换行诗的反向读写
2018-06-08 23:47:36 1 举报
如何使用字节字符桥将一首五言绝句按行反写?
作者其他创作
大纲/内容
22836
字符串转为数字太长?还是5个一组?那样的话字的顺序都乱了.?那该怎样做呢?
package 换行诗;import java.io.FileInputStream;import java.io.FileOutputStream;import java.io.IOException;import java.io.InputStream;import java.io.InputStreamReader;import java.io.OutputStream;import java.io.OutputStreamWriter;import java.util.ArrayList;public class Test9 implements Runnable { public static void main(String[] args) { Runnable r1 = new Test9(); Thread t1 = new Thread(r1);// t1线程 Test9 test = new Test9();// t1.start(); InputStream is = null; OutputStream os = null; OutputStreamWriter osw = null; InputStreamReader isr = null; try { is = new FileInputStream(\"test1.txt\"); os = new FileOutputStream(\"test2.txt\
20809
疑是地上霜
0
ArrayList myStr = new ArrayList();
低头思故乡
放入集合的下标不重要关键要按组来
床前明月光
最先写write
26126
14
dataInt
24202
20030
19
26376
10
缺少回车换行1310
26159
一共20个下标
20302
2420221069261262637620809131030097261592232019978386841310200302283626395261262637613102030222836246052592520065
添加回车换行1310
22320
存放起来是重复的
package 换行诗;import java.io.BufferedReader;import java.io.FileInputStream;import java.io.FileOutputStream;import java.io.InputStream;import java.io.InputStreamReader;import java.io.OutputStream;import java.io.OutputStreamWriter;import java.nio.CharBuffer;import java.util.ArrayList;import javax.sound.midi.Soundbank;public class Test9 {\tpublic static void main(String[] args) {\t\tInputStream is;\t\tOutputStream os;\t\tInputStreamReader isr;\t\tOutputStreamWriter osw;\t\tBufferedReader br;//\t\tArrayList poem = new ArrayList();\t\tint data = 0;\t\tint i = 0;\t\ttry {\t\t\tis = new FileInputStream(\"test1.txt\");\t\t\tos = new FileOutputStream(\"test2.txt\
15
举头望明月
38684
采用何种集合呢?
19978
26395
排除13和10? 一个回车一个换行.
1
21069
一个线程读取这么一组?制作4个线程
20065 后需要 1310回车换行
2
242022106926126263762080930097261592232019978386842003022836263952612626376203022283624605259252006520
20065
while ((data = isr.read()) != -1) { //isr读取的中文一个是3byte\t\t\t\tSystem.out.println(data);\t\t\t\tif(data % 17 == 0) {\t\t\t\t\tstrArray.add(newLine);\t\t\t\t}\t\t\t}
?
25925
低 头 思 故 乡
5
16
30097
验证
3
放入什么集合???
4
24605
0 条评论
下一页