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.155 -- Release Build+ab39a59f14bca7cb8b2a97a73d65e4a810348977
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