|
Blob data is stored in large object data types, general store binary, so use only byte access.
First, determine whether the data blob is empty, then use the input stream reading data, the specific code as follows:
String content = null;
try {
if (image! = null) {
InputStream is = image.getBinaryStream ();
byte [] b = new byte [is.available ()];
is.read (b, 0, b.length);
content = new String (b);
}
System.out.println (content);
} Catch (IOException e) {
e.printStackTrace ();
} |
|
|
|