Feature.FromStream Method
Thread safety: This method is not thread-safe.
FromStream(System.IO.Stream stream)
Initializes a new instance of the Feature class from the specified binary data.Syntax
public static Feature FromStream (
System.IO.Stream stream
)
Parameters
data
Pointer to the first byte of feature data.
length
The number of bytes to read.
stream
Type: Byte sequence
The feature data.
The feature data.
Return Value
Type: Feature
A new feature initialized from the specified data.
A new feature initialized from the specified data.
Remarks
This method is used to re-create a Feature from a binary representation created by the Save method.
Example
// Saves the feature to a binary stream and reads it back
public static Feature SaveAndReadFeature(Feature feature)
{
// Save the given feature to a binary stream
System.IO.Stream stream = feature.Save(FeatureSaveMode.XYZ);
// Read the stream
Feature readFeature = Feature.FromStream(stream);
// Return the read feature
return readFeature;
}
Platforms
Windows, Linux, Android