Gemstone IO Library
Show/Hide TOC

# CachedFileStreamSetLength Method

When overridden in a derived class, sets the length of the current stream.

## Definition

Namespace: IO
Assembly: Gemstone.IO (in Gemstone.IO.dll) Version: 1.0.159 -- Release Build+ba5688372d08d23734a863a87183685f0687ec86
C#
View Source Request Example

    public override void SetLength(
    	long value
    )

VB
View Source Request Example

    Public Overrides Sub SetLength (
    	value As Long
    )

C++
View Source Request Example

    public:
    virtual void SetLength(
    	long long value
    ) override

JavaScript
View Source Request Example

    function SetLength(value);

#### Parameters

value Int64
  The desired length of the current stream in bytes.

## Exceptions

ArgumentOutOfRangeException | Attempted to set the value parameter to less than 0.
IOException | An I/O error occurs.
NotSupportedException | The stream does not support both writing and seeking.
ObjectDisposedException | Methods were called after the stream was closed.

## See Also

#### Reference

CachedFileStream Class
IO