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

## Class ParameterWriter

- java.lang.Object
- - org.mariadb.jdbc.internal.packet.dao.parameters.ParameterWriter

    public class ParameterWriter
    extends Object

Helper class for serializing query parameters.

### Field Summary

Fields
`static byte` `QUOTE`

### Constructor Summary

Constructors
Constructor and Description
`ParameterWriter()`

### Method Summary

All Methods Static Methods Concrete Methods
`static void` `write(OutputStream out, byte[] bytes, boolean noBackslashEscapes)` Write byte array in text format.
`static void` `write(OutputStream out, InputStream is, boolean noBackslashEscapes)` Write stream in text format.
`static void` `write(OutputStream out, InputStream is, long length, boolean noBackslashEscapes)` Write stream in text format.
`static void` `write(OutputStream out, Reader reader, boolean noBackslashEscapes)` Write whole reader in text format.
`static void` `write(OutputStream out, Reader reader, long length, boolean noBackslashEscapes)` Write reader in text format.
`static void` `write(PacketOutputStream out, double value)`
`static void` `write(PacketOutputStream out, int value)`
`static void` `write(PacketOutputStream out, long value)`
`static void` `write(PacketOutputStream out, String value, boolean noBackslashEscapes)` Write string in text format.
`static void` `writeUnsafe(PacketOutputStream out, ArrayList<char[]> readArrays, boolean noBackslashEscapes)` Write cached reader char array to buffer without checking buffer size.
`static void` `writeUnsafe(PacketOutputStream out, byte[] bytes, boolean noBackslashEscapes)` Write byte array in text format without checking buffer size.
`static void` `writeUnsafe(PacketOutputStream out, InputStream is, boolean noBackslashEscapes)` Write stream in text format without checking buffer size.
`static void` `writeUnsafe(PacketOutputStream out, InputStream is, long length, boolean noBackslashEscapes)` Write stream in text format without checking buffer size.
`static void` `writeUnsafe(PacketOutputStream out, Reader reader, boolean noBackslashEscapes)` Write whole reader in text format without checking buffer size.
`static void` `writeUnsafe(PacketOutputStream out, String value, boolean noBackslashEscapes)` Write string in text format without checking buffer size.

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

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

### Field Detail

#### QUOTE

    public static final byte QUOTE

See Also:
  Constant Field Values

### Constructor Detail

#### ParameterWriter

    public ParameterWriter()

### Method Detail

#### write

    public static void write(OutputStream out,
                             byte[] bytes,
                             boolean noBackslashEscapes)
                      throws IOException

Write byte array in text format.

Parameters:
  `out` - database stream
  `bytes` - byte arrayto send
  `noBackslashEscapes` - must backslash be escape
Throws:
  `IOException` - if any error occur when writing to database

#### write

    public static void write(PacketOutputStream out,
                             String value,
                             boolean noBackslashEscapes)
                      throws IOException

Write string in text format.

Parameters:
  `out` - database stream
  `value` - String value to send
  `noBackslashEscapes` - must backslash be escape
Throws:
  `IOException` - if any error occur when writing to database

#### write

    public static void write(OutputStream out,
                             InputStream is,
                             boolean noBackslashEscapes)
                      throws IOException

Write stream in text format.

Parameters:
  `out` - database stream
  `is` - input stream to write
  `noBackslashEscapes` - must backslash be escape
Throws:
  `IOException` - if any error occur when writing to database

#### write

    public static void write(OutputStream out,
                             InputStream is,
                             long length,
                             boolean noBackslashEscapes)
                      throws IOException

Write stream in text format.

Parameters:
  `out` - database stream
  `is` - input stream to write
  `length` - max inputstream length to write
  `noBackslashEscapes` - must backslash be escape
Throws:
  `IOException` - if any error occur when writing to database

#### write

    public static void write(OutputStream out,
                             Reader reader,
                             boolean noBackslashEscapes)
                      throws IOException

Write whole reader in text format.

Parameters:
  `out` - database stream
  `reader` - reader to write
  `noBackslashEscapes` - must backslash be escape
Throws:
  `IOException` - if any error occur when writing to database

#### write

    public static void write(OutputStream out,
                             Reader reader,
                             long length,
                             boolean noBackslashEscapes)
                      throws IOException

Write reader in text format.

Parameters:
  `out` - database stream
  `reader` - reader to write
  `length` - reader max length to write
  `noBackslashEscapes` - must backslash be escape
Throws:
  `IOException` - if any error occur when writing to database

#### write

    public static void write(PacketOutputStream out,
                             int value)
                      throws IOException

Throws:
  `IOException`

#### write

    public static void write(PacketOutputStream out,
                             long value)
                      throws IOException

Throws:
  `IOException`

#### write

    public static void write(PacketOutputStream out,
                             double value)
                      throws IOException

Throws:
  `IOException`

#### writeUnsafe

    public static void writeUnsafe(PacketOutputStream out,
                                   Reader reader,
                                   boolean noBackslashEscapes)
                            throws IOException

Write whole reader in text format without checking buffer size.

Parameters:
  `out` - database stream
  `reader` - reader to write
  `noBackslashEscapes` - must backslash be escape
Throws:
  `IOException` - if any error occur when writing to database

#### writeUnsafe

    public static void writeUnsafe(PacketOutputStream out,
                                   ArrayList<char[]> readArrays,
                                   boolean noBackslashEscapes)
                            throws IOException

Write cached reader char array to buffer without checking buffer size.

Parameters:
  `out` - output buffer
  `readArrays` - cache char array
  `noBackslashEscapes` - backslash must be escape flag
Throws:
  `IOException` - if error occur when writing to buffer

#### writeUnsafe

    public static void writeUnsafe(PacketOutputStream out,
                                   InputStream is,
                                   boolean noBackslashEscapes)
                            throws IOException

Write stream in text format without checking buffer size.

Parameters:
  `out` - database stream
  `is` - input stream to write
  `noBackslashEscapes` - must backslash be escape
Throws:
  `IOException` - if any error occur when writing to database

#### writeUnsafe

    public static void writeUnsafe(PacketOutputStream out,
                                   String value,
                                   boolean noBackslashEscapes)
                            throws IOException

Write string in text format without checking buffer size.

Parameters:
  `out` - database stream
  `value` - String value to send
  `noBackslashEscapes` - must backslash be escape
Throws:
  `IOException` - if any error occur when writing to database

#### writeUnsafe

    public static void writeUnsafe(PacketOutputStream out,
                                   InputStream is,
                                   long length,
                                   boolean noBackslashEscapes)
                            throws IOException

Write stream in text format without checking buffer size.

Parameters:
  `out` - database stream
  `is` - input stream to write
  `length` - max inputstream length to write
  `noBackslashEscapes` - must backslash be escape
Throws:
  `IOException` - if InputStream read failed

#### writeUnsafe

    public static void writeUnsafe(PacketOutputStream out,
                                   byte[] bytes,
                                   boolean noBackslashEscapes)

Write byte array in text format without checking buffer size.

Parameters:
  `out` - database stream
  `bytes` - byte arrayto send
  `noBackslashEscapes` - must backslash be escape