net.sf.ant4eclipse.model.project
Class ChunkyFile

java.lang.Object
  extended by net.sf.ant4eclipse.model.project.ChunkyFile

public class ChunkyFile
extends java.lang.Object

Simple representation for chunk based files as internally used by the Eclipse framework.


Constructor Summary
ChunkyFile(java.io.File source)
          Creates a chunked representation of the supplied file.
 
Method Summary
 byte[] getChunk(int index)
          Returns a chunk by it's index.
 int getChunkCount()
          Returns the number of available chunks.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChunkyFile

public ChunkyFile(java.io.File source)
           throws java.io.IOException
Creates a chunked representation of the supplied file.

Parameters:
source - The file that shall be loaded.
Throws:
java.io.IOException - Reading the file failed for some reason.
Method Detail

getChunkCount

public int getChunkCount()
Returns the number of available chunks.

Returns:
The number of available chunks.

getChunk

public byte[] getChunk(int index)
Returns a chunk by it's index.

Parameters:
index - The index of the chunk.
Returns:
The chunk data. null if the index wasn't valid.