パッケージ jp.co.osstech.libjeid.rc

クラス RCPhoto


  • public class RCPhoto
    extends java.lang.Object
    RCPhotoは、在留カードおよび特別永住者証明書の顔画像 (DF1/EF02)に対応するクラスです。
    • コンストラクタの概要

      コンストラクタ 
      コンストラクタ 説明
      RCPhoto​(byte[] encoded)
      RCPhotoオブジェクトを構築します。
    • メソッドの概要

      すべてのメソッド インスタンス・メソッド concreteメソッド 
      修飾子とタイプ メソッド 説明
      byte[] getEncoded()
      符号化データを返します。
      byte[] getPhoto()
      顔写真(JPEG2000)を返します。
      BitmapARGB getPhotoBitmapARGB()
      顔写真(JPEG2000)をデコードしてBitmapARGBオブジェクトを返します。
      java.lang.String toString()
      Stringオブジェクトを返します。
      • クラスから継承されたメソッド java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • コンストラクタの詳細

      • RCPhoto

        public RCPhoto​(byte[] encoded)
                throws java.io.IOException
        RCPhotoオブジェクトを構築します。
        パラメータ:
        encoded - 符号化データ
        例外:
        java.io.IOException - デコードエラー
    • メソッドの詳細

      • toString

        public java.lang.String toString()
        Stringオブジェクトを返します。
        オーバーライド:
        toString クラス内 java.lang.Object
        戻り値:
        Stringオブジェクト
      • getEncoded

        public byte[] getEncoded()
        符号化データを返します。
        戻り値:
        符号化データ
      • getPhoto

        public byte[] getPhoto()
        顔写真(JPEG2000)を返します。
        戻り値:
        顔写真(JPEG2000)
      • getPhotoBitmapARGB

        public BitmapARGB getPhotoBitmapARGB()
                                      throws java.io.IOException
        顔写真(JPEG2000)をデコードしてBitmapARGBオブジェクトを返します。
        以下は取得したBitmapARGBのインスタンスからandroid.graphics.Bitmapのインスタンスを作成するサンプルコードです。
        (argbはBitmapARGBのインスタンスです)
        
         Bitmap bitmap = Bitmap.createBitmap(argb.getData(),
                                             argb.getWidth(),
                                             argb.getHeight(),
                                             Bitmap.Config.ARGB_8888);
        戻り値:
        顔写真
        例外:
        java.io.IOException - デコードエラー