Hi,
I want to do :
byte[] byteArray = null;
someInputStream.read(byteArray);
But I get a NullPointerException from byteArray being null. So I changed it to:
byte[] byteArray;
someInputStream.read(byteArray);
But my IDE ( Eclipse ) won't let me compile saying the variable byteArray has not been initialized.
What I want to do is create a byte array that can be used by the read method. How do I do this ?
One more question, can I do this without knowing the size of the array before hand ?