It is possible to create stand-alone AWT-based applications with a Window. To do this, simply create an instance of the window or windows you need inside main(). For example, the f
Read tutorial ↗Datagrams are bundles of information passed between machines. They are somewhat like a hard throw from a well-trained but blindfolded catcher to the third baseman. Once the datagra
Read tutorial ↗URLConnection is a general-purpose class for accessing the attributes of a remote resource. Once you make a connection to a remote server, you can use URLConnection to inspect the
Read tutorial ↗The very simple example that follows opens a connection to a "whois" port on the InterNIC server, sends the command-line argument down the socket, and then prints the data that is
Read tutorial ↗The InetAddress class has no visible constructors. To create an InetAddress object, you have to use one of the available factory methods. Factory methods are merely a convention wh
Read tutorial ↗The following program illustrates how to use object serialization and deserialization. It begins by instantiating an object of class MyClass. This object has three instance variabl
Read tutorial ↗StreamTokenizer defines several methods. In this example, we will use only a few. To reset the default set of delimiters, we will employ the resetSyntax() method. The default set o
Read tutorial ↗The PushbackReader class allows one or more characters to be returned to the input stream. This allows you to look ahead in the input stream. Here are its two constructors:
Read tutorial ↗As is the case with the byte-oriented stream, buffering an input character stream also provides the foundation required to support moving backward in the stream within the availabl
Read tutorial ↗CharArrayWriter is an implementation of an output stream that uses an array as the destination. CharArrayWriter has two constructors, shown here:
Read tutorial ↗CharArrayReader is an implementation of an input stream that uses a character array as the source. This class has two constructors, each of which requires a character array to prov
Read tutorial ↗The FileReader class creates a Reader that you can use to read the contents of a file. FileWriter creates a Writer that you can use to write to a file.
Read tutorial ↗