|
1.0.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.soda.dk.core.EscObject
org.eclipse.soda.dk.connection.Connection
org.eclipse.soda.dk.random.access.file.connection.RandomAccessFileConnection
public class RandomAccessFileConnection
The RandomAccessFileConnection class implements the ConnectionService interface to support reading and writing to a random ascces file.
ConnectionService,
File| Field Summary |
|---|
| Fields inherited from class org.eclipse.soda.dk.connection.Connection |
|---|
CLIENT_WAIT_RESOURCE, CLOSE_RESOURCE, CLOSED_RESOURCE, configurationService, OPEN_RESOURCE, OPENFAILED_RESOURCE, READ_BYTES_RESOURCE, WRITE_BYTES_RESOURCE |
| Fields inherited from class org.eclipse.soda.dk.core.EscObject |
|---|
CLONE_EXCEPTION_RESOURCE, EMPTY_BYTES, EMPTY_STRING, ERROR_OCCURRED_EXCEPTION_RESOURCE, ID_FILTER_KEY, ID_KEY, ID_KEY_ANY, INTEGER_TABLE, KEY_KEY, LOG_DEBUG, LOG_ERROR, LOG_INFO, LOG_TRACE, LOG_WARNING, PREFIX_KEY, RESOURCE_BUNDLE, SLEEP_EXCEPTION_RESOURCE, SYSTEM_INFO_RESOURCE, TO_STRING_CONFIGURATION_KEYS, TRACE_LEVEL_HIGH, TRACE_LEVEL_LOW, TRACE_LEVEL_MAX, TRACE_LEVEL_MIN, TRACE_LEVEL_NONE, TRACE_LEVEL_NORMAL, TRACELEVEL_KEY, UNKNOWN_ERROR_RESOURCE |
| Fields inherited from interface org.eclipse.soda.dk.random.access.file.connection.service.RandomAccessFileConnectionService |
|---|
CONNECTION_TYPE, DEFAULT_MODE, DEFAULT_NAME, DEFAULT_PATH, FACTORY_SERVICE_NAME, MODE_KEY, NAME_KEY, PATH_KEY, SERVICE_NAME |
| Fields inherited from interface org.eclipse.soda.dk.connection.service.ConnectionService |
|---|
CONNECTION_KEY, DEFAULT_CONNECTION |
| Constructor Summary | |
|---|---|
RandomAccessFileConnection()
Constructs a standard FileConnection object. |
|
RandomAccessFileConnection(ConfigurationService configuration)
Constructs an instance of this class from the specified configuration parameter. |
|
RandomAccessFileConnection(java.util.Dictionary properties)
Constructs an instance of this class from the specified properties parameter. |
|
RandomAccessFileConnection(java.io.RandomAccessFile randomAccessFile)
Constructs an RandomAccessFileConnection object using the
input parameter(s). |
|
RandomAccessFileConnection(java.lang.String path,
java.lang.String filename,
java.lang.String mode)
Constructs a RandomAccessFileConnection object using the
input parameter(s). |
|
| Method Summary | |
|---|---|
void |
close()
Perform the close action method. |
void |
exit()
Exit. |
java.io.RandomAccessFile |
getRandomAccessFile()
Gets the random access file value. |
void |
open()
Perform the open action method. |
int |
read(byte[] bytes,
int offset,
int length)
Read with the specified bytes, offset and length parameters and return the int result. |
void |
setRandomAccessFile(java.io.RandomAccessFile randomAccessFile)
Sets the random access file value. |
void |
toStringInfo(java.lang.StringBuffer buffer)
To string info with the specified buffer parameter. |
void |
write(byte[] bytes,
int offset,
int count)
Write with the specified bytes, offset and count parameters. |
| Methods inherited from class org.eclipse.soda.dk.connection.Connection |
|---|
attemptRecoveryFromError, finalize, flush, getConfigurationService, getDefaultResource, getErrorSeverity, getResource, isOpen, read, setConfigurationService, setOpen, write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.eclipse.soda.dk.connection.service.ConnectionService |
|---|
flush, isOpen, read, write |
| Constructor Detail |
|---|
public RandomAccessFileConnection()
FileConnection object. This
constructor uses the default input and output names.
RandomAccessFileConnection(RandomAccessFile),
RandomAccessFileConnection(String,String,String),
RandomAccessFileConnection(Dictionary),
RandomAccessFileConnection(ConfigurationService)public RandomAccessFileConnection(java.io.RandomAccessFile randomAccessFile)
RandomAccessFileConnection object using the
input parameter(s).
java.io.RandomAccessFile
The random access file (RandomAccessFile)
parameter.
randomAccessFile - The random access file (RandomAccessFile) parameter.RandomAccessFileConnection(),
RandomAccessFileConnection(String,String,String),
RandomAccessFileConnection(Dictionary),
RandomAccessFileConnection(ConfigurationService)
public RandomAccessFileConnection(java.lang.String path,
java.lang.String filename,
java.lang.String mode)
RandomAccessFileConnection object using the
input parameter(s).
java.lang.String
java.lang.String
The mode (String) parameter.
path - The path (String) parameter.filename - The filename (String) parameter.mode - The mode (String) parameter.RandomAccessFileConnection(),
RandomAccessFileConnection(RandomAccessFile),
RandomAccessFileConnection(Dictionary),
RandomAccessFileConnection(ConfigurationService)public RandomAccessFileConnection(java.util.Dictionary properties)
Dictionary) parameter.
properties - The properties (Dictionary) parameter.RandomAccessFileConnection(),
RandomAccessFileConnection(RandomAccessFile),
RandomAccessFileConnection(String,String,String),
RandomAccessFileConnection(ConfigurationService)public RandomAccessFileConnection(ConfigurationService configuration)
ConfigurationService)
parameter.
configuration - The configuration (ConfigurationService) parameter.RandomAccessFileConnection(),
RandomAccessFileConnection(RandomAccessFile),
RandomAccessFileConnection(String,String,String),
RandomAccessFileConnection(Dictionary)| Method Detail |
|---|
public void close()
throws java.io.IOException
close in interface ConnectionServiceclose in class ConnectionIOException.
java.io.IOExceptionConnectionService.close()
public void exit()
throws java.io.IOException
exit in interface ConnectionServiceexit in class ConnectionIOException.
java.io.IOExceptionpublic java.io.RandomAccessFile getRandomAccessFile()
RandomAccessFile) value.setRandomAccessFile(RandomAccessFile)
public void open()
throws java.io.IOException
open in interface ConnectionServiceopen in class Connectionjava.io.IOExceptionConnectionService.open()
public int read(byte[] bytes,
int offset,
int length)
throws java.io.IOException
byte[]) parameter.
The offset (int) parameter.
The length (int) parameter.
read in interface ConnectionServicebytes - The bytes (byte[]) parameter.offset - The offset (int) parameter.length - The length (int) parameter.
int) value.
IOException.
java.io.IOExceptionConnectionService.read(byte[])public void setRandomAccessFile(java.io.RandomAccessFile randomAccessFile)
RandomAccessFile)
parameter.
randomAccessFile - The random access file (RandomAccessFile) parameter.getRandomAccessFile()public void toStringInfo(java.lang.StringBuffer buffer)
StringBuffer) parameter.
toStringInfo in class EscObjectbuffer - The buffer (StringBuffer) parameter.
public void write(byte[] bytes,
int offset,
int count)
throws java.io.IOException
byte[]) parameter.
The offset (int) parameter.
The count (int) parameter.
write in interface ConnectionServicebytes - The bytes (byte[]) parameter.offset - The offset (int) parameter.count - The count (int) parameter.
IOException.
java.io.IOExceptionConnectionService.write(byte[])
|
1.0.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||