Examples of rewind()


Examples of java.nio.IntBuffer.rewind()

      attribs.put(implementation.getProfileMaskAttrib()).put(profileMask);
    if ( loseContextOnReset )
      attribs.put(CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB).put(LOSE_CONTEXT_ON_RESET_ARB);

    attribs.put(0);
    attribs.rewind();
    return attribs;
  }

  public String toString() {
    StringBuilder sb = new StringBuilder(32);
View Full Code Here

Examples of java.nio.LongBuffer.rewind()

        array.setAll(LongArray.unsafeValueOf());
        assertArrayEquals(new long[]{}, array.toArray());
        assertEquals(0, array.length());
        assertEquals(offset, array.offset());
        LongBuffer buffer = array.buffer();
        buffer.rewind().limit(buffer.capacity());
        while (buffer.hasRemaining()) {
            assertEquals(0, buffer.get());
        }
    }
View Full Code Here

Examples of java.nio.MappedByteBuffer.rewind()

                //System.out.println("input = " + input);
                if(input == 0) {
                    // write
                    byte[] buf=new byte[SIZE];
                    shared_buffer.put(buf, 0, buf.length);
                    shared_buffer.rewind();
                    shared_buffer.put((byte)1).rewind();
                    count++;
                    if(count % PRINT == 0)
                        System.out.println("wrote " + count);
                }
View Full Code Here

Examples of java.nio.ShortBuffer.rewind()

            } else if (ind >= vertCount) {
                ind -= vertCount;
                sib.put(i, (short) ind);
            }
        }
        sib.rewind();

        setBuffer(Type.Position, 3, fpb);
        setBuffer(Type.Normal,   3, fnb);
        setBuffer(Type.TexCoord, 2, ftb);
        setBuffer(Type.Index,    3, sib);
View Full Code Here

Examples of net.sf.jiga.xtended.impl.Animation.rewind()

            public void actionPerformed(ActionEvent e) {
                SortedMap<Integer, Animation> animations = character.accessSynchCache();
                Animation anim = animations.get(modelPanel.currentRecordKey.get(ModelAnimBrowser.CURRENTRECORDKEY));
                if (anim instanceof Animation) {
                    anim.stop();
                    anim.rewind();
                    JComponent comp = modelPanel.currentRecord.get(ModelAnimBrowser.CURRENTRECORD);
                    if (comp instanceof JComponent) {
                        comp.repaint();
                    }
                    if (animator instanceof javax.swing.Timer) {
View Full Code Here

Examples of org.activeio.Packet.rewind()

    public void testRewind() {
        Packet packet = createTestPacket(100);
        packet.position(5);
        packet.limit(95);
        packet.rewind();
       
        assertEquals(0, packet.position());
        assertEquals(95, packet.limit());
    }
   
View Full Code Here

Examples of org.apache.abdera.i18n.text.io.RewindableInputStream.rewind()

        ByteArrayInputStream in = new ByteArrayInputStream(new byte[] {0x01, 0x02, 0x03, 0x04});
        RewindableInputStream ris = new RewindableInputStream(in);
        byte[] buf1 = new byte[4];
        byte[] buf2 = new byte[4];
        ris.read(buf1);
        ris.rewind();
        ris.read(buf2);
        for (int n = 0; n < 4; n++)
            assertEquals(buf2[n], buf1[n]);
    }
View Full Code Here

Examples of org.apache.cxf.ws.rm.RewindableInputStream.rewind()

                }
            }
           
            // read SOAP headers from saved input stream
            RewindableInputStream is = (RewindableInputStream)message.get(RMMessageConstants.SAVED_CONTENT);
            is.rewind();
            XMLStreamReader reader = StaxUtils.createXMLStreamReader(is, "UTF-8");
            message.getHeaders().clear();
            if (reader.getEventType() != XMLStreamConstants.START_ELEMENT
                && reader.nextTag() != XMLStreamConstants.START_ELEMENT) {
                throw new IllegalStateException("No document found");
View Full Code Here

Examples of org.apache.mina.common.ByteBuffer.rewind()

        }
        else
        {
            ByteBuffer data = buffer.slice();
            data.limit(length);
            data.rewind();
            buffer.skip(length);

            return new AMQShortString(data);
        }
    }
View Full Code Here

Examples of org.apache.mina.common.IoBuffer.rewind()

        @Override
        public void messageSent(IoSession session, Object message)
                throws Exception {
            IoBuffer buffer = (IoBuffer) message;
            buffer.rewind();
            byte[] data = new byte[buffer.remaining()];
            buffer.get(data);
            StringBuffer sb = (StringBuffer) session.getAttribute("sent");
            sb.append(new String(data, "ASCII"));
        }
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.