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.
-
Closed
-
-
EndOfFile
- Various file state flags.
-
atEndOfFile()
- Check if the end of file has been reached.
-
Available()
- Return the number of bytes that are available for reading without blocking
the input stream.
-
Close()
- Close the remote file.
-
Flush()
- Flush any buffered data for this file.
-
getFileName()
- Get the file name string.
-
getFilePath()
- Get the file path string.
-
getFileSize()
- Get the file size, in bytes.
-
isClosed()
- Check if the file has been closed.
-
isDirectory()
-
-
isHidden()
-
-
isReadOnly()
- Return the file attribute bit states.
-
isSystem()
-
-
Read(byte[], int, int)
- Read a block of data from the file.
-
toString()
- Return the SMB file as a string
-
Write(byte[], int, int)
- Write a block of data to the file.
EndOfFile
public static final int EndOfFile
- Various file state flags.
Closed
public static final int Closed
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.
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.
Close
public abstract void Close() throws IOException
- Close the remote file.
- Throws: IOException
- If an I/O error occurs
Flush
public abstract void Flush() throws IOException
- Flush any buffered data for this file.
- Throws: IOException
- If an I/O error occurs
getFileName
public final String getFileName()
- Get the file name string.
- Returns:
- File name string.
getFilePath
public final String getFilePath()
- Get the file path string.
- Returns:
- File path string.
getFileSize
public final int getFileSize()
- Get the file size, in bytes.
- Returns:
- File size in bytes.
isClosed
public final boolean isClosed()
- Check if the file has been closed.
- Returns:
- true if the file has been closed, else false.
isDirectory
public final boolean isDirectory()
isHidden
public final boolean isHidden()
isReadOnly
public final boolean isReadOnly()
- Return the file attribute bit states.
isSystem
public final boolean isSystem()
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
toString
public final String toString()
- Return the SMB file as a string
- Returns:
- SMB file string.
- Overrides:
- toString in class Object
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