Ejemplo n.º 1
0
 /**
  * Deletes the Storage that holds the content of this binary body.
  *
  * @see org.apache.james.mime4j.dom.Disposable#dispose()
  */
 @Override
 public void dispose() {
   if (storage != null) {
     storage.delete();
     storage = null;
   }
 }
Ejemplo n.º 2
0
  @Override
  public void writeTo(OutputStream out) throws IOException {
    if (out == null) throw new IllegalArgumentException();

    InputStream in = storage.getInputStream();
    CodecUtil.copy(in, out);
    in.close();
  }
Ejemplo n.º 3
0
 @Override
 public StorageBinaryBody copy() {
   storage.addReference();
   return new StorageBinaryBody(storage);
 }
Ejemplo n.º 4
0
 @Override
 public InputStream getInputStream() throws IOException {
   return storage.getInputStream();
 }