com.ejie.r01f.servlet.upload
Class PartInputStream

java.lang.Object
  extended byjava.io.InputStream
      extended byjava.io.FilterInputStream
          extended bycom.ejie.r01f.servlet.upload.PartInputStream

public class PartInputStream
extends java.io.FilterInputStream

Clase wrapper de un ServletInputStream y que lee desde este buscando una cadena delimitadora (boundary) dentro de un post multi-part desde un navegador


Method Summary
 int available()
          Devuelve si hay contenido disponible en el ServletInputStream
 void close()
          Cierra el inputStream, para lo cual lee todo el contenido
 int read()
          Devuelve un byte o -1 si no se puede leer
 int read(byte[] b)
          Llena el array de bytes desde el ServletInputStream
 int read(byte[] b, int off, int len)
          Lee el numero de bytes especificado en len desde el ServletInputStream a partir del offset especificado y lo devuelve en el array de bytes
 
Methods inherited from class java.io.FilterInputStream
mark, markSupported, reset, skip
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

read

public int read()
         throws java.io.IOException
Devuelve un byte o -1 si no se puede leer

Throws:
java.io.IOException

read

public int read(byte[] b,
                int off,
                int len)
         throws java.io.IOException
Lee el numero de bytes especificado en len desde el ServletInputStream a partir del offset especificado y lo devuelve en el array de bytes

Throws:
java.io.IOException

read

public int read(byte[] b)
         throws java.io.IOException
Llena el array de bytes desde el ServletInputStream

Throws:
java.io.IOException

available

public int available()
              throws java.io.IOException
Devuelve si hay contenido disponible en el ServletInputStream

Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Cierra el inputStream, para lo cual lee todo el contenido

Throws:
java.io.IOException