BasicSessionID(final byte[] encodedForm) { super(encodedForm); if (encodedForm[0] != 0x07) { throw wrongFormat(); } }
/** * Create a session ID object for the given encoded representation. * * @param encoded the encoded representation * @return the session ID object */ public static SessionID createSessionID(byte[] encoded) { final int length = encoded.length; if (length >= 19 && encoded[0] == 0x07) { return new BasicSessionID(encoded.clone()); } else if (length == 17 && encoded[0] == 0x09) { return new UUIDSessionID(encoded.clone()); } return new UnknownSessionID(encoded.clone()); }
/** * Create a session ID object for the given encoded representation. * * @param encoded the encoded representation * @return the session ID object */ public static SessionID createSessionID(byte[] encoded) { final int length = encoded.length; if (length >= 19 && encoded[0] == 0x07) { return new BasicSessionID(encoded.clone()); } else if (length == 17 && encoded[0] == 0x09) { return new UUIDSessionID(encoded.clone()); } return new UnknownSessionID(encoded.clone()); }
BasicSessionID(final byte[] encodedForm) { super(encodedForm); if (encodedForm[0] != 0x07) { throw wrongFormat(); } }
/** * Create a session ID object for the given encoded representation. * * @param encoded the encoded representation * @return the session ID object */ public static SessionID createSessionID(byte[] encoded) { final int length = encoded.length; if (length >= 19 && encoded[0] == 0x07) { return new BasicSessionID(encoded.clone()); } else if (length == 17 && encoded[0] == 0x09) { return new UUIDSessionID(encoded.clone()); } return new UnknownSessionID(encoded.clone()); }
BasicSessionID(final byte[] encodedForm) { super(encodedForm); if (encodedForm[0] != 0x07) { throw wrongFormat(); } }