SHARE
TWEET

Untitled

a guest Jun 19th, 2019 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. PipedInputStream in = new PipedInputStream();
  2. PipedOutputStream out = new PipedOutputStream(in);
  3. BufferedReader r = new BufferedReader(new InputStreamReader(in));//Обёртка для удобной работы со строками
  4. BufferedWriter w = new BufferedWriter(new OutputStremWriter(out));//Тоже самое для OutputStream
  5. w.write("Hello world!n");//n означает перенос строки
  6. w.flush();//стоит делать после окончания блока записей
  7. System.out.println(r.readLine());//"Hello world!"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top