compbio.engine
Class FilePuller
java.lang.Object
compbio.engine.FilePuller
- All Implemented Interfaces:
- java.lang.Comparable<java.util.concurrent.Delayed>, java.util.concurrent.Delayed
public class FilePuller
- extends java.lang.Object
- implements java.util.concurrent.Delayed
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
newFilePuller
public static FilePuller newFilePuller(java.lang.String file,
int chunkSize)
newProgressPuller
public static FilePuller newProgressPuller(java.lang.String file)
- Progress Puller is designed to read 3 characters from the beginning of
the file, nothing more. Intended to be used in conjunction with a tool
which output progress as a percent value from 0 to 100. In any cases
progress could not be more than the largest byte value 255.
- Parameters:
file
-
- Returns:
- instance
pull
public ChunkHolder pull(long position)
throws java.io.IOException
- Throws:
java.io.IOException
initPull
public void initPull()
getFile
public java.lang.String getFile()
isFileCreated
public boolean isFileCreated()
waitForFile
public void waitForFile(long maxWaitSeconds)
hasMoreData
public boolean hasMoreData()
throws java.io.IOException
- Throws:
java.io.IOException
compareTo
public int compareTo(java.util.concurrent.Delayed o)
- Specified by:
compareTo
in interface java.lang.Comparable<java.util.concurrent.Delayed>
getDelay
public long getDelay(java.util.concurrent.TimeUnit unit)
- Specified by:
getDelay
in interface java.util.concurrent.Delayed
disconnect
public void disconnect()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
getProgress
public byte getProgress()
throws java.io.IOException
- Throws:
java.io.IOException