org.simantics.databoard.util
Class StreamUtil

java.lang.Object
  extended by org.simantics.databoard.util.StreamUtil

public class StreamUtil
extends java.lang.Object


Constructor Summary
StreamUtil()
           
 
Method Summary
static void read(java.io.InputStream is, java.nio.ByteBuffer buf, int bytes)
           
static byte[] readFully(java.io.InputStream is)
           
static void readFully(java.io.InputStream is, byte[] b)
           
static void readFully(java.io.InputStream is, byte[] b, int off, int len)
           
static void readFully(java.io.InputStream is, java.nio.ByteBuffer buf)
           
static java.lang.String readString(java.io.InputStream is, java.nio.charset.Charset cs)
           
static void writeFully(byte[] data, java.io.File dst)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamUtil

public StreamUtil()
Method Detail

readString

public static java.lang.String readString(java.io.InputStream is,
                                          java.nio.charset.Charset cs)
                                   throws java.io.IOException
Throws:
java.io.IOException

readFully

public static byte[] readFully(java.io.InputStream is)
                        throws java.io.IOException
Throws:
java.io.IOException

read

public static void read(java.io.InputStream is,
                        java.nio.ByteBuffer buf,
                        int bytes)
                 throws java.io.IOException
Throws:
java.io.IOException

readFully

public static void readFully(java.io.InputStream is,
                             java.nio.ByteBuffer buf)
                      throws java.io.IOException
Throws:
java.io.IOException

readFully

public static void readFully(java.io.InputStream is,
                             byte[] b)
                      throws java.io.IOException
Throws:
java.io.IOException

readFully

public static void readFully(java.io.InputStream is,
                             byte[] b,
                             int off,
                             int len)
                      throws java.io.IOException
Throws:
java.io.IOException

writeFully

public static void writeFully(byte[] data,
                              java.io.File dst)
                       throws java.io.IOException
Throws:
java.io.IOException