Package com.logviewer.data2
Class LogRecord
java.lang.Object
com.logviewer.data2.LogRecord
- All Implemented Interfaces:
Externalizable,Serializable,Comparable<LogRecord>
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe name of generic field that contains whole record text. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintstatic LogRecordcreateUnparsedRecord(String message, long time, long start, long end, int loadedTextLengthBytes) booleanlonggetEnd()getFieldOffset(String fieldName) int[]An array containing field positions.getFieldText(String fieldName) intgetLogId()longgetStart()longgetTime()longinthashCode()booleanhasMore()booleanhasTime()voidtoString()void
-
Field Details
-
WHOLE_LINE
The name of generic field that contains whole record text.- See Also:
-
-
Constructor Details
-
LogRecord
public LogRecord()Used by deserializer only. -
LogRecord
public LogRecord(@NonNull String message, long timeNanos, long start, long end, int loadedTextLengthBytes) -
LogRecord
-
-
Method Details
-
getLogId
-
setLogId
-
getStart
public long getStart() -
getEnd
public long getEnd() -
hasMore
public boolean hasMore() -
getLoadedTextLengthBytes
public int getLoadedTextLengthBytes() -
getTime
public long getTime() -
getTimeMillis
public long getTimeMillis() -
hasTime
public boolean hasTime() -
getMessage
-
getFieldOffset
-
getFieldText
-
getFieldNames
-
getFieldPositions
public int[] getFieldPositions()An array containing field positions. The start offset of a field with index "i" is located in getFieldPositions()[i * 2], the end is in getFieldPositions()[i * 2 + 1] -
toString
-
compareTo
- Specified by:
compareToin interfaceComparable<LogRecord>
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
createUnparsedRecord
-
equals
-
hashCode
public int hashCode()
-