Top Description Inners Fields Constructors Methods
org.hsqldb.persist

public Class TextFileReader8

extends Object
implements TextFileReader
Class Inheritance
All Implemented Interfaces
org.hsqldb.persist.TextFileReader
Known Direct Subclasses
org.hsqldb.persist.TextFileReader16
Imports
java.io.IOException, .UnsupportedEncodingException, org.hsqldb.error.Error, .ErrorCode, org.hsqldb.lib.CharArrayWriter, .HsqlByteArrayOutputStream, org.hsqldb.rowio.RowInputInterface, .RowInputText

Reader for 8-bit text files.
Authors
Bob Preston (sqlbob@users dot sourceforge.net), Fred Toussi (fredt@users dot sourceforge.net)
Since
2.2.7
Version
2.7.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv abstract static class
pack-priv static class
pack-priv static class

Field Summary

Modifier and TypeField and Description
pack-priv TextFileReader8.StringCreator
pack-priv RandomAccessInterface
pack-priv String
pack-priv boolean
pack-priv long
pack-priv RowInputInterface
pack-priv TextFileSettings

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv
TextFileReader8(RandomAccessInterface dataFile, TextFileSettings textFileSettings, RowInputInterface rowIn, boolean isReadOnly)

Method Summary

Modifier and TypeMethod and Description
private long
findNextUsedLinePos()

Searches from file pointer, pos, and finds the beginning of the first line that contains any non-space character.

pack-priv int
public String
public long
pack-priv static TextFileReader
newTextFileReader(RandomAccessInterface dataFile, TextFileSettings textFileSettings, RowInputInterface rowIn, boolean isReadOnly)

pack-priv int
public void
public RowInputInterface
private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bufferback to summary
pack-priv TextFileReader8.StringCreator buffer
dataFileback to summary
pack-priv RandomAccessInterface dataFile
isReadOnlyback to summary
pack-priv boolean isReadOnly
positionback to summary
pack-priv long position
rowInback to summary
pack-priv RowInputInterface rowIn
textFileSettingsback to summary
pack-priv TextFileSettings textFileSettings

Constructor Detail

TextFileReader8back to summary
pack-priv TextFileReader8()
TextFileReader8back to summary
pack-priv TextFileReader8(RandomAccessInterface dataFile, TextFileSettings textFileSettings, RowInputInterface rowIn, boolean isReadOnly)

Method Detail

findNextUsedLinePosback to summary
private long findNextUsedLinePos()

Searches from file pointer, pos, and finds the beginning of the first line that contains any non-space character. Increments the row counter when a blank line is skipped. If none found return -1

getByteSizeForCharback to summary
pack-priv int getByteSizeForChar()
getHeaderLineback to summary
public String getHeaderLine()

Implements org.hsqldb.persist.TextFileReader.getHeaderLine.

getLineNumberback to summary
public long getLineNumber()

Implements org.hsqldb.persist.TextFileReader.getLineNumber.

newTextFileReaderback to summary
pack-priv static TextFileReader newTextFileReader(RandomAccessInterface dataFile, TextFileSettings textFileSettings, RowInputInterface rowIn, boolean isReadOnly)
readCharback to summary
pack-priv int readChar()
readHeaderLineback to summary
public void readHeaderLine()

Implements org.hsqldb.persist.TextFileReader.readHeaderLine.

readObjectback to summary
public RowInputInterface readObject()

Implements org.hsqldb.persist.TextFileReader.readObject.

skipBOMback to summary
private void skipBOM()
org.hsqldb.persist back to summary

pack-priv abstract Class TextFileReader8.StringCreator

extends Object
Class Inheritance
Known Direct Subclasses
org.hsqldb.persist.TextFileReader8.StringCreatorBytes, org.hsqldb.persist.TextFileReader8.StringCreatorChars

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv abstract int
pack-priv abstract String
pack-priv static TextFileReader8.StringCreator
getStringCreator(Class<?> cl, String encoding)

pack-priv abstract void
pack-priv abstract void
setSize(int size)

pack-priv abstract int
size()

pack-priv abstract void
write(int c)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

StringCreatorback to summary
pack-priv StringCreator()

Method Detail

getByteSizeback to summary
pack-priv abstract int getByteSize()
getStringback to summary
pack-priv abstract String getString() throws UnsupportedEncodingException
getStringCreatorback to summary
pack-priv static TextFileReader8.StringCreator getStringCreator(Class<?> cl, String encoding)
resetback to summary
pack-priv abstract void reset()
setSizeback to summary
pack-priv abstract void setSize(int size)
sizeback to summary
pack-priv abstract int size()
writeback to summary
pack-priv abstract void write(int c)
org.hsqldb.persist back to summary

pack-priv Class TextFileReader8.StringCreatorBytes

extends StringCreator
Class Inheritance

Field Summary

Modifier and TypeField and Description
private HsqlByteArrayOutputStream
private String

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv int
pack-priv String
pack-priv void
pack-priv void
pack-priv int
pack-priv void
Inherited from org.hsqldb.persist.TextFileReader8.StringCreator:
getStringCreator

Field Detail

bufferback to summary
private HsqlByteArrayOutputStream buffer
encodingback to summary
private String encoding

Constructor Detail

StringCreatorBytesback to summary
pack-priv StringCreatorBytes(String encoding)

Method Detail

getByteSizeback to summary
pack-priv int getByteSize()

Implements abstract org.hsqldb.persist.TextFileReader8.StringCreator.getByteSize.

getStringback to summary
pack-priv String getString() throws UnsupportedEncodingException

Implements abstract org.hsqldb.persist.TextFileReader8.StringCreator.getString.

resetback to summary
pack-priv void reset()

Implements abstract org.hsqldb.persist.TextFileReader8.StringCreator.reset.

setSizeback to summary
pack-priv void setSize(int size)

Implements abstract org.hsqldb.persist.TextFileReader8.StringCreator.setSize.

sizeback to summary
pack-priv int size()

Implements abstract org.hsqldb.persist.TextFileReader8.StringCreator.size.

writeback to summary
pack-priv void write(int c)

Implements abstract org.hsqldb.persist.TextFileReader8.StringCreator.write.

org.hsqldb.persist back to summary

pack-priv Class TextFileReader8.StringCreatorChars

extends StringCreator
Class Inheritance

Field Summary

Modifier and TypeField and Description
private CharArrayWriter

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv int
pack-priv String
pack-priv void
pack-priv void
pack-priv int
pack-priv void
Inherited from org.hsqldb.persist.TextFileReader8.StringCreator:
getStringCreator

Field Detail

bufferback to summary
private CharArrayWriter buffer

Constructor Detail

StringCreatorCharsback to summary
pack-priv StringCreatorChars()

Method Detail

getByteSizeback to summary
pack-priv int getByteSize()

Implements abstract org.hsqldb.persist.TextFileReader8.StringCreator.getByteSize.

getStringback to summary
pack-priv String getString()

Implements abstract org.hsqldb.persist.TextFileReader8.StringCreator.getString.

resetback to summary
pack-priv void reset()

Implements abstract org.hsqldb.persist.TextFileReader8.StringCreator.reset.

setSizeback to summary
pack-priv void setSize(int size)

Implements abstract org.hsqldb.persist.TextFileReader8.StringCreator.setSize.

sizeback to summary
pack-priv int size()

Implements abstract org.hsqldb.persist.TextFileReader8.StringCreator.size.

writeback to summary
pack-priv void write(int c)

Implements abstract org.hsqldb.persist.TextFileReader8.StringCreator.write.