Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.imagero.uio.buffer
Class AbstractBufferManager  view AbstractBufferManager download AbstractBufferManager.java

java.lang.Object
  extended bycom.imagero.uio.buffer.AbstractBufferManager
All Implemented Interfaces:
BufferManager
Direct Known Subclasses:
HTTPBufferManager, InputStreamBufferManager, OutputStreamBufferManager, RABufferManager, RAFBufferManager

public abstract class AbstractBufferManager
extends java.lang.Object
implements BufferManager


Field Summary
(package private)  MemoryAccessManager accessManager
           
(package private)  int bufferSize
           
protected static int defaultBufferSize
           
(package private)  long length
           
(package private)  long offset
           
(package private)  com.imagero.uio.RandomAccessRO ro
           
 
Fields inherited from interface com.imagero.uio.buffer.BufferManager
empty
 
Constructor Summary
AbstractBufferManager()
           
 
Method Summary
 void clear()
          clear all buffered data without closing
 void clear(long start, long end)
          all buffered data in stream between start and end will be cleared
protected  void clearImpl(int bs, int eb)
           
protected  MemoryAccessManager createAccessManager()
           
 void flush()
           
 int getCount()
          get count of Buffers CURRENTLY contained in this BufferManager
static int getDefaultBufferSize()
           
protected  int getEnd(long pos)
          get index of buffer which end is less or equals as given position
 int getMaxCache()
          get max buffer count
protected  int getStart(long pos)
          get index of buffer which start is greater or equals as given position
static void setDefaultBufferSize(int defaultBufferSize)
           
 void setDirty(int index)
           
 void setDirty(long from, long to)
           
 void setMaxCache(int max)
          set max buffer count
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.imagero.uio.buffer.BufferManager
close, getData, getDataLength, getDataStart, getIndex, getLength
 

Field Detail

defaultBufferSize

protected static int defaultBufferSize

accessManager

MemoryAccessManager accessManager

offset

long offset

length

long length

bufferSize

int bufferSize

ro

com.imagero.uio.RandomAccessRO ro
Constructor Detail

AbstractBufferManager

public AbstractBufferManager()
Method Detail

getDefaultBufferSize

public static int getDefaultBufferSize()

setDefaultBufferSize

public static void setDefaultBufferSize(int defaultBufferSize)

createAccessManager

protected MemoryAccessManager createAccessManager()

getCount

public int getCount()
get count of Buffers CURRENTLY contained in this BufferManager

Specified by:
getCount in interface BufferManager

clear

public void clear()
Description copied from interface: BufferManager
clear all buffered data without closing

Specified by:
clear in interface BufferManager

clear

public void clear(long start,
                  long end)
           throws java.io.IOException
Description copied from interface: BufferManager
all buffered data in stream between start and end will be cleared

Specified by:
clear in interface BufferManager

clearImpl

protected void clearImpl(int bs,
                         int eb)
                  throws java.io.IOException

getEnd

protected int getEnd(long pos)
get index of buffer which end is less or equals as given position


getStart

protected int getStart(long pos)
get index of buffer which start is greater or equals as given position


getMaxCache

public int getMaxCache()
Description copied from interface: BufferManager
get max buffer count

Specified by:
getMaxCache in interface BufferManager

setMaxCache

public void setMaxCache(int max)
Description copied from interface: BufferManager
set max buffer count

Specified by:
setMaxCache in interface BufferManager

flush

public void flush()
           throws java.io.IOException

setDirty

public void setDirty(int index)

setDirty

public void setDirty(long from,
                     long to)