|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.teiid.core.util.ObjectConverterUtil
public class ObjectConverterUtil
Constructor Summary | |
---|---|
ObjectConverterUtil()
|
Method Summary | |
---|---|
static char[] |
bytesToChar(byte[] bytes,
java.lang.String encoding)
Returns the given bytes as a char array using a given encoding (null means platform default). |
protected static byte[] |
convertBlobToByteArray(java.sql.Blob data)
|
static byte[] |
convertFileToByteArray(java.io.File file)
Returns the contents of the given file as a byte array. |
static char[] |
convertFileToCharArray(java.io.File file,
java.lang.String encoding)
Returns the contents of the given file as a char array. |
static java.lang.String |
convertFileToString(java.io.File file)
Returns the contents of the given file as a string. |
static byte[] |
convertToByteArray(java.io.InputStream is)
|
static byte[] |
convertToByteArray(java.io.InputStream is,
int length)
Returns the given input stream's contents as a byte array. |
static byte[] |
convertToByteArray(java.io.InputStream is,
int length,
boolean close)
|
static byte[] |
convertToByteArray(java.lang.Object data)
|
static byte[] |
convertToByteArray(java.util.zip.ZipEntry ze,
java.util.zip.ZipFile zip)
Returns the contents of the given zip entry as a byte array. |
static char[] |
convertToCharArray(java.io.InputStream stream,
int length,
java.lang.String encoding)
Returns the given input stream's contents as a character array. |
static char[] |
convertToCharArray(java.io.Reader reader,
int length)
|
static java.io.InputStream |
convertToInputStream(byte[] data)
|
static java.io.InputStream |
convertToInputStream(char[] data)
|
static java.io.InputStream |
convertToInputStream(java.lang.String data)
|
static java.lang.String |
convertToString(java.io.InputStream stream)
Returns the contents of the given InputStream as a string. |
static java.lang.String |
convertToString(java.io.Reader reader)
|
static void |
write(byte[] data,
java.lang.String fileName)
|
static void |
write(char[] data,
java.lang.String fileName)
|
static void |
write(java.io.InputStream is,
java.io.File f)
|
static void |
write(java.io.InputStream is,
java.lang.String fileName)
|
static int |
write(java.io.OutputStream out,
java.io.InputStream is,
byte[] l_buffer,
int length)
|
static int |
write(java.io.OutputStream out,
java.io.InputStream is,
byte[] l_buffer,
int length,
boolean close)
|
static int |
write(java.io.OutputStream out,
java.io.InputStream is,
int length)
|
static int |
write(java.io.OutputStream out,
java.io.InputStream is,
int length,
boolean close)
|
static void |
write(java.io.Reader reader,
java.io.File f)
|
static void |
write(java.io.Reader reader,
java.lang.String fileName)
|
static int |
write(java.io.Writer out,
java.io.Reader is,
int length,
boolean close)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ObjectConverterUtil()
Method Detail |
---|
protected static byte[] convertBlobToByteArray(java.sql.Blob data) throws TeiidException
TeiidException
public static byte[] convertToByteArray(java.lang.Object data) throws TeiidException, java.io.IOException
TeiidException
java.io.IOException
public static byte[] convertToByteArray(java.io.InputStream is) throws java.io.IOException
java.io.IOException
public static byte[] convertToByteArray(java.io.InputStream is, int length) throws java.io.IOException
java.io.IOException
- if a problem occurred reading the stream.public static byte[] convertToByteArray(java.io.InputStream is, int length, boolean close) throws java.io.IOException
java.io.IOException
public static int write(java.io.OutputStream out, java.io.InputStream is, byte[] l_buffer, int length) throws java.io.IOException
java.io.IOException
public static int write(java.io.OutputStream out, java.io.InputStream is, byte[] l_buffer, int length, boolean close) throws java.io.IOException
java.io.IOException
public static int write(java.io.OutputStream out, java.io.InputStream is, int length) throws java.io.IOException
java.io.IOException
public static int write(java.io.OutputStream out, java.io.InputStream is, int length, boolean close) throws java.io.IOException
java.io.IOException
public static int write(java.io.Writer out, java.io.Reader is, int length, boolean close) throws java.io.IOException
java.io.IOException
public static java.io.InputStream convertToInputStream(byte[] data)
public static java.io.InputStream convertToInputStream(java.lang.String data)
public static java.io.InputStream convertToInputStream(char[] data)
public static void write(java.io.InputStream is, java.lang.String fileName) throws java.io.IOException
java.io.IOException
public static void write(java.io.Reader reader, java.lang.String fileName) throws java.io.IOException
java.io.IOException
public static void write(java.io.Reader reader, java.io.File f) throws java.io.IOException
java.io.IOException
public static void write(java.io.InputStream is, java.io.File f) throws java.io.IOException
java.io.IOException
public static void write(byte[] data, java.lang.String fileName) throws java.lang.Exception
java.lang.Exception
public static void write(char[] data, java.lang.String fileName) throws java.lang.Exception
java.lang.Exception
public static char[] bytesToChar(byte[] bytes, java.lang.String encoding) throws java.io.IOException
java.io.IOException
public static byte[] convertFileToByteArray(java.io.File file) throws java.io.IOException
java.io.IOException
- if a problem occurred reading the file.public static char[] convertFileToCharArray(java.io.File file, java.lang.String encoding) throws java.io.IOException
java.io.IOException
- if a problem occurred reading the file.public static java.lang.String convertFileToString(java.io.File file) throws java.io.IOException
java.io.IOException
- if a problem occurred reading the file.public static java.lang.String convertToString(java.io.InputStream stream) throws java.io.IOException
java.io.IOException
- if a problem occurred reading the file.public static char[] convertToCharArray(java.io.InputStream stream, int length, java.lang.String encoding) throws java.io.IOException
java.io.IOException
- if a problem occurred reading the stream.public static byte[] convertToByteArray(java.util.zip.ZipEntry ze, java.util.zip.ZipFile zip) throws java.io.IOException
java.io.IOException
- if a problem occurred reading the zip entry.public static java.lang.String convertToString(java.io.Reader reader) throws java.io.IOException
java.io.IOException
public static char[] convertToCharArray(java.io.Reader reader, int length) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |