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.160 -- Release Build+169caca5192ac5075949df0220a553c99300004a
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