com.soscompany.utils
Class FileBitsStream

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

public class FileBitsStream
extends java.lang.Object
implements BitsStream


Constructor Summary
FileBitsStream(java.lang.String fileName)
           
 
Method Summary
static java.lang.String bitsToString(long bits)
           
 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)
           
static long stringToBits(java.lang.String s)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileBitsStream

public FileBitsStream(java.lang.String fileName)
               throws java.io.IOException
Throws:
java.io.IOException
Method Detail

mark

public void mark(int readlimit)
Specified by:
mark in interface BitsStream

reset

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

getPosition

public Size getPosition()
Specified by:
getPosition in interface BitsStream

close

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

stringToBits

public static long stringToBits(java.lang.String s)

bitsToString

public static java.lang.String bitsToString(long bits)

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)
            throws java.io.IOException
Specified by:
getBits 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

getDataSize

public Size getDataSize()
                 throws java.io.IOException
Specified by:
getDataSize 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