@Test public void testScaleOut() throws Exception { ByteArrayOutputStreamPayload payload = new ByteArrayOutputStreamPayload(); String randomStr = randomString(); ByteBuf byteBuf = directByteBuf(randomStr.length()); randomStr += randomString(2<<11); byteBuf.writeBytes(randomStr.getBytes()); payload.startInput(); payload.in(byteBuf); payload.endInput(); }
public byte[] getBytes(){ int currentPos = pos.get(); byte []dst = new byte[currentPos]; System.arraycopy(data, 0, dst, 0, currentPos); return dst; }
ByteArrayOutputStreamPayload extends AbstractInOutPayload { public byte[] getBytes(){ int currentPos = pos.get(); byte []dst = new byte[currentPos]; System.arraycopy(data, 0, dst, 0, currentPos); return dst; } }
ByteArrayOutputStreamPayload extends AbstractInOutPayload { public byte[] getBytes(){ int currentPos = pos.get(); byte []dst = new byte[currentPos]; System.arraycopy(data, 0, dst, 0, currentPos); return dst; } ByteArrayOutputStreamPayload();  ByteArrayOutputStreamPayload(int INIT_SIZE);  ByteArrayOutputStreamPayload(String message); }
ByteArrayOutputStreamPayload extends AbstractInOutPayload { public byte[] getBytes(){ int currentPos = pos.get(); byte []dst = new byte[currentPos]; System.arraycopy(data, 0, dst, 0, currentPos); return dst; } ByteArrayOutputStreamPayload();  ByteArrayOutputStreamPayload(int INIT_SIZE);  ByteArrayOutputStreamPayload(String message); @Override void doStartInput(); @Override int doIn(ByteBuf byteBuf); @Override long doOut(WritableByteChannel writableByteChannel); byte[] getBytes(); @Override String toString(); }
ByteArrayOutputStreamPayload extends AbstractInOutPayload { public byte[] getBytes(){ int currentPos = pos.get(); byte []dst = new byte[currentPos]; System.arraycopy(data, 0, dst, 0, currentPos); return dst; } ByteArrayOutputStreamPayload();  ByteArrayOutputStreamPayload(int INIT_SIZE);  ByteArrayOutputStreamPayload(String message); @Override void doStartInput(); @Override int doIn(ByteBuf byteBuf); @Override long doOut(WritableByteChannel writableByteChannel); byte[] getBytes(); @Override String toString();  }