private String readLine() throws IOException {
        List<Byte> collectedBytes = new ArrayList<>();
       
        int chunkSize = currentConverter.getChunkSize();
        
        byte in_byte;
        int [] encoded_message_part = new int[chunkSize];
        int [] decoded_message_part;
        
        while (true) {
            
            for (int i = 0; i < chunkSize; i++) {
                in_byte = in.readByte();
                encoded_message_part[i] = (int) in_byte;
            }
            decoded_message_part = currentConverter.decode(encoded_message_part);
            for (int in_int: decoded_message_part) {
                in_byte = (byte) in_int;
                collectedBytes.add(in_byte);
            }
            
            //buffer.append((char) in_byte);
            if (collectedBytes.size() > 2) {
                if (collectedBytes.get(collectedBytes.size() - 2) == '\r' 
                        && collectedBytes.get(collectedBytes.size() - 1) == '\n') {
                    byte [] result = new byte[collectedBytes.size()];
                    for (int i = 0; i < collectedBytes.size(); i++) {
                        result[i] = collectedBytes.get(i);
                    }
                    return new String(result, "UTF-8");
                }
            }
        }
    }