|
Babylon Java Chat | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjava.lang.Thread
BabylonFileTransfer
public abstract class BabylonFileTransfer
An abstract class for file transfers by the client or server. Used as a
superclass for BabylonServerFileTransfer and
BabylonClientFileTransfer, this class contains common data items
and methods for reading and writing the file.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
protected int |
blockSize
|
protected static int |
DEFAULT_BLOCKSIZE
|
protected int |
expireMins
|
protected long |
expiryTime
|
protected java.lang.String |
fileName
|
protected boolean |
receivedAll
|
protected int |
receivedBlocks
|
protected java.io.File |
tmpFile
|
protected int |
totalBlocks
|
protected long |
totalSize
|
protected java.io.RandomAccessFile |
transFile
|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
BabylonFileTransfer(java.lang.String fn,
long ts,
int tb,
int bs,
int minutes)
|
|
| Method Summary | |
|---|---|
protected byte[] |
getFileBlock(int blockNumber)
Read the requested block number from the file and return the data. |
protected void |
putFileBlock(int blockNumber,
byte[] data)
Write the requested block number to the file using the supplied data. |
abstract void |
run()
|
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final int DEFAULT_BLOCKSIZE
protected java.lang.String fileName
protected long totalSize
protected int totalBlocks
protected int blockSize
protected int expireMins
protected long expiryTime
protected java.io.File tmpFile
protected java.io.RandomAccessFile transFile
protected int receivedBlocks
protected boolean receivedAll
| Constructor Detail |
|---|
public BabylonFileTransfer(java.lang.String fn,
long ts,
int tb,
int bs,
int minutes)
| Method Detail |
|---|
public abstract void run()
run in interface java.lang.Runnablerun in class java.lang.Thread
protected byte[] getFileBlock(int blockNumber)
throws java.lang.IndexOutOfBoundsException,
java.io.IOException
java.lang.IndexOutOfBoundsException
java.io.IOException
protected void putFileBlock(int blockNumber,
byte[] data)
throws java.lang.IndexOutOfBoundsException,
java.io.IOException
java.lang.IndexOutOfBoundsException
java.io.IOException
|
Babylon Java Chat | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||