Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## utilities
Class MyInputStream

    java.lang.Object
      |
      +--utilities.MyInputStream

public class MyInputStream
extends java.lang.Object

Constructor Summary
`MyInputStream()` Constructor to set up BufferedReader for standard input stream System.in.
`MyInputStream(java.lang.String fileName)` Constructor to set up BufferedReader for input from a file.

Method Summary
`void` | `flushCurrentLine()` Discard remainder of current line.
`static void` | `main(java.lang.String[] args)` test program
`boolean` | `readBoolean()` Input a boolean.
`byte` | `readByte()` Input a byte.
`double` | `readDouble()` Input a double.
`float` | `readFloat()` Input a float.
`int` | `readInteger()` Input an integer.
`long` | `readLong()` Input a long.
`short` | `readShort()` Input a short.
`java.lang.String` | `readString()` Input a string.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MyInputStream

    public MyInputStream()

  Constructor to set up BufferedReader for standard input stream System.in. Typically, this is the keyboard.

### MyInputStream

    public MyInputStream(java.lang.String fileName)

  Constructor to set up BufferedReader for input from a file.

Method Detail

### flushCurrentLine

    public void flushCurrentLine()

  Discard remainder of current line.

### readInteger

    public int readInteger()

  Input an integer.
  Returns:
    next token as an integer number
  Throws:
    MyInputException -
    java.lang.NumberFormatException -

### readLong

    public long readLong()

  Input a long.

### readShort

    public short readShort()

  Input a short.

### readByte

    public byte readByte()

  Input a byte.

### readFloat

    public float readFloat()

  Input a float.

### readDouble

    public double readDouble()

  Input a double.

### readString

    public java.lang.String readString()

  Input a string.

### readBoolean

    public boolean readBoolean()

  Input a boolean.

### main

    public static void main(java.lang.String[] args)

  test program

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD