org.mariadb.jdbc.internal.packet.dao.parameters

## Class DateParameter

- java.lang.Object
- - org.mariadb.jdbc.internal.packet.dao.parameters.ParameterHolder
  - - org.mariadb.jdbc.internal.packet.dao.parameters.NotLongDataParameterHolder
    - - org.mariadb.jdbc.internal.packet.dao.parameters.DateParameter

All Implemented Interfaces:
  Cloneable

    public class DateParameter
    extends NotLongDataParameterHolder

### Constructor Summary

Constructors
Constructor and Description
`DateParameter(Date date, Calendar cal, Options options)` Represents a date, constructed with time in millis since epoch.

### Method Summary

All Methods Instance Methods Concrete Methods
`long` `getApproximateTextProtocolLength()`
`MariaDbType` `getMariaDbType()`
`String` `toString()` Nice formatting of prepared statements using PreparedStatement.toString().
`void` `writeBinary(PacketOutputStream writeBuffer)` Write to server OutputStream in binary protocol.
`void` `writeTo(OutputStream os)` Write to server OutputStream in text protocol.

### Methods inherited from class org.mariadb.jdbc.internal.packet.dao.parameters.NotLongDataParameterHolder

`isLongData`

### Methods inherited from class org.mariadb.jdbc.internal.packet.dao.parameters.ParameterHolder

`writeBufferType`

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

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

### Constructor Detail

#### DateParameter

    public DateParameter(Date date,
                         Calendar cal,
                         Options options)

Represents a date, constructed with time in millis since epoch.

Parameters:
  `date` - the date
  `cal` - the calendar to use for timezone
  `options` - jdbc options

### Method Detail

#### writeTo

    public void writeTo(OutputStream os)
                 throws IOException

Write to server OutputStream in text protocol.

Specified by:
  `writeTo` in class `ParameterHolder`
Parameters:
  `os` - output buffer
Throws:
  `IOException` - when something goes wrong

#### getApproximateTextProtocolLength

    public long getApproximateTextProtocolLength()

Specified by:
  `getApproximateTextProtocolLength` in class `ParameterHolder`

#### writeBinary

    public void writeBinary(PacketOutputStream writeBuffer)

Write to server OutputStream in binary protocol.

Specified by:
  `writeBinary` in class `NotLongDataParameterHolder`
Parameters:
  `writeBuffer` - output buffer

#### getMariaDbType

    public MariaDbType getMariaDbType()

Specified by:
  `getMariaDbType` in class `ParameterHolder`

#### toString

    public String toString()

Description copied from class: `ParameterHolder`
Nice formatting of prepared statements using PreparedStatement.toString().

Overrides:
  `toString` in class `ParameterHolder`
Returns:
  formatted value