Package com.mouseviator.fsuipc.datarequest.primitives

# Class ByteRequest

java.lang.Object
com.mouseviator.fsuipc.datarequest.DataRequest
com.mouseviator.fsuipc.datarequest.primitives.ByteRequest

All Implemented Interfaces:
  `IDataRequest<java.lang.Byte>`

    public class ByteRequest
    extends DataRequest
    implements IDataRequest<java.lang.Byte>

This class implements byte data request for use with `FSUIPC` class. The internal byte data buffer length will be 1 bytes (8 bit), matching FSUIPC 8bit signed/unsigned byte values. If you are familiar with FSUIPC lua functions, or other data type marking, this will match data that you can read in lua with readUB or readSB function.

Author:
  Mouseviator

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from interface com.mouseviator.fsuipc.datarequest.IDataRequest

  `IDataRequest.RequestType`

- ## Field Summary

  ### Fields inherited from class com.mouseviator.fsuipc.datarequest.DataRequest

  `BUFFER_LENGTH_BYTE, BUFFER_LENGTH_DOUBLE, BUFFER_LENGTH_FLOAT, BUFFER_LENGTH_INT, BUFFER_LENGTH_LONG, BUFFER_LENGTH_SHORT, dataBuffer, MAX_OFFSET_VALUE, MIN_OFFSET_VALUE, offset, type`

- ## Constructor Summary

  Constructors
  Constructor | Description
  --- | ---
  `ByteRequest()` | Creates a new byte data request.
  `ByteRequest​(int offset)` | Creates a new byte data request associated with given offset.
  `ByteRequest​(int offset, byte value)` | Creates a new byte data request associated with given offset and with given value.This also sets data request type to WRITE.
  `ByteRequest​(int offset, java.lang.Byte value)` | Creates a new byte data request associated with given offset and with given value.This also sets data request type to WRITE.

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `java.lang.Byte` | `getValue()` | Returns the value stored within this data request byte data buffer.
  `void` | `setValue​(java.lang.Byte value)` | Sets the value to be stored in the byte data buffer of this data request.

  ### Methods inherited from class com.mouseviator.fsuipc.datarequest.DataRequest

  `convertStringToByteArray, copyByteArray, getDataBuffer, getDouble, getFloat, getInt, getLong, getOffset, getShort, getSize, getType, getZeroTerminatedString, putDouble, putDouble, putFloat, putFloat, putInt, putInt, putLong, putLong, putShort, putShort, setOffset, setType`

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

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

  ### Methods inherited from interface com.mouseviator.fsuipc.datarequest.IDataRequest

  `getDataBuffer, getOffset, getSize, getType, setOffset, setType`

- ## Constructor Details

  - ### ByteRequest

    public ByteRequest()
    Creates a new byte data request.

  - ### ByteRequest

    public ByteRequest​(int offset) throws java.security.InvalidParameterException
    Creates a new byte data request associated with given offset.
    Parameters:
      `offset` - An offset to associate this data request with.
    Throws:
      `java.security.InvalidParameterException`

  - ### ByteRequest

    public ByteRequest​(int offset, byte value) throws java.security.InvalidParameterException
    Creates a new byte data request associated with given offset and with given value.This also sets data request type to WRITE.
    Parameters:
      `offset` - An offset to associate this data request with.
      `value` - The actual value.
    Throws:
      `java.security.InvalidParameterException`

  - ### ByteRequest

    public ByteRequest​(int offset, java.lang.Byte value) throws java.security.InvalidParameterException
    Creates a new byte data request associated with given offset and with given value.This also sets data request type to WRITE.
    Parameters:
      `offset` - An offset to associate this data request with.
      `value` - The actual value.
    Throws:
      `java.security.InvalidParameterException`

- ## Method Details

  - ### getValue

    public java.lang.Byte getValue()
    Description copied from interface: `IDataRequest`
    Returns the value stored within this data request byte data buffer.
    Specified by:
      `getValue` in interface `IDataRequest<java.lang.Byte>`
    Returns:
      The value stored within this data request.

  - ### setValue

    public void setValue​(java.lang.Byte value)
    Description copied from interface: `IDataRequest`
    Sets the value to be stored in the byte data buffer of this data request.
    Specified by:
      `setValue` in interface `IDataRequest<java.lang.Byte>`
    Parameters:
      `value` - The value to store.