|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.OutputStream
com.ejie.r01f.io.BytesOutputStream
Versión des-sincronizada de ByteArrayOutputStream que ofrece una alternativa eficiente de SOLO LECTURA al array de bytes interno sin necesidad de hacer una copia (como es el caso de ByteArrayOutputStream), ver métodos writeTo y getInputStream
Constructor Summary | |
BytesOutputStream()
Constructor por defecto |
|
BytesOutputStream(int initialBufferSize)
Inicialización a partir de un tamaño de buffer |
Method Summary | |
void |
close()
|
int |
getLength()
Devuelve el número de bytes que contiene el buffer interno |
void |
reset()
Resetea el estado del buffer interno |
byte[] |
toByteArray()
Devuelve una copia del buffer interno. |
java.io.InputStream |
toInputStream()
Devuelve un InputStream que lee del buffer interno |
java.lang.String |
toString()
|
void |
write(byte[] data,
int offset,
int length)
|
void |
write(int datum)
|
void |
writeTo(java.io.OutputStream out)
Copia (vuelca) los datos del buffer interno en otro OutputStream |
Methods inherited from class java.io.OutputStream |
flush, write |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public BytesOutputStream()
public BytesOutputStream(int initialBufferSize)
initialBufferSize
- El tamaño inicial del bufferMethod Detail |
public void write(int datum) throws java.io.IOException
java.io.IOException
public void write(byte[] data, int offset, int length) throws java.io.IOException
java.io.IOException
public void close()
public byte[] toByteArray()
public void writeTo(java.io.OutputStream out) throws java.io.IOException
out
- El OutputStream al que hay que copiar (volcar) los datos
java.io.IOException
public java.io.InputStream toInputStream()
public void reset() throws java.io.IOException
java.io.IOException
public int getLength()
public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |