Class jls.io.FileDescriptor

This class represents a file system descriptor. A file descriptor represents I/O objects, such as open files and sockets.
Defined in: FileDescriptor.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
Method Attributes Method Name and Description
 
Closes this file.
 
Flushs this file.
 
Tells if this stream supports the mark and reset methods.
 
read(buffer)
Reads this file into a buffer.
 
Reads a byte.
 
readByteArray(barray, offset, length)
Reads bytes into the specified byte array, starting at the given offset.
 
write(buffer)
Writes a buffer into this file.
 
Writes a byte.
 
writeByteArray(barray, offset, length)
Writes bytes from the specified byte array starting at the given offset.
Class Detail
jls.io.FileDescriptor()
Method Detail
close()
Closes this file.

flush()
Flushs this file.

{Boolean} markSupported()
Tells if this stream supports the mark and reset methods.
Returns:
{Boolean} if this stream instance supports the mark and reset methods; false otherwise.

{Number} read(buffer)
Reads this file into a buffer.
Parameters:
{jls.lang.Buffer} buffer
The buffer to read.
Returns:
{Number} the read byte count.

{Number} readByte()
Reads a byte.
Returns:
{Number} The unsigned byte or -1.

{Number} readByteArray(barray, offset, length)
Reads bytes into the specified byte array, starting at the given offset.
Parameters:
{ByteArray} barray
The destination byte array.
{Number} offset
The offset at which to start storing bytes.
{Number} length
The maximum number of bytes to read.
Returns:
{Number} The total number of bytes read.

{Number} write(buffer)
Writes a buffer into this file.
Parameters:
{jls.lang.Buffer} buffer
The buffer to write.
Returns:
{Number} the write byte count.

{Boolean} writeByte(b)
Writes a byte.
Parameters:
{Number} b
The byte to write.
Returns:
{Boolean} true if the byte has been write.

{Number} writeByteArray(barray, offset, length)
Writes bytes from the specified byte array starting at the given offset.
Parameters:
{ByteArray} barray
The source byte array.
{Number} offset
The offset at which to start getting bytes.
{Number} length
The maximum number of bytes to write.
Returns:
{Number} The number of bytes written.

Documentation generated by JsDoc Toolkit 2.3.2 on Sat Jan 08 2011 02:00:13 GMT+0100 (CET)