core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileObject.java
/**
     * @param newSize
     * @throws IOException
     *             if the new size exceeds the limit
     */
@param newSize
@throws IOException
if the new size exceeds the limit
@param newSize @throws IOException if the new size exceeds the limit
synchronized void resize(int newSize) throws IOException
    {
        if (fs.getFileSystemOptions() != null)
        {
            int maxSize = RamFileSystemConfigBuilder.getInstance().getMaxSize(
                    fs.getFileSystemOptions());
            if (fs.size() + newSize - this.size() > maxSize)
            {
                throw new IOException("FileSystem capacity (" + maxSize
                        + ") exceeded.");
            }
        }
        this.data.resize(newSize);
    }
synchronized void resize ( int newSize ) throws IOException { if ( fs . getFileSystemOptions ( ) != null ) { int maxSize = RamFileSystemConfigBuilder . getInstance ( ) . getMaxSize ( fs . getFileSystemOptions ( ) ) ; if ( fs . size ( ) + newSize - this . size ( ) > maxSize ) { throw new IOException ( "FileSystem capacity (" + maxSize + ") exceeded." ) ; } } this . data . resize ( newSize ) ; }
@param newSize
 @throws IOException
             if the new size exceeds the limit
@param newSize @throws IOException if the new size exceeds the limit