package cn.text.one;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
public class Text4 {
public static void main(String[] args) {
InputStream in=null;
byte[] src="take is cheap show me".getBytes();
try {
in=new ByteArrayInputStream(src);
byte[] flush=new byte[5];
int len=-1;
while((len=in.read(flush))!=-1) {
String str=new String(flush,0,len);
System.out.println(str);
}
} catch (IOException e) {
e.printStackTrace();
}finally {
try {
in.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
