遍历Text字符
来源:互联网 发布:锁扣地板 知乎 编辑:程序博客网 时间:2024/05/01 02:23
package ncdc;
import java.nio.ByteBuffer;
import org.apache.hadoop.io.Text;
public class TestIterator {
public static void main(String[] args){
Text t = new Text("\u0041\u00DF\u6771\uD801\uDC00");
ByteBuffer buf = ByteBuffer.wrap(t.getBytes(),0,t.getLength());
int cp;
while(buf.hasRemaining() && (cp = Text.bytesToCodePoint(buf))!=-1){
System.out.println(Integer.toHexString(cp));
}
}
}
import java.nio.ByteBuffer;
import org.apache.hadoop.io.Text;
public class TestIterator {
public static void main(String[] args){
Text t = new Text("\u0041\u00DF\u6771\uD801\uDC00");
ByteBuffer buf = ByteBuffer.wrap(t.getBytes(),0,t.getLength());
int cp;
while(buf.hasRemaining() && (cp = Text.bytesToCodePoint(buf))!=-1){
System.out.println(Integer.toHexString(cp));
}
}
}
0 0
- 遍历Text字符
- Text截取字符
- Javascript 遍历页面text控件
- 遍历gbk字符
- 指针遍历字符
- <class 'suds.sax.text.Text'> 类型转换字符类型
- 宽字符版文件夹遍历
- 遍历字符串应该取出字符
- 目录遍历以及特殊字符
- 二叉树字符型遍历
- 遍历字符串中的每个字符
- java-相同字符的遍历
- SQL text类型字段字符替换
- 字符缩进 text-indent:0.5em;
- adb shell input text 输入特殊字符 &
- 字符转换属性text-tranform改变大小写
- adb shell input text 输入特殊字符 &
- [codeforces] B. Text Document Analysis 字符分析
- VM10 安装 mac os 10.9
- 【新学期】:大三下的开始
- lua 快速排序
- 集成了Laravel的Eloquent ORM的Yaf框架
- 欢迎使用CSDN-markdown编辑器
- 遍历Text字符
- ContentProvider 报线程错误
- [BZOJ2298] [HAOI2011]problem a
- HDU 4811 Ball(贪心)
- 通过汇编分析c程序函数调用的原理
- 【JAVA】23、方法的递归调用
- 纯化水系统安装与使用注意点
- 构建微服务-第一章-什么是微服务_006关于SOA
- LayoutInflater简单理解