Package java.nio

Examples of java.nio.IntBuffer.flip()


                        this.finish();
                    }
                };
                BindManager.manager.addDelegate(delegate);
                countDownLatch.await();
                buffer.flip();
                return Integer.toString(buffer.get());
            }else if(arguments[0].equalsIgnoreCase("simulate")){
                final ArrayList<Integer> codes = new ArrayList<Integer>();
                final JFrame catcher = new JFrame("Got: 0");
                final JButton closer = new JButton("Done");
View Full Code Here


            return null;
        }
        IntBuffer buff = createIntBuffer(data.length);
        buff.clear();
        buff.put(data);
        buff.flip();
        return buff;
    }

    /**
     * Create a new int[] array and populate it with the given IntBuffer's
View Full Code Here

            return null;
        }
        final IntBuffer buff = createIntBuffer(data.length);
        buff.clear();
        buff.put(data);
        buff.flip();
        return buff;
    }

    /**
     * Create a new int[] array and populate it with the given IntBuffer's contents.
View Full Code Here

            buff = reuseStore;
            buff.clear();
        }
        buff.clear();
        buff.put(data);
        buff.flip();
        return buff;
    }

    /**
     * Copies floats from one buffer to another.
View Full Code Here

            if (size > 0) {
                final String[] strings = tmpEl.getAttribute("data").split("\\s+");
                for (final String s : strings) {
                    tmp.put(Integer.parseInt(s));
                }
                tmp.flip();
            }
            ret = tmp;
        } catch (final Exception e) {
            final IOException ex = new IOException();
            ex.initCause(e);
View Full Code Here

    public IntBuffer asIntBuffer() {
        final IntBuffer source = getBuffer().duplicate();
        source.rewind();
        final IntBuffer buff = BufferUtils.createIntBufferOnHeap(source.limit());
        buff.put(source);
        buff.flip();
        return buff;
    }

    @Override
    public IntBufferData makeCopy() {
View Full Code Here

        source.rewind();
        final IntBuffer buff = BufferUtils.createIntBufferOnHeap(source.limit());
        for (int i = 0, max = source.limit(); i < max; i++) {
            buff.put(source.get() & 0xFF);
        }
        buff.flip();
        return buff;
    }

    @Override
    public ByteBufferData makeCopy() {
View Full Code Here

        source.rewind();
        final IntBuffer buff = BufferUtils.createIntBufferOnHeap(source.limit());
        for (int i = 0, max = source.limit(); i < max; i++) {
            buff.put(source.get() & 0xFFFF);
        }
        buff.flip();
        return buff;
    }

    @Override
    public ShortBufferData makeCopy() {
View Full Code Here

   * @see org.newdawn.slick.opengl.Texture#release()
   */
    public void release() {
        IntBuffer texBuf = createIntBuffer(1);
        texBuf.put(textureID);
        texBuf.flip();
       
      GL.glDeleteTextures(texBuf);
     
        if (lastBind == this) {
          bindNone();
View Full Code Here

 
  public static IntBuffer CreateFlippedBuffer(int... values)
  {
    IntBuffer buffer = CreateIntBuffer(values.length);
    buffer.put(values);
    buffer.flip();
   
    return buffer;
  }
 
  public static FloatBuffer CreateFlippedBuffer(Vertex[] vertices)
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.