java.io.Closeable, java.io.Flushable, java.lang.AutoCloseable, org.apache.hadoop.fs.StreamCapabilities, org.apache.hadoop.fs.Syncablepublic class NativeAzureFileSystem.NativeAzureFsOutputStream
extends java.io.OutputStream
implements org.apache.hadoop.fs.Syncable, org.apache.hadoop.fs.StreamCapabilities
| Constructor | Description |
|---|---|
NativeAzureFsOutputStream(java.io.OutputStream out,
java.lang.String aKey,
java.lang.String anEncodedKey) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
|
java.lang.String |
getEncodedKey() |
Get the blob name.
|
java.lang.String |
getKey() |
Get the blob name.
|
java.io.OutputStream |
getOutStream() |
Get a reference to the wrapped output stream.
|
boolean |
hasCapability(java.lang.String capability) |
Propagate probe of stream capabilities to nested stream
(if supported), else return false.
|
void |
hflush() |
|
void |
hsync() |
|
void |
setEncodedKey(java.lang.String anEncodedKey) |
Set the blob name.
|
void |
setKey(java.lang.String key) |
Set the blob name.
|
void |
sync() |
Deprecated.
|
void |
write(byte[] b) |
Writes b.length bytes from the specified byte array to this output
stream.
|
void |
write(byte[] b,
int off,
int len) |
Writes
len from the specified byte array starting at offset
off to the output stream. |
void |
write(int b) |
Writes the specified byte to this output stream.
|
public NativeAzureFsOutputStream(java.io.OutputStream out,
java.lang.String aKey,
java.lang.String anEncodedKey)
throws java.io.IOException
java.io.IOException@LimitedPrivate("HDFS")
public java.io.OutputStream getOutStream()
public void hflush()
throws java.io.IOException
hflush in interface org.apache.hadoop.fs.Syncablejava.io.IOExceptionpublic void hsync()
throws java.io.IOException
hsync in interface org.apache.hadoop.fs.Syncablejava.io.IOException@Deprecated
public void sync()
throws java.io.IOException
sync in interface org.apache.hadoop.fs.Syncablejava.io.IOExceptionpublic boolean hasCapability(java.lang.String capability)
hasCapability in interface org.apache.hadoop.fs.StreamCapabilitiescapability - string to query the stream support for.public void close()
throws java.io.IOException
close in interface java.lang.AutoCloseableclose in interface java.io.Closeableclose in class java.io.OutputStreamjava.io.IOExceptionpublic void write(int b)
throws java.io.IOException
write in class java.io.OutputStreamb - 32-bit integer of block of 4 bytesjava.io.IOExceptionpublic void write(byte[] b)
throws java.io.IOException
write in class java.io.OutputStreamb - Block of bytes to be written to the output stream.java.io.IOExceptionpublic void write(byte[] b,
int off,
int len)
throws java.io.IOException
len from the specified byte array starting at offset
off to the output stream. The general contract for write(b,
off, len) is that some of the bytes in the array b
are written to the output stream in order; element b[off]
is the first byte written and b[off+len-1] is the last
byte written by this operation.write in class java.io.OutputStreamb - Byte array to be written.off - Write this offset in stream.len - Number of bytes to be written.java.io.IOExceptionpublic java.lang.String getKey()
public void setKey(java.lang.String key)
key - Blob name.public java.lang.String getEncodedKey()
public void setEncodedKey(java.lang.String anEncodedKey)
anEncodedKey - Blob name.Copyright © 2008–2025 Apache Software Foundation. All rights reserved.