Package one.nio.http

Class HttpClient.ResponseReader

    • Field Detail

      • buf

        byte[] buf
      • length

        int length
      • pos

        int pos
    • Constructor Detail

      • ResponseReader

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

      • readResultCode

        java.lang.String readResultCode()
                                 throws java.io.IOException,
                                        HttpException
        Throws:
        java.io.IOException
        HttpException
      • readBody

        byte[] readBody​(int contentLength)
                 throws java.io.IOException
        Throws:
        java.io.IOException
      • readBodyUntilClose

        byte[] readBodyUntilClose()
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • mergeChunks

        byte[] mergeChunks​(java.util.List<byte[]> chunks)
      • mayHaveBody

        private static boolean mayHaveBody​(int status)