|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.me.parabola.imgfmt.app.BufferedImgFileReader
public class BufferedImgFileReader
Read from an img file via a buffer.
Constructor Summary | |
---|---|
BufferedImgFileReader(ImgChannel chan)
|
Method Summary | |
---|---|
void |
close()
Called when the stream is closed. |
byte |
get()
Read in a single byte from the current position. |
byte[] |
get(int len)
Read in an arbitrary length sequence of bytes. |
int |
get3()
Read a three byte signed quantity. |
java.lang.String |
getBase11str(byte firstChar,
char delimiter)
Read in a string of digits in the compressed base 11 format that is used for phone numbers in the POI section. |
char |
getChar()
Read in two bytes. |
int |
getInt()
Read in a 4 byte value. |
int |
getu3()
Get a 3byte unsigned quantity. |
java.lang.String |
getZString()
Read a zero terminated string from the file. |
long |
position()
Get the position. |
void |
position(long pos)
Set the position of the file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BufferedImgFileReader(ImgChannel chan)
Method Detail |
---|
public void close() throws java.io.IOException
close
in interface java.io.Closeable
java.io.IOException
- When there is an error in closing.public long position()
position
in interface ImgFileReader
public void position(long pos)
position
in interface ImgFileReader
pos
- The new position in the file.public byte get() throws ReadFailedException
get
in interface ImgFileReader
ReadFailedException
public char getChar() throws ReadFailedException
getChar
in interface ImgFileReader
ReadFailedException
public int get3() throws ReadFailedException
get3
in interface ImgFileReader
ReadFailedException
public int getu3() throws ReadFailedException
ImgFileReader
getu3
in interface ImgFileReader
ReadFailedException
- When the file cannot be read.public int getInt() throws ReadFailedException
getInt
in interface ImgFileReader
ReadFailedException
public byte[] get(int len) throws ReadFailedException
get
in interface ImgFileReader
len
- The number of bytes to read.
ReadFailedException
public java.lang.String getZString() throws ReadFailedException
getZString
in interface ImgFileReader
ReadFailedException
- For failures.public java.lang.String getBase11str(byte firstChar, char delimiter)
getBase11str
in interface ImgFileReader
delimiter
- This will replace all digit 11 characters. Usually a
'-' to separate numbers in a telephone. No doubt there is a different
standard in each country.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |