org.apache.pdfbox.examples
Class AbstractExample

java.lang.Object
  extended by org.apache.pdfbox.examples.AbstractExample
Direct Known Subclasses:
SetField

public abstract class AbstractExample
extends Object

A simple class which has some methods used by all examples.

Version:
$Revision: 1.4 $
Author:
Ben Litchfield

Constructor Summary
AbstractExample()
           
 
Method Summary
 void close(COSDocument doc)
          Close the document.
static void close(COSWriter writer)
          Close the writer.
 void close(InputStream stream)
          Close the stream.
 void close(OutputStream stream)
          Close the stream.
 void close(PDDocument doc)
          Close the document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractExample

public AbstractExample()
Method Detail

close

public void close(InputStream stream)
           throws IOException
Close the stream.

Parameters:
stream - The stream to close.
Throws:
IOException - If there is an error closing the stream.

close

public void close(OutputStream stream)
           throws IOException
Close the stream.

Parameters:
stream - The stream to close.
Throws:
IOException - If there is an error closing the stream.

close

public void close(COSDocument doc)
           throws IOException
Close the document.

Parameters:
doc - The doc to close.
Throws:
IOException - If there is an error closing the document.

close

public void close(PDDocument doc)
           throws IOException
Close the document.

Parameters:
doc - The doc to close.
Throws:
IOException - If there is an error closing the document.

close

public static void close(COSWriter writer)
                  throws IOException
Close the writer.

Parameters:
writer - The writer to close.
Throws:
IOException - If there is an error closing the writer.


Copyright © 2002-2010 The Apache Software Foundation. All Rights Reserved.