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 String
convertPropsToString(Properties prop)
Helper method to convert properties to string.static String
convertToString(byte[] byteArray)
Helper method to convert a byte arror to string.static String
convertXidArrayToString(Xid[] xidArray)
Converts an array of xids to string that can be printed.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 OutputStreamstatic String
getTraceRecordScheme()
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
- anObject
valueorigin
- anObject
valuemessage
- aString
value- Returns:
- a
String
value
-
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
String
value
-
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
String
value
-
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
String
value
-
convertPropsToString
public static String convertPropsToString(Properties prop)
Helper method to convert properties to string.- Parameters:
prop
- aProperties
value- Returns:
- a
String
value
-
-