aspose.pdf
Class TextFileStream

java.lang.Object
  extended by aspose.pdf.BasicStream
      extended by aspose.pdf.TextFileStream

public class TextFileStream
extends BasicStream

File stream represent text based file .


Constructor Summary
TextFileStream()
          construction
TextFileStream(java.io.File infile)
          construction
TextFileStream(java.io.File infile, boolean canwrite)
          construction
TextFileStream(java.lang.String infile)
          construction
TextFileStream(java.lang.String infile, boolean canwrite)
          construction
 
Method Summary
 void close()
          close the stream
 void flush()
          flush the stream
 java.io.FileInputStream getinput()
           
 int read()
          read a char from the stream
 int read(byte[] data, int offset, int count)
          Abstract method for stream read.
 int read(char[] data)
          read a char array from the stream
 int read(char[] data, int offset, int count)
          read a char array from the stream stream offset count the max count from the stream return the real count from the stream
 byte readbyte()
          Abstract method for stream read.
 char readchar()
          read a char from the stream
 java.lang.String readLine()
          read a String from the stream
 void setappendwrite(boolean value)
          set appending write mode
 void setouput(java.io.File outfile)
          setouput
 void setouput(java.lang.String outfile)
          set output
 void setseek(long value)
          针对当前位置的偏移量 ,需要重载这个方法
 void setseek(long orig, long offset)
          针对orig位置的偏移量
 void skip(long number)
          skip several chars
 char[] toArray()
          return the byte array
 void write()
          write a char array to the output stream
 void write(byte[] data, int offset, int count)
          Abstract method for stream write.
 void write(char data)
          write a char to the output stream
 void write(char[] data)
          write a char array to the output stream
 void write(char[] data, int offset, int count)
          write a char array to the output stream
 void writeLine(java.lang.String line)
          write a line to the output stream
 
Methods inherited from class aspose.pdf.BasicStream
getCanRead, getCanSeek, getCanWrite, getlength, getseek, setCanRead, setCanSeek, setCanWrite, setlength, write, write
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextFileStream

public TextFileStream()
construction


TextFileStream

public TextFileStream(java.lang.String infile)
construction


TextFileStream

public TextFileStream(java.lang.String infile,
                      boolean canwrite)
construction


TextFileStream

public TextFileStream(java.io.File infile)
construction


TextFileStream

public TextFileStream(java.io.File infile,
                      boolean canwrite)
construction

Method Detail

getinput

public java.io.FileInputStream getinput()

setseek

public void setseek(long value)
针对当前位置的偏移量 ,需要重载这个方法

Overrides:
setseek in class BasicStream
Parameters:
value - The position.

setseek

public void setseek(long orig,
                    long offset)
针对orig位置的偏移量

Overrides:
setseek in class BasicStream
Parameters:
orig - The original value.
offset - The offset.

setappendwrite

public void setappendwrite(boolean value)
set appending write mode


setouput

public void setouput(java.lang.String outfile)
set output


setouput

public void setouput(java.io.File outfile)
setouput


toArray

public char[] toArray()
return the byte array


readbyte

public byte readbyte()
Description copied from class: BasicStream
Abstract method for stream read.

Overrides:
readbyte in class BasicStream

read

public int read()
read a char from the stream

Overrides:
read in class BasicStream

readLine

public java.lang.String readLine()
read a String from the stream


readchar

public char readchar()
read a char from the stream


read

public int read(char[] data)
read a char array from the stream


read

public int read(char[] data,
                int offset,
                int count)
read a char array from the stream stream offset count the max count from the stream return the real count from the stream


read

public int read(byte[] data,
                int offset,
                int count)
Description copied from class: BasicStream
Abstract method for stream read.

Overrides:
read in class BasicStream

skip

public void skip(long number)
skip several chars

Overrides:
skip in class BasicStream

write

public void write(char data)
write a char to the output stream


writeLine

public void writeLine(java.lang.String line)
write a line to the output stream


write

public void write()
write a char array to the output stream

Overrides:
write in class BasicStream

write

public void write(char[] data)
write a char array to the output stream


write

public void write(char[] data,
                  int offset,
                  int count)
write a char array to the output stream


write

public void write(byte[] data,
                  int offset,
                  int count)
Description copied from class: BasicStream
Abstract method for stream write.

Overrides:
write in class BasicStream

flush

public void flush()
flush the stream

Overrides:
flush in class BasicStream

close

public void close()
close the stream

Overrides:
close in class BasicStream