|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.novell.service.file.nw.DataAccessableParameters
Provides a DataAccessor implementation using the custom data openFlags and dataSelector parameters.
DataAccessableParameters is the file system's implementation of the custom data parameter passed as the custom parameter to the various NInputStream, NOutputStream and RandomAccess constructors. This class is used in conjunction with the NFileInputStream, NFileOutputStream and NRandomAccessFile classes. It defines constants that can be used for the various constructors in these classes, or this object can be instantiated and passed into the custom parameter constructors.
When opening a file stream, you can use any of the openFlags outlined in the variable section. However, all streams do not support all of the open flags specified below (extended attributes for example). The only flags that are guaranteed to be supported for any accessor are the READ and WRITE flags (and READ_WRITE for random access).
The dataSelector allows selection of different data forks on a device. For example, a file can have a data fork and a resource fork. To choose the default fork, independent of platform and device type, specify DEFAULT_DATASELECTOR for this parameter.
DataAccessable
,
NInputStream
,
NOutputStream
,
RandomAccess
,
NFileInputStream
,
NFileOutputStream
,
NRandomAccessFile
,
DEFAULT_DATASELECTOR
Field Summary | |
static int |
COMPATABILITY
The openFlag variable allowing the data accessor to be opened in NetWare compatability mode. |
static int |
DEFAULT_DATASELECTOR
The dataSelector variable with the default value. |
static int |
DEFAULT_INPUT_OPENFLAGS
The default NFileInputFile openFlags value. |
static int |
DEFAULT_OUTPUT_OPENFLAGS
The default NFileOutputFile openFlags value. |
static int |
DELETE_FILE_CLOSE
The openFlag variable allowing the data accessor to be opened in delete-after-close mode. |
static int |
DENY_READ
The openFlag variable allowing the data accessor to be opened but deny any shared read requests. |
static int |
DENY_WRITE
The openFlag variable allowing the data accessor to be opened but deny any shared write requests. |
static int |
EA_STREAM_SELECTOR
The dataSelector variable allowing an EA stream to be opened on a directory entry. |
static int |
OPEN_COMPRESSED
The openFlag variable allowing the data accessor to be opened in compressed mode. |
static int |
READ
The openFlag variable allowing the data accessor to be opened in read mode. |
static int |
READ_WRITE
The openFlag variable allowing the data accessor to be opened in read/write mode. |
static int |
WRITE
The openFlag variable allowing the data accessor to be opened in write mode. |
static int |
WRITE_THROUGH
The openFlag variable allowing the data accessor to be opened in a mode where any writes are immediately flushed to the device. |
Constructor Summary | |
DataAccessableParameters(int openFlags,
int dataSelector)
Constructs a DataAccessableParameters object. |
Method Summary | |
java.lang.String |
checkParameters(java.lang.String name,
java.lang.String nameSpace)
Opens a file stream with the passed in subordinate name. |
java.lang.Object |
clone()
Returns a clone of this DataAccessableParameters object. |
boolean |
equals(java.lang.Object obj)
Compares the input parameter object to this DataAccessableParameters object. |
int |
getDataSelector()
Returns the dataSelector value that was set in the constructor. |
int |
getOpenFlags()
Returns the openFlags value that was set in the constructor. |
java.lang.String |
toString()
Returns a debug string representation of this DataAccessableParameters object. |
Methods inherited from class java.lang.Object |
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public static final int READ
(READ = 0x0001)
public static final int WRITE
(WRITE = 0x0002)
public static final int DENY_READ
(DENY_READ = 0x0004)
public static final int DENY_WRITE
(DENY_WRITE = 0x0008)
public static final int COMPATABILITY
(COMPATABILITY = 0x0010)
public static final int WRITE_THROUGH
(WRITE_THROUGH = 0x0040)
public static final int OPEN_COMPRESSED
(OPEN_COMPRESSED = 0x0100)
public static final int DELETE_FILE_CLOSE
Beginning with NetWare 4.10, a file can be opened as a temporary file that will be deleted when the file is closed. To create a temporary file, the caller must set the DELETE_FILE_CLOSE bit, the DENY_READ bit, and the DENY_WRITE bit in the mode parameter of openStream(). Temporary files by definition do not allow shared I/O access. This file will exist until the caller closes the file, which will cause the file to be deleted. NetWare will create temporary files with the HIDDEN bit set so that they will not be visible.
(DELETE_FILE_CLOSE = 0x0400)
public static final int READ_WRITE
(READ_WRITE = READ | WRITE)
public static final int DEFAULT_INPUT_OPENFLAGS
(DEFAULT_INPUT_OPENFLAGS = READ)
public static final int DEFAULT_OUTPUT_OPENFLAGS
(DEFAULT_OUTPUT_OPENFLAGS = WRITE)
public static final int EA_STREAM_SELECTOR
(EA_STREAM_SELECTOR = 0xFF)
public static final int DEFAULT_DATASELECTOR
(DEFAULT_DATASELECTOR = -1)
Constructor Detail |
public DataAccessableParameters(int openFlags, int dataSelector)
The DataAccessableParameters object is suitable for the custom parameter of the various NInputStream, NOutputStream, RandomAccess, NFileInputStream, NFileOutputStream and NRandomAccessFile class constructors.
openFlags
- The open flags to use when opening the
stream.dataSelector
- The dataSelector to use when opening the
stream.Method Detail |
public int getOpenFlags()
public int getDataSelector()
public boolean equals(java.lang.Object obj)
public java.lang.String toString()
The debug string is in the following format: nameSpace: s, openFlags: i, dataSelector: i.
public java.lang.Object clone()
public java.lang.String checkParameters(java.lang.String name, java.lang.String nameSpace)
This method should be used only by SPI provider developers; it is not intended for the user application interface. The implementors of the DataAccessable openStream custom data methods should call this method on the custom data object received before accessing any of the custom data paramters.
name
- The subordinate name to be opened, or NULL for
non-subordinate opens.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |