net.java.sen.util
クラス BufferCache

java.lang.Object
  上位を拡張 net.java.sen.util.BufferCache

public class BufferCache
extends java.lang.Object

Provides a cache of open MappedByteBuffers to avoid exhausting address space with duplicated buffers


コンストラクタの概要
BufferCache()
           
 
メソッドの概要
static java.nio.ByteBuffer getBuffer(java.io.File file)
          Gets a ByteBuffer mapped from the given file.
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

BufferCache

public BufferCache()
メソッドの詳細

getBuffer

public static java.nio.ByteBuffer getBuffer(java.io.File file)
                                     throws java.io.IOException
Gets a ByteBuffer mapped from the given file. The buffer that is returned is created by the .duplicate() method of a unique MappedByteBuffer on the whole file, and should thus share the address space of the original buffer (ByteBuffers are not thread safe and so must be duplicated, but the memory usage is at least minimal this way)

パラメータ:
file - The file to return a buffer for
戻り値:
A ByteBuffer mapped from the given file
例外:
java.io.IOException


Copyright ? 2008. All Rights Reserved.