7_API REFERENCE MANUAL
public
void
sendBytes(byte[]
myByteArray)
throws
IOException {
sendBytes(myByteArray, 0, myByteArray.length);
}
public void sendBytes(byte[] myByteArray, int start, int
len) throws IOException {
if (len < 0)
throw
new
IllegalArgumentException("Negative
length not allowed");
if (start < 0 || start >= myByteArray.length)
throw
new
IndexOutOfBoundsException("Out
of
bounds: " + start);
// Other checks if needed.
// May be better to save the streams in the support
class;
// just like the socket variable.
OutputStream out = socket.getOutputStream();
DataOutputStream dos = new DataOutputStream(out);
dos.writeInt(len);
if (len > 0) {
dos.write(myByteArray, start, len);
}
}
public byte[] readBytes() throws IOException {
// Again, probably better to store these objects
references in the support class
InputStream in = socket.getInputStream();
DataInputStream dis = new DataInputStream(in);
int len = dis.readInt();
byte[] data = new byte[len];
if (len > 0) {
dis.readFully(data);
}
return data;
Summary of Contents for Nexo NLX1
Page 1: ...E S P INSTRUCTIONS MANUAL VERSION 2 0 NEXO NLX1 SYSTEM...
Page 2: ......
Page 3: ...INSTRUCTIONS MANUAL VERSION 1 0 NEXO NLX1 SYSTEM...
Page 7: ...CONTENTSOJMAR 7 PAGE LEFT BLANK INTENTIONALLY...
Page 39: ...2_MANUAL DE INSTALACI N OJMAR 39 PAGE LEFT BLANK INTENTIONALLY...
Page 57: ...3_PUESTA EN MARCHA OJMAR 57 PAGE LEFT BLANK INTENTIONALLY...
Page 62: ...5_MANUAL DE MANTENIMIENTO 1 2 3 User key master or service 4...
Page 70: ...5_MANUAL DE MANTENIMIENTO...
Page 74: ...5_MANUAL DE MANTENIMIENTO PAGE LEFT BLANK INTENTIONALLY...
Page 150: ...7_API REFERENCE MANUAL options BT group 1 range_from 1 range_to 100...
Page 184: ...7_API REFERENCE MANUAL PAGE LEFT BLANK INTENTIONALLY...
Page 186: ...7_API REFERENCE MANUAL Option b...
Page 187: ...7_API REFERENCE MANUAL OJMAR 187 Option c INSTALLING ONE ROUTER PER 50 LOCKS IS RECOMMENDED...
Page 188: ...7_API REFERENCE MANUAL...