Examples of rewind()


Examples of ch.usi.dslab.bezerra.netwrapper.Message.rewind()

      buffer.position(buffer.position() + 4);
     
      Input in = new Input(new ByteBufferInputStream(buffer));
      Message msg = (Message) kryo.readClassAndObject(in);
      in.close();
      msg.rewind();
      return msg;
   }

   @Override
   public Object deepDuplicate(Object o) {
View Full Code Here

Examples of com.ardor3d.scenegraph.IntBufferData.rewind()

            }
            final IndexBufferData<?> newIndices = BufferUtils.createIndexBufferData(indexCount, md.getVertexCount());
            for (final PrimitiveGroup group : strips) {
                final IntBufferData data = new IntBufferData(group.getIndices().length);
                data.getBuffer().put(group.getIndices());
                data.rewind();
                newIndices.put(data);
            }
            newIndices.rewind();

            // ask mesh to apply new index data
View Full Code Here

Examples of com.esotericsoftware.kryo.io.Input.rewind()

    for (int i = 0; i < 127; i++)
      assertEquals(String.valueOf((char)i), read.readString());
    for (int i = 0; i < 127; i++)
      assertEquals(String.valueOf((char)i) + "abc", read.readString());

    read.rewind();
    assertEquals("", read.readStringBuilder().toString());
    assertEquals("1", read.readStringBuilder().toString());
    assertEquals("22", read.readStringBuilder().toString());
    assertEquals("uno", read.readStringBuilder().toString());
    assertEquals("dos", read.readStringBuilder().toString());
View Full Code Here

Examples of com.esotericsoftware.kryo.io.UnsafeInput.rewind()

    for (int i = 0; i < 127; i++)
      assertEquals(String.valueOf((char)i), read.readString());
    for (int i = 0; i < 127; i++)
      assertEquals(String.valueOf((char)i) + "abc", read.readString());

    read.rewind();
    assertEquals("", read.readStringBuilder().toString());
    assertEquals("1", read.readStringBuilder().toString());
    assertEquals("22", read.readStringBuilder().toString());
    assertEquals("uno", read.readStringBuilder().toString());
    assertEquals("dos", read.readStringBuilder().toString());
View Full Code Here

Examples of com.esotericsoftware.kryo.io.UnsafeMemoryInput.rewind()

    for (int i = 0; i < 127; i++)
      assertEquals(String.valueOf((char)i), read.readString());
    for (int i = 0; i < 127; i++)
      assertEquals(String.valueOf((char)i) + "abc", read.readString());

    read.rewind();
    assertEquals("", read.readStringBuilder().toString());
    assertEquals("1", read.readStringBuilder().toString());
    assertEquals("22", read.readStringBuilder().toString());
    assertEquals("uno", read.readStringBuilder().toString());
    assertEquals("dos", read.readStringBuilder().toString());
View Full Code Here

Examples of com.jogamp.common.nio.NativeSizeBuffer.rewind()

            codeBuffers.referenceBuffer(i, bf.newDirectByteBuffer(bytes));
            i++;
        }
        devices.rewind();
        lengths.rewind();

        IntBuffer errBuffer = bf.newDirectIntBuffer(1);
//        IntBuffer status = newDirectByteBuffer(binaries.size()*4).asIntBuffer();
        CLProgramBinding binding = context.getPlatform().getProgramBinding();
        long id = binding.clCreateProgramWithBinary(context.ID, devices.capacity(), devices, lengths, codeBuffers, /*status*/null, errBuffer);
View Full Code Here

Examples of com.sun.sgs.impl.sharedutil.MessageBuffer.rewind()

  int capacity = 10;
  MessageBuffer buf1 = new MessageBuffer(capacity);
  for (byte b = 0; b < capacity; b++) {
      buf1.putByte(b);
  }
  buf1.rewind();
  for (byte b = 0; b < capacity; b++) {
      byte b2 = buf1.getByte();
      if (b != b2) {
    fail("Mismatched bytes; b:"+ b + ", b2:" + b2);
      }
View Full Code Here

Examples of java.nio.Buffer.rewind()

    buf = factory.newInstance();
    buf.position(5);
    buf.mark();
    buf.position(6);
    buf.limit(9);
    h.check(buf.rewind(), buf, "rewind: buf.rewind()");
    checkStatus(h, buf, "rewind", 10, 9, true, 9, 0);
    try
      {
        buf.reset();
        h.check(false, "rewind: mark not invalidated");
View Full Code Here

Examples of java.nio.ByteBuffer.rewind()

                        }
                        catch(Throwable t) {
                        }
                        body=tmp;
                    }
                    buf.rewind();
                }

                if(terminate)
                    break;
View Full Code Here

Examples of java.nio.ByteBuffer.rewind()

                LOG.error(e);
                throw e;
            }
            tmpBuf.flip();
            final int length = tmpBuf.getInt();
            tmpBuf.rewind();
            IoBuffer ioBuf = IoBuffer.wrap(tmpBuf);
            out.write(ioBuf);
            // attempt zero-copy sendfile
            long position = offset + 4;
            long count = length;
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.