@Override public void setPayload(byte[] bytes) { if (bytes.length == 1) { throw new ProtocolError("Closing frame payload, if present, must be a minimum of 2 bytes in length"); } if (bytes.length > 0) { code = (int) Utils.toLong(bytes, 0, 2); if (code < 1000 || code == 1004 || code == 1005 || code == 1006 || (code > 1011 && code < 3000) || code > 4999) { throw new ProtocolError("Illegal status code: " + code); } if (bytes.length > 2) { utf8Decode(bytes); } } }
@Override public void setPayload(byte[] bytes) { if (bytes.length == 1) { throw new ProtocolError("Closing frame payload, if present, must be a minimum of 2 bytes in length"); } if (bytes.length > 0) { code = (int) Utils.toLong(bytes, 0, 2); if (code < 1000 || code == 1004 || code == 1005 || code == 1006 || (code > 1011 && code < 3000) || code > 4999) { throw new ProtocolError("Illegal status code: " + code); } if (bytes.length > 2) { utf8Decode(bytes); } } }
@Override public void setPayload(byte[] bytes) { if (bytes.length == 1) { throw new ProtocolError("Closing frame payload, if present, must be a minimum of 2 bytes in length"); } if (bytes.length > 0) { code = (int) Utils.toLong(bytes, 0, 2); if (code < 1000 || code == 1004 || code == 1005 || code == 1006 || (code > 1011 && code < 3000) || code > 4999) { throw new ProtocolError("Illegal status code: " + code); } if (bytes.length > 2) { utf8Decode(bytes); } } }
@Override public void setPayload(byte[] bytes) { if (bytes.length == 1) { throw new ProtocolError("Closing frame payload, if present, must be a minimum of 2 bytes in length"); } if (bytes.length > 0) { code = (int) Utils.toLong(bytes, 0, 2); if (code < 1000 || code == 1004 || code == 1005 || code == 1006 || (code > 1011 && code < 3000) || code > 4999) { throw new ProtocolError("Illegal status code: " + code); } if (bytes.length > 2) { utf8Decode(bytes); } } }
@Override public void setPayload(byte[] bytes) { if (bytes.length == 1) { throw new ProtocolError("Closing frame payload, if present, must be a minimum of 2 bytes in length"); } if (bytes.length > 0) { code = (int) Utils.toLong(bytes, 0, 2); if (code < 1000 || code == 1004 || code == 1005 || code == 1006 || (code > 1011 && code < 3000) || code > 4999) { throw new ProtocolError("Illegal status code: " + code); } if (bytes.length > 2) { utf8Decode(bytes); } } }
@Override public void setPayload(byte[] bytes) { if (bytes.length == 1) { throw new ProtocolError("Closing frame payload, if present, must be a minimum of 2 bytes in length"); } if (bytes.length > 0) { code = (int) Utils.toLong(bytes, 0, 2); if (code < 1000 || code == 1004 || code == 1005 || code == 1006 || (code > 1011 && code < 3000) || code > 4999) { throw new ProtocolError("Illegal status code: " + code); } if (bytes.length > 2) { utf8Decode(bytes); } } }