Class STouchProtocol.TextReaderWriter

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

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

    Constructors
    Modifier Constructor Description
    private TextReaderWriter()  
  • Method Summary

    Modifier and Type Method Description
    java.lang.String 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.String text)
    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

    • TextReaderWriter

      private TextReaderWriter()
  • Method Details

    • readFromBuffer

      public java.lang.String 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.String>
      Parameters:
      buffer - the buffer containing the data to read
      Returns:
      the parsed object
    • writeToBuffer

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