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:

int data = mmInStream.read();
   if(data == 0x0A) { 
                } else if(data == 0x0D) {
                    buffer = new byte[arr_byte.size()];
                    for(int i = 0 ; i < arr_byte.size() ; i++) {
                        buffer[i] = arr_byte.get(i).byteValue();
                    }
                    // Send the obtained bytes to the UI Activity
                    mHandler.obtainMessage(BluetoothState.MESSAGE_READ
                            , buffer.length, -1, buffer).sendToTarget();
                    arr_byte = new ArrayList<Integer>();
                } else {
                    arr_byte.add(data);
                }

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:1

Some time ago I asked this question. All solutions are workarounds. Now this can't be. I feel that something is wrong here, but I can't tell if it is Swing's MVC model that is conceptually wrong, or ...

In onCreate() method of activity I have this code for ToolBar: toolbar = (Toolbar) findViewById(R.id.tool_bar); setSupportActionBar(toolbar); getSupportActionBar().setDisplayHomeAsUpEnabled(true); ...

Relating to my earlier question, I want to ensure all the child objects are loaded as I have a multiple threads that may need to access the data (and thus avoid lazy loading exceptions). I understand ...

I want to use java9 on my gradle project inside eclipse oxygen. When I run: Run as> Gradle Test on GreeterTest.java with the following code: package hello.test; import static org.junit....