I read from Socket InputStream. Since I analyze incoming data on the fly, I need to read character by character.
Does it BufferedReader.read()do the same thing as InputStream.read()? (assuming BufferedReader was created with an InputStream base)
BufferedReader.read()
InputStream.read()
How much more efficient is using InputStream.read () when reading each character separately? Or is there a better way?
BufferedReader Reader. InputStream . , . Reader ? , - :
BufferedReader in = new BufferedReader(new InputStreamReader(socket));
.
BufferedReader, , , ( -).
read() InputStream . , InputStreamrReader. , read() InputStreamReader BufferesReader - ascii , : BufferedReader , /STDIN, , , InputStreamReader, read() /STDIN, , .
Source: https://habr.com/ru/post/1673740/More articles:Не могу получить мангуст-уникальный-валидатор для работы - javascriptHow do InputStream, InputStreamReader and BufferedReader work in Java? - javaWhat is the relationship between InputStream, BuffreredInputStream, InputStreamReader and BufferedReader? - java* ngIf indicating the focus - inputjQuery elevateZoom only works when I set a warning () before - javascriptSearch for a special pattern in the string: R - regexКак настроить шаги, выполняемые во время сборки ионных приложений? - ionic2SQL Server - remove all non-printable ASCII characters - sql-serverКак ограничить область перетаскивания для изображений - iosPython math range error - pythonAll Articles