|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.ObjectMiG.oneclick.File
public class File
This class provides fileaccess for the MiGOneClick framework.
| Field Summary | |
|---|---|
static int |
CLOSED
|
static int |
R
Used to open file in mode READ |
static int |
RW
Used to open file in mode READ/WRITE (File is truncated) |
static int |
RWW
Used to open file in mode READ/UPDATE |
static int |
W
Used to open file in mode WRITE (File is truncated) |
static int |
WW
Used to open file in mode UPDATE |
| Constructor Summary | |
|---|---|
File(java.lang.String server,
java.lang.String iosessionid,
java.lang.String filename,
int mode)
Creates a File object. |
|
File(java.lang.String server,
java.lang.String iosessionid,
java.lang.String filename,
int mode,
boolean disable_https_trustmanager)
Creates a File object, possible without a trustmanager. |
|
| Method Summary | |
|---|---|
boolean |
close()
Closes the file, if the file is opened in write mode a flush() is invoked. |
boolean |
flush()
Flushes a file opened for write to the MiG server. |
int |
getBlockSize()
For DEBUG |
java.lang.String |
getErrorMessages()
Returns the ErrorMessage buffer as a String. |
java.lang.String |
getFilename()
Returns the filename of the file. |
int |
getFlushCount()
Returns the number of flushes performed on this file. |
int |
getMode()
Returns the mode in which the file was opend |
java.util.Vector[] |
getTransferLog()
Returns the transferlog |
int |
read()
Reads the next byte of data from the file. |
void |
resetErrorMessages()
Clears the File ErrorMessage buffer. |
boolean |
seek(long newfilepos)
Seeks to the specified position in the file. |
void |
setIOsessionid(java.lang.String iosessionid)
Changes the session of an allready opend file. |
void |
startTransferLogging()
Starts logging of the Transferrates |
boolean |
write(int b)
Writes a byte to the file, see read() for describtion of why the byte is represented as an int. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int CLOSED
public static final int R
public static final int W
public static final int WW
public static final int RW
public static final int RWW
| Constructor Detail |
|---|
public File(java.lang.String server,
java.lang.String iosessionid,
java.lang.String filename,
int mode)
server - URL to the server containing the files to access.iosessionid - The MiG iosessionid.
public File(java.lang.String server,
java.lang.String iosessionid,
java.lang.String filename,
int mode,
boolean disable_https_trustmanager)
server - URL to the MiG server containing the files to access.iosessionid - The MiG iosessionid.disable_https_trustmanager - If true, this disables the https trustmanager, this is needed if the server uses a non-authorized https certificate.| Method Detail |
|---|
public int read()
getErrorMessages() method can be used to
retrieve information on what happend.
Actual data is returned as a value 0-255,
the 'rocket scientist' who defined java's primitive
types did'nt find any use for signed types.
Therefor we are forced to use the first 8 bit of a int to simulate
a signed byte.public boolean flush()
getErrorMessages() method.public boolean write(int b)
read() for describtion of why the byte is represented as an int.
getErrorMessages() method can be used to
retrieve information on what happend.public boolean seek(long newfilepos)
newfilepos - Indicating the new fileposition relativly to the beginning of the file.
getErrorMessages() method can be used to
retrieve information on what happend.public boolean close()
flush() is invoked.
getErrorMessages() method can be used to
retrieve information on what happend.public void setIOsessionid(java.lang.String iosessionid)
public int getMode()
public java.lang.String getFilename()
public int getFlushCount()
public void startTransferLogging()
public java.util.Vector[] getTransferLog()
public void resetErrorMessages()
public java.lang.String getErrorMessages()
public int getBlockSize()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||