/** * Ensures that all pending data is sent out to the target. It also * flushes the target. If an I/O error occurs, this writer's error * state is set to {@code true}. */ @Override public void flush() { synchronized (lock) { if (out != null) { try { out.flush(); } catch (IOException e) { setError(); } } else { setError(); } } }
/** * Closes this print writer. Flushes this writer and then closes the target. * If an I/O error occurs, this writer's error flag is set to {@code true}. */ @Override public void close() { synchronized (lock) { if (out != null) { try { out.close(); } catch (IOException e) { setError(); } out = null; } } }
protected void setError() { super.setError(); }
public void print(String str) { try { out.write(str); } catch (IOException e) { setError(); } }
private void setError(Throwable th) { super.setError(); if (th instanceof IOException) _ioException=(IOException)th; else { _ioException=new IOException(String.valueOf(th)); _ioException.initCause(th); } LOG.debug(th); }
private void setError(Throwable th) { super.setError(); if (th instanceof IOException) _ioException=(IOException)th; else { _ioException=new IOException(String.valueOf(th)); _ioException.initCause(th); } LOG.debug(th); }
private void setError(Throwable th) { super.setError(); if (th instanceof IOException) _ioException=(IOException)th; else { _ioException=new IOException(String.valueOf(th)); _ioException.initCause(th); } LOG.debug(th); }
private void setError(Throwable th) { super.setError(); if (th instanceof IOException) _ioException=(IOException)th; else { _ioException=new IOException(String.valueOf(th)); _ioException.initCause(th); } LOG.debug(th); }
private void setError(Throwable th) { super.setError(); if (th instanceof IOException) _ioException=(IOException)th; else { _ioException=new IOException(String.valueOf(th)); _ioException.initCause(th); } LOG.debug(th); }
private void setError(Throwable th) { super.setError(); if (th instanceof IOException) _ioException=(IOException)th; else { _ioException=new IOException(String.valueOf(th)); _ioException.initCause(th); } LOG.debug(th); }
private void setError(Throwable th) { super.setError(); if (th instanceof IOException) _ioException=(IOException)th; else { _ioException=new IOException(String.valueOf(th)); _ioException.initCause(th); } if (LOG.isDebugEnabled()) LOG.debug(th); }
private void setError(Throwable th) { super.setError(); if (th instanceof IOException) _ioException=(IOException)th; else { _ioException=new IOException(String.valueOf(th)); _ioException.initCause(th); } if (LOG.isDebugEnabled()) LOG.debug(th); }
private void setError(Throwable th) { super.setError(); if (th instanceof IOException) _ioException=(IOException)th; else { _ioException=new IOException(String.valueOf(th)); _ioException.initCause(th); } if (LOG.isDebugEnabled()) LOG.debug(th); }