当然可以!
abstract int read()
Reads the next byte of data from the input stream.
int read(byte[] b)
Reads some number of bytes from the input stream and stores them into the buffer array b.
int read(byte[] b, int off, int len)
Reads up to len bytes of data from the input stream into an array of bytes.
先读到 array of bytes 然后转换为String就可以了!
abstract int read()
Reads the next byte of data from the input stream.
int read(byte[] b)
Reads some number of bytes from the input stream and stores them into the buffer array b.
int read(byte[] b, int off, int len)
Reads up to len bytes of data from the input stream into an array of bytes.
先读到 array of bytes 然后转换为String就可以了!
如下是我用的代码:
nputStream ipstm = messagePart.getInputStream();
BufferedReader bufreader = new BufferedReader(new InputStreamReader(ipstm));
String thisLine = bufreader.readLine();
wjmmml(笑着悲伤) 的方法试了一下,好象不行,问一下,messagePart是什末?
BufferedReader br = new BufferedReader(isr);
String target;
String line = br.readLine();
while(line!=null){
target += line;
line = br.readLine();
}
//没有测试的