public class BinaryFILEWriter extends Object implements Closeable
Modifier and Type | Method and Description |
---|---|
void |
close() |
static BinaryFILEWriter |
open(File file)
Open a BinaryFILE writer.
|
static BinaryFILEWriter |
open(File file,
long size)
Open a BinaryFILE writer.
|
void |
write(ByteBuffer payload)
Write a message.
|
public static BinaryFILEWriter open(File file) throws IOException
file
- the output fileIOException
- if an I/O error occurspublic static BinaryFILEWriter open(File file, long size) throws IOException
file
- the output filesize
- the size of the memory-mapped regionIOException
- if an I/O error occurspublic void write(ByteBuffer payload) throws IOException
payload
- a buffer containing a messageIOException
- if an I/O error occurspublic void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2017. All rights reserved.