ISeekableByteChannel Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A byte channel that maintains a current position and allows the position to be changed.
[Android.Runtime.Register("java/nio/channels/SeekableByteChannel", "", "Java.Nio.Channels.ISeekableByteChannelInvoker", ApiSince=24)]
public interface ISeekableByteChannel : IDisposable, Java.Interop.IJavaPeerable, Java.Nio.Channels.IByteChannel
[<Android.Runtime.Register("java/nio/channels/SeekableByteChannel", "", "Java.Nio.Channels.ISeekableByteChannelInvoker", ApiSince=24)>]
type ISeekableByteChannel = interface
interface IByteChannel
interface IReadableByteChannel
interface IChannel
interface ICloseable
interface IJavaObject
interface IDisposable
interface IJavaPeerable
interface IWritableByteChannel
- Derived
- Attributes
- Implements
Remarks
A byte channel that maintains a current position and allows the position to be changed.
A seekable byte channel is connected to an entity, typically a file, that contains a variable-length sequence of bytes that can be read and written. The current position can be #position() <i>queried</i>
and #position(long) <i>modified</i>
. The channel also provides access to the current size of the entity to which the channel is connected. The size increases when bytes are written beyond its current size; the size decreases when it is #truncate <i>truncated</i>
.
The #position(long) position
and #truncate truncate
methods which do not otherwise have a value to return are specified to return the channel upon which they are invoked. This allows method invocations to be chained. Implementations of this interface should specialize the return type so that method invocations on the implementation class can be chained.
Added in 1.7.
Java documentation for java.nio.channels.SeekableByteChannel
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Properties
Handle |
Gets the JNI value of the underlying Android object. (Inherited from IJavaObject) |
IsOpen |
Returns true if this channel is open. (Inherited from IChannel) |
JniIdentityHashCode |
Returns the value of |
JniManagedPeerState |
State of the managed peer. (Inherited from IJavaPeerable) |
JniPeerMembers |
Member access and invocation support. (Inherited from IJavaPeerable) |
PeerReference |
Returns a JniObjectReference of the wrapped Java object instance. (Inherited from IJavaPeerable) |
Methods
Close() |
Closes this channel. (Inherited from IChannel) |
Disposed() |
Called when the instance has been disposed. (Inherited from IJavaPeerable) |
DisposeUnlessReferenced() |
If there are no outstanding references to this instance, then
calls |
Finalized() |
Called when the instance has been finalized. (Inherited from IJavaPeerable) |
Position() |
Returns this channel's position. |
Position(Int64) |
Sets this channel's position. |
Read(ByteBuffer) |
Reads a sequence of bytes from this channel into the given buffer. |
SetJniIdentityHashCode(Int32) |
Set the value returned by |
SetJniManagedPeerState(JniManagedPeerStates) | (Inherited from IJavaPeerable) |
SetPeerReference(JniObjectReference) |
Set the value returned by |
Size() |
Returns the current size of entity to which this channel is connected. |
Truncate(Int64) |
Truncates the entity, to which this channel is connected, to the given size. |
UnregisterFromRuntime() |
Unregister this instance so that the runtime will not return it from future Java.Interop.JniRuntime+JniValueManager.PeekValue invocations. (Inherited from IJavaPeerable) |
Write(ByteBuffer) |
Writes a sequence of bytes to this channel from the given buffer. |
Extension Methods
JavaCast<TResult>(IJavaObject) |
Performs an Android runtime-checked type conversion. |
JavaCast<TResult>(IJavaObject) | |
GetJniTypeName(IJavaPeerable) | |
ReadAsync(IReadableByteChannel, ByteBuffer) | |
WriteAsync(IWritableByteChannel, ByteBuffer) |