Ian Wong

Greenhorn
+ Follow
since Feb 19, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ian Wong

I tried to write a program which read a text file(~300,000 bytes) into a byte array (e.g. byte[] b=new byte[1000000]), then I get an OutputStream by socket.getOutputStream(), when I tried to write the array to the OutputStream I got a SocketOutputStream Exception. If the array size is smaller than 65,535 then everything is fine.
If I need to send several byte array(e.g. 1 for public key, 1 for enctypted data) through socket, how can tell the I/O stream that "this is the end of this byte array, i am going to send/receive another one".
Moreover, if I send a byte array with the size > 65535, I get SocketOutputStream exception...is 65535 the limit of socket?