AbortablePrintWriter (GWT Javadoc)

Overview | Package | Class | Use | Deprecated | Help
| GWT 2.7.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.google.gwt.codegen.server
Class AbortablePrintWriter

    java.lang.Object
      java.io.Writer
          java.io.PrintWriter
              com.google.gwt.codegen.server.AbortablePrintWriter

All Implemented Interfaces:
  java.io.Closeable, java.io.Flushable, java.lang.Appendable

    public class AbortablePrintWriter

extends java.io.PrintWriter

Wrapper for a `PrintWriter` that adds the ability to abort creation and an onClose hook

Experimental API - subject to change.

Field Summary

Fields inherited from class java.io.PrintWriter
`out`

Fields inherited from class java.io.Writer
`lock`

Constructor Summary
`AbortablePrintWriter(java.io.PrintWriter pw)` Wrap a `PrintWriter` instance.

Method Summary
`void` | `abort()` Abort creation of this output.
`void` | `close()`
`protected void` | `onClose(boolean aborted)` Called exactly once when this `PrintWriter` is closed or aborted.

Methods inherited from class java.io.PrintWriter
`append, append, append, checkError, clearError, flush, format, format, print, print, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, println, println, println, setError, write, write, write, write, write`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AbortablePrintWriter

    public AbortablePrintWriter(java.io.PrintWriter pw)

  Wrap a `PrintWriter` instance.

  Parameters:
    `pw` -
  Throws:
    `java.lang.RuntimeException` - if there are reflection errors accessing the out field in pw

Method Detail

### abort

    public void abort()

  Abort creation of this output.

### close

    public void close()

  Specified by:
    `close` in interface `java.io.Closeable`
  Overrides:
    `close` in class `java.io.PrintWriter`

### onClose

    protected void onClose(boolean aborted)

  Called exactly once when this `PrintWriter` is closed or aborted.

  Parameters:
    `aborted` -

Overview | Package | Class | Use | Deprecated | Help
| GWT 2.7.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD