com.soscompany.utils
Class MemoryBitsStream

java.lang.Object
  extended by com.soscompany.utils.MemoryBitsStream
All Implemented Interfaces:
BitsStream

public class MemoryBitsStream
extends java.lang.Object
implements BitsStream


Constructor Summary
MemoryBitsStream(BitsStream stream, int size)
           
MemoryBitsStream(int size)
           
 
Method Summary
 void byteAlign()
           
 void close()
           
 int getBits(long[] buffer, int count)
           
 int getBits(long[] buffer, int count, boolean moveReadPointer)
           
 Size getDataSize()
           
 Size getPosition()
           
 void mark(int readlimit)
           
 void reset()
           
 void setReadLimit(long limit)
           
 void setReadProgressListener(ReadProgressListener listener)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemoryBitsStream

public MemoryBitsStream(BitsStream stream,
                        int size)
                 throws java.io.IOException
Throws:
java.io.IOException

MemoryBitsStream

public MemoryBitsStream(int size)
Method Detail

close

public void close()
           throws java.io.IOException
Specified by:
close in interface BitsStream
Throws:
java.io.IOException

getPosition

public Size getPosition()
                 throws java.io.IOException
Specified by:
getPosition in interface BitsStream
Throws:
java.io.IOException

mark

public void mark(int readlimit)
          throws java.io.IOException
Specified by:
mark in interface BitsStream
Throws:
java.io.IOException

reset

public void reset()
           throws java.io.IOException
Specified by:
reset in interface BitsStream
Throws:
java.io.IOException

getDataSize

public Size getDataSize()
                 throws java.io.IOException
Specified by:
getDataSize in interface BitsStream
Throws:
java.io.IOException

byteAlign

public void byteAlign()
               throws java.io.IOException
Specified by:
byteAlign in interface BitsStream
Throws:
java.io.IOException

getBits

public int getBits(long[] buffer,
                   int count,
                   boolean moveReadPointer)
            throws java.io.IOException
Specified by:
getBits in interface BitsStream
Throws:
java.io.IOException

getBits

public int getBits(long[] buffer,
                   int count)
            throws java.io.IOException
Specified by:
getBits in interface BitsStream
Throws:
java.io.IOException

setReadLimit

public void setReadLimit(long limit)
Specified by:
setReadLimit in interface BitsStream

setReadProgressListener

public void setReadProgressListener(ReadProgressListener listener)
Specified by:
setReadProgressListener in interface BitsStream