public static ServerName parseVersionedServerName(final byte[] versionedBytes) {
    // Version is a short.
    short version = Bytes.toShort(versionedBytes);
    if (version == VERSION) {
      int length = versionedBytes.length - Bytes.SIZEOF_SHORT;
      return valueOf(Bytes.toString(versionedBytes, Bytes.SIZEOF_SHORT, length));
    }
    // Presume the bytes were written with an old version of hbase and that the
    // bytes are actually a String of the form "'<hostname>' ':' '<port>'".
    return valueOf(Bytes.toString(versionedBytes), NON_STARTCODE);
  }
Use this method instantiating a {@link ServerName} from bytes gotten from a call to
{@link #getVersionedBytes()}. Will take care of the case where bytes were written by an earlier
version of hbase.
@param versionedBytes Pass bytes gotten from a call to {@link #getVersionedBytes()}
@return A ServerName instance.
@see #getVersionedBytes()
hbase-common/src/main/java/org/apache/hadoop/hbase/ServerName.java