org.firebirdsql.gds.ng.tz

## Class TimeZoneDatatypeCoder

- java.lang.Object
- - org.firebirdsql.gds.ng.tz.TimeZoneDatatypeCoder

    public class TimeZoneDatatypeCoder
    extends java.lang.Object

Datatype coder for `TIME WITH TIME ZONE` and `TIMESTAMP WITH TIME ZONE`.

As this uses Java 8 and higher types, this is not part of datatype coder itself.

Since:
  4.0
Author:
  Mark Rotteveel

### Constructor Summary

Constructors
Constructor and Description
`TimeZoneDatatypeCoder(DatatypeCoder datatypeCoder)` Initializes a time zone datatype coder.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`java.time.OffsetDateTime` `decodeTimestampTz(byte[] timestampTzBytes)`
`java.time.OffsetTime` `decodeTimeTz(byte[] timeTzBytes)`
`byte[]` `encodeTimestampTz(java.time.OffsetDateTime offsetDateTime)`
`byte[]` `encodeTimeTz(java.time.OffsetTime offsetTime)`
`static TimeZoneDatatypeCoder` `getInstanceFor(DatatypeCoder datatypeCoder)` Gets or creates an instance of time zone datatype coder for a datatype coder.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### TimeZoneDatatypeCoder

    public TimeZoneDatatypeCoder(DatatypeCoder datatypeCoder)

Initializes a time zone datatype coder.

Parameters:
  `datatypeCoder` - datatype coder

### Method Detail

#### decodeTimestampTz

    public java.time.OffsetDateTime decodeTimestampTz(byte[] timestampTzBytes)

#### encodeTimestampTz

    public byte[] encodeTimestampTz(java.time.OffsetDateTime offsetDateTime)

#### decodeTimeTz

    public java.time.OffsetTime decodeTimeTz(byte[] timeTzBytes)

#### encodeTimeTz

    public byte[] encodeTimeTz(java.time.OffsetTime offsetTime)

#### getInstanceFor

    public static TimeZoneDatatypeCoder getInstanceFor(DatatypeCoder datatypeCoder)

Gets or creates an instance of time zone datatype coder for a datatype coder.

Parameters:
  `datatypeCoder` - Datatype coder instance
Returns:
  Cached or new instance of `TimeZoneDatatypeCoder`