borland Packages  Class Hierarchy  datastore Package 

StreamVerifier class

java.lang.Object
   +----com.borland.datastore.CacheListener
           +----com.borland.datastore.SaveListener
                   +----com.borland.datastore.BTree
                           +----com.borland.datastore.StreamVerifier

About the StreamVerifier class

Variables  Properties  Methods  

The StreamVerifier class is used to verify the integrity of a file stream (DataStore.FILE_STREAM) or DataSet stream (DataStore.TABLE_STREAM). It defines several implementations for the verify method and various constants that customize the amount of status information returned from the verification process.

By default each verify method will check the stream(s), and either return the number of errors or throw an exception if the number of errors exceeds a specified number. You can use the EXCEPTION option to always throw an exception when an error is encountered.

See the section on verifying and repairing DataStores in the documentation for the DataStore component for more information.


StreamVerifier variables

Variables implemented in this class

StreamVerifier properties

*Read-only properties **Write-only properties

Properties implemented in java.lang.Object

StreamVerifier methods

Methods implemented in this class

Methods implemented in com.borland.datastore.BTree

Methods implemented in java.lang.Object


StreamVerifier variables

DATA

  public static final int DATA = 0x0001
Constant that specifies to display the data in the stream.

EXCEPTION

  public static final int EXCEPTION = 0x0004
Constant that specifies an Exception be thrown at the end of verification if any errors are encountered. By default an Exception is only thrown if more than the specified number of errors are encountered (as indicated in the errorCount parameter of all verify(...) methods.)

PROGRESS

  public static final int PROGRESS = 0x0002
Constant that specifies to display the progress of stream verification.

SILENT

  public static final int SILENT = 0x0008
Constant that instructs the verifier to not report any status information (that is, to ignore all display options specified in the verify(...) method) as long as there are no errors. If errors are encountered, the verification process is restarted using the specified display options.

SILENT_VERBOSE

  public static final int SILENT_VERBOSE = SILENT|VERBOSE)
Constant that instructs the verifier to not report any status information (that is, to ignore all display options specified in the verify(...) method) as long as there are no errors. If errors are encountered, the verification process is restarted with maximum status information returned.

SILENT_VERBOSE_EXCEPTION

  public static final int SILENT_VERBOSE_EXCEPTION = SILENT|VERBOSE|EXCEPTION)
Constant that instructs the verifier to not report any status information (that is, to ignore all display options specified in the verify(...) method) as long as there are no errors. If errors are encountered, the verification process is restarted with maximum status information returned and an Exception thrown at the end of the verification process.

VERBOSE

  public static final int VERBOSE = DATA|PROGRESS)
Enables all status display options.

StreamVerifier methods

typeName(short)

  public static final String typeName(short type)
Converts the DataStore stream type into a readable string.

See also: AGG_STREAM, DELETED_STREAM, FETCH_STREAM, FILE_STREAM, HIDDEN_STREAM, INSERTED_STREAM, ORIGINALS_STREAM, SECOND_INDEX_STREAM, TABLE_FILE_STREAM, TABLE_STREAM

verify(com.borland.datastore.DataStoreConnection, com.borland.dx.dataset.ReadRow, java.io.PrintStream, int, int)

  public static final int verify(DataStoreConnection con, ReadRow dirEntry, PrintStream out, int displayOptions, int errorCount)
Checks the integrity of a single stream. Note that the stream is closed before verification begins. This method returns the number of errors found.

Parameters:

con
Connection to the DataStore that contains the dirEntry stream.
dirEntry
The stream to verify, designated by a row in a directory DataSet, returned by DataStoreConnection.openDirectory().
out
The PrintStream to send the verification output to.
displayOptions
Instructs verifier how to display progress messages as the stream is verified.
errorCount
The number of errors that can be ignored before a DataSetException is thrown.

verify(com.borland.datastore.DataStoreConnection, java.io.PrintStream, int, int)

  public static final int verify(DataStoreConnection con, PrintStream out, int displayOptions, int errorCount)
Checks the integrity of all the streams in the DataStore. Note that each stream is closed before verification begins. If no errors around found, the DataStore's consistent property is set to true. This method returns the number of errors found.

Parameters:

con
Connection to the DataStore to verify.
out
The PrintStream to send the verification output to.
displayOptions
Instructs verifier how to display progress messages as the stream is verified.
errorCount
The number of errors that can be ignored before a DataSetException is thrown.

verify(com.borland.dx.dataset.DataSet, java.io.PrintStream, int, int)

  public static final int verify(DataSet dataSet, PrintStream out, int displayOptions, int errorCount)
Checks the integrity of all DataStore.TABLE_STREAM types used by the designated DataSet. This method returns the number of errors found.

Parameters:

dataSet
The DataSet streams to verify.
out
The PrintStream to send the verification output to.
displayOptions
Specifies how much status information is reported during the stream verification process. Valid values are defined as constants in this class.
errorCount
Indicates the number of errors that can be ignored before an DataSetException is thrown.