es.caib.signatura.impl
Class MIMEInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FilterInputStream
          extended by es.caib.signatura.impl.MIMEInputStream
All Implemented Interfaces:
java.io.Closeable

public class MIMEInputStream
extends java.io.FilterInputStream


Field Summary
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
MIMEInputStream(java.io.InputStream is, java.lang.String contentType)
          Crea un nuevo MIMEInputStream
 
Method Summary
 int available()
          Devuelve el número de bytes que se pueden leer sin que se bloquee el stream
 void close()
           
 void mark(int readlimit)
          Does nothing, since this class does not support mark/reset.
 boolean markSupported()
          Tests if this input stream supports the mark and reset methods of InputStream, which it does not.
 int read()
          Lee el siguiente byte procesado
 int read(byte[] buffer, int offset, int length)
           
 void reset()
          Always throws an IOException, since this class does not support mark/reset.
 long skip(long n)
          Skips over and discards n bytes of data from the input stream.
 
Methods inherited from class java.io.FilterInputStream
read
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MIMEInputStream

public MIMEInputStream(java.io.InputStream is,
                       java.lang.String contentType)
                throws java.io.UnsupportedEncodingException
Crea un nuevo MIMEInputStream

Throws:
java.io.UnsupportedEncodingException
Method Detail

close

public void close()
           throws java.io.IOException
Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.FilterInputStream
Throws:
java.io.IOException

read

public int read()
         throws java.io.IOException
Lee el siguiente byte procesado

Overrides:
read in class java.io.FilterInputStream
Returns:
el siguiente byte de datos o bien -1 si se ha llegado al final del stream
Throws:
java.io.IOException

read

public int read(byte[] buffer,
                int offset,
                int length)
         throws java.io.IOException
Overrides:
read in class java.io.FilterInputStream
Throws:
java.io.IOException

skip

public long skip(long n)
          throws java.io.IOException
Skips over and discards n bytes of data from the input stream.

Overrides:
skip in class java.io.FilterInputStream
Parameters:
n - the number of bytes to be skipped.
Returns:
the actual number of bytes skipped.
Throws:
java.io.IOException - if an I/O error occurs.

available

public int available()
              throws java.io.IOException
Devuelve el número de bytes que se pueden leer sin que se bloquee el stream

Overrides:
available in class java.io.FilterInputStream
Throws:
java.io.IOException - i

mark

public void mark(int readlimit)
Does nothing, since this class does not support mark/reset.

Overrides:
mark in class java.io.FilterInputStream

reset

public void reset()
           throws java.io.IOException
Always throws an IOException, since this class does not support mark/reset.

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

markSupported

public boolean markSupported()
Tests if this input stream supports the mark and reset methods of InputStream, which it does not.

Overrides:
markSupported in class java.io.FilterInputStream
Returns:
false, since this class does not support the mark and reset methods.


Copyright © 2011 Direcció General de Tecnologia i Comunicacions. Govern de les Illes Balears. All Rights Reserved.