Skip to content

Commit 7513d11

Browse files
authored
Update README.md
1 parent d1de99d commit 7513d11

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,41 @@ String data = socketReader.readStr(); // Read first string
2626

2727
```
2828

29+
## Getting started
30+
31+
The first set to getting started is to include the **fastjavaio.jar** to your project. If you're running your application on the command-line this can easily be done by adding the jar file to your classpath.
32+
33+
If you're using a unix like system try:
34+
```bash
35+
javac -cp .:fastjavaio.jar MyApp.java
36+
java -cp .:fastjavaio.jar MyApp
37+
```
38+
39+
If you're using windows try:
40+
```bash
41+
javac -cp .;fastjavaio.jar MyApp.java
42+
java -cp .;fastjavaio.jar MyApp
43+
```
44+
45+
To actually use the InputReader class within your application you need to import it from within the fastjavaio package:
46+
47+
``` java
48+
// imports the InputReader class from the fastjavaio package
49+
import fastjavaio.InputReader;
50+
51+
public class InputReaderUsageExample {
52+
public static void main (String[] args) throws java.io.IOException {
53+
54+
// Create an InputReader object that reads data from standard input by default
55+
InputReader in = new InputReader();
56+
57+
// read input here...
58+
59+
}
60+
}
61+
62+
```
63+
2964
## InputReader methods
3065

3166
**ALL methods in the InputReader class must be caught or thrown** because they throw an java.io.IOException when something bad happens such as trying to read a byte value from an empty stream. See [here](https://github.com/williamfiset/FastJavaIO#examples) for detailed examples of how to use the methods outlined below.

0 commit comments

Comments
 (0)