org.alliance.core.file
Class ChunkStorage

java.lang.Object
  extended by org.alliance.core.file.ChunkStorage

public class ChunkStorage
extends java.lang.Object

Created by IntelliJ IDEA. User: maciek Date: 2006-jan-06 Time: 15:50:12 To change this template use File | Settings | File Templates.


Constructor Summary
ChunkStorage(java.lang.String file)
           
 
Method Summary
 int appendChunk(byte[] buf)
           
 void flush()
           
 java.io.InputStream getChunk(int off)
           
 int getSize()
           
 void markAsRemoved(int off)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChunkStorage

public ChunkStorage(java.lang.String file)
             throws java.io.IOException
Throws:
java.io.IOException
Method Detail

getSize

public int getSize()
            throws java.io.IOException
Throws:
java.io.IOException

appendChunk

public int appendChunk(byte[] buf)
                throws java.io.IOException
Returns:
The offset in our storage where this chunk is located
Throws:
java.io.IOException

getChunk

public java.io.InputStream getChunk(int off)
                             throws java.io.IOException
Throws:
java.io.IOException

flush

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

markAsRemoved

public void markAsRemoved(int off)
                   throws java.io.IOException
Throws:
java.io.IOException