public class BlockBlobAppendStream extends OutputStream implements org.apache.hadoop.fs.Syncable, org.apache.hadoop.fs.StreamCapabilities
| Constructor and Description |
|---|
BlockBlobAppendStream(StorageInterface.CloudBlockBlobWrapper blob,
String aKey,
int bufferSize,
boolean compactionEnabled,
com.microsoft.azure.storage.OperationContext opContext)
BlockBlobAppendStream constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Force all data in the output stream to be written to Azure storage.
|
void |
flush()
Flushes this output stream and forces any buffered output bytes to be
written out.
|
boolean |
hasCapability(String capability)
The Synchronization capabilities of this stream depend upon the compaction
policy.
|
void |
hflush()
Force all data in the output stream to be written to Azure storage.
|
void |
hsync()
Force all data in the output stream to be written to Azure storage.
|
void |
write(byte[] data,
int offset,
int length)
Writes length bytes from the specified byte array starting at offset to
this output stream.
|
void |
write(int byteVal)
Writes the specified byte to this output stream.
|
writepublic BlockBlobAppendStream(StorageInterface.CloudBlockBlobWrapper blob, String aKey, int bufferSize, boolean compactionEnabled, com.microsoft.azure.storage.OperationContext opContext) throws IOException
blob - Azure Block BlobaKey - blob's namebufferSize - the maximum size of a blob block.compactionEnabled - is the compaction process enabled for this blobopContext - Azure Store operation context for the blobIOException - if an I/O error occurs. In particular, an IOException may be
thrown if the output stream cannot be used for append operationspublic void write(int byteVal)
throws IOException
write in class OutputStreambyteVal - the byteValue to write.IOException - if an I/O error occurs. In particular, an IOException may be
thrown if the output stream has been closed.public void write(byte[] data,
int offset,
int length)
throws IOException
write in class OutputStreamdata - the byte array to write.offset - the start offset in the data.length - the number of bytes to write.IOException - if an I/O error occurs. In particular, an IOException may be
thrown if the output stream has been closed.public void flush()
throws IOException
flush in interface Flushableflush in class OutputStreamIOExceptionpublic void hsync()
throws IOException
hsync in interface org.apache.hadoop.fs.SyncableIOExceptionpublic void hflush()
throws IOException
hflush in interface org.apache.hadoop.fs.SyncableIOExceptionpublic boolean hasCapability(String capability)
hasCapability in interface org.apache.hadoop.fs.StreamCapabilitiescapability - string to query the stream support for.public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class OutputStreamIOExceptionCopyright © 2008–2020 Apache Software Foundation. All rights reserved.