TCP.Advanced.readIntoByteArray()

Signature

int readIntoByteArray(String sessionNickName, int maxNumBytesToRead, Object byteArray)

Domain

Parameters

NameTypeDescription
sessionNickNameStringNick name of the session
maxNumBytesToReadintIf the end of the stream is received before this number of bytes are read, then the reading stops and returns the data collected so far.
byteArrayObjectA byte[] whose length is at least maxNumBytesToRead and into which the data will be read from offset 0. (For use in custom Java code).

Returns

TypeDescription
int-1 if End-of-stream is reached or the number of bytes that were read into the array passed.