|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nasa.pds.objectAccess.TableWriter
public class TableWriter
The TableWriter
class is used for writing
fixed-width text, fixed-width binary and delimited data files.
Constructor Summary | |
---|---|
TableWriter(Object table,
OutputStream outputStream)
Creates an instance of TableWriter for writing to
a fixed-width text or binary data file and uses "US-ASCII"
character set name for encoding. |
|
TableWriter(Object table,
OutputStream outputStream,
String charsetName)
Creates an instance of TableWriter for writing to a
fixed-width text or binary data file. |
|
TableWriter(Object table,
Writer writer)
Creates an instance of TableWriter for writing to
a delimited data file. |
Method Summary | |
---|---|
void |
close()
Closes this table writer which may no longer be used for writing records. |
TableRecord |
createRecord()
Creates a record for adding data. |
void |
flush()
Flushes the output stream or writer. |
void |
write(TableRecord record)
Writes the table record to the output stream or writer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TableWriter(Object table, OutputStream outputStream, String charsetName) throws UnsupportedCharsetException
TableWriter
for writing to a
fixed-width text or binary data file. For fixed-width text file,
'carriage return + line feed' is used for record delimiter.
table
- a table objectoutputStream
- an output streamcharsetName
- the charset name to use for encoding the bytes.
UnsupportedCharsetException
public TableWriter(Object table, OutputStream outputStream)
TableWriter
for writing to
a fixed-width text or binary data file and uses "US-ASCII"
character set name for encoding. For fixed-width text file,
'carriage return + line feed' is used for record delimiter.
table
- a table objectoutputStream
- an output streampublic TableWriter(Object table, Writer writer)
TableWriter
for writing to
a delimited data file. It uses 'carriage return + line feed'
for record delimiter.
table
- a table objectwriter
- a writer objectMethod Detail |
---|
public TableRecord createRecord()
TableRecord
public void write(TableRecord record) throws IOException
record
- the TableRecord
object
IOException
public void flush() throws IOException
IOException
public void close() throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |