io
Class ChunkedDataSet

java.lang.Object
  extended by io.ChunkedDataSet

public class ChunkedDataSet
extends java.lang.Object

Use the ChunkedDataSet if you have a list of files containing framed data and want to read that in sequencially.

Author:
sikoried

Nested Class Summary
static class ChunkedDataSet.Chunk
          A chunk consists of its name and a (ready-to-read) FrameReader
 
Constructor Summary
ChunkedDataSet(java.util.List<java.lang.String> fileNames)
           
ChunkedDataSet(java.lang.String fileName)
          Create a ChunkDataSet using the given list file.
 
Method Summary
 java.util.List<Sample> cachedData()
          Cache all chunks into a List for easier (single-core) access
 ChunkedDataSet.Chunk nextChunk()
          Get the next Chunk from the list.
 void rewind()
           
 void setChunkList(java.lang.String fileName)
          Load the given chunk list.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChunkedDataSet

public ChunkedDataSet(java.util.List<java.lang.String> fileNames)

ChunkedDataSet

public ChunkedDataSet(java.lang.String fileName)
               throws java.io.IOException
Create a ChunkDataSet using the given list file.

Parameters:
fileName - path to the list file
Throws:
java.io.IOException
Method Detail

cachedData

public java.util.List<Sample> cachedData()
                                  throws java.io.IOException
Cache all chunks into a List for easier (single-core) access

Returns:
Throws:
java.io.IOException

nextChunk

public ChunkedDataSet.Chunk nextChunk()
                               throws java.io.IOException
Get the next Chunk from the list.

Returns:
Chunk instance on success, null if there's no more chunks
Throws:
java.io.IOException

rewind

public void rewind()

setChunkList

public void setChunkList(java.lang.String fileName)
                  throws java.io.IOException
Load the given chunk list.

Parameters:
fileName -
Throws:
java.io.IOException