Class HTTPOutputStream

java.lang.Object
  |
  +--java.io.OutputStream
        |
        +--java.io.FilterOutputStream
              |
              +--java.io.DataOutputStream
                    |
                    +--HTTPOutputStream
All Implemented Interfaces:
java.io.DataOutput

public class HTTPOutputStream
extends java.io.DataOutputStream

This is an extended DataOutputstream That can handle HTTP data.


Fields inherited from class java.io.DataOutputStream
written
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
HTTPOutputStream(java.io.OutputStream os)
          Create a new HTTPOutputStream on the underlying stream.
 
Method Summary
 void write(byte b)
          Write a byte to the underlying stream.
 void write(byte[] buf)
          Write a byte array to the underlying stream.
 void write(byte[] buf, int off, int len)
          Write a byte array to the underlying stream.
 void writeHTTPHeader(HTTPHeader header)
          Write a HTTPHeader on this stream.
 
Methods inherited from class java.io.DataOutputStream
flush, size, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
 
Methods inherited from class java.io.FilterOutputStream
close
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTTPOutputStream

public HTTPOutputStream(java.io.OutputStream os)
Create a new HTTPOutputStream on the underlying stream.
Parameters:
is - the underlying stream.
Method Detail

writeHTTPHeader

public void writeHTTPHeader(HTTPHeader header)
                     throws java.io.IOException
Write a HTTPHeader on this stream.
Parameters:
header - the HTTPHeader to write.
Throws:
java.io.IOException - if the header could not be written correctly.

write

public void write(byte b)
           throws java.io.IOException
Write a byte to the underlying stream.
Parameters:
b - the byte to write.
Throws:
java.io.IOException - relayed from underlying write.

write

public void write(byte[] buf)
           throws java.io.IOException
Write a byte array to the underlying stream.
Overrides:
write in class java.io.FilterOutputStream
Parameters:
buf - the byte array to write.
Throws:
java.io.IOException - relayed from underlying write.

write

public void write(byte[] buf,
                  int off,
                  int len)
           throws java.io.IOException
Write a byte array to the underlying stream.
Overrides:
write in class java.io.DataOutputStream
Parameters:
buf - the byte array to write.
off - the starting offset in the array.
len - the number of bytes to write.
Throws:
java.io.IOException - relayed from underlying write.