com.noelios.restlet.http
Class ChunkedInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by com.noelios.restlet.http.ChunkedInputStream
All Implemented Interfaces:
java.io.Closeable

public class ChunkedInputStream
extends java.io.InputStream

InputStream to wrap a source InputStream that has been chunked. See section 3.6.1 of HTTP Protocol for more information on chunked encoding.

Author:
Kevin Conaway
See Also:
HTTP/1.1 Protocol

Constructor Summary
ChunkedInputStream(java.io.InputStream source)
          Constructor.
 
Method Summary
 void close()
          Close this input stream but do not close the underlying stream.
 int read()
           
 int read(byte[] b, int off, int len)
           
 
Methods inherited from class java.io.InputStream
available, mark, markSupported, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChunkedInputStream

public ChunkedInputStream(java.io.InputStream source)
Constructor.

Parameters:
source - Source InputStream to read from
Method Detail

close

public void close()
           throws java.io.IOException
Close this input stream but do not close the underlying stream.

Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.InputStream
Throws:
java.io.IOException

read

public int read()
         throws java.io.IOException
Specified by:
read in class java.io.InputStream
Throws:
java.io.IOException

read

public int read(byte[] b,
                int off,
                int len)
         throws java.io.IOException
Overrides:
read in class java.io.InputStream
Throws:
java.io.IOException


Copyright © 2005-2008 Noelios Technologies.