congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
com.novoda
Code IndexAdd Tabnine to your IDE (free)

How to use com.novoda

Best Java code snippets using com.novoda (Showing top 20 results out of 315)

origin: novoda/android-demos

  private byte[] getDecode(String encryption_subject) throws CryptException {

    try {
      return Base64.decode(encryption_subject);
    } catch (Base64DecoderException e) {
      throw new CryptException(e);
    }
  }
}
origin: novoda/android-demos

/**
 * Decodes Base64 content in byte array format and returns
 * the decoded byte array.
 *
 * @param source The Base64 encoded data
 * @return decoded data
 * @since 1.3
 * @throws Base64DecoderException
 */
public static byte[] decode(byte[] source) throws Base64DecoderException {
 return decode(source, 0, source.length);
}
origin: novoda/android-demos

/**
 * Decodes web safe Base64 content in byte array format and returns
 * the decoded data.
 * Web safe encoding uses '-' instead of '+', '_' instead of '/'
 *
 * @param source the string to decode (decoded in default encoding)
 * @return the decoded data
 */
public static byte[] decodeWebSafe(byte[] source)
  throws Base64DecoderException {
 return decodeWebSafe(source, 0, source.length);
}
origin: novoda/android-demos

private String encode(String encryption_subject, Cipher crypter) throws CryptException {
  try {
    return Base64.encode(finishTransformation(crypter, encryption_subject.getBytes(CHARSET)));
  } catch (UnsupportedEncodingException e) {
    throw new CryptException(e);
  }
}
origin: novoda/android-demos

@Override
public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.list);
  setListAdapter(new StyledListItemAdapter(this));
}

origin: novoda/android-demos

private String getString(String encryption_subject, Cipher crypter) throws CryptException {
  try {
    return new String(finishTransformation(crypter, getDecode(encryption_subject)), CHARSET);
  } catch (UnsupportedEncodingException e) {
    throw new CryptException(e);
  }
}
origin: novoda/android-demos

public View getView(int position, View convertView, ViewGroup parent) {
  if (convertView == null) {
    sv = new StyledItemView(mContext, mTitles[position]);
  } else {
    sv = (StyledItemView) convertView;
  }
  sv.setContent(mTitles[position]);
  return sv;
}
origin: novoda/android-demos

@Override
protected void onResume() {
  super.onResume();
  receiver = new TabChangeReceiver();
  registerReceiver(receiver, new IntentFilter("com.novoda.TAB"), null, mHandler);
}

origin: novoda/android-demos

private SecretKeyFactory getSecretKeyFactory() throws CryptException {
  try {
    return SecretKeyFactory.getInstance(ALGORITHM);
  } catch (NoSuchAlgorithmException e) {
    throw new CryptException(e);
  }
}
origin: novoda/android-demos

/**
 * Encodes a byte array into Base64 notation.
 * Equivalent to calling
 * {@code encodeBytes(source, 0, source.length)}
 *
 * @param source The data to convert
 * @since 1.4
 */
public static String encode(byte[] source) {
 return encode(source, 0, source.length, ALPHABET, true);
}
origin: novoda/android-demos

  public void onClick(View v) {
    Intent intent = new Intent("com.novoda.TAB");
    intent.putExtra("tab", 1);
    sendBroadcast(intent);
  }
};
origin: novoda/android-demos

@Override
protected Dialog onCreateDialog(int id) {
  Dialog dialog = null;
  
  switch (id) {
    case DIALOG_CHOOSE_VIEW_ID:
      dialog = getChooseViewDialog();
      break;
    default:
      dialog = super.onCreateDialog(id);
  }
  
  return dialog;
}

origin: novoda/android-demos

/**
 * Decodes web safe Base64 content in byte array format and returns
 * the decoded byte array.
 * Web safe encoding uses '-' instead of '+', '_' instead of '/'
 *
 * @param source the Base64 encoded data
 * @param off    the offset of where to begin decoding
 * @param len    the length of characters to decode
 * @return decoded data
 */
public static byte[] decodeWebSafe(byte[] source, int off, int len)
  throws Base64DecoderException {
 return decode(source, off, len, WEBSAFE_DECODABET);
}
origin: novoda/android-demos

private Cipher getCipherInstance() throws CryptException {
  try {
    return Cipher.getInstance(CIPHER_TYPE);
  } catch (NoSuchAlgorithmException | NoSuchPaddingException e) {
    throw new CryptException(e);
  }
}
origin: novoda/android-demos

/**
 * Encodes a byte array into web safe Base64 notation.
 *
 * @param source The data to convert
 * @param doPadding is {@code true} to pad result with '=' chars
 *        if it does not fall on 3 byte boundaries
 */
public static String encodeWebSafe(byte[] source, boolean doPadding) {
 return encode(source, 0, source.length, WEBSAFE_ALPHABET, doPadding);
}
origin: novoda/android-demos

  public void onClick(View v) {
    Intent intent = new Intent("com.novoda.TAB");
    intent.putExtra("tab", 0);
    sendBroadcast(intent);
  }
};
origin: novoda/android-demos

/**
 * Decodes Base64 content in byte array format and returns
 * the decoded byte array.
 *
 * @param source the Base64 encoded data
 * @param off    the offset of where to begin decoding
 * @param len    the length of characters to decode
 * @return decoded data
 * @since 1.3
 * @throws Base64DecoderException
 */
public static byte[] decode(byte[] source, int off, int len)
  throws Base64DecoderException {
 return decode(source, off, len, DECODABET);
}
origin: novoda/android-demos

private void initialise(PBEParameterSpec ps, SecretKey k, Cipher crypter, int decryptMode) throws CryptException {
  try {
    crypter.init(decryptMode, k, ps);
  } catch (InvalidKeyException | InvalidAlgorithmParameterException e) {
    throw new CryptException(e);
  }
}
origin: novoda/android-demos

/**
 * Decodes data from Base64 notation.
 *
 * @param s the string to decode (decoded in default encoding)
 * @return the decoded data
 * @since 1.4
 */
public static byte[] decode(String s) throws Base64DecoderException {
 byte[] bytes = s.getBytes();
 return decode(bytes, 0, bytes.length);
}
origin: novoda/android-demos

private byte[] finishTransformation(Cipher crypter, byte[] bytes) throws CryptException {
  try {
    return crypter.doFinal(bytes);
  } catch (IllegalBlockSizeException | BadPaddingException e) {
    throw new CryptException(e);
  }
}
com.novoda

Most used classes

  • Scraper$Factory
  • Scraper
  • ArticleEditor$Factory
  • ArticleEditor
  • DeveloperError
    Use for fast feedback when developing, can be used in places where you expect the code never to be e
  • Element,
  • RootTag,
  • ElementFinder,
  • ElementFinderFactory,
  • ParseWatcher,
  • HtmlGenerator$Factory,
  • HtmlGenerator,
  • NoPlayer,
  • NoPlayerLog,
  • AudioTracks,
  • PlayerAudioTrack,
  • PlayerSubtitleTrack,
  • PlayerVideoTrack,
  • Classes
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now