Top Description Fields Constructors Methods
org.apache.pdfbox.filter

pack-priv final Class ASCII85OutputStream

extends FilterOutputStream
Class Inheritance
Imports
java.io.FilterOutputStream, .IOException, .OutputStream

This class represents an ASCII85 output stream.
Author
Ben Litchfield

Field Summary

Modifier and TypeField and Description
private int
private boolean
private byte[]
private int
private int
maxline

Function produces five ASCII printing characters from four bytes of binary data.

private static final char
private static final char
private byte[]
private char
private static final char
Z

Inherited from java.io.FilterOutputStream:
out

Constructor Summary

AccessConstructor and Description
pack-priv
ASCII85OutputStream(OutputStream
The output stream to write to.
out
)

Constructor.

Method Summary

Modifier and TypeMethod and Description
public void
close()

Overrides java.io.FilterOutputStream.close.

Implements java.io.Closeable.close.

This will close the stream.

public void
flush()

Overrides java.io.FilterOutputStream.flush.

Implements java.io.Flushable.flush.

This will flush the data to the stream.

public int

Returns:

The line length attribute.
getLineLength
()

This will get the length of the line.

public char

Returns:

The terminating character.
getTerminator
()

This will get the terminating character.

public void
setLineLength(int
The length of the line to use.
l
)

This will set the line length that will be used.

public void
setTerminator(char
The terminating character.
term
)

This will set the terminating character.

private void
transformASCII85()

This will transform the next four ascii bytes.

public void
write(int
The byte to write.
b
)

Overrides java.io.FilterOutputStream.write.

This will write a single byte.

Inherited from java.io.FilterOutputStream:
writewrite

Field Detail

countback to summary
private int count
flushedback to summary
private boolean flushed
indataback to summary
private byte[] indata
lineBreakback to summary
private int lineBreak
maxlineback to summary
private int maxline

Function produces five ASCII printing characters from four bytes of binary data.

NEWLINEback to summary
private static final char NEWLINE
OFFSETback to summary
private static final char OFFSET
outdataback to summary
private byte[] outdata
terminatorback to summary
private char terminator
Zback to summary
private static final char Z

Constructor Detail

ASCII85OutputStreamback to summary
pack-priv ASCII85OutputStream(OutputStream out)

Constructor.

Parameters
out:OutputStream

The output stream to write to.

Method Detail

closeback to summary
public void close() throws IOException

Overrides java.io.FilterOutputStream.close.

Implements java.io.Closeable.close.

This will close the stream.

Annotations
@Override
Exceptions
IOException:
If there is an error closing the wrapped stream.
flushback to summary
public void flush() throws IOException

Overrides java.io.FilterOutputStream.flush.

Implements java.io.Flushable.flush.

This will flush the data to the stream.

Annotations
@Override
Exceptions
IOException:
If there is an error writing the data to the stream.
getLineLengthback to summary
public int getLineLength()

This will get the length of the line.

Returns:int

The line length attribute.

getTerminatorback to summary
public char getTerminator()

This will get the terminating character.

Returns:char

The terminating character.

setLineLengthback to summary
public void setLineLength(int l)

This will set the line length that will be used.

Parameters
l:int

The length of the line to use.

setTerminatorback to summary
public void setTerminator(char term)

This will set the terminating character.

Parameters
term:char

The terminating character.

transformASCII85back to summary
private void transformASCII85()

This will transform the next four ascii bytes.

writeback to summary
public void write(int b) throws IOException

Overrides java.io.FilterOutputStream.write.

This will write a single byte.

Parameters
b:int

The byte to write.

Annotations
@Override
Exceptions
IOException:
If there is an error writing to the stream.