1 | In java.io, there are several classes that throw IOExceptions -- please catch them! |
2 | The class InputStream is basic and it has methods such as read() skip() (bytes in a stream) available() (bytes remaining in stream) close(). |
3 | InputStreams can be created from memory |
4 | InputStream s = new ByteArrayInputStream(buffer, 100, 300); // creates a stream of 300 bytes in locations 100 to 399 |
5 | More usefully, they can be created from a UNIX file |
6 | InputStream s = new FileInputStream("/usr/gcf/greatidea"); |