Skip to content

Commit 6021f23

Browse files
committed
Fixed BufferUnderflowException.
1 parent 360bc1a commit 6021f23

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/de/javasocketapi/core/ReadingByteBuffer.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
package de.javasocketapi.core;
22

3+
import org.boon.primitive.ByteBuf;
4+
35
import java.nio.ByteBuffer;
4-
import java.util.Arrays;
56
import java.util.UUID;
67

78
public class ReadingByteBuffer {
89
private ByteBuffer byteBuffer;
910

1011
ReadingByteBuffer(final byte... bytes) {
1112
this.byteBuffer = ByteBuffer.wrap(bytes);
13+
this.byteBuffer = this.byteBuffer.flip();
1214
}
1315

1416
public boolean readBoolean() {

0 commit comments

Comments
 (0)