Incorrect use of rewind.  For a ByteBuffer with position other than 0 rewind will set the position to 0 thereby making the next read not idempotent.  Here's some code to illustrate this behavior 

```java
	    try {
    	    ByteBuffer bb = ByteBuffer.allocate(100);
    	    bb.putLong(1L);
    	    bb.putLong(2L);
    	    
            ByteBuffer bb2 = ByteBuffer.wrap(bb.array(), 8, 8);
    	    
            LongSerializer ser = LongSerializer.get();
            Assert.assertTrue(2 == ser.fromByteBuffer(bb2));
            bb2.rewind();
            Assert.assertTrue(2 == ser.fromByteBuffer(bb2));
	    }
	    catch (Exception e) {
	        e.printStackTrace();
	    }
```