org.deegree.coverage.raster.cache
Class ByteBufferPool

java.lang.Object
  extended by org.deegree.coverage.raster.cache.ByteBufferPool

public class ByteBufferPool
extends java.lang.Object

The ByteBufferPool will be the central place for buffering byte buffers used for rasters. Currently only new byte buffers are created, no pooling is done.

Version:
$Revision: 23929 $, $Date: 2010-04-28 15:27:36 +0200 (Mi, 28. Apr 2010) $
Author:
Rutger Bezema, last edited by: $Author: rbezema $

Constructor Summary
ByteBufferPool()
           
 
Method Summary
static java.nio.ByteBuffer allocate(int size, boolean directAllocation)
           
static java.nio.ByteBuffer allocate(int size, boolean direct, boolean forCache)
          Frees up raster memory and than allocates the ByteBuffer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteBufferPool

public ByteBufferPool()
Method Detail

allocate

public static java.nio.ByteBuffer allocate(int size,
                                           boolean direct,
                                           boolean forCache)
Frees up raster memory and than allocates the ByteBuffer.

Parameters:
size -
direct -
forCache -
Returns:
an allocated byte buffer of the given size.

allocate

public static java.nio.ByteBuffer allocate(int size,
                                           boolean directAllocation)
Parameters:
size -
directAllocation - if the allocation should be direct
Returns:
the newly created ByteBuffer.


Copyright © 2011. All Rights Reserved.