Java Code Examples for org.apache.catalina.tribes.util.Arrays#fromString()

The following examples show how to use org.apache.catalina.tribes.util.Arrays#fromString() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: StaticMember.java    From Tomcat8-Source-Read with MIT License 4 votes vote down vote up
/**
 * @param id String, must be in byte array string format, like {214,116,1,3} and exactly 16 bytes long
 */
public void setUniqueId(String id) {
    byte[] uuid = Arrays.fromString(id);
    if ( uuid==null || uuid.length != 16 ) throw new RuntimeException(sm.getString("staticMember.invalid.uuidLength", id));
    setUniqueId(uuid);
}
 
Example 2
Source File: StaticMember.java    From Tomcat7.0.67 with Apache License 2.0 4 votes vote down vote up
/**
 * @param id String, must be in byte array string format, like {214,116,1,3} and exactly 16 bytes long
 */
public void setUniqueId(String id) {
    byte[] uuid = Arrays.fromString(id);
    if ( uuid==null || uuid.length != 16 ) throw new RuntimeException("UUID must be exactly 16 bytes, not:"+id);
    setUniqueId(uuid);
}
 
Example 3
Source File: StaticMember.java    From tomcatsrc with Apache License 2.0 4 votes vote down vote up
/**
 * @param id String, must be in byte array string format, like {214,116,1,3} and exactly 16 bytes long
 */
public void setUniqueId(String id) {
    byte[] uuid = Arrays.fromString(id);
    if ( uuid==null || uuid.length != 16 ) throw new RuntimeException("UUID must be exactly 16 bytes, not:"+id);
    setUniqueId(uuid);
}