public static byte[] numToBytes(long value) { return numToBytes(value, false); }
@Override public void write(ByteBuf os) throws IOException { os.writeByte(MARKER); os.writeBytes(numToBytes(integer, true)); }
@Override public void write(ByteBuf os) throws IOException { os.writeByte(MARKER); os.writeBytes(numToBytes(capacity, true)); if (capacity > 0) { os.writeBytes(bytes); os.writeBytes(CRLF); } }
private static void writeArgument(ByteBuf os, ByteBuf argument) throws IOException { os.writeBytes(BYTES_PREFIX); os.writeBytes(numToBytes(argument.readableBytes(), true)); os.writeBytes(argument); os.writeBytes(CRLF); }
private static void writeArgument(OutputStream os, byte[] argument) throws IOException { os.write(BYTES_PREFIX); os.write(numToBytes(argument.length, true)); os.write(argument); os.write(CRLF); }
private static void writeArgument(ByteBuf os, byte[] argument) throws IOException { os.writeBytes(BYTES_PREFIX); os.writeBytes(numToBytes(argument.length, true)); os.writeBytes(argument); os.writeBytes(CRLF); }
private static void writeArgument(ByteBuf os, byte[] argument) throws IOException { os.writeBytes(BYTES_PREFIX); os.writeBytes(numToBytes(argument.length, true)); os.writeBytes(argument); os.writeBytes(CRLF); }
@Override public void write(ByteBuf os) throws IOException { os.writeByte(MARKER); os.writeBytes(numToBytes(capacity, true)); if (capacity > 0) { os.writeBytes(data()); os.writeBytes(CRLF); } }
@Override public void write(ByteBuf os) throws IOException { os.writeByte(MARKER); os.writeBytes(numToBytes(data().longValue(), true)); }
@Override public void write(ByteBuf os) throws IOException { os.writeByte(MARKER); if (replies == null) { os.writeBytes(NEG_ONE_WITH_CRLF); } else { os.writeBytes(numToBytes(replies.length, true)); for (Reply reply : replies) { reply.write(os); } } }
@Override public void write(ChannelBuffer os) throws IOException { os.writeByte(MARKER); os.writeBytes(numToBytes(integer, true)); }
@Override public void write(ByteBuf os) throws IOException { os.writeByte(MARKER); if (data() == null) { os.writeBytes(NEG_ONE_WITH_CRLF); } else { os.writeBytes(numToBytes(data().length, true)); for (Reply reply : data()) { reply.write(os); } } }
private static void writeArgument(ChannelBuffer os, byte[] argument) throws IOException { os.writeBytes(BYTES_PREFIX); os.writeBytes(numToBytes(argument.length, true)); os.writeBytes(argument); os.writeBytes(CRLF); }
@Override public void write(ChannelBuffer os) throws IOException { os.writeByte(MARKER); if (replies == null) { os.writeBytes(NEG_ONE_WITH_CRLF); } else { os.writeBytes(numToBytes(replies.length, true)); for (Reply reply : replies) { reply.write(os); } } }
private static void writeArgument(ChannelBuffer os, byte[] argument) throws IOException { os.writeBytes(BYTES_PREFIX); os.writeBytes(numToBytes(argument.length, true)); os.writeBytes(argument); os.writeBytes(CRLF); }
@Override public void write(ChannelBuffer os) throws IOException { os.writeByte(MARKER); if (replies == null) { os.writeBytes(NEG_ONE_WITH_CRLF); } else { os.writeBytes(numToBytes(replies.length, true)); for (Reply reply : replies) { reply.write(os); } } }
private static void writeArgument(ChannelBuffer os, ChannelBuffer argument) throws IOException { os.writeBytes(BYTES_PREFIX); os.writeBytes(numToBytes(argument.readableBytes(), true)); os.writeBytes(argument); os.writeBytes(CRLF); }
@Override public void write(ChannelBuffer os) throws IOException { os.writeByte(MARKER); os.writeBytes(numToBytes(bytes.capacity(), true)); os.writeBytes(bytes); os.writeBytes(CRLF); }
@Override public void write(ChannelBuffer os) throws IOException { os.writeByte(MARKER); os.writeBytes(numToBytes(bytes.capacity(), true)); os.writeBytes(bytes); os.writeBytes(CRLF); }
@Override public void write(ChannelBuffer os) throws IOException { os.writeByte(MARKER); os.writeBytes(numToBytes(bytes.capacity(), true)); os.writeBytes(bytes); os.writeBytes(CRLF); }