Writes a String as an HBase RPC parameter. @param buf The buffer to serialize the string to. @param s The string to serialize.
(final ChannelBuffer buf, final String s)
| 974 | * @param s The string to serialize. |
| 975 | */ |
| 976 | static void writeHBaseString(final ChannelBuffer buf, final String s) { |
| 977 | buf.writeByte(10); // Code for String.class in HbaseObjectWritable |
| 978 | final byte[] b = s.getBytes(CharsetUtil.UTF_8); |
| 979 | writeVLong(buf, b.length); |
| 980 | buf.writeBytes(b); |
| 981 | } |
| 982 | |
| 983 | /** |
| 984 | * Writes a byte array as an HBase RPC parameter. |