/** * from {@link java.io.DataInput} interface */ @Override public void readFully(byte[] b, int off, int len) throws IOException { readBytes(b, off, len); }
/** * from {@link java.io.DataInput} interface */ @Override public void readFully(byte[] b) throws IOException { readBytes(b); }
@Override public void readBytes(final byte[] dst) { readBytes(dst, 0, dst.length); }
@Override public void readBytes(final ActiveMQBuffer dst) { readBytes(dst, dst.writableBytes()); }
@Override public SimpleString readSimpleString() { int len = readInt(); byte[] data = new byte[len]; readBytes(data); return new SimpleString(data); }
@Override public void readBytes(final ActiveMQBuffer dst, final int length) { if (length > dst.writableBytes()) { throw new IndexOutOfBoundsException(); } readBytes(dst, dst.writerIndex(), length); dst.writerIndex(dst.writerIndex() + length); }
/** * from {@link java.io.DataInput} interface */ @Override public void readFully(byte[] b) throws IOException { readBytes(b); }
/** * from {@link java.io.DataInput} interface */ @Override public void readFully(byte[] b) throws IOException { readBytes(b); }
/** * from {@link java.io.DataInput} interface */ @Override public void readFully(byte[] b, int off, int len) throws IOException { readBytes(b, off, len); }
/** * from {@link java.io.DataInput} interface */ @Override public void readFully(byte[] b, int off, int len) throws IOException { readBytes(b, off, len); }
/** * from {@link java.io.DataInput} interface */ @Override public void readFully(byte[] b) throws IOException { readBytes(b); }
/** * from {@link java.io.DataInput} interface */ @Override public void readFully(byte[] b, int off, int len) throws IOException { readBytes(b, off, len); }
/** * from {@link java.io.DataInput} interface */ @Override public void readFully(byte[] b) throws IOException { readBytes(b); }
@Override public SimpleString readSimpleString() { int len = readInt(); byte[] data = new byte[len]; readBytes(data); return new SimpleString(data); }
@Override public SimpleString readSimpleString() { int len = readInt(); byte[] data = new byte[len]; readBytes(data); return new SimpleString(data); }
@Override public SimpleString readSimpleString() { int len = readInt(); byte[] data = new byte[len]; readBytes(data); return new SimpleString(data); }
@Override public void readBytes(final ActiveMQBuffer dst, final int length) { if (length > dst.writableBytes()) { throw new IndexOutOfBoundsException(); } readBytes(dst, dst.writerIndex(), length); dst.writerIndex(dst.writerIndex() + length); }
@Override public void readBytes(final ActiveMQBuffer dst, final int length) { if (length > dst.writableBytes()) { throw new IndexOutOfBoundsException(); } readBytes(dst, dst.writerIndex(), length); dst.writerIndex(dst.writerIndex() + length); }
@Override public void readBytes(final ActiveMQBuffer dst, final int length) { if (length > dst.writableBytes()) { throw new IndexOutOfBoundsException(); } readBytes(dst, dst.writerIndex(), length); dst.writerIndex(dst.writerIndex() + length); }
@Test public void testInterruptData() throws Exception { LargeMessageControllerImpl readBuffer = splitBuffer(3, new byte[]{0, 1, 2, 3, 4}); byte[] bytes = new byte[30]; readBuffer.readBytes(bytes, 0, 5); for (byte i = 0; i < 5; i++) { Assert.assertEquals(i, bytes[i]); } }