vqServer API Class vq.utils.vqis
java.lang.Object
|
+----java.io.InputStream
|
+----java.io.FilterInputStream
|
+----java.io.DataInputStream
|
+----vq.utils.vqis
|
|
Contents
Package index
Package
API index
|
- public class vqis
- extends java.io.DataInputStream
Adaptor class for reading from HTTP protocol streams and vqServer
.cfg file format files. Each byte is interpreted as a whole character.
last- The last byte read from the stream.
vqis(File)
- Creates a new buffered stream to read from the specified file.
vqis(InputStream)
- Creates a new stream for reading from the specified stream.
vqis(String)
- Creates a new buffered stream to read from the specified file.
vqis(String, String)
- Creates a new buffered stream to read from the specified location
using the specified mode.
read()
- Reads the next byte from the underlying stream.
readbool()
- Reads a boolean field value
written in vqServer
.cfg file format.
readchar()
- Reads the next byte from the underlying stream and returns it as a char.
readdate()
- Reads a date field value written in vqServer
.cfg file format.
readln()
- Reads up to and including the next line break from the underlying stream.
readlong()
- Reads a long field value
written in vqServer
.cfg file format.
readname()
- Reads a field name written in vqServer
.cfg file format.
readtrimln()
- Reads up to and including the next line break from the underlying stream.
readvalue()
- Reads a field value written in vqServer
.cfg file format.
readword(String)
- Reads up to and including the next word break from the underlying stream.
last
public int last
The last byte read from the stream.
vqis
public vqis(java.io.InputStream is)
Creates a new stream for reading from the specified stream.
- Parameters:
is
- the input stream to read from
vqis
public vqis(java.lang.String fname) throws java.io.IOException
Creates a new buffered stream to read from the specified file.
- Parameters:
fname
- the name of the file to read from
vqis
public vqis(java.io.File file) throws java.io.IOException
Creates a new buffered stream to read from the specified file.
- Parameters:
file
- the file to read from
vqis
public vqis(java.lang.String mode,
java.lang.String fname) throws java.io.IOException
Creates a new buffered stream to read from the specified location
using the specified mode.
Currently identical to vqis(String fname).
- Parameters:
mode
- the mode to use
fname
- the name of the file to read from
read
public int read() throws java.io.IOException
Reads the next byte from the underlying stream.
- Returns:
- the byte read
- Overrides:
- read in class java.io.FilterInputStream
readchar
public char readchar() throws java.io.IOException
Reads the next byte from the underlying stream and returns it as a char.
- Returns:
- the character read
readword
public java.lang.String readword(java.lang.String stopChars) throws java.io.IOException
Reads up to and including the next word break from the underlying stream.
Word breaks include the space character, characters in
stopChars, the end of the line and the end of file.
Copes with lines terminated by both line feed and carriage return line feed.
- Parameters:
stopChars
- word break characters
- Returns:
- the word read (excluding the word break character(s)) as a string
readln
public java.lang.String readln() throws java.io.IOException
Reads up to and including the next line break from the underlying stream.
Line breaks include the end of file.
Copes with lines terminated by both line feed and carriage return - line feed.
- Returns:
- the line read (including leading and trailing spaces and the line break character(s) as a String
readtrimln
public java.lang.String readtrimln() throws java.io.IOException
Reads up to and including the next line break from the underlying stream.
Line breaks include the end of file.
Copes with lines terminated by both line feed and carriage return - line feed.
- Returns:
- the line read (excluding leading and trailing spaces and the line break character(s) as a String
readname
public java.lang.String readname() throws java.io.IOException
Reads a field name written in vqServer
.cfg file format.
- Returns:
- the field name read
readvalue
public java.lang.String readvalue() throws java.io.IOException
Reads a field value written in vqServer
.cfg file format.
- Returns:
- the field value read
readbool
public boolean readbool() throws java.io.IOException
Reads a boolean field value
written in vqServer
.cfg file format.
- Returns:
- the boolean value read
readlong
public long readlong() throws java.io.IOException
Reads a long field value
written in vqServer
.cfg file format.
- Returns:
- the long value read
readdate
public long readdate() throws java.io.IOException
Reads a date field value written in vqServer
.cfg file format.
- Returns:
- the date read as a long