public class ArcFileWriter extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
ACTIVE_SUFFIX
Suffix used for open files.
|
protected ArcFileWriterConfig |
arcFileConfig
Overall ARC file writer configuration.
|
protected ArcFileNaming |
arcFileNaming
ARC file naming Configuration.
|
protected int |
sequenceNr
Current sequence number.
|
ArcWriter |
writer
Current ARC writer.
|
protected java.io.RandomAccessFile |
writer_raf
Current random access file.
|
protected RandomAccessFileOutputStream |
writer_rafout
Current random access output stream.
|
protected java.io.File |
writerFile
Current ARC file.
|
| Modifier | Constructor and Description |
|---|---|
protected |
ArcFileWriter()
Constructor for internal and unit test use.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close writer and release all resources.
|
static ArcFileWriter |
getArcWriterInstance(ArcFileNaming arcFileNaming,
ArcFileWriterConfig arcFileConfig)
Returns a configured ARC file writer.
|
java.io.File |
getFile()
Returns the current ARC file object.
|
int |
getSequenceNr()
Returns the current sequence number.
|
ArcWriter |
getWriter()
Returns the current ARC writer object.
|
boolean |
nextWriter()
Checks to see whether a new file needs to be created.
|
void |
open()
Open new file with active prefix and prepare for writing.
|
protected static final java.lang.String ACTIVE_SUFFIX
protected ArcFileWriterConfig arcFileConfig
protected ArcFileNaming arcFileNaming
protected int sequenceNr
protected java.io.File writerFile
protected java.io.RandomAccessFile writer_raf
protected RandomAccessFileOutputStream writer_rafout
protected ArcFileWriter()
public static ArcFileWriter getArcWriterInstance(ArcFileNaming arcFileNaming, ArcFileWriterConfig arcFileConfig)
arcFileNaming - ARC file naming configurationarcFileConfig - overall ARC writer configurationpublic int getSequenceNr()
public java.io.File getFile()
public ArcWriter getWriter()
public void open() throws java.io.IOException
java.io.IOException - if an I/O exception occurs while opening filepublic boolean nextWriter() throws java.lang.Exception
java.lang.Exception - if an exception occurspublic void close() throws java.io.IOException
java.io.IOException - in an I/O exception occurs while closing resourcesCopyright © 2011–2022. All rights reserved.