@Nonnull
  private String unpackLanguageOrRegion(byte[] value, int base) {
    Preconditions.checkState(value.length == 2, "Language or country value must be 2 bytes.");
    if (value[0] == 0 && value[1] == 0) {
      return "";
    }
    if (isTruthy(UnsignedBytes.toInt(value[0]) & 0x80)) {
      byte[] result = new byte[3];
      result[0] = (byte) (base + (value[1] & 0x1F));
      result[1] = (byte) (base + ((value[1] & 0xE0) >>> 5) + ((value[0] & 0x03) << 3));
      result[2] = (byte) (base + ((value[0] & 0x7C) >>> 2));
      return new String(result, US_ASCII);
    }
    return new String(value, US_ASCII);
  }
@Nonnull
  private String unpackLanguageOrRegion(byte[] value, int base) {
    Preconditions.checkState(value.length == 2, "Language or country value must be 2 bytes.");
    if (value[0] == 0 && value[1] == 0) {
      return "";
    }
    if (isTruthy(UnsignedBytes.toInt(value[0]) & 0x80)) {
      byte[] result = new byte[3];
      result[0] = (byte) (base + (value[1] & 0x1F));
      result[1] = (byte) (base + ((value[1] & 0xE0) >>> 5) + ((value[0] & 0x03) << 3));
      result[2] = (byte) (base + ((value[0] & 0x7C) >>> 2));
      return new String(result, US_ASCII);
    }
    return new String(value, US_ASCII);
  }
@ Nonnull private String unpackLanguageOrRegion ( byte [ ] value , int base ) { Preconditions . checkState ( value . length == 2 , "Language or country value must be 2 bytes." ) ; if ( value [ 0 ] == 0 && value [ 1 ] == 0 ) { return "" ; } if ( isTruthy ( UnsignedBytes . toInt ( value [ 0 ] ) & 0x80 ) ) { byte [ ] result = new byte [ 3 ] ; result [ 0 ] = ( byte ) ( base + ( value [ 1 ] & 0x1F ) ) ; result [ 1 ] = ( byte ) ( base + ( ( value [ 1 ] & 0xE0 ) >>> 5 ) + ( ( value [ 0 ] & 0x03 ) << 3 ) ) ; result [ 2 ] = ( byte ) ( base + ( ( value [ 0 ] & 0x7C ) >>> 2 ) ) ; return new String ( result , US_ASCII ) ; } return new String ( value , US_ASCII ) ; }
}
}