de.xabsl.jxabslx.utils
Class ScannerInputSource

java.lang.Object
  extended by de.xabsl.jxabslx.utils.ScannerInputSource
All Implemented Interfaces:
InputSource

public class ScannerInputSource
extends java.lang.Object
implements InputSource

InputSource implementation utilizing java.util.Scanner. Reads intermediate code from a variety of sources. Ignores C-style //....EOL comments.


Constructor Summary
ScannerInputSource(java.io.File file)
           
ScannerInputSource(java.io.File file, java.lang.String charsetName)
           
ScannerInputSource(java.io.InputStream inputStream)
           
ScannerInputSource(java.io.InputStream inputStream, java.lang.String charsetName)
           
ScannerInputSource(java.lang.Readable readable)
           
ScannerInputSource(java.nio.channels.ReadableByteChannel readableByteChannel)
           
ScannerInputSource(java.nio.channels.ReadableByteChannel readableByteChannel, java.lang.String charsetName)
           
ScannerInputSource(java.lang.String string)
           
 
Method Summary
protected  void finalize()
           
 java.lang.String next()
          Read a string
 boolean nextBoolean()
          Read d boolean
 double nextDouble()
          Read a decimal
 int nextInt()
          Read an integer
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScannerInputSource

public ScannerInputSource(java.io.File file)
                   throws java.io.FileNotFoundException
Throws:
java.io.FileNotFoundException

ScannerInputSource

public ScannerInputSource(java.io.InputStream inputStream)

ScannerInputSource

public ScannerInputSource(java.lang.Readable readable)

ScannerInputSource

public ScannerInputSource(java.nio.channels.ReadableByteChannel readableByteChannel)

ScannerInputSource

public ScannerInputSource(java.lang.String string)

ScannerInputSource

public ScannerInputSource(java.io.File file,
                          java.lang.String charsetName)
                   throws java.io.FileNotFoundException
Throws:
java.io.FileNotFoundException

ScannerInputSource

public ScannerInputSource(java.io.InputStream inputStream,
                          java.lang.String charsetName)

ScannerInputSource

public ScannerInputSource(java.nio.channels.ReadableByteChannel readableByteChannel,
                          java.lang.String charsetName)
Method Detail

next

public java.lang.String next()
Description copied from interface: InputSource
Read a string

Specified by:
next in interface InputSource

nextDouble

public double nextDouble()
Description copied from interface: InputSource
Read a decimal

Specified by:
nextDouble in interface InputSource

nextInt

public int nextInt()
Description copied from interface: InputSource
Read an integer

Specified by:
nextInt in interface InputSource

nextBoolean

public boolean nextBoolean()
Description copied from interface: InputSource
Read d boolean

Specified by:
nextBoolean in interface InputSource

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable