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.apache.tapestry5.internal.services.assets
Class BytestreamCache

    java.lang.Object
      org.apache.tapestry5.internal.services.assets.BytestreamCache

    public class BytestreamCache

extends java.lang.Object

A wrapper around a byte-stream, represented internally as a byte array. Part of the fix to TAP5-1116, avoiding a live lock due to ByteArrayOutputStream.writeTo() being a synchronized method.

Since:
  5.2.0

Constructor Summary
`BytestreamCache(byte[] streamData)`
`BytestreamCache(java.io.ByteArrayOutputStream os)`

Method Summary
`java.io.InputStream` | `openStream()`
`int` | `size()`
`void` | `writeTo(java.io.OutputStream os)`

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

Constructor Detail

### BytestreamCache

    public BytestreamCache(byte[] streamData)

### BytestreamCache

    public BytestreamCache(java.io.ByteArrayOutputStream os)

Method Detail

### writeTo

    public void writeTo(java.io.OutputStream os)
                 throws java.io.IOException

  Throws:
    `java.io.IOException`

### size

    public int size()

### openStream

    public java.io.InputStream openStream()

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

Copyright © 2003-2012 The Apache Software Foundation.