/
GermanezZ
/
JavaExercises
Обзор
Документация
Войти
/
GermanezZ
/
JavaExercises
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
AllMetanitLessons/InputOutoutStreamsFolder/Buffered/InputStream.java
31 строка
607 B
germa
Уроки по Metanit
04 дек 2024, 20:39
04 дек 2024, 20:39
48d575a
Код
Авторство
О чём код?
package AllMetanitLessons.InputOutoutStreamsFolder.Buffered; import java.io.*; public class InputStream { public static void main(String[] args) { String text = "New Buffered Text"; byte[] arr = text.getBytes(); try(ByteArrayInputStream bin = new ByteArrayInputStream(arr); BufferedInputStream buf = new BufferedInputStream(bin)) { int i; while ((i = buf.read())!=-1){ System.out.print((char) i); } }catch (IOException exc){ System.out.println(exc.getMessage()); } } }