MCPcopy Create free account
hub / github.com/OpenTSDB/asynchbase / writeHBaseString

Method writeHBaseString

src/HBaseRpc.java:976–981  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.

Callers 1

serializeMethod · 0.80

Calls 1

writeVLongMethod · 0.95

Tested by

no test coverage detected