this.name = name; this.contentType = data == null ? CONTENT_TYPE : data.getContentType(); os = new ByteArrayOutputStream(); try { if (data != null) { data.writeTo(os); } } catch (Exception e) { // Is this sufficient? }
return contentType;
if (os.size() != 0) { data = os.toByteArray(); os.reset(); } return new ByteArrayInputStream(data == null ? new byte[0] : data);
return name;
if (os.size() != 0) { data = os.toByteArray(); os.reset(); } return os;