public CachingStream() throws IOException {
  super(null);
  Path tempFile=DefaultFilepaths.createTempFile("tmpattach",null);
  channel=Files.newByteChannel(tempFile,StandardOpenOption.CREATE,StandardOpenOption.WRITE,StandardOpenOption.TRUNCATE_EXISTING,StandardOpenOption.READ,StandardOpenOption.DELETE_ON_CLOSE);
  out=Channels.newOutputStream(channel);
}

public CachingStream ( ) throws IOException { super ( null ) ; Path tempFile = DefaultFilepaths . createTempFile ( "tmpattach" , null ) ; channel = Files . newByteChannel ( tempFile , StandardOpenOption . CREATE , StandardOpenOption . WRITE , StandardOpenOption . TRUNCATE_EXISTING , StandardOpenOption . READ , StandardOpenOption . DELETE_ON_CLOSE ) ; out = Channels . newOutputStream ( channel ) ; }
constructs a new caching stream that caches data in a temporary file .
