public final class LisFileWriter extends Object implements Closeable
Constructor and Description |
---|
LisFileWriter(File file)
Create a LIS file writer for the specified disk file.
|
LisFileWriter(OutputStream outputStream)
Create a LIS file writer for the specified stream.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Append closing records and close the back-end stream.
|
void |
write(LisFile lisFile)
Write the specified LIS file.
|
void |
write(List<LisFile> lisFiles)
Write the specified LIS files.
|
public LisFileWriter(OutputStream outputStream)
outputStream
- Stream to write. Non-null.IllegalArgumentException
- If outputStream is null.public LisFileWriter(File file)
file
- Disk file to write. Non-null.IllegalArgumentException
- If file is null.public void write(LisFile lisFile) throws IOException
Multiple logical LIS files can be written in sequence to the same stream.
When writing is done, close the writer with close()
.
lisFile
- LIS file to write. Non-null.IllegalArgumentException
- If lisFile is null.IOException
- If the write operation fails for some reason.public void write(List<LisFile> lisFiles) throws IOException
write(LisFile)
in sequence.lisFiles
- LIS files to write. Non-null.IllegalArgumentException
- If lisFiles is null.IOException
- If the write operation fails for some reason.public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2024 Petroware AS - https://petroware.no