public static int bytesReadUnsignedShort(ActiveMQBuffer message) { return message.readUnsignedShort(); }
public static String readUTF(final ActiveMQBuffer input) { StringUtilBuffer buffer = UTF8Util.getThreadLocalBuffer(); final int size = input.readUnsignedShort();
public static int bytesReadUnsignedShort(ActiveMQBuffer message) { return message.readUnsignedShort(); }
public static int bytesReadUnsignedShort(ActiveMQBuffer message) { return message.readUnsignedShort(); }
public static int bytesReadUnsignedShort(ActiveMQBuffer message) { return message.readUnsignedShort(); }
public static int bytesReadUnsignedShort(ActiveMQBuffer message) { return message.readUnsignedShort(); }
public static int bytesReadUnsignedShort(ActiveMQBuffer message) { return message.readUnsignedShort(); }
public static int bytesReadUnsignedShort(ActiveMQBuffer message) { return message.readUnsignedShort(); }
private void testValidateUTFWithChars(final int size, final char c) { final char[] chars = new char[size]; Arrays.fill(chars, c); final String expectedUtf8String = new String(chars); final ActiveMQBuffer buffer = ActiveMQBuffers.fixedBuffer(4 * chars.length); UTF8Util.saveUTF(buffer.byteBuf(), expectedUtf8String); final byte[] expectedBytes = expectedUtf8String.getBytes(StandardCharsets.UTF_8); final int encodedSize = buffer.readUnsignedShort(); final byte[] realEncodedBytes = new byte[encodedSize]; buffer.getBytes(buffer.readerIndex(), realEncodedBytes); Assert.assertArrayEquals(expectedBytes, realEncodedBytes); }
@Test public void testUnsignedShort() throws Exception { short s1 = Short.MAX_VALUE; wrapper.writeShort(s1); int s2 = wrapper.readUnsignedShort(); Assert.assertEquals(s1, s2); s1 = Short.MIN_VALUE; wrapper.writeShort(s1); s2 = wrapper.readUnsignedShort(); Assert.assertEquals(s1 * -1, s2); s1 = -1; wrapper.writeShort(s1); s2 = wrapper.readUnsignedShort(); // / The max of an unsigned short // (http://en.wikipedia.org/wiki/Unsigned_short) Assert.assertEquals(s2, 65535); }
public static String readUTF(final ActiveMQBuffer input) { StringUtilBuffer buffer = UTF8Util.getThreadLocalBuffer(); final int size = input.readUnsignedShort();
public static String readUTF(final ActiveMQBuffer input) { StringUtilBuffer buffer = UTF8Util.getThreadLocalBuffer(); final int size = input.readUnsignedShort();
public static String readUTF(final ActiveMQBuffer input) { StringUtilBuffer buffer = UTF8Util.getThreadLocalBuffer(); final int size = input.readUnsignedShort();
public static String readUTF(final ActiveMQBuffer input) { StringUtilBuffer buffer = UTF8Util.getThreadLocalBuffer(); final int size = input.readUnsignedShort();
public static String readUTF(final ActiveMQBuffer input) { StringUtilBuffer buffer = UTF8Util.getThreadLocalBuffer(); final int size = input.readUnsignedShort();
public static String readUTF(final ActiveMQBuffer input) { StringUtilBuffer buffer = UTF8Util.getThreadLocalBuffer(); final int size = input.readUnsignedShort();