public static void main(String[] args) { try { DataOutputStream output = new DataOutputStream(new FileOutputStream("t.dat"));output.writeInt(1234);output.writeChars("AB");output.writeFloat(123.4F);}catch(Exception e){ e.printStackTrace();} }改成这样就可以了,记得采纳 ...
EVALUATION The getOutputStream method of sun.net.www.protocol.http.HttpURLConnectionreturns a ByteArrayOutputStream, so if you try to write 27MB into it you're likely to get an OutOfMemoryError. Reassigning to classes_net. -- mr@eng 1999/5/18 HTTP 1.0 requires sending a Content-Length r...