Package com.sun.jts.trace
Class TraceRecordFormatter
- java.lang.Object
-
- com.sun.jts.trace.TraceRecordFormatter
-
public class TraceRecordFormatter extends Object
This class is used to format the trace record.- Version:
- 1.0
- Author:
- Kannan Srinivasan
-
-
Constructor Summary
Constructors Constructor Description TraceRecordFormatter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringconvertPropsToString(Properties prop)Helper method to convert properties to string.static StringconvertToString(byte[] byteArray)Helper method to convert a byte arror to string.static StringconvertXidArrayToString(Xid[] xidArray)Converts an array of xids to string that can be printed.static StringcreateTraceRecord(Object tid, Object origin, String message)Returns the formatted record, by accepting the simple string message, tid and originator, which can be written to OutputStreamstatic StringgetTraceRecordScheme()Returns the scheme used to format the record.
-
-
-
Method Detail
-
createTraceRecord
public static String createTraceRecord(Object tid, Object origin, String message)
Returns the formatted record, by accepting the simple string message, tid and originator, which can be written to OutputStream- Parameters:
tid- anObjectvalueorigin- anObjectvaluemessage- aStringvalue- Returns:
- a
Stringvalue
-
getTraceRecordScheme
public static String getTraceRecordScheme()
Returns the scheme used to format the record. This prints the different components (fields) of the trace and record and their order of occurrence.- Returns:
- a
Stringvalue
-
convertToString
public static String convertToString(byte[] byteArray)
Helper method to convert a byte arror to string. This is typically used for printing Xids.- Parameters:
byteArray- abyte[]value- Returns:
- a
Stringvalue
-
convertXidArrayToString
public static String convertXidArrayToString(Xid[] xidArray)
Converts an array of xids to string that can be printed. Its a helper method.- Parameters:
xidArray- aXid[]value- Returns:
- a
Stringvalue
-
convertPropsToString
public static String convertPropsToString(Properties prop)
Helper method to convert properties to string.- Parameters:
prop- aPropertiesvalue- Returns:
- a
Stringvalue
-
-