Condividi tramite


AzureSeekableByteChannel Class

  • java.lang.Object
    • com.azure.storage.blob.nio.AzureSeekableByteChannel

Implements

public final class AzureSeekableByteChannel
implements SeekableByteChannel

A byte channel that maintains a current position.

A channel may only be opened in read mode OR write mode. It may not be opened in read/write mode. Seeking is supported for reads, but not for writes. Modifications to existing files is not permitted--only creating new files or overwriting existing files.

This type is not threadsafe to prevent having to hold locks across network calls.

Methods inherited from java.lang.Object

Method Details

close

public void close()

Throws:

isOpen

public boolean isOpen()

position

public long position()

Throws:

position

public AzureSeekableByteChannel position(long newPosition)

Parameters:

newPosition

Throws:

read

public int read(ByteBuffer dst)

Parameters:

dst

Throws:

size

public long size()

Throws:

truncate

public AzureSeekableByteChannel truncate(long size)

Parameters:

size

Throws:

write

public int write(ByteBuffer src)

Parameters:

src

Throws:

Applies to