UsbStream Class
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Represents a USB stream.
Inheritance Hierarchy
System. . :: . .Object
System. . :: . .MarshalByRefObject
System.IO. . :: . .Stream
Microsoft.SPOT.Hardware.UsbClient..::..UsbStream
Namespace: Microsoft.SPOT.Hardware.UsbClient
Assembly: Microsoft.SPOT.Hardware.Usb (in Microsoft.SPOT.Hardware.Usb.dll)
Syntax
'Declaration
Public NotInheritable Class UsbStream _
Inherits Stream
public sealed class UsbStream : Stream
public ref class UsbStream sealed : public Stream
[<Sealed>]
type UsbStream =
class
inherit Stream
end
public final class UsbStream extends Stream
The UsbStream type exposes the following members.
Properties
Name | Description | |
---|---|---|
CanRead | Gets a value indicating whether the current stream supports reading. (Overrides Stream. . :: . .CanRead.) | |
CanSeek | Gets a value indicating whether the current stream supports seeking. (Overrides Stream. . :: . .CanSeek.) | |
CanTimeout | Gets a value that determines whether the current stream can time out. (Inherited from Stream.) | |
CanWrite | Gets a value indicating whether the current stream supports writing. (Overrides Stream. . :: . .CanWrite.) | |
Length | Gets the length in bytes of the stream. (Overrides Stream. . :: . .Length.) | |
Position | Gets or sets the position within the current stream. (Overrides Stream. . :: . .Position.) | |
ReadTimeout | Gets or sets a value, in milliseconds, that determines how long the stream will attempt to read before timing out. (Inherited from Stream.) | |
WriteTimeout | Gets or sets a value, in miliseconds, that determines how long the stream will attempt to write before timing out. (Inherited from Stream.) |
Top
Methods
Name | Description | |
---|---|---|
Close | Closes the current stream and releases any resources (such as sockets and file handles) associated with the current stream. Instead of calling this method, ensure that the stream is properly disposed. (Inherited from Stream.) | |
Dispose() () () () | Releases all resources used by the Stream. (Inherited from Stream.) | |
Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
Flush | Flushes the USB stream, causing its buffer to empty. (Overrides Stream. . :: . .Flush() () () ().) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Read | Reads from a USB stream. (Overrides Stream. . :: . .Read(array<Byte> [] () [] [], Int32, Int32).) | |
ReadByte | Reads a byte from the stream and advances the position within the stream by one byte, or returns -1 if at the end of the stream. (Inherited from Stream.) | |
Seek | Sets the current position of this stream to the given value. (Overrides Stream. . :: . .Seek(Int64, SeekOrigin).) | |
SetLength | Sets the length of this stream to the given value. (Overrides Stream. . :: . .SetLength(Int64).) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
Write | Writes to a USB stream. (Overrides Stream. . :: . .Write(array<Byte> [] () [] [], Int32, Int32).) | |
WriteByte | Writes a byte to the current position in the stream and advances the position within the stream by one byte. (Inherited from Stream.) |
Top
Fields
Name | Description | |
---|---|---|
NullEndpoint | Defines a USB stream as having a null endpoint. | |
ReadEndpoint | Defines a USB stream as having a readable endpoint. | |
WriteEndpoint | Defines a USB stream as having a writeable endpoint. |
Top
Remarks
Use the CreateUsbStream method to create a UsbStream for a controller.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.