org.alliance.core.file
Class ChunkStorage
java.lang.Object
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.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ChunkStorage
public ChunkStorage(java.lang.String file)
throws java.io.IOException
- Throws:
java.io.IOException
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