com.j256.simplemagic.types
Class LocalDateType
java.lang.Object
com.j256.simplemagic.types.LongType
com.j256.simplemagic.types.IntegerType
com.j256.simplemagic.types.LocalDateType
- All Implemented Interfaces:
- MagicMatcher
- Direct Known Subclasses:
- LocalLongDateType, UtcDateType
public class LocalDateType
- extends IntegerType
A 4-byte value interpreted as a UNIX-style date, but interpreted as local time rather than UTC.
- Author:
- graywatson
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
dateFormat
protected final ThreadLocal<SimpleDateFormat> dateFormat
LocalDateType
public LocalDateType(EndianType endianType)
renderValue
public void renderValue(StringBuilder sb,
Object extractedValue,
Formatter formatter)
- Description copied from interface:
MagicMatcher
- Returns the string version of the extracted value.
- Specified by:
renderValue
in interface MagicMatcher
- Overrides:
renderValue
in class LongType
dateFromExtractedValue
protected Date dateFromExtractedValue(long val)
assisgnTimeZone
protected void assisgnTimeZone(SimpleDateFormat format)
This content is licensed by Gray Watson under the Creative Commons Attribution-Share Alike 3.0 License.