/** * Gets the raw data. The size of the byte array maybe larger than the actual length. */ public byte[] get() { if (data == null) { try { ByteArrayOutputStreamEx baos = new ByteArrayOutputStreamEx(1024); InputStream is = dataHandler.getDataSource().getInputStream(); baos.readFrom(is); is.close(); data = baos.getBuffer(); dataLen = baos.size(); } catch (IOException e) { // TODO: report the error to the unmarshaller dataLen = 0; // recover by assuming length-0 data } } return data; }
/** * Gets the raw data. The size of the byte array maybe larger than the actual length. */ public byte[] get() { if (data == null) { try { ByteArrayOutputStreamEx baos = new ByteArrayOutputStreamEx(1024); InputStream is = dataHandler.getDataSource().getInputStream(); baos.readFrom(is); is.close(); data = baos.getBuffer(); dataLen = baos.size(); } catch (IOException e) { // TODO: report the error to the unmarshaller dataLen = 0; // recover by assuming length-0 data } } return data; }
/** * Gets the raw data. The size of the byte array maybe larger than the actual length. */ public byte[] get() { if (data == null) { try { ByteArrayOutputStreamEx baos = new ByteArrayOutputStreamEx(1024); InputStream is = dataHandler.getDataSource().getInputStream(); baos.readFrom(is); is.close(); data = baos.getBuffer(); dataLen = baos.size(); } catch (IOException e) { // TODO: report the error to the unmarshaller dataLen = 0; // recover by assuming length-0 data } } return data; }
/** * Gets the raw data. The size of the byte array maybe larger than the actual length. */ public byte[] get() { if (data == null) { try { ByteArrayOutputStreamEx baos = new ByteArrayOutputStreamEx(1024); InputStream is = dataHandler.getDataSource().getInputStream(); baos.readFrom(is); is.close(); data = baos.getBuffer(); dataLen = baos.size(); } catch (IOException e) { // TODO: report the error to the unmarshaller dataLen = 0; // recover by assuming length-0 data } } return data; }