@Override public int readUnsignedByte() { return (short) (readByte() & 0xFF); }
@Override public boolean readBoolean() { return readByte() != 0; }
@Override public SimpleString readNullableSimpleString() { int b = readByte(); if (b == DataConstants.NULL) { return null; } else { return readSimpleString(); } }
@Override public String readNullableString() { int b = readByte(); if (b == DataConstants.NULL) { return null; } else { return readString(); } }
@Override public boolean readBoolean() { return readByte() != 0; }
@Override public int readUnsignedByte() { return (short) (readByte() & 0xFF); }
@Override public boolean readBoolean() { return readByte() != 0; }
@Override public int readUnsignedByte() { return (short) (readByte() & 0xFF); }
@Override public int readUnsignedByte() { return (short) (readByte() & 0xFF); }
@Override public int readUnsignedByte() { return (short) (readByte() & 0xFF); }
@Override public boolean readBoolean() { return readByte() != 0; }
@Override public String readNullableString() { int b = readByte(); if (b == DataConstants.NULL) { return null; } else { return readString(); } }
@Override public SimpleString readNullableSimpleString() { int b = readByte(); if (b == DataConstants.NULL) { return null; } else { return readSimpleString(); } }
@Override public SimpleString readNullableSimpleString() { int b = readByte(); if (b == DataConstants.NULL) { return null; } else { return readSimpleString(); } }
@Override public String readNullableString() { int b = readByte(); if (b == DataConstants.NULL) { return null; } else { return readString(); } }
@Override public String readNullableString() { int b = readByte(); if (b == DataConstants.NULL) { return null; } else { return readString(); } }
@Override public SimpleString readNullableSimpleString() { int b = readByte(); if (b == DataConstants.NULL) { return null; } else { return readSimpleString(); } }
@Override public SimpleString readNullableSimpleString() { int b = readByte(); if (b == DataConstants.NULL) { return null; } else { return readSimpleString(); } }
@Test public void testReadLongs() throws Exception { LargeMessageControllerImpl buffer = createBufferWithLongs(3, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15); for (int i = 1; i <= 15; i++) { Assert.assertEquals(i, buffer.readLong()); } try { buffer.readByte(); Assert.fail("supposed to throw an exception"); } catch (IndexOutOfBoundsException e) { } }
@Test public void testReadIntegers() throws Exception { LargeMessageControllerImpl buffer = createBufferWithIntegers(3, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15); for (int i = 1; i <= 15; i++) { Assert.assertEquals(i, buffer.readInt()); } try { buffer.readByte(); Assert.fail("supposed to throw an exception"); } catch (IndexOutOfBoundsException e) { } }