@Test(expected = IOException.class) public void testClose() throws Exception { try { new HttpResponseOutputStream<Void>(new NullOutputStream()) { @Override public Void getStatus() throws BackgroundException { throw new InteroperabilityException("d"); } }.close(); } catch(IOException e) { assertEquals("d. Please contact your web hosting service provider for assistance.", e.getMessage()); throw e; } }
@Override public void close() throws IOException { super.close(); try { final T response = this.getStatus(); if(log.isDebugEnabled()) { log.debug(String.format("Closed stream %s with response value %s", this, response)); } } catch(BackgroundException e) { throw new IOException(e.getDetail(), e); } }
HttpResponseOutputStream extends StatusOutputStream<T> { @Override public void close() throws IOException { super.close(); try { final T response = this.getStatus(); if(log.isDebugEnabled()) { log.debug(String.format("Closed stream %s with response value %s", this, response)); } } catch(BackgroundException e) { throw new IOException(e.getDetail(), e); } } }
HttpResponseOutputStream extends StatusOutputStream<T> { @Override public void close() throws IOException { super.close(); try { final T response = this.getStatus(); if(log.isDebugEnabled()) { log.debug(String.format("Closed stream %s with response value %s", this, response)); } } catch(BackgroundException e) { throw new IOException(e.getDetail(), e); } } HttpResponseOutputStream(final OutputStream proxy); }
HttpResponseOutputStream extends StatusOutputStream<T> { @Override public void close() throws IOException { super.close(); try { final T response = this.getStatus(); if(log.isDebugEnabled()) { log.debug(String.format("Closed stream %s with response value %s", this, response)); } } catch(BackgroundException e) { throw new IOException(e.getDetail(), e); } } HttpResponseOutputStream(final OutputStream proxy); abstract T getStatus(); @Override void close(); }
HttpResponseOutputStream extends StatusOutputStream<T> { @Override public void close() throws IOException { super.close(); try { final T response = this.getStatus(); if(log.isDebugEnabled()) { log.debug(String.format("Closed stream %s with response value %s", this, response)); } } catch(BackgroundException e) { throw new IOException(e.getDetail(), e); } } HttpResponseOutputStream(final OutputStream proxy); abstract T getStatus(); @Override void close();  }