![]() |
Barcode.jar ver 5.0.0
Java 開発者向け バーコード作成ライブラリ(SVG出力・Base64出力対応)
|
公開メンバ関数 | |
| QRCode (Graphics2D g) | |
| QRCode (String filepath) | |
| QRCode () | |
| QRCode (String imgFormat, boolean useStream) | |
| String | getStringEncoding () throws Exception |
| void | setStringEncoding (String value) throws Exception |
| String | getErrorCorrect () |
| void | setErrorCorrect (String value) |
| int | getVersion () |
| void | setVersion (int value) |
| String | getEncodeMode () |
| void | setEncodeMode (String value) |
| float | getRotateAngle () |
| int | getImgMargin () |
| void | setImgMargin (int value) |
| ByteArrayOutputStream | getImageStream () |
| void | setImageStream (ByteArrayOutputStream value) |
| String | getImageBase64 () |
| String | getImageFormat () |
| void | setImageFormat (String value) |
| Color | getForeColor () |
| void | setForeColor (Color value) |
| Color | getBackColor () |
| void | setBackColor (Color value) |
| void | draw (String code, float x, float y, float width, float height) throws Exception |
| void | draw (String code, float x, float y, float width, float height, String filePath) throws Exception |
| void | draw (byte code[], float x, float y, float width, float height) throws Exception |
| void | drawDelicate (String code, float x, float y, float minLinePitch) throws Exception |
| void | drawDelicate (String code, float x, float y, float minLinePitch, String filePath) throws Exception |
| void | drawDelicate (byte code[], float x, float y, float minLinePitch) throws Exception |
| void | drawDirect (String code, float x, float y, float width) throws Exception |
| void | drawDirect (String code, float x, float y, float width, String filePath) throws Exception |
| void | drawDirect (byte code[], float x, float y, float width) throws Exception |
| void | WriteSVG (String code, float x, float y, float minLinePitch, String filePath) throws Exception |
| void | WriteSVG (byte code[], float x, float y, float minLinePitch, String filePath) throws Exception |
| float | getDrawDelicateWidth (String code, float minLinePitch) throws Exception |
| float | getDrawDelicateWidth (byte code[], float minLinePitch) throws Exception |
| float | getDrawDirectWidth (String code, float width) throws Exception |
| float | getDrawDirectWidth (byte code[], float width) throws Exception |
| String | writeSVGToString (String code, float x, float y, float width, float height) throws Exception |
| String | writeSVGToString (byte[] code, float x, float y, float width, float height) throws Exception |
QRコードを生成する2次元バーコードライブラリです。 数字、英数字、漢字、かな、ひらがな、記号、バイナリ、制御コードなど、あらゆる種類のデータを扱えます。 1つのシンボルに最大7,089文字をエンコードできます。
エンコードモードごとの容量: 数字のみ 最大7,089文字 英数字 最大4,296文字 バイナリ(8ビット) 最大2,953バイト 漢字、全角かな 最大1,817文字
3つのエンコードモードをサポート: 数字、英数字、バイナリ8ビット
| pao.barcode.QRCode.QRCode | ( | Graphics2D | g | ) |
QRコードのインスタンスを作成します。
| g | バーコードを描画するGraphics2D |
| pao.barcode.QRCode.QRCode | ( | String | filepath | ) |
QRコードのインスタンスを作成します。
| filePath | 出力画像ファイルパス |
| pao.barcode.QRCode.QRCode | ( | ) |
QRコードのインスタンスを作成します。 画像形式はデフォルトでPNGが設定されます。
このコンストラクタは以下の用途で使用できます:
Graphics2Dやファイルパスを指定せずに、シンプルにバーコードを生成できます。
| pao.barcode.QRCode.QRCode | ( | String | imgFormat, |
| boolean | useStream ) |
QRコードのインスタンスを作成します(メモリストリーム出力用)。
このコンストラクタは、ファイルに保存せずにメモリ上で画像データを取得したい場合に使用します。 生成後、以下のメソッドで画像データを取得できます:
| imgFormat | 出力画像フォーマット("png", "jpeg", "bmp"など)。 nullや空文字、または無効な形式が指定された場合は"png"が使用されます。 |
| useStream | ストリーム出力を使用する場合はtrue。 falseの場合はストリーム機能は無効となり、getImageBase64等は空を返します。 |
| void pao.barcode.QRCode.draw | ( | byte | code[], |
| float | x, | ||
| float | y, | ||
| float | width, | ||
| float | height ) throws Exception |
バーコードを描画します。
| code | バーコードとして生成するバイト配列 |
| x | バーコードの位置 (X座標) |
| y | バーコードの位置 (Y座標) |
| width | バーコードの幅 |
| height | バーコードの高さ |
| Exception | none |
| void pao.barcode.QRCode.draw | ( | String | code, |
| float | x, | ||
| float | y, | ||
| float | width, | ||
| float | height ) throws Exception |
バーコードを描画します。
| code | バーコードとして生成するテキスト |
| x | バーコードの位置 (X座標) |
| y | バーコードの位置 (Y座標) |
| width | バーコードの幅 |
| height | バーコードの高さ |
| Exception | none |
| void pao.barcode.QRCode.draw | ( | String | code, |
| float | x, | ||
| float | y, | ||
| float | width, | ||
| float | height, | ||
| String | filePath ) throws Exception |
バーコードを描画します。
| code | バーコードとして生成するテキスト |
| x | バーコードの位置 (X座標) |
| y | バーコードの位置 (Y座標) |
| width | バーコードの幅 |
| height | バーコードの高さ |
| filePath | 画像ファイルパス |
| Exception | none |
| void pao.barcode.QRCode.drawDelicate | ( | byte | code[], |
| float | x, | ||
| float | y, | ||
| float | minLinePitch ) throws Exception |
最小ピッチを指定してバーコードを描画します。
| code | バーコードとして生成するバイト配列 |
| x | バーコードの位置 (X座標) |
| y | バーコードの位置 (Y座標) |
| minLinePitch | バーコードの最小ラインピッチ |
| Exception | none |
| void pao.barcode.QRCode.drawDelicate | ( | String | code, |
| float | x, | ||
| float | y, | ||
| float | minLinePitch ) throws Exception |
最小ピッチを指定してバーコードを描画します。
| code | バーコードとして生成するテキスト |
| x | バーコードの位置 (X座標) |
| y | バーコードの位置 (Y座標) |
| minLinePitch | バーコードの最小ラインピッチ |
| Exception | none |
| void pao.barcode.QRCode.drawDelicate | ( | String | code, |
| float | x, | ||
| float | y, | ||
| float | minLinePitch, | ||
| String | filePath ) throws Exception |
最小ピッチを指定してバーコードを描画します。
| code | バーコードとして生成するテキスト |
| x | バーコードの位置 (X座標) |
| y | バーコードの位置 (Y座標) |
| minLinePitch | バーコードの最小ラインピッチ |
| filePath | 画像ファイルパス |
| Exception | none |
| void pao.barcode.QRCode.drawDirect | ( | byte | code[], |
| float | x, | ||
| float | y, | ||
| float | width ) throws Exception |
ピクセル単位で直接バーコードを描画します。
| code | バーコードとして生成するバイト配列 |
| x | バーコードの位置 (X座標) |
| y | バーコードの位置 (Y座標) |
| width | バーコードの幅 |
| Exception | none |
| void pao.barcode.QRCode.drawDirect | ( | String | code, |
| float | x, | ||
| float | y, | ||
| float | width ) throws Exception |
ピクセル単位で直接バーコードを描画します。
| code | バーコードとして生成するテキスト |
| x | バーコードの位置 (X座標) |
| y | バーコードの位置 (Y座標) |
| width | バーコードの幅 |
| Exception | none |
| void pao.barcode.QRCode.drawDirect | ( | String | code, |
| float | x, | ||
| float | y, | ||
| float | width, | ||
| String | filePath ) throws Exception |
ピクセル単位で直接バーコードを描画します。
| code | バーコードとして生成するテキスト |
| x | バーコードの位置 (X座標) |
| y | バーコードの位置 (Y座標) |
| width | バーコードの幅 |
| filePath | 画像ファイルパス |
| Exception | none |
| Color pao.barcode.QRCode.getBackColor | ( | ) |
背景色を取得します。
| float pao.barcode.QRCode.getDrawDelicateWidth | ( | byte | code[], |
| float | minLinePitch ) throws Exception |
描画時のバーコード幅を取得します。
| code | バーコードとして生成するバイト配列 |
| minLinePitch | バーコードの最小ラインピッチ |
| Exception | none |
| float pao.barcode.QRCode.getDrawDelicateWidth | ( | String | code, |
| float | minLinePitch ) throws Exception |
描画時のバーコード幅を取得します。
| code | バーコードとして生成する文字列 |
| minLinePitch | バーコードの最小ラインピッチ |
| Exception | none |
| float pao.barcode.QRCode.getDrawDirectWidth | ( | byte | code[], |
| float | width ) throws Exception |
描画時のバーコード幅を取得します。
| code | バーコードとして生成するバイト配列 |
| width | バーコードの幅 |
| Exception | none |
| float pao.barcode.QRCode.getDrawDirectWidth | ( | String | code, |
| float | width ) throws Exception |
描画時のバーコード幅を取得します。
| code | バーコードとして生成する文字列 |
| width | バーコードの幅 |
| Exception | none |
| String pao.barcode.QRCode.getEncodeMode | ( | ) |
エンコードモードを取得します。
| String pao.barcode.QRCode.getErrorCorrect | ( | ) |
エラー訂正レベルを取得します。
| Color pao.barcode.QRCode.getForeColor | ( | ) |
バーの色(前景色)を取得します。
| String pao.barcode.QRCode.getImageBase64 | ( | ) |
画像をBase64エンコードした文字列を取得します。
| String pao.barcode.QRCode.getImageFormat | ( | ) |
画像フォーマットを取得します。
| ByteArrayOutputStream pao.barcode.QRCode.getImageStream | ( | ) |
画像ストリームを取得します。
| int pao.barcode.QRCode.getImgMargin | ( | ) |
画像マージンのピクセル数を取得します。
| float pao.barcode.QRCode.getRotateAngle | ( | ) |
バーコードの回転角度を取得します。
| String pao.barcode.QRCode.getStringEncoding | ( | ) | throws Exception |
文字エンコーディングを取得します。
| int pao.barcode.QRCode.getVersion | ( | ) |
バーコードバージョンを取得します。
| void pao.barcode.QRCode.setBackColor | ( | Color | value | ) |
背景色を設定します。 画像データ保存時のみ有効です。nullを指定すると透明になります。
| value | 背景色 |
| void pao.barcode.QRCode.setEncodeMode | ( | String | value | ) |
エンコードモードを設定します。
| value | エンコードモード ("A": 英数字、"N": 数字、その他: バイナリ8ビット) |
| void pao.barcode.QRCode.setErrorCorrect | ( | String | value | ) |
エラー訂正レベルを設定します。
| value | エラー訂正レベル ("L"/"Q"/"H"/その他) "L": 約7復元可能 "Q": 約25復元可能 "H": 約30復元可能 その他: 約15復元可能 |
| void pao.barcode.QRCode.setForeColor | ( | Color | value | ) |
バーの色(前景色)を設定します。
| value | バーの色 |
| void pao.barcode.QRCode.setImageFormat | ( | String | value | ) |
画像フォーマットを設定します。
| value | 画像フォーマット ("png", "jpeg", "bmp"など) |
| void pao.barcode.QRCode.setImageStream | ( | ByteArrayOutputStream | value | ) |
画像ストリームを設定します。
| value | 画像ストリーム |
| void pao.barcode.QRCode.setImgMargin | ( | int | value | ) |
画像マージンのピクセル数を設定します。
| value | 画像マージンのピクセル数 |
| void pao.barcode.QRCode.setStringEncoding | ( | String | value | ) | throws Exception |
文字エンコーディングを設定します。
| value | 文字エンコーディング |
| void pao.barcode.QRCode.setVersion | ( | int | value | ) |
バーコードバージョンを設定します。
| value | バーコードバージョン (1〜40、0で自動選択) |
| void pao.barcode.QRCode.WriteSVG | ( | byte | code[], |
| float | x, | ||
| float | y, | ||
| float | minLinePitch, | ||
| String | filePath ) throws Exception |
SVG形式でバーコードを出力します。
| code | バーコードとして生成するバイト配列 |
| x | バーコードの位置 (X座標) |
| y | バーコードの位置 (Y座標) |
| minLinePitch | バーコードの最小ラインピッチ |
| filePath | SVGファイルパス |
| Exception | none |
| void pao.barcode.QRCode.WriteSVG | ( | String | code, |
| float | x, | ||
| float | y, | ||
| float | minLinePitch, | ||
| String | filePath ) throws Exception |
SVG形式でバーコードを出力します。
| code | バーコードとして生成するテキスト |
| x | バーコードの位置 (X座標) |
| y | バーコードの位置 (Y座標) |
| minLinePitch | バーコードの最小ラインピッチ |
| filePath | SVGファイルパス |
| Exception | none |
| String pao.barcode.QRCode.writeSVGToString | ( | byte[] | code, |
| float | x, | ||
| float | y, | ||
| float | width, | ||
| float | height ) throws Exception |
SVG形式でバーコードを出力します。 pDrawDirectのロジックに準拠。
| code | バーコードとして生成するバイト配列 |
| x | X座標 |
| y | Y座標 |
| width | バーコードの幅 |
| height | バーコードの高さ |
| Exception | リソースが見つからない場合 |
| String pao.barcode.QRCode.writeSVGToString | ( | String | code, |
| float | x, | ||
| float | y, | ||
| float | width, | ||
| float | height ) throws Exception |
SVG形式でバーコードを出力します。
| code | バーコードとして生成するテキスト |
| x | X座標 |
| y | Y座標 |
| width | バーコードの幅 |
| height | バーコードの高さ |
| Exception | リソースが見つからない場合 |