Java tutorial
//package com.java2s; /* * BurpUtils.java * * Copyright (c) 2014 Luca Carettoni * * This file is part of Bradamsa, (B)urp Suite + (Radamsa) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. This program is distributed in the * hope that it will be useful, but WITHOUT ANY WARRANTY. * */ import java.io.IOException; import java.io.InputStream; import java.io.PrintStream; public class Main { private static void pipe(final InputStream src, final PrintStream dest) { new Thread(new Runnable() { @Override public void run() { try { byte[] buffer = new byte[1024]; for (int n = 0; n != -1; n = src.read(buffer)) { dest.write(buffer, 0, n); } } catch (IOException e) { } } }).start(); } }