ISessionInputBuffer.Read Method
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.
Overloads
| Name | Description |
|---|---|
| Read() |
Reads the next byte from the input buffer. |
| Read(Byte[]) |
Reads bytes into an array, starting at its first element. |
| Read(Byte[], Int32, Int32) |
Reads bytes into the specified part of an array. |
Read()
Reads the next byte from the input buffer.
[Android.Runtime.Register("read", "()I", "GetReadHandler:Org.Apache.Http.IO.ISessionInputBufferInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public int Read();
[<Android.Runtime.Register("read", "()I", "GetReadHandler:Org.Apache.Http.IO.ISessionInputBufferInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member Read : unit -> int
Returns
The byte value from 0 through 255, or -1 if the end of the stream is reached.
- Attributes
Exceptions
An I/O error occurs while reading a byte.
Remarks
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.
Applies to
Read(Byte[])
Reads bytes into an array, starting at its first element.
[Android.Runtime.Register("read", "([B)I", "GetRead_arrayBHandler:Org.Apache.Http.IO.ISessionInputBufferInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public int Read(byte[]? b);
[<Android.Runtime.Register("read", "([B)I", "GetRead_arrayBHandler:Org.Apache.Http.IO.ISessionInputBufferInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member Read : byte[] -> int
Parameters
- b
- Byte[]
The array that receives the bytes read.
Returns
The number of bytes read, or -1 if the end of the stream is reached before data is available.
- Attributes
Exceptions
An I/O error occurs while reading bytes.
Remarks
The Android implementation returns zero if b is null. A read can return fewer bytes than the array can hold.
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.
Applies to
Read(Byte[], Int32, Int32)
Reads bytes into the specified part of an array.
[Android.Runtime.Register("read", "([BII)I", "GetRead_arrayBIIHandler:Org.Apache.Http.IO.ISessionInputBufferInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public int Read(byte[]? b, int off, int len);
[<Android.Runtime.Register("read", "([BII)I", "GetRead_arrayBIIHandler:Org.Apache.Http.IO.ISessionInputBufferInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member Read : byte[] * int * int -> int
Parameters
- b
- Byte[]
The array that receives the bytes read.
- off
- Int32
The zero-based index in b at which to store the first byte.
- len
- Int32
The maximum number of bytes to read.
Returns
The number of bytes read, or -1 if the end of the stream is reached before data is available.
- Attributes
Exceptions
An I/O error occurs while reading bytes.
Remarks
The Android implementation returns zero if b is null. A read can return fewer than len bytes.
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.