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

## org.jasig.portal.serialize
Class CachingWriter

    java.lang.Object
      java.io.Writer
          org.jasig.portal.serialize.CachingWriter

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

    public class CachingWriter

extends java.io.Writer
implements CharacterCachingWriter

Field Summary
`(package private) java.io.StringWriter` | `cache`
`(package private) boolean` | `caching`
`(package private) java.io.Writer` | `out`

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

Constructor Summary
`CachingWriter(java.io.Writer out)`

Method Summary
`void` | `close()`
`void` | `flush()`
`java.lang.String` | `getCache(java.lang.String encoding)`
`boolean` | `startCaching()`
`boolean` | `stopCaching()`
`void` | `write(char[] c)`
`void` | `write(char[] c, int off, int len)`
`void` | `write(int c)`
`void` | `write(java.lang.String str)`
`void` | `write(java.lang.String str, int off, int len)`

Methods inherited from class java.io.Writer
`append, append, append, append, append, append`

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

Field Detail

### out

    java.io.Writer out

### cache

    java.io.StringWriter cache

### caching

    boolean caching

Constructor Detail

### CachingWriter

    public CachingWriter(java.io.Writer out)

Method Detail

### startCaching

    public boolean startCaching()
                         throws java.io.IOException

  Specified by:
    `startCaching` in interface `CharacterCachingWriter`
  Throws:
    `java.io.IOException`

### getCache

    public java.lang.String getCache(java.lang.String encoding)
                              throws java.io.IOException

  Specified by:
    `getCache` in interface `CharacterCachingWriter`
  Throws:
    `java.io.IOException`

### stopCaching

    public boolean stopCaching()

  Specified by:
    `stopCaching` in interface `CharacterCachingWriter`

### close

    public void close()
               throws java.io.IOException

  Specified by:
    `close` in interface `java.io.Closeable`
  Specified by:
    `close` in class `java.io.Writer`
  Throws:
    `java.io.IOException`

### flush

    public void flush()
               throws java.io.IOException

  Specified by:
    `flush` in interface `java.io.Flushable`
  Specified by:
    `flush` in interface `CharacterCachingWriter`
  Specified by:
    `flush` in class `java.io.Writer`
  Throws:
    `java.io.IOException`

### write

    public void write(char[] c)
               throws java.io.IOException

  Overrides:
    `write` in class `java.io.Writer`
  Throws:
    `java.io.IOException`

### write

    public void write(char[] c,
                      int off,
                      int len)
               throws java.io.IOException

  Specified by:
    `write` in class `java.io.Writer`
  Throws:
    `java.io.IOException`

### write

    public void write(int c)
               throws java.io.IOException

  Overrides:
    `write` in class `java.io.Writer`
  Throws:
    `java.io.IOException`

### write

    public void write(java.lang.String str)
               throws java.io.IOException

  Overrides:
    `write` in class `java.io.Writer`
  Throws:
    `java.io.IOException`

### write

    public void write(java.lang.String str,
                      int off,
                      int len)
               throws java.io.IOException

  Overrides:
    `write` in class `java.io.Writer`
  Throws:
    `java.io.IOException`

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