Class STouchProtocol.IntegerReaderWriter

java.lang.Object
de.freaklamarsch.systarest.STouchProtocol.IntegerReaderWriter
All Implemented Interfaces:
STouchProtocol.ObjectReaderWriter<java.lang.Integer>
Enclosing class:
STouchProtocol

private static class STouchProtocol.IntegerReaderWriter
extends java.lang.Object
implements STouchProtocol.ObjectReaderWriter<java.lang.Integer>
  • Constructor Summary

    Constructors
    Modifier Constructor Description
    private IntegerReaderWriter()  
  • Method Summary

    Modifier and Type Method Description
    java.lang.Integer readFromBuffer​(java.nio.ByteBuffer buffer)
    Parses the command from the received buffer and returns a parsed object.
    int writeToBuffer​(java.nio.ByteBuffer buffer, java.lang.Integer object)
    Converts the parsed object into the reply buffer.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • IntegerReaderWriter

      private IntegerReaderWriter()
  • Method Details

    • readFromBuffer

      public java.lang.Integer readFromBuffer​(java.nio.ByteBuffer buffer)
      Description copied from interface: STouchProtocol.ObjectReaderWriter
      Parses the command from the received buffer and returns a parsed object.
      Specified by:
      readFromBuffer in interface STouchProtocol.ObjectReaderWriter<java.lang.Integer>
      Parameters:
      buffer - the buffer containing the data to read
      Returns:
      the parsed object
    • writeToBuffer

      public int writeToBuffer​(java.nio.ByteBuffer buffer, java.lang.Integer object)
      Description copied from interface: STouchProtocol.ObjectReaderWriter
      Converts the parsed object into the reply buffer.
      Specified by:
      writeToBuffer in interface STouchProtocol.ObjectReaderWriter<java.lang.Integer>
      Parameters:
      buffer - the buffer to write to
      object - the object to convert
      Returns:
      the length of the bytes written to the buffer