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

## org.apache.fop.afp
Class AFPStreamer

    java.lang.Object
      org.apache.fop.afp.AFPStreamer

All Implemented Interfaces:
  Streamable

public class AFPStreamer
extends java.lang.Object
implements Streamable

Manages the streaming of the AFP output

Constructor Summary
`AFPStreamer(Factory factory)` Main constructor

Method Summary
`void` | `close()` Closes off the AFP stream writing the document stream
`DataStream` | `createDataStream(AFPPaintingState paintingState)` Creates a new DataStream
`ResourceGroup` | `getResourceGroup(AFPResourceLevel level)` Returns the resource group for a given resource info
`void` | `setDefaultResourceGroupFilePath(java.lang.String filePath)` Sets the default resource group file path
`void` | `setOutputStream(java.io.OutputStream outputStream)` Sets the final outputstream
`void` | `writeToStream(java.io.OutputStream os)` DataStream objects must implement the writeToStream() method to write its data to the given OutputStream

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

Constructor Detail

### AFPStreamer

    public AFPStreamer(Factory factory)

  Main constructor

Parameters:
  `factory` - a factory

Method Detail

### createDataStream

    public DataStream createDataStream(AFPPaintingState paintingState)
                                throws java.io.IOException

  Creates a new DataStream

  Parameters:
    `paintingState` - the AFP painting state
  Returns:
    a new `DataStream`
  Throws:
    `java.io.IOException` - thrown if an I/O exception of some sort has occurred

### setDefaultResourceGroupFilePath

    public void setDefaultResourceGroupFilePath(java.lang.String filePath)

  Sets the default resource group file path

  Parameters:
    `filePath` - the default resource group file path

### getResourceGroup

    public ResourceGroup getResourceGroup(AFPResourceLevel level)

  Returns the resource group for a given resource info

  Parameters:
    `level` - a resource level
  Returns:
    a resource group for the given resource info

### close

    public void close()
               throws java.io.IOException

  Closes off the AFP stream writing the document stream

  Throws:
    `java.io.IOException` - if an an I/O exception of some sort has occurred

### setOutputStream

    public void setOutputStream(java.io.OutputStream outputStream)

  Sets the final outputstream

  Parameters:
    `outputStream` - an outputstream

### writeToStream

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

  DataStream objects must implement the writeToStream() method to write its data to the given OutputStream

  Specified by:
    `writeToStream` in interface `Streamable`
  Parameters:
    `os` - the outputsteam stream
  Throws:
    `java.io.IOException` - an I/O exception of some sort has occurred.

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

Copyright 1999-2010 The Apache Software Foundation. All Rights Reserved.