Maven module :un.api : api-encoding :
Class : un.api.io.IOUtilities
Extends/Implements : -
Subclasses : -

Utility methods for stream manipulation.
author  Johann Sorel


Variables : -
Functions : toInputStream, toOutputStream, readAll, copy



public ByteInputStream toInputStream (Object input, boolean[] closeStream)

public ByteOutputStream toOutputStream (Object output, boolean[] closeStream)


Read all bytes in given stream.
Does not close the stream.
param  stream
return  byte[]
public byte[] readAll (ByteInputStream stream)


Copy content from input stream to output stream.
Streams are not closed.
param  in stream to read from, not null
param  out stream to write to, not null
return  number of copied bytes
public long copy (ByteInputStream in, ByteOutputStream out)