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

クラス DriverLicensePhoto


  • public class DriverLicensePhoto
    extends java.lang.Object
    DriverLicensePhotoは、運転免許証仕様の「写真」に対応するクラスです。
    • コンストラクタの概要

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

      すべてのメソッド インスタンス・メソッド concreteメソッド 
      修飾子とタイプ メソッド 説明
      android.graphics.Bitmap getBitmap()
      顔写真(JPEG2000)をデコードしてandroid.graphics.Bitmapオブジェクトを返します。
      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
    • コンストラクタの詳細

      • DriverLicensePhoto

        public DriverLicensePhoto​(byte[] encoded)
                           throws java.io.IOException
        DriverLicensePhotoオブジェクトを構築します。
        パラメータ:
        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)
      • getBitmap

        public android.graphics.Bitmap getBitmap()
                                          throws java.io.IOException
        顔写真(JPEG2000)をデコードしてandroid.graphics.Bitmapオブジェクトを返します。 このメソッドは互換性維持のために引き続き使用できますが、非推奨となります。 getPhotoBitmapARGB()を用いてBitmapARGBオブジェクトを生成してください。
        戻り値:
        顔写真
        例外:
        java.io.IOException - デコードエラー
      • 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 - デコードエラー