Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Freenet
Class Conduit  view Conduit download Conduit.java

java.lang.Object
  extended byjava.lang.Thread
      extended byFreenet.Conduit
All Implemented Interfaces:
java.lang.Runnable

public class Conduit
extends java.lang.Thread

This class creates a conduit between an InputStream and an OutputStream and when the feed method of this object is called the InputStream will be fed into the output stream of this object.

Version:
1.0

Nested Class Summary
 
Nested classes inherited from class java.lang.Thread
java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
private  long bytesMoved
           
private  long bytesToMove
           
private  Freenet.support.Callback cb
           
private  Freenet.support.ByteCounter counter
           
private  Freenet.support.Callback icb
           
private  java.io.InputStream in
           
private  java.io.OutputStream out
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Conduit(java.io.InputStream i, java.io.OutputStream o)
           
Conduit(java.io.InputStream i, java.io.OutputStream o, Freenet.support.ByteCounter counter)
           
 
Method Summary
 void asyncFeed(Freenet.support.Callback cb)
          Commences the transfer from Input to Output Streams asynchronously
 void asyncFeed(Freenet.support.Callback cb, Freenet.support.Callback icb, long n)
          Commences the transfer from Input to Output Stream asynchronously until a number of bytes have been transfered
 long bytesMoved()
           
 void run()
          The method of Thread that will be run if there is no Runnable object associated with the Thread.
 void syncFeed()
          Transfer from Input to Output Streams, doesn't return until transfer complete
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, 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

in

private java.io.InputStream in

out

private java.io.OutputStream out

cb

private Freenet.support.Callback cb

icb

private Freenet.support.Callback icb

counter

private Freenet.support.ByteCounter counter

bytesToMove

private long bytesToMove

bytesMoved

private long bytesMoved
Constructor Detail

Conduit

public Conduit(java.io.InputStream i,
               java.io.OutputStream o)

Conduit

public Conduit(java.io.InputStream i,
               java.io.OutputStream o,
               Freenet.support.ByteCounter counter)
Method Detail

bytesMoved

public long bytesMoved()

asyncFeed

public void asyncFeed(Freenet.support.Callback cb)
Commences the transfer from Input to Output Streams asynchronously


asyncFeed

public void asyncFeed(Freenet.support.Callback cb,
                      Freenet.support.Callback icb,
                      long n)
Commences the transfer from Input to Output Stream asynchronously until a number of bytes have been transfered


syncFeed

public void syncFeed()
Transfer from Input to Output Streams, doesn't return until transfer complete


run

public void run()
Description copied from class: java.lang.Thread
The method of Thread that will be run if there is no Runnable object associated with the Thread. Thread's implementation does nothing at all.