Package org.apache.fontbox.cff
Class DataOutput
- java.lang.Object
 - 
- org.apache.fontbox.cff.DataOutput
 
 
- 
public class DataOutput extends java.lang.Object- Version:
 - $Revision: 1.0 $
 - Author:
 - Villu Ruusmann
 
 
- 
- 
Constructor Summary
Constructors Constructor Description DataOutput()Constructor.DataOutput(java.lang.String encoding)Constructor with a given encoding. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getBytes()Returns the written data buffer as byte array.voidprint(java.lang.String string)Write the given string to the buffer using the given encoding.voidprintln()Add a newline to the given string.voidprintln(java.lang.String string)Write the given string to the buffer using the given encoding.voidwrite(byte[] buffer)Write a byte array to the buffer.voidwrite(byte[] buffer, int offset, int length)Write a part of a byte array to the buffer.voidwrite(int value)Write an int value to the buffer. 
 - 
 
- 
- 
Method Detail
- 
getBytes
public byte[] getBytes()
Returns the written data buffer as byte array.- Returns:
 - the data buffer as byte array
 
 
- 
write
public void write(int value)
Write an int value to the buffer.- Parameters:
 value- the given value
 
- 
write
public void write(byte[] buffer)
Write a byte array to the buffer.- Parameters:
 buffer- the given byte array
 
- 
write
public void write(byte[] buffer, int offset, int length)Write a part of a byte array to the buffer.- Parameters:
 buffer- the given byte bufferoffset- the offset where to startlength- the amount of bytes to be written from the array
 
- 
print
public void print(java.lang.String string) throws java.io.IOExceptionWrite the given string to the buffer using the given encoding.- Parameters:
 string- the given string- Throws:
 java.io.IOException- If an error occurs during writing the data to the buffer
 
- 
println
public void println(java.lang.String string) throws java.io.IOExceptionWrite the given string to the buffer using the given encoding. A newline is added after the given string- Parameters:
 string- the given string- Throws:
 java.io.IOException- If an error occurs during writing the data to the buffer
 
- 
println
public void println()
Add a newline to the given string. 
 - 
 
 -