Package java.nio

Examples of java.nio.IntBuffer.limit()


        }
    }

    private static int[] getGlyphs ( GlyphSequence gs ) {
        IntBuffer gb = gs.getGlyphs();
        int[] ga = new int [ gb.limit() ];
        gb.rewind();
        gb.get ( ga );
        return ga;
    }
View Full Code Here


        return data;
    }

    private static int[] getGlyphs ( GlyphSequence gs ) {
        IntBuffer gb = gs.getGlyphs();
        int[] ga = new int [ gb.limit() ];
        gb.rewind();
        gb.get ( ga );
        return ga;
    }
View Full Code Here

        int ta = 0;
        for ( int i = 0, n = sa.length; i < n; i++ ) {
            GlyphSequence s = sa [ i ];
            IntBuffer ga = s.getGlyphs();
            assert ga != null;
            int ng = ga.limit();
            List al = s.getAssociations();
            assert al != null;
            int na = al.size();
            assert na == ng;
            tg += ng;
View Full Code Here

            al.add ( igs.getAssociation ( i ) );
        }
        gb.flip();
        if ( igs.compareGlyphs ( gb ) != 0 ) {
            this.igs = new GlyphSequence ( igs.getCharacters(), gb, al );
            this.indexLast = gb.limit();
            return true;
        } else {
            return false;
        }
    }
View Full Code Here

    }

    final IntBuffer retVal = IntBuffer.wrap(array);

    if (index + 1 == baseListCount()) {
      retVal.limit(maxIndex - (index * allocateSize));
    }

    return retVal.asReadOnlyBuffer();
  }

View Full Code Here

      while (width % 2 == 0 && height % 2 == 0) {
        int s2 = 0;

        while (true) {
          if (s2 >= scaledBuffer.limit()) {
            break label33;
          }

          if (scaledBuffer.get(s2) >>> 24 == 0) {
            IntBuffer newBuffer = getPooledBuffer(width * height).asIntBuffer();
 
View Full Code Here

                        lodData[i][bufferPos[i]] = (buffer.get()& 0xffff) + indexPos[i];
                        bufferPos[i]++;
                    }
                }else{
                    IntBuffer buffer = (IntBuffer) g.getMesh().getLodLevel(i).getDataReadOnly();
                    for (int j = 0; j < buffer.limit(); j++) {
                        lodData[i][bufferPos[i]] = buffer.get() + indexPos[i];
                        bufferPos[i]++;
                    }
                }
                indexPos[i] += numOfVertices;
View Full Code Here

     */
    public IntBuffer majorVersionBuffer() {
        int[] holder = new int[1];
        holder[0] = getMajorVersion();
        IntBuffer ib = IntBuffer.wrap(holder);
        ib.limit(1);
        return ib;
      }

    /**
     * Return an IntBuffer that accesses the minor version number.
View Full Code Here

     */
    public IntBuffer minorVersionBuffer() {
        int[] holder = new int[1];
        holder[0] = getMinorVersion();
        IntBuffer ib = IntBuffer.wrap(holder);
        ib.limit(1);
        return ib;
    }

    /**
     * Get the magic number from the given byteBuffer.
View Full Code Here

    @Override
    public MutableIntArray length(int length) {
        int offset = elements.position();
        subArrayCheck(offset, length);
        IntBuffer copy = elements.duplicate();
        copy.limit(offset + length);
        return new SubBoundedIntBufferArrayImpl(this, copy);
    }

    /**
     * Convenience method, combining {@code offset(int)} and {@code length(int)}.
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.