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.178 -- Release Build+b3946162e2bd2f7852bcfab078c6dd8531382bfc
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