FileStream

Overview

FileStream is a class in Aspose.3D FOSS for Java. Inherits from: Stream.

File stream for reading and writing files.

This class provides 16 methods for working with FileStream objects in Java programs. Available methods include: FileStream, Stream, close, flush, getInputStream, getLength, getOutputStream, read, readByte, seek, setLength, write, and 1 additional methods. All public members are accessible to any Java application after installing the Aspose.3D FOSS for Java package. Properties: APPEND, CREATE, OPEN, READ, READ_WRITE, WRITE, and 3 more.

Properties

NameTypeAccessDescription
lengthlongReadGets the length of the file.
CREATEintReadGets the create.
OPENintReadGets the open.
APPENDintReadGets the append.
READintReadGets the read.
WRITEintReadGets the write.
READ_WRITEintReadGets the read write.
outputStreamOutputStreamReadGets the output stream.
inputStreamjava.io.InputStreamReadGets the input stream.

Methods

SignatureDescription
FileStream(fileName: String, fileMode: int, fileAccess: int)Creates a new file stream.
FileStream(fileName: String, fileMode: int)Creates a new file stream.
getLength()longGets the length of the file.
setLength(len: long)Sets the length of the file.
readByte()intReads a byte from the file.
read(buf: byte[])intReads bytes from the file.
read(buf: byte[], start: int, len: int)intReads bytes from the file.
write(buf: byte[])Writes bytes to the file.
write(buf: byte[], start: int, len: int)Writes bytes to the file.
writeByte(b: int)Writes a byte to the file.
seek(offset: long, seek: int)longSeeks to a position in the file.
close()Closes the file stream.
flush()Flushes the file stream.
Stream(in: InputStream)File stream for reading and writing files.
getOutputStream()OutputStreamReturns the output stream.
getInputStream()java.io.InputStreamCreates a new file stream.

See Also

 English