|
Arch4J 1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.arch4j.parse.RecordWriter
Field Summary | |
static String |
DATA_TYPE_DATE
|
static String |
DATA_TYPE_NUMBER
|
static String |
DATA_TYPE_TEXT
|
static String |
DEFAULT_CLOSE_BRACKET
Used to bound the end of output text. |
static String |
DEFAULT_OPEN_BRACKET
Used to bound the beginning of output text. |
protected ReadOnlyProperty |
format
property tree, describes output record format. |
protected BufferedWriter |
writer
|
Method Summary | |
void |
close()
close down the writer and flush all the data to the underlying output stream. |
protected String |
convertObjectToText(Object value,
String aDateFormat)
|
protected abstract String[] |
createRawData(RecordData record)
create a record ready to go out to the ouput stream from an RecordData
object. |
void |
flush()
flush any buffered contents to the stream. |
protected abstract void |
initFormatData()
|
void |
setFormat(ReadOnlyProperty formatProps)
provide the reader with the property tree that defines the format of the files it must read. |
void |
write(RecordData record)
read raw data records from an input stream, convert them to (@link RecordData} objects using the format properties, and notify the handler provided. |
void |
writeDateRecord(Date date,
String format)
|
protected void |
writeRawData(String[] rawBuffer)
write a set of strings representing a record out to the ouput stream. |
void |
writeRecord(String formattedRecord)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String DATA_TYPE_TEXT
public static final String DATA_TYPE_DATE
public static final String DATA_TYPE_NUMBER
public static final String DEFAULT_OPEN_BRACKET
public static final String DEFAULT_CLOSE_BRACKET
protected ReadOnlyProperty format
protected BufferedWriter writer
Method Detail |
public void setFormat(ReadOnlyProperty formatProps) throws FormatException
formatProps
- property tree defining output file format. See subclass
implementations.
FormatException
public void write(RecordData record) throws IOException
IOException
public void writeRecord(String formattedRecord)
public void writeDateRecord(Date date, String format)
public void flush() throws IOException
IOException
public void close() throws IOException
IOException
protected abstract String[] createRawData(RecordData record)
RecordData
object. Format based on the properties provided to the setFormat(org.arch4j.propertytree.ReadOnlyProperty)
method.
record
- the record object to be converted to Strings.
protected void writeRawData(String[] rawBuffer)
rawBuffer
- raw data to send to output file.protected abstract void initFormatData() throws FormatException
FormatException
protected String convertObjectToText(Object value, String aDateFormat)
|
Arch4J 1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |