摘要: /* * StringBuffer中append()不用创建对象可以连接字符串,想知道是如何完成的。*/public AbstractStringBuilder append(String str) { if (str == null) return appendNull(); int len = str.length(); ... 阅读全文
posted @ 2017-11-23 18:09 艾缇小王子 阅读(3776) 评论(0) 推荐(0) 编辑
摘要: //思想即为在一个大数组中查找一个小数组public static int indexOf(byte[] source, byte[] target) { //先把字符串转化为byte[] source,把要查找的字符串转化为byte[]target int sourceCount = source.length; int targetCount = target.len... 阅读全文
posted @ 2017-11-23 17:01 艾缇小王子 阅读(335) 评论(0) 推荐(0) 编辑