public class SequenceSegmentInformationWriter extends Object implements Closeable
| Constructor and Description |
|---|
SequenceSegmentInformationWriter(OutputStream output) |
SequenceSegmentInformationWriter(String outputFile) |
| Modifier and Type | Method and Description |
|---|---|
void |
addCustomProperties(String key,
String value)
Adds a custom property to the properties object.
|
void |
appendEntry(SegmentInformationRecords.SegmentInformation segmentInformation)
Append a base information record.
|
void |
appendProperties(Properties p)
Append the properties of this reader to the writer properties.
|
void |
close()
Closes this stream and releases any system resources associated
with it.
|
Properties |
getCustomProperties() |
void |
printStats(PrintStream out) |
void |
setCustomProperties(Properties customProperties)
Define custom properties to be written with in the .sbip along with all properties handled by the
writer.
|
void |
setEntryBases(long numOfBases) |
void |
setEntryFeatures(long numOfFeatures) |
void |
setEntryLabels(long numOfLabels) |
void |
setNumEntriesPerChunk(int numEntriesPerChunk) |
static void |
writeProperties(String basename,
List<Properties> properties)
Write the sbip file with the information obtained by merging properties.
|
static void |
writeProperties(String basename,
long numberOfRecords,
long maxNumOfLabels,
long maxNumOfBases,
long maxNumOfFeatures) |
public SequenceSegmentInformationWriter(String outputFile) throws FileNotFoundException
FileNotFoundExceptionpublic SequenceSegmentInformationWriter(OutputStream output)
public void setCustomProperties(Properties customProperties)
customProperties - public void addCustomProperties(String key, String value)
key - value - public void appendProperties(Properties p)
p - public Properties getCustomProperties()
public static void writeProperties(String basename, List<Properties> properties) throws FileNotFoundException
basename - basename of the .sbi file.properties - List of properties that should be written.FileNotFoundExceptionpublic static void writeProperties(String basename, long numberOfRecords, long maxNumOfLabels, long maxNumOfBases, long maxNumOfFeatures) throws FileNotFoundException
FileNotFoundExceptionpublic void setEntryBases(long numOfBases)
public void setEntryLabels(long numOfLabels)
public void setEntryFeatures(long numOfFeatures)
public void appendEntry(SegmentInformationRecords.SegmentInformation segmentInformation)
IOException - If an error occurs while writing the file.public void setNumEntriesPerChunk(int numEntriesPerChunk)
public void printStats(PrintStream out)
public void close()
throws IOException
As noted in AutoCloseable.close(), cases where the
close may fail require careful attention. It is strongly advised
to relinquish the underlying resources and to internally
mark the Closeable as closed, prior to throwing
the IOException.
close in interface Closeableclose in interface AutoCloseableIOException - if an I/O error occursCopyright © 2018 Campagne Laboratory. All rights reserved.