QJCC homepage

biz.chitec.quarterback.gjsa.server
Class FileTransferBurstMaker

java.lang.Object
  extended bybiz.chitec.quarterback.gjsa.server.BurstMaker
      extended bybiz.chitec.quarterback.gjsa.server.FileTransferBurstMaker

public class FileTransferBurstMaker
extends BurstMaker

Burst maker for file contents. Transmits a file in bursted chunks over a GJSA connection.

Version:
$Id: 59f6c665c2f1974651e78cf6dccd83ffc88c7dd6 $
Author:
Dirk Hillbrecht 1997-2000, chitec/Dirk Hillbrecht 2000. Distributed under the terms of the GNU LGPL.

Nested Class Summary
 
Nested classes inherited from class biz.chitec.quarterback.gjsa.server.BurstMaker
 
Field Summary
private  int currpos
           
private  java.io.InputStream is
           
 int MAXCHUNKSIZE
           
 
Fields inherited from class biz.chitec.quarterback.gjsa.server.BurstMaker
loggable
 
Constructor Summary
FileTransferBurstMaker(java.lang.String fname)
           
 
Method Summary
 java.util.List getReplyPart(int start, int num)
          constructs a part of the answer.
 boolean isLoggable()
          returns whether the answer should be logged
 boolean linearContinueable()
          returns whether more data is available.
private  byte[] readChunk()
           
 
Methods inherited from class biz.chitec.quarterback.gjsa.server.BurstMaker
burstIterator, burstIterator, elementIterator, elementIterator, getCompleteReply, getCompleteReply, getRefNr, iterator, iterator, setLoggable, setRefNr
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAXCHUNKSIZE

public final int MAXCHUNKSIZE
See Also:
Constant Field Values

currpos

private int currpos

is

private java.io.InputStream is
Constructor Detail

FileTransferBurstMaker

public FileTransferBurstMaker(java.lang.String fname)
                       throws java.io.IOException
Method Detail

readChunk

private byte[] readChunk()
                  throws java.io.IOException
Throws:
java.io.IOException

isLoggable

public boolean isLoggable()
returns whether the answer should be logged

Overrides:
isLoggable in class BurstMaker

linearContinueable

public boolean linearContinueable()
Description copied from class: BurstMaker
returns whether more data is available. This method returns true if another getReplyPart() call is possible where start is start+num of the last call.

Specified by:
linearContinueable in class BurstMaker

getReplyPart

public java.util.List getReplyPart(int start,
                                   int num)
Description copied from class: BurstMaker
constructs a part of the answer. This method must be implemented by any actual BurstMaker.

Specified by:
getReplyPart in class BurstMaker

QJCC homepage