Skip to content
Advertisement

Tag: buffer

How to perform unbuffered input in Java (if at all possible)?

Java Beginner here. When we input a string, we have to press the enter key to let the program know that the user has done inputting. Is there a way where we use another key instead of enter key (for example a question mark key) to input a string? Answer Ever heard of something called a “buffer”? It is a

Difference between 0x0A and 0x0D

I was studying about bluetooth and I was trying to write the code to keep listening to the input stream while connected and i came across this following code snippet: Can someone explain what is the difference between 0x0A and 0x0D. And also give a brief explanation about this code. Kindly share your views. Answer The values starting 0x are

Byte array of unknown length in java

I am constructing an array of bytes in java and I don’t know how long the array will be. I want some tool like Java’s StringBuffer that you can just call .append(byte b) or .append(byte[] buf) and have it buffer all my bytes and return to me a byte[] when I’m done. Is there a class that does for bytes

Advertisement