|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectaspose.pdf.BasicStream
aspose.pdf.BinaryFileStream
public class BinaryFileStream
Stream represent binary code .
Field Summary |
---|
Fields inherited from class aspose.pdf.BasicStream |
---|
canRead, canSeek, canWrite, length, seek |
Constructor Summary | |
---|---|
BinaryFileStream()
Constructs a BinaryFileStream instance. |
|
BinaryFileStream(BinaryFileStream bfs)
Constructs a BinaryFileStream instance from another BinaryFileStream. |
|
BinaryFileStream(byte[] arr)
Constructs a BinaryFileStream instance from a byte array. |
|
BinaryFileStream(java.io.File infile)
construct a BinaryFileStream instance from a File object. |
|
BinaryFileStream(java.io.File infile,
boolean canwrite)
Constructs a BinaryFileStream instance from a File object. |
|
BinaryFileStream(java.io.FileInputStream infs)
Constructs a BinaryFileStream instance from a FileInputStream object. |
|
BinaryFileStream(java.io.FileInputStream infs,
boolean canwrite)
construct a BinaryFileStream instance from a FileInputStream object. |
|
BinaryFileStream(java.lang.String infile)
Constructs a BinaryFileStream instance from a file. |
|
BinaryFileStream(java.lang.String infile,
boolean canwrite)
Construct a BinaryFileStream instance from a file. |
Method Summary | |
---|---|
void |
close()
Closes the stream. |
void |
flush()
Flushes the stream. |
java.io.FileInputStream |
getInput()
Gets the FileInputStream object. |
int |
read()
Reads an int value. |
int |
read(byte[] data)
Reads a byte array into the stream. |
int |
read(byte[] data,
int offset,
int count)
Reads a byte array from the stream. |
int |
read(int[] data)
Reads a int array from the stream. |
int |
read(int[] data,
int offset,
int count)
Reads a int array from the stream. |
byte |
readByte()
Reads a byte from the stream. |
byte[] |
readBytes(long getlength)
Reads content into a byte array. |
void |
setappendwrite(boolean value)
Sets appending write mode. |
void |
setInput(java.io.FileInputStream fs)
Sets the FileInputStream object. |
void |
setoutput(java.io.File outfile)
Sets output. |
void |
setoutput(java.lang.String outfile)
Sets output. |
void |
setPosition(int pos)
Set the pointer position. |
void |
setSeek(long value)
Sets the offset . |
void |
setSeek(long orig,
long offset)
Sets the offset compare to origin. |
void |
skip(long number)
Skips several bytes. |
byte[] |
toArray()
Converts to a byte array. |
int[] |
toIntArray()
Converts to a int array. |
MemStream |
toMemStream()
Transfers the stream to a Memory Stream. |
void |
write()
Writes a char to the output stream |
void |
write(BinaryFileStream bfs)
Writes the content to a BinaryFileStream object. |
void |
write(byte data)
Writes a byte value to the output stream. |
void |
write(byte[] data)
Writes a byte array to the output stream. |
void |
write(byte[] data,
int offset,
int count)
Writes a byte array to the output stream. |
Methods inherited from class aspose.pdf.BasicStream |
---|
getCanRead, getCanSeek, getCanWrite, getLength, getSeek, setCanRead, setCanSeek, setCanWrite, setLength |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BinaryFileStream()
public BinaryFileStream(byte[] arr)
arr
- The byte array.public BinaryFileStream(java.lang.String infile)
infile
- The file name.public BinaryFileStream(java.lang.String infile, boolean canwrite)
infile
- The file name.canwrite
- Whether the stream can write.public BinaryFileStream(BinaryFileStream bfs)
bfs
- The BinaryFileStream.public BinaryFileStream(java.io.File infile)
infile
- The File object.public BinaryFileStream(java.io.File infile, boolean canwrite)
infile
- The File object.canwrite
- Whether the stream can write.public BinaryFileStream(java.io.FileInputStream infs)
infs
- The FileInputStream object.public BinaryFileStream(java.io.FileInputStream infs, boolean canwrite)
infs
- The FileInputStream object.canwrite
- Whether the stream can write.Method Detail |
---|
public java.io.FileInputStream getInput()
public void setInput(java.io.FileInputStream fs)
fs
- The FileInputStream object.public void setSeek(long value)
setSeek
in class BasicStream
value
- The offset value.public void setSeek(long orig, long offset)
setSeek
in class BasicStream
orig
- The original position.offset
- The offset.public void setappendwrite(boolean value)
value
- A boolean value that indicates whether the stream is appending write mode.public void setoutput(java.lang.String outfile)
outfile
- The output file name.public void setoutput(java.io.File outfile)
outfile
- The output File object.public int read()
read
in class BasicStream
public byte readByte()
readByte
in class BasicStream
public byte[] toArray()
public int[] toIntArray()
public int read(byte[] data)
data
- The byte array.
public int read(int[] data)
data
- The int array.
public int read(byte[] data, int offset, int count)
read
in class BasicStream
data
- The byte array.offset
- The stream offset.count
- The count of the byte value that will be read.
public int read(int[] data, int offset, int count)
data
- The int array.offset
- The stream offset.count
- The count of the int value that will be read.
public void skip(long number)
skip
in class BasicStream
number
- The number of the bytes.public void write()
write
in class BasicStream
public void write(BinaryFileStream bfs)
bfs
- The BinaryFileStream object.public void write(byte data)
write
in class BasicStream
data
- The byte value.public void write(byte[] data)
write
in class BasicStream
data
- The byte array.public void write(byte[] data, int offset, int count)
write
in class BasicStream
data
- The byte array.offset
- The stream offset.count
- The count of the byte values that needs to be read.public void flush()
flush
in class BasicStream
public void close()
close
in class BasicStream
public void setPosition(int pos)
pos
- The position of the pointer.public byte[] readBytes(long getlength)
getlength
- The length of the content.
public MemStream toMemStream() throws java.io.IOException
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |