com.ejie.r01f.sql
Class BLOBInputStream

java.lang.Object
  extended byjava.io.InputStream
      extended bycom.ejie.r01f.sql.BLOBInputStream

public class BLOBInputStream
extends java.io.InputStream

LECTURA DE UN BLOB Clase Wrapper de un BlobInputStream para ser utilizada desde SQLHelpper Se encarga de obtener la conexión a la base de datos y liberarla cuando ya se ha leido todo el inputStream.


Method Summary
 int available()
          Devuelve el número de bytes disponibles para ser leidos
 void close()
           
 void finalize()
          Cerrar la conexión a base de datos en su caso
 int read()
          Lee un byte del inputStream y lo devuelve
 int read(byte[] b)
          Llena el array de bytes que se pasa como parametro
 int read(byte[] b, int off, int len)
          Lee un numero de bytes a partir de un offset y los devuelve como un array de bytes
 long skip(long len)
          Salta un número de bytes
 
Methods inherited from class java.io.InputStream
mark, markSupported, reset
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

finalize

public void finalize()
Cerrar la conexión a base de datos en su caso


read

public int read()
         throws java.io.IOException
Lee un byte del inputStream y lo devuelve

Returns:
(int)El byte leido
Throws:
java.io.IOException
See Also:
InputStream.read()

read

public int read(byte[] b,
                int off,
                int len)
         throws java.io.IOException
Lee un numero de bytes a partir de un offset y los devuelve como un array de bytes

Returns:
(int) El número de bytes leidos o -1 si se ha llegado al final
Throws:
java.io.IOException
See Also:
InputStream.read(byte[], int, int)

read

public int read(byte[] b)
         throws java.io.IOException
Llena el array de bytes que se pasa como parametro

Returns:
(int) El numero de bytes leidos o -1 si se ha llegado al final
Throws:
java.io.IOException
See Also:
InputStream.read(byte[])

skip

public long skip(long len)
          throws java.io.IOException
Salta un número de bytes

Returns:
(long): El numero de bytes saltados
Throws:
java.io.IOException
See Also:
InputStream.skip(long)

available

public int available()
              throws java.io.IOException
Devuelve el número de bytes disponibles para ser leidos

Returns:
(int)El numero de bytes disponibles
Throws:
java.io.IOException
See Also:
InputStream.available()

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException
See Also:
InputStream.close()