php.java.bridge.http
Class ChunkedInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FilterInputStream
          extended by php.java.bridge.http.ChunkedInputStream
All Implemented Interfaces:
java.io.Closeable

public class ChunkedInputStream
extends java.io.FilterInputStream

An output stream which reads data in HTTP chunks.

Author:
jostb

Field Summary
static int[] ASCII_HEX
          Maps ASCII to HEX code.
 
Constructor Summary
ChunkedInputStream(java.io.InputStream in)
          Create a new chunked input stream
 
Method Summary
 void eof()
          read trailing 0\r\n
 int read(byte[] buf, int pos, int len)
          
 
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ASCII_HEX

public static final int[] ASCII_HEX
Maps ASCII to HEX code.

Constructor Detail

ChunkedInputStream

public ChunkedInputStream(java.io.InputStream in)
Create a new chunked input stream

Parameters:
in - The input stream
Method Detail

read

public int read(byte[] buf,
                int pos,
                int len)
         throws java.io.IOException

Overrides:
read in class java.io.FilterInputStream
Throws:
java.io.IOException

eof

public void eof()
         throws java.io.IOException
read trailing 0\r\n

Throws:
java.io.IOException