2008-07-29 1.1.0

org.eclipse.soda.dk.random.access.file.connection
Class RandomAccessFileConnection

java.lang.Object
  extended by org.eclipse.soda.dk.core.EscObject
      extended by org.eclipse.soda.dk.connection.Connection
          extended by org.eclipse.soda.dk.connection.StreamConnection
              extended by org.eclipse.soda.dk.random.access.file.connection.RandomAccessFileConnection
All Implemented Interfaces:
ConnectionService, RandomAccessFileConnectionService

public class RandomAccessFileConnection
extends StreamConnection
implements ConnectionService, RandomAccessFileConnectionService


Field Summary
static java.lang.String CLASS_NAME
          Defines the full class name.
 
Fields inherited from class org.eclipse.soda.dk.connection.Connection
CHANNEL_ACTIVE_STATE_RESOURCE, CHANNEL_ALIVE_STATE_RESOURCE, CHANNEL_CLOSED_RESOURCE, CHANNEL_CONNECTED_STATE_RESOURCE, CHANNEL_CREATED_STATE_RESOURCE, CHANNEL_DEAD_STATE_RESOURCE, CHANNEL_OPEN, CHANNEL_OPENFAILED_RESOURCE, CHANNEL_READ_BYTES_RESOURCE, CHANNEL_STARTED_STATE_RESOURCE, CHANNEL_WRITE_BYTES_RESOURCE, CLIENT_WAIT_RESOURCE, CLOSE_RESOURCE, CLOSED_RESOURCE, configurationService, logLevel, OPEN_RESOURCE, OPENFAILED_RESOURCE, READ_BYTES_RESOURCE, readByteCount, WRITE_BYTES_RESOURCE, writeByteCount
 
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, ID_NAME_KEY, INTEGER_TABLE, INTEGER_TABLE_SIZE, KEY_KEY, LOG_DEBUG, LOG_DEFAULT, LOG_ERROR, LOG_INFO, LOG_LEVEL_KEY, LOG_TRACE, LOG_WARNING, LONG_TABLE, LONG_TABLE_SIZE, PREFIX_KEY, READONLY_EMPTY_COLLECTION, READONLY_EMPTY_LIST, READONLY_EMPTY_MAP, 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, MANAGED_SERVICE_NAME, MODE, MODE_DEFAULT, MODE_KEY, NAME, NAME_DEFAULT, NAME_KEY, PATH, PATH_DEFAULT, PATH_KEY, RandomAccessFileConnection, SERVICE_DESCRIPTION, SERVICE_NAME
 
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)
           
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)
           
 
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 bytes.
 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)
          Writes count bytes from the byte array buffer starting at offset.
 
Methods inherited from class org.eclipse.soda.dk.connection.StreamConnection
flush, getInputStream, getOutputStream, read, setInputStream, setOutputStream, write
 
Methods inherited from class org.eclipse.soda.dk.connection.Connection
attemptRecoveryFromError, finalize, getConfigurationService, getDefaultResource, getErrorSeverity, getLogDetails4, getLogDetails5, getLogLevel, getReadByteCount, getResource, getWriteByteCount, isOpen, setConfigurationInformation, setConfigurationService, setLogLevel, setOpen, setReadByteCount, setWriteByteCount, updateReadByteCount, updateWriteByteCount
 
Methods inherited from class org.eclipse.soda.dk.core.EscObject
createDefaultLogService, createException, createException, createInteger, createIntegerTable, createLong, createLongTable, createNumber, format, getBoolean, getCurrentTimestamp, getDefaultLogService, getFloat, getId, getIdName, getInt, getLoadLibraryName, getLogDetails, getLogDetails0, getLogDetails1, getLogDetails2, getLogDetails3, getLogDetails6, getLogDetails7, getLogService, getLong, getObject, getOutputName, getReadOnlyEmptyCollection, getReadOnlyEmptyList, getReadOnlyEmptyMap, getSimpleClassName, getStaticBoolean, getStaticFloat, getStaticInt, getStaticLong, getStaticObject, getStaticString, getString, getTraceLevel, getVmLibraryVersion, handleError, handleError, handleError, handleError, handleErrorInternal, handleStaticError, handleStaticException, isDebug, isLogging, isTrace, loadService, log, log, log, report, report, report, report, report, report, reportError, reportSystemInfo, setDebug, setDefaultLogService, setLogService, setTraceLevel, shouldLog, sleep, startupEscStatic, toString, toStringConfigurationKeys
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_NAME

public static final java.lang.String CLASS_NAME
Defines the full class name.

See Also:
Constant Field Values
Constructor Detail

RandomAccessFileConnection

public RandomAccessFileConnection()
Constructs a standard FileConnection object. This constructor uses the default input and output names.

See Also:
RandomAccessFileConnection(RandomAccessFile), RandomAccessFileConnection(String,String,String), RandomAccessFileConnection(Dictionary), RandomAccessFileConnection(ConfigurationService)

RandomAccessFileConnection

public RandomAccessFileConnection(ConfigurationService configuration)
Constructs an instance of this class from the specified configuration parameter. The configuration (ConfigurationService) parameter.

Parameters:
configuration - The configuration (ConfigurationService) parameter.
See Also:
RandomAccessFileConnection(), RandomAccessFileConnection(RandomAccessFile), RandomAccessFileConnection(String,String,String), RandomAccessFileConnection(Dictionary)

RandomAccessFileConnection

public RandomAccessFileConnection(java.util.Dictionary properties)
Parameters:
properties - The properties (Dictionary) parameter.
See Also:
RandomAccessFileConnection(), RandomAccessFileConnection(RandomAccessFile), RandomAccessFileConnection(String,String,String), RandomAccessFileConnection(ConfigurationService)

RandomAccessFileConnection

public RandomAccessFileConnection(java.io.RandomAccessFile randomAccessFile)
Constructs an RandomAccessFileConnection object using the input parameter(s). java.io.RandomAccessFile The random access file (RandomAccessFile) parameter.

Parameters:
randomAccessFile - The random access file (RandomAccessFile) parameter.
See Also:
RandomAccessFileConnection(), RandomAccessFileConnection(String,String,String), RandomAccessFileConnection(Dictionary), RandomAccessFileConnection(ConfigurationService)

RandomAccessFileConnection

public RandomAccessFileConnection(java.lang.String path,
                                  java.lang.String filename,
                                  java.lang.String mode)
Parameters:
path - The path (String) parameter.
filename - The filename (String) parameter.
mode - The mode (String) parameter.
See Also:
RandomAccessFileConnection(), RandomAccessFileConnection(RandomAccessFile), RandomAccessFileConnection(Dictionary), RandomAccessFileConnection(ConfigurationService)
Method Detail

close

public void close()
           throws java.io.IOException
Perform the close action method.

Specified by:
close in interface ConnectionService
Overrides:
close in class StreamConnection
Throws:
java.io.IOException - IOException.
See Also:
ConnectionService.close()

exit

public void exit()
          throws java.io.IOException
Exit.

Specified by:
exit in interface ConnectionService
Overrides:
exit in class Connection
Throws:
java.io.IOException - IOException.

getRandomAccessFile

public java.io.RandomAccessFile getRandomAccessFile()
Gets the random access file value.

Returns:
The random access file (RandomAccessFile) value.
See Also:
setRandomAccessFile(RandomAccessFile)

open

public void open()
          throws java.io.IOException
Perform the open action method. href="java.io.IOException.html">IOException Thrown if the IOException exception condition occurs.

Specified by:
open in interface ConnectionService
Overrides:
open in class Connection
Throws:
java.io.IOException - IOException.
See Also:
ConnectionService.open()

read

public int read(byte[] bytes,
                int offset,
                int length)
         throws java.io.IOException
Description copied from class: StreamConnection
Read bytes.

Specified by:
read in interface ConnectionService
Overrides:
read in class StreamConnection
Parameters:
bytes - The bytes (byte[]) parameter.
offset - The offset (int) parameter.
length - The length (int) parameter.
Returns:
Results of the read (int) value.
Throws:
java.io.IOException - IOException.
See Also:
StreamConnection.read(byte[])

setRandomAccessFile

public void setRandomAccessFile(java.io.RandomAccessFile randomAccessFile)
Sets the random access file value. The random access file (RandomAccessFile) parameter.

Parameters:
randomAccessFile - The random access file (RandomAccessFile) parameter.
See Also:
getRandomAccessFile()

toStringInfo

public void toStringInfo(java.lang.StringBuffer buffer)
Description copied from class: Connection
To string info with the specified buffer parameter.

Overrides:
toStringInfo in class Connection
Parameters:
buffer - The buffer (StringBuffer) parameter.

write

public void write(byte[] bytes,
                  int offset,
                  int count)
           throws java.io.IOException
Description copied from class: StreamConnection
Writes count bytes from the byte array buffer starting at offset.

Specified by:
write in interface ConnectionService
Overrides:
write in class StreamConnection
Parameters:
bytes - The bytes (byte[]) parameter.
offset - The offset (int) parameter.
count - The count (int) parameter.
Throws:
java.io.IOException - IOException.
See Also:
StreamConnection.write(byte[])

2008-07-29 1.1.0

Copyright (c) 1999, 2008 IBM and others. See license in Legal section. OSGi Framework Version 3.4.0.v20080605-1900