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.143 -- Release Build+37d022088aab2458baec8e7580132f50f5d9f39c
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