via uma parte do colaborador preguiçoso
InputStream in = request.getInputStream(); int k; int aBuffSize = 1123123; String StringFromWS=""; byte buff[] = new byte[aBuffSize]; OutputStream xOutputStream = new ByteArrayOutputStream(aBuffSize);while ( (k=in.read(buff) ) != -1)
xOutputStream.write(buff,0,k);// I can now grab the string I want
StringFromWS = StringFromWS + xOutputStream.toString();
System.out.println(StringFromWS);
InputStream in = req.getInputStream();DataInputStream dis = new DataInputStream(in);
StringBuffer sb = new StringBuffer();
String line;
while ((line=dis.readUTF()) != null) {
sb.append(line+"\n");
}
String finalSring = sb.toString();
0 コメント:
コメントを投稿