org.simantics.databoard.util
Class StreamUtil
java.lang.Object
org.simantics.databoard.util.StreamUtil
public class StreamUtil
- extends java.lang.Object
Method Summary |
static void |
read(java.io.InputStream is,
java.nio.ByteBuffer buf,
int bytes)
|
static byte[] |
readFully(java.io.File file)
|
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.File file,
java.nio.charset.Charset cs)
|
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 |
StreamUtil
public StreamUtil()
readString
public static java.lang.String readString(java.io.InputStream is,
java.nio.charset.Charset cs)
throws java.io.IOException
- Throws:
java.io.IOException
readString
public static java.lang.String readString(java.io.File file,
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
readFully
public static byte[] readFully(java.io.File file)
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