public final class LasFileWriter extends Object implements Closeable
Typical usage:
If there is to much data to keep in memory, or the writing is based on a streaming source, it is possible to append chunks of data to the last LasFile instance written, like:LasFileWriter writer = new LasFileWriter(new File("path/to/file.json")); writer.write(lasFile); writer.close();
LasFileWriter writer = new LasFileWriter(new File("path/to/file.json")); writer.write(lasFile); writer.append(lasFile); writer.append(lasFile); : writer.close();
Constructor and Description |
---|
LasFileWriter(File file)
Create a LAS file writer for the specified disk file.
|
LasFileWriter(OutputStream outputStream)
Create a LAS file writer for the specified stream.
|
Modifier and Type | Method and Description |
---|---|
void |
append(LasFile lasFile)
Append the curve data of the specified LAS file.
|
void |
close()
Close the back-end stream.
|
static String |
toString(LasFile lasFile)
Convenience method for returning a string representation of
the specified LAS file.
|
void |
write(LasFile lasFile)
Write the specified LAS file instance.
|
public LasFileWriter(OutputStream outputStream)
outputStream
- Stream to write. Non-null.IllegalArgumentException
- If outputStream is null.public LasFileWriter(File file)
file
- Disk file to write. Non-null.IllegalArgumentException
- If file is null.public void write(LasFile lasFile) throws IOException
lasFile
- LAS file instance to write. Non-null.IllegalArgumentException
- If lasFile is null.IOException
- If the write operation fails for some reason.public void append(LasFile lasFile) throws IOException
lasFile
- LAS file of data to append to stream. Non-null.IllegalArgumentException
- If lasFile is null.IllegalStateException
- If the writer is not open for writing.IOException
- If the write operation fails for some reason.public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public static String toString(LasFile lasFile)
lasFile
- LAS file to write. Non-null.IllegalArgumentException
- If lasFile is null.Copyright © 2024 Petroware AS - https://petroware.no