## php.java.bridge
Class Options

    java.lang.Object
      php.java.bridge.Options

    public final class Options

extends java.lang.Object

Exposes the request options. There is one Options instance for each request, but certain options may change for each packet. For example if a user calls java_set_file_encoding(enc), the new file encoding becomes available in the next packet.

Author:
  jostb

Constructor Summary
`Options()`

Method Summary
`boolean` `extJavaCompatibility()` Returns true, if bit 0 of the request header is set (see PROTOCOL.TXT).
`byte[]` `getBytes(java.lang.String s)` Return a byte array using the current file encoding (see java_set_file_encoding()).
`java.lang.String` `getEncoding()` Returns the file encoding, see java_set_file_encoding().
`boolean` `hexNumbers()` Returns true, if exact numbers are base 16 (see PROTOCOL.TXT).
`boolean` `sendArraysAsValues()` Returns true, if bit 1 of the request header is set (see PROTOCOL.TXT).
`void` `setEncoding(java.lang.String symbol)` Set the new file encoding.
`void` `updateOptions(byte b)` Update the current request options

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Options

    public Options()

Method Detail

### getEncoding

    public java.lang.String getEncoding()

  Returns the file encoding, see java_set_file_encoding(). This option may change for each packet.

  Returns:
    The file encoding

### getBytes

    public byte[] getBytes(java.lang.String s)

  Return a byte array using the current file encoding (see java_set_file_encoding()).

  Parameters:
    `s` - The string
  Returns:
    The encoded bytes.

### sendArraysAsValues

    public boolean sendArraysAsValues()

  Returns true, if bit 1 of the request header is set (see PROTOCOL.TXT). This option stays the same for all packets.

  Returns:
    the value of the request header bit 1.

### extJavaCompatibility

    public boolean extJavaCompatibility()

  Returns true, if bit 0 of the request header is set (see PROTOCOL.TXT). This options stays the same for all packets.

  Returns:
    the value of the request header

### hexNumbers

    public boolean hexNumbers()

  Returns true, if exact numbers are base 16 (see PROTOCOL.TXT). This options stays the same for all packets.

  Returns:
    the value of the request header

### setEncoding

    public void setEncoding(java.lang.String symbol)

  Set the new file encoding.

  Parameters:
    `symbol` - The new file encoding, for example "UTF-8".

### updateOptions

    public void updateOptions(byte b)

  Update the current request options

  Parameters:
    `b` - The options from the request header.