Example #1
0
 // returns the mimeType associated with this content part
 public String getMimeType() {
   String mimeType = "application/octet-stream";
   if (part != null) {
     mimeType = part.getMimeType();
   }
   return mimeType;
 }
Example #2
0
 // returns the content associated with this content part
 public java.io.InputStream getContent() throws ServiceException {
   java.io.InputStream stream = null;
   if (part != null) {
     try {
       Object content = part.getContent(bizdoc.getInternalId());
       if (content != null) {
         if (content instanceof java.io.InputStream) {
           stream = (java.io.InputStream) content;
         } else {
           stream = new java.io.ByteArrayInputStream((byte[]) content);
         }
       }
     } catch (java.io.IOException ex) {
       throw new ServiceException(ex.getClass().getName() + ": " + ex.getMessage());
     }
   }
   return stream;
 }
Example #3
0
 // returns the name of this content part
 public String getName() {
   return part == null ? null : part.getPartName();
 }