org.apache.http.impl.io
Class AbstractHttpDataTransmitter

java.lang.Object
  extended by org.apache.http.impl.io.AbstractHttpDataTransmitter
All Implemented Interfaces:
HttpDataTransmitter
Direct Known Subclasses:
SocketHttpDataTransmitter

public abstract class AbstractHttpDataTransmitter
extends java.lang.Object
implements HttpDataTransmitter

Abstract base class for data transmitters using traditional IO.

Author:
Oleg Kalnichevski

Constructor Summary
AbstractHttpDataTransmitter()
           
 
Method Summary
 void flush()
           
protected  void flushBuffer()
           
 HttpTransportMetrics getMetrics()
           
protected  void init(java.io.OutputStream outstream, int buffersize, HttpParams params)
           
 void write(byte[] b)
           
 void write(byte[] b, int off, int len)
           
 void write(int b)
           
 void writeLine(CharArrayBuffer s)
           
 void writeLine(java.lang.String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractHttpDataTransmitter

public AbstractHttpDataTransmitter()
Method Detail

init

protected void init(java.io.OutputStream outstream,
                    int buffersize,
                    HttpParams params)

flushBuffer

protected void flushBuffer()
                    throws java.io.IOException
Throws:
java.io.IOException

flush

public void flush()
           throws java.io.IOException
Specified by:
flush in interface HttpDataTransmitter
Throws:
java.io.IOException

write

public void write(byte[] b,
                  int off,
                  int len)
           throws java.io.IOException
Specified by:
write in interface HttpDataTransmitter
Throws:
java.io.IOException

write

public void write(byte[] b)
           throws java.io.IOException
Specified by:
write in interface HttpDataTransmitter
Throws:
java.io.IOException

write

public void write(int b)
           throws java.io.IOException
Specified by:
write in interface HttpDataTransmitter
Throws:
java.io.IOException

writeLine

public void writeLine(java.lang.String s)
               throws java.io.IOException
Specified by:
writeLine in interface HttpDataTransmitter
Throws:
java.io.IOException

writeLine

public void writeLine(CharArrayBuffer s)
               throws java.io.IOException
Specified by:
writeLine in interface HttpDataTransmitter
Throws:
java.io.IOException

getMetrics

public HttpTransportMetrics getMetrics()
Specified by:
getMetrics in interface HttpDataTransmitter


Copyright © 2005-2009 Apache Software Foundation. All Rights Reserved.