下面列出了org.apache.hadoop.io.UTF8#set ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
@SuppressWarnings("deprecation")
static void writeString(String str, DataOutputStream out) throws IOException {
UTF8 ustr = TL_DATA.get().U_STR;
ustr.set(str, true);
ustr.write(out);
}
/** write the long value */
static void writeLongAsString(long value, DataOutputStream out) throws IOException {
UTF8 ustr = TL_DATA.get().U_STR;
ustr.set(toLogLong(value), true);
ustr.write(out);
}
/** write the long value */
static void writeShortAsString(short value, DataOutputStream out) throws IOException {
UTF8 ustr = TL_DATA.get().U_STR;
ustr.set(toLogShort(value), true);
ustr.write(out);
}