Package one.nio.http

Class HttpClient.ChunkedLineReader

    • Field Detail

      • ch

        private byte[] ch
      • chPos

        private int chPos
      • chLen

        private int chLen
      • hasNext

        private boolean hasNext
    • Constructor Detail

      • ChunkedLineReader

        ChunkedLineReader​(Socket socket,
                          int bufferSize)
                   throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • chunkSizeFor

        private int chunkSizeFor​(int cap)
      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<java.lang.String>
      • next

        public java.lang.String next()
        Specified by:
        next in interface java.util.Iterator<java.lang.String>
      • readChunkedLine

        private java.lang.String readChunkedLine()
                                          throws java.io.IOException,
                                                 HttpException
        Throws:
        java.io.IOException
        HttpException
      • findLineEnd

        private int findLineEnd​(byte[] b,
                                int start,
                                int len)
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable