org.geotools.resources
Class NIOUtilities

java.lang.Object
  extended by org.geotools.resources.NIOUtilities

public final class NIOUtilities
extends java.lang.Object

Utility class for managing memory mapped buffers.

Since:
2.0
Version:
$Id: NIOUtilities.java 30640 2008-06-12 17:34:32Z acuster $
Author:
Andrea Aimes

Method Summary
static boolean clean(java.nio.ByteBuffer buffer)
          Really closes a MappedByteBuffer without the need to wait for garbage collection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

clean

public static boolean clean(java.nio.ByteBuffer buffer)
Really closes a MappedByteBuffer without the need to wait for garbage collection. Any problems with closing a buffer on Windows (the problem child in this case) will be logged as SEVERE to the logger of the package name. To force logging of errors, set the System property "org.geotools.io.debugBuffer" to "true".

Parameters:
buffer - The buffer to close.
Returns:
true if the operation was successful, false otherwise.
See Also:
MappedByteBuffer


Copyright © 1996-2010 Geotools. All Rights Reserved.