org.galagosearch.core.index
Class BackedCompressedByteBuffer

java.lang.Object
  extended by org.galagosearch.core.index.BackedCompressedByteBuffer

public class BackedCompressedByteBuffer
extends java.lang.Object

A BackedCompressedByteBuffer is like a CompressedByteBuffer, but it can overflow into disk storage if necessary. Unlike a CompressedByteBuffer, there's no getBytes() method since that wouldn't makes sense if all the data is on disk.

Author:
trevor

Nested Class Summary
 class BackedCompressedByteBuffer.BufferInputStream
           
 
Constructor Summary
BackedCompressedByteBuffer()
           
BackedCompressedByteBuffer(long threshold)
          Creates a new instance of BackedCompressedByteBuffer
 
Method Summary
 void add(CompressedByteBuffer other)
           
 void add(long value)
           
 void addFloat(float f)
           
 void addRaw(int b)
           
 void clear()
           
 void flush()
           
 BackedCompressedByteBuffer.BufferInputStream getInputStream()
           
 long length()
           
 void write(java.io.OutputStream stream)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BackedCompressedByteBuffer

public BackedCompressedByteBuffer(long threshold)
Creates a new instance of BackedCompressedByteBuffer


BackedCompressedByteBuffer

public BackedCompressedByteBuffer()
Method Detail

add

public void add(long value)
         throws java.io.IOException
Throws:
java.io.IOException

add

public void add(CompressedByteBuffer other)
         throws java.io.IOException
Throws:
java.io.IOException

addFloat

public void addFloat(float f)
              throws java.io.IOException
Throws:
java.io.IOException

addRaw

public void addRaw(int b)
            throws java.io.IOException
Throws:
java.io.IOException

write

public void write(java.io.OutputStream stream)
           throws java.io.IOException
Throws:
java.io.IOException

flush

public void flush()
           throws java.io.IOException
Throws:
java.io.IOException

length

public long length()

clear

public void clear()

getInputStream

public BackedCompressedByteBuffer.BufferInputStream getInputStream()
                                                            throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2009. All Rights Reserved.