Certain aspects of java.net require caution:
Most objects associated with java.net are not serializable, which means that you cannot insert them into tables.
You might encounter the exception “Too many open files,” when you have opened only a few. Check Number of Java Sockets configuration parameter.
Most of the I/O-related functions use buffered I/O, which means that you might need to flush your data explicitly. The PrintWriter class is an example of a class in which the data is not automatically flushed.