All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.starla.lite.SMBFile

java.lang.Object
   |
   +----com.starla.lite.SMBFile

public abstract class SMBFile
extends Object
SMB file class.

This is an abstract class that defines the standard SMB file methods.


Variable Index

 o Closed
 o EndOfFile
Various file state flags.

Method Index

 o atEndOfFile()
Check if the end of file has been reached.
 o Available()
Return the number of bytes that are available for reading without blocking the input stream.
 o Close()
Close the remote file.
 o Flush()
Flush any buffered data for this file.
 o getFileName()
Get the file name string.
 o getFilePath()
Get the file path string.
 o getFileSize()
Get the file size, in bytes.
 o isClosed()
Check if the file has been closed.
 o isDirectory()
 o isHidden()
 o isReadOnly()
Return the file attribute bit states.
 o isSystem()
 o Read(byte[], int, int)
Read a block of data from the file.
 o toString()
Return the SMB file as a string
 o Write(byte[], int, int)
Write a block of data to the file.

Variables

 o EndOfFile
 public static final int EndOfFile
Various file state flags.

 o Closed
 public static final int Closed

Methods

 o atEndOfFile
 public final boolean atEndOfFile()
Check if the end of file has been reached.

Returns:
true if end of file has been reached, else false.
 o Available
 public final int Available()
Return the number of bytes that are available for reading without blocking the input stream.

Returns:
Number of bytes available for read without blocking the input stream.
 o Close
 public abstract void Close() throws IOException
Close the remote file.

Throws: IOException
If an I/O error occurs
 o Flush
 public abstract void Flush() throws IOException
Flush any buffered data for this file.

Throws: IOException
If an I/O error occurs
 o getFileName
 public final String getFileName()
Get the file name string.

Returns:
File name string.
 o getFilePath
 public final String getFilePath()
Get the file path string.

Returns:
File path string.
 o getFileSize
 public final int getFileSize()
Get the file size, in bytes.

Returns:
File size in bytes.
 o isClosed
 public final boolean isClosed()
Check if the file has been closed.

Returns:
true if the file has been closed, else false.
 o isDirectory
 public final boolean isDirectory()
 o isHidden
 public final boolean isHidden()
 o isReadOnly
 public final boolean isReadOnly()
Return the file attribute bit states.

 o isSystem
 public final boolean isSystem()
 o Read
 public abstract int Read(byte buf[],
                          int siz,
                          int offset) throws IOException
Read a block of data from the file.

Parameters:
buf - Byte buffer to receive the data.
siz - Maximum length of data to receive.
offset - Offset within buffer to place received data.
Returns:
Actual length of data received.
Throws: IOException
If an I/O error occurs
 o toString
 public final String toString()
Return the SMB file as a string

Returns:
SMB file string.
Overrides:
toString in class Object
 o Write
 public abstract int Write(byte buf[],
                           int siz,
                           int offset) throws IOException
Write a block of data to the file.

Parameters:
buf - Byte buffer containing data to be written.
siz - Length of data to be written.
offset - Offset within buffer to start writing data from.
Returns:
Actual length of data written.
Throws: IOException
If an I/O error occurs

All Packages  Class Hierarchy  This Package  Previous  Next  Index