Package com.yahoo.io

Class ReadLine


  • public class ReadLine
    extends java.lang.Object
    Conventient utility for reading lines from ByteBuffers. Please read the method documentation for readLine() carefully. The NIO ByteBuffer abstraction is somewhat clumsy and thus usage of this code requires that you understand the semantics clearly.
    Author:
    Bjorn Borud
    • Constructor Summary

      Constructors 
      Constructor Description
      ReadLine()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String readLine​(java.nio.ByteBuffer buffer)
      Extract next line from a byte buffer.
      • Methods inherited from class java.lang.Object

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

      • ReadLine

        public ReadLine()
    • Method Detail

      • readLine

        public static java.lang.String readLine​(java.nio.ByteBuffer buffer)
        Extract next line from a byte buffer. Looks for EOL characters between start and limit, and returns a string between start and the EOL charachers. It skips ahead past any remaining EOL characters and sets position to the first non-EOL character. If it doesn't find an EOL characher between start and limit