private String[] getChunkHeader() throws IOException{
            StringBuilder sb = new StringBuilder();
            boolean fi = false;
            while(true){
                int read = in.read();
                if(read == -1) {
                    throw new IOException("Connection closed.");
                }
                if(read == '\n' && fi) break;

                if(read != '\r'){
                    sb.append((char) read);
                }else{
                    fi = true;
                }
            }
            return sb.toString().split(";");
        }