/** * Create a new storage area with the given stub. * @param stub */ public OutputStreamStorage( OutputStreamStub stub ) { if( stub.getOutputFile() != null ) { this.file = stub.getOutputFile(); this.outputStream = initializeOutputStream(stub.getOutputFile()); } else if( stub.getOutputStream() != null ) { this.file = null; this.outputStream = stub.getOutputStream(); } else throw new ReviewedGATKException("Not enough information to create storage for an OutputStream; need either a file or an existing output stream"); }