public abstract class BlockWriter extends BlockClient
This class does not provide thread-safety.
BlockClient.Type
Constructor and Description |
---|
BlockWriter()
Default constructor for the abstract writer implementations.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
abort()
Abort writing.
|
abstract long |
append(io.netty.buffer.ByteBuf buf)
Appends buf.readableBytes() bytes to the end of this block writer from the given buf.
|
abstract long |
append(ByteBuffer inputBuf)
Appends data to the end of a block from an input
ByteBuffer . |
abstract long |
append(DataBuffer buffer)
Appends buffer.readableBytes() bytes to the end of this block writer from the given buffer.
|
abstract void |
commitFile()
Commit the file.
|
abstract WritableByteChannel |
getChannel() |
abstract long |
getPosition() |
close, toString
public BlockWriter()
public abstract long append(ByteBuffer inputBuf)
ByteBuffer
.inputBuf
- ByteBuffer
that input data is stored inpublic abstract long append(io.netty.buffer.ByteBuf buf) throws IOException
buf
- the byte buffer that holds the dataIOException
public abstract long append(DataBuffer buffer) throws IOException
buffer
- the byte buffer that holds the dataIOException
public abstract long getPosition()
public abstract WritableByteChannel getChannel()
public abstract void commitFile()
public abstract void abort()
Copyright © 2023. All Rights Reserved.