BLOB bLOB= (BLOB)pkContents.get("BINARY_DATA";
InputStream inStream = null;
ByteArrayOutputStream outStream = null;
byte[] recvData = null;
try
{
byte[] buf = new byte[1024];
inSteam = bLOB.getBinarySteam();
outStream = new ByteArrayOutputStream();
int readCnt = 0;
while( (readCnt = inStream.read(buf)) != -1 )
{
outStream.write(buf,0,readCnt);
}
outStream.flush();
recvData = outStream.toByteArry();
Debug.WriteLine(recvData.Length);