org.virtualbox_4_3
Class IFile

java.lang.Object
  extended by org.virtualbox_4_3.IUnknown
      extended by org.virtualbox_4_3.IFile
Direct Known Subclasses:
IGuestFile

public class IFile
extends IUnknown

Abstract parent interface for files handled by VirtualBox. Interface ID: {5EC56EA3-B55D-4BDB-8C4F-5F9FB26B894B}


Field Summary
 
Fields inherited from class org.virtualbox_4_3.IUnknown
obj, port
 
Constructor Summary
IFile(java.lang.String wrapped, org.virtualbox_4_3.jaxws.VboxPortType port)
           
 
Method Summary
 void close()
          Closes this file.
 java.lang.Long getCreationMode()
          The creation mode.
 java.lang.String getDisposition()
          The disposition mode.
 IEventSource getEventSource()
          Event source for guest session events.
 java.lang.String getFileName()
          Full path of the actual file name of this file.
 java.lang.Long getId()
          The file's ID.
 java.lang.Long getInitialSize()
          The initial size in bytes when opened.
 java.lang.Long getOffset()
          Current read/write offset in bytes.
 java.lang.String getOpenMode()
          The open mode.
 FileStatus getStatus()
          Current file status.
 IFsObjInfo queryInfo()
          Queries information about this file.
static IFile queryInterface(IUnknown obj)
           
 byte[] read(java.lang.Long toRead, java.lang.Long timeoutMS)
          Reads data from this file.
 byte[] readAt(java.lang.Long offset, java.lang.Long toRead, java.lang.Long timeoutMS)
          Reads data from an offset of this file.
 void seek(java.lang.Long offset, FileSeekType whence)
          Changes the read and write position of this file.
 void setACL(java.lang.String acl)
          Sets the ACL of this file.
 java.lang.Long write(byte[] data, java.lang.Long timeoutMS)
          Writes bytes to this file.
 java.lang.Long writeAt(java.lang.Long offset, byte[] data, java.lang.Long timeoutMS)
          Writes bytes at a certain offset to this file.
 
Methods inherited from class org.virtualbox_4_3.IUnknown
getRemoteWSPort, getWrapped, releaseRemote
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IFile

public IFile(java.lang.String wrapped,
             org.virtualbox_4_3.jaxws.VboxPortType port)
Method Detail

getCreationMode

public java.lang.Long getCreationMode()
The creation mode.

Returns:
Long

getDisposition

public java.lang.String getDisposition()
The disposition mode.

Returns:
String

getEventSource

public IEventSource getEventSource()
Event source for guest session events.

Returns:
org.virtualbox_4_3.IEventSource

getFileName

public java.lang.String getFileName()
Full path of the actual file name of this file.

Returns:
String

getId

public java.lang.Long getId()
The file's ID.

Returns:
Long

getInitialSize

public java.lang.Long getInitialSize()
The initial size in bytes when opened.

Returns:
Long

getOpenMode

public java.lang.String getOpenMode()
The open mode.

Returns:
String

getOffset

public java.lang.Long getOffset()
Current read/write offset in bytes.

Returns:
Long

getStatus

public FileStatus getStatus()
Current file status.

Returns:
org.virtualbox_4_3.FileStatus

queryInterface

public static IFile queryInterface(IUnknown obj)

close

public void close()
Closes this file. After closing operations like reading data, writing data or querying information will not be possible anymore.


queryInfo

public IFsObjInfo queryInfo()
Queries information about this file.

Returns:
Object information of this file. Also see IFsObjInfo. Expected result codes:
E_NOTIMPLThe method is not implemented yet.

read

public byte[] read(java.lang.Long toRead,
                   java.lang.Long timeoutMS)
Reads data from this file.

Parameters:
toRead - Number of bytes to read.
timeoutMS - Timeout (in ms) to wait for the operation to complete. Pass 0 for an infinite timeout.
Returns:
Array of data read. Expected result codes:
E_NOTIMPLThe method is not implemented yet.

readAt

public byte[] readAt(java.lang.Long offset,
                     java.lang.Long toRead,
                     java.lang.Long timeoutMS)
Reads data from an offset of this file.

Parameters:
offset - Offset in bytes to start reading.
toRead - Number of bytes to read.
timeoutMS - Timeout (in ms) to wait for the operation to complete. Pass 0 for an infinite timeout.
Returns:
Array of data read. Expected result codes:
E_NOTIMPLThe method is not implemented yet.

seek

public void seek(java.lang.Long offset,
                 FileSeekType whence)
Changes the read and write position of this file.

Parameters:
offset - Offset to seek.
whence - Seek mode; see FileSeekTypefor more information. Expected result codes:
E_NOTIMPLThe method is not implemented yet.

setACL

public void setACL(java.lang.String acl)
Sets the ACL of this file.

Parameters:
acl - ACL string to set. Expected result codes:
E_NOTIMPLThe method is not implemented yet.

write

public java.lang.Long write(byte[] data,
                            java.lang.Long timeoutMS)
Writes bytes to this file.

Parameters:
data - Array of bytes to write. The size of the array also specifies how much to write.
timeoutMS - Timeout (in ms) to wait for the operation to complete. Pass 0 for an infinite timeout.
Returns:
How much bytes were written.

writeAt

public java.lang.Long writeAt(java.lang.Long offset,
                              byte[] data,
                              java.lang.Long timeoutMS)
Writes bytes at a certain offset to this file.

Parameters:
offset - Offset in bytes to start writing.
data - Array of bytes to write. The size of the array also specifies how much to write.
timeoutMS - Timeout (in ms) to wait for the operation to complete. Pass 0 for an infinite timeout.
Returns:
How much bytes were written. Expected result codes:
E_NOTIMPLThe method is not implemented yet.