![]() |
Barcode.jar ver 5.0.0
Java 開発者向け バーコード作成ライブラリ(SVG出力・Base64出力対応)
|
クラス | |
| enum | SIZE_KIND |
公開メンバ関数 | |
| Pdf417 (Graphics2D g) | |
| Pdf417 (String filepath) | |
| Pdf417 () | |
| Pdf417 (String imgFormat, boolean useStream) | |
| String | getStringEncoding () throws Exception |
| void | setStringEncoding (String value) throws Exception |
| 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) |
| SIZE_KIND | getSizeKind () |
| void | setSizeKind (SIZE_KIND sizeKind) |
| int | getCodeRows () |
| void | setCodeRows (int codeRows) |
| int | getCodeColumns () |
| void | setCodeColumns (int codeColumns) |
| int | getErrorLevel () |
| void | setErrorLevel (int errorLevel) |
| boolean | getUseAutoErrorLevel () |
| void | setUseAutoErrorLevel (boolean useAutoErrorLevel) |
| float | getAspectRatio () |
| void | setAspectRatio (float aspectRatio) |
| void | paintCode () |
| 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, float height) throws Exception |
| void | drawDirect (String code, float x, float y, float width, float height, String filePath) throws Exception |
| void | drawDirect (byte code[], float x, float y, float width, float height) 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 |
限定公開メンバ関数 | |
| byte[] | getOutBits () |
| int | getBitColumns () |
| int[] | getCodewords () |
| int | getLenCodewords () |
| void | setLenCodewords (int lenCodewords) |
| byte[] | getText () |
| void | setText (byte[] text) |
| void | setText (String s) throws UnsupportedEncodingException |
| int | getOptions () |
| void | setOptions (int options) |
| float | getYHeight () |
| void | setYHeight (float yHeight) |
| boolean | checkSegmentType (Segment segment, char type) |
| int | getSegmentLength (Segment segment) |
| void | outCodeword17 (int codeword) |
| void | outCodeword18 (int codeword) |
| void | outCodeword (int codeword) |
| void | outStopPattern () |
| void | outStartPattern () |
| void | outPaintCode () |
| void | calculateErrorCorrection (int dest) |
| int | getTextTypeAndValue (int maxLength, int idx) |
| void | textCompaction (int start, int length) |
| void | basicNumberCompaction (int start, int length) |
| void | numberCompaction (int start, int length) |
| void | byteCompaction6 (int start) |
| void | assemble () |
| void | dumpList () |
| int | getMaxSquare () |
静的限定公開メンバ関数 | |
| static int | maxPossibleErrorLevel (int remain) |
限定公開変数類 | |
| int | bitPtr |
| int | cwPtr |
| SegmentList | segmentList |
PDF417を生成する2次元バーコードライブラリです。数字、英数字、漢字、かな、ひらがな、記号、バイナリ、制御コードなど、あらゆる種類のデータを扱えます。
| pao.barcode.Pdf417.Pdf417 | ( | Graphics2D | g | ) |
PDF417のインスタンスを作成します。
| g | バーコードを描画するGraphics2D |
| pao.barcode.Pdf417.Pdf417 | ( | String | filepath | ) |
PDF417のインスタンスを作成します。
| filePath | 出力画像ファイルパス |
| pao.barcode.Pdf417.Pdf417 | ( | ) |
PDF417のインスタンスを作成します。 画像形式はデフォルトでPNGが設定されます。
このコンストラクタは以下の用途で使用できます:
Graphics2Dやファイルパスを指定せずに、シンプルにバーコードを生成できます。
| pao.barcode.Pdf417.Pdf417 | ( | String | imgFormat, |
| boolean | useStream ) |
PDF417のインスタンスを作成します(メモリストリーム出力用)。
このコンストラクタは、ファイルに保存せずにメモリ上で画像データを取得したい場合に使用します。 生成後、以下のメソッドで画像データを取得できます:
| imgFormat | 出力画像フォーマット("png", "jpeg", "bmp"など)。 nullや空文字、または無効な形式が指定された場合は"png"が使用されます。 |
| useStream | ストリーム出力を使用する場合はtrue。 falseの場合はストリーム機能は無効となり、getImageBase64等は空を返します。 |
| void pao.barcode.Pdf417.draw | ( | byte | code[], |
| float | x, | ||
| float | y, | ||
| float | width, | ||
| float | height ) throws Exception |
バーコードを描画します。
| code | バーコードとして生成するバイト配列 |
| x | バーコードのX座標 |
| y | バーコードのY座標 |
| width | バーコードの幅 |
| height | バーコードの高さ |
| Exception | 例外 |
| void pao.barcode.Pdf417.draw | ( | String | code, |
| float | x, | ||
| float | y, | ||
| float | width, | ||
| float | height ) throws Exception |
バーコードを描画します。
| code | バーコードとして生成するテキスト |
| x | バーコードのX座標 |
| y | バーコードのY座標 |
| width | バーコードの幅 |
| height | バーコードの高さ |
| Exception | 例外 |
| void pao.barcode.Pdf417.draw | ( | String | code, |
| float | x, | ||
| float | y, | ||
| float | width, | ||
| float | height, | ||
| String | filePath ) throws Exception |
バーコードを描画します。
| code | バーコードとして生成するテキスト |
| x | バーコードのX座標 |
| y | バーコードのY座標 |
| width | バーコードの幅 |
| height | バーコードの高さ |
| filePath | 画像ファイルパス |
| Exception | 例外 |
| void pao.barcode.Pdf417.drawDelicate | ( | byte | code[], |
| float | x, | ||
| float | y, | ||
| float | minLinePitch ) throws Exception |
最小ピッチを指定してバーコードを描画します。
| code | バーコードとして生成するバイト配列 |
| x | バーコードのX座標 |
| y | バーコードのY座標 |
| minLinePitch | バーコードの最小ラインピッチ |
| Exception | 例外 |
| void pao.barcode.Pdf417.drawDelicate | ( | String | code, |
| float | x, | ||
| float | y, | ||
| float | minLinePitch ) throws Exception |
最小ピッチを指定してバーコードを描画します。
| code | バーコードとして生成するテキスト |
| x | バーコードのX座標 |
| y | バーコードのY座標 |
| minLinePitch | バーコードの最小ラインピッチ |
| Exception | 例外 |
| void pao.barcode.Pdf417.drawDelicate | ( | String | code, |
| float | x, | ||
| float | y, | ||
| float | minLinePitch, | ||
| String | filePath ) throws Exception |
最小ピッチを指定してバーコードを描画します。
| code | バーコードとして生成するテキスト |
| x | バーコードのX座標 |
| y | バーコードのY座標 |
| minLinePitch | バーコードの最小ラインピッチ |
| filePath | 画像ファイルパス |
| Exception | 例外 |
| void pao.barcode.Pdf417.drawDirect | ( | byte | code[], |
| float | x, | ||
| float | y, | ||
| float | width, | ||
| float | height ) throws Exception |
ピクセル単位で直接バーコードを描画します。
| code | バーコードとして生成するバイト配列 |
| x | バーコードのX座標 |
| y | バーコードのY座標 |
| width | バーコードの幅 |
| height | バーコードの高さ |
| Exception | 例外 |
| void pao.barcode.Pdf417.drawDirect | ( | String | code, |
| float | x, | ||
| float | y, | ||
| float | width, | ||
| float | height ) throws Exception |
ピクセル単位で直接バーコードを描画します。
| code | バーコードとして生成するテキスト |
| x | バーコードのX座標 |
| y | バーコードのY座標 |
| width | バーコードの幅 |
| height | バーコードの高さ |
| Exception | 例外 |
| void pao.barcode.Pdf417.drawDirect | ( | String | code, |
| float | x, | ||
| float | y, | ||
| float | width, | ||
| float | height, | ||
| String | filePath ) throws Exception |
ピクセル単位で直接バーコードを描画します。
| code | バーコードとして生成するテキスト |
| x | バーコードのX座標 |
| y | バーコードのY座標 |
| width | バーコードの幅 |
| height | バーコードの高さ |
| filePath | 画像ファイルパス |
| Exception | 例外 |
| float pao.barcode.Pdf417.getAspectRatio | ( | ) |
Gets the barcode aspect ratio.
| Color pao.barcode.Pdf417.getBackColor | ( | ) |
背景色を取得します。
|
protected |
Gets the number of X pixels of outBits.
outBits | int pao.barcode.Pdf417.getCodeColumns | ( | ) |
バーコードデータ列数を取得します。
| int pao.barcode.Pdf417.getCodeRows | ( | ) |
バーコード行数を取得します。
|
protected |
Gets the codeword array. This array is always 928 elements long. It can be writen to if the option PDF417_USE_RAW_CODEWORDS is set.
| int pao.barcode.Pdf417.getErrorLevel | ( | ) |
エラー訂正レベルを取得します。
| Color pao.barcode.Pdf417.getForeColor | ( | ) |
バーの色(前景色)を取得します。
| String pao.barcode.Pdf417.getImageBase64 | ( | ) |
画像をBase64エンコードした文字列を取得します。
| String pao.barcode.Pdf417.getImageFormat | ( | ) |
画像フォーマットを取得します。
| ByteArrayOutputStream pao.barcode.Pdf417.getImageStream | ( | ) |
画像ストリームを取得します。
| int pao.barcode.Pdf417.getImgMargin | ( | ) |
画像マージンのピクセル数を取得します。
|
protected |
Gets the length of the codewords.
|
protected |
Gets the options to generate the barcode.
|
protected |
Gets the raw image bits of the barcode. The image will have to be scaled in the Y direction by yHeight.
| float pao.barcode.Pdf417.getRotateAngle | ( | ) |
バーコードの回転角度を取得します。
| SIZE_KIND pao.barcode.Pdf417.getSizeKind | ( | ) |
データ列数・行数決定方法を取得します。
| String pao.barcode.Pdf417.getStringEncoding | ( | ) | throws Exception |
文字エンコーディングを取得します。
|
protected |
Gets the bytes that form the barcode. This bytes should be interpreted in the codepage Cp437.
| boolean pao.barcode.Pdf417.getUseAutoErrorLevel | ( | ) |
自動エラーレベルを使用するかどうかを取得します。
|
protected |
Gets the Y pixel height relative to X.
| void pao.barcode.Pdf417.paintCode | ( | ) |
Paints the barcode. If no exception was thrown a valid barcode is available.
| void pao.barcode.Pdf417.setAspectRatio | ( | float | aspectRatio | ) |
Sets the barcode aspect ratio. A ratio or 0.5 will make the barcode width twice as large as the height.
| aspectRatio | the barcode aspect ratio |
| void pao.barcode.Pdf417.setBackColor | ( | Color | value | ) |
背景色を設定します。 画像データ保存時のみ有効です。nullを指定すると透明になります。
| value | 背景色 |
| void pao.barcode.Pdf417.setCodeColumns | ( | int | codeColumns | ) |
バーコードデータ列数を設定します。
| codeColumns | バーコードデータ列数 |
| void pao.barcode.Pdf417.setCodeRows | ( | int | codeRows | ) |
バーコード行数を設定します。
| codeRows | バーコード行数 |
| void pao.barcode.Pdf417.setErrorLevel | ( | int | errorLevel | ) |
エラー訂正レベルを設定します。
| errorLevel | エラー訂正レベル |
| void pao.barcode.Pdf417.setForeColor | ( | Color | value | ) |
バーの色(前景色)を設定します。
| value | バーの色 |
| void pao.barcode.Pdf417.setImageFormat | ( | String | value | ) |
画像フォーマットを設定します。
| value | 画像フォーマット ("png", "jpeg", "bmp"など) |
| void pao.barcode.Pdf417.setImageStream | ( | ByteArrayOutputStream | value | ) |
画像ストリームを設定します。
| value | 画像ストリーム |
| void pao.barcode.Pdf417.setImgMargin | ( | int | value | ) |
画像マージンのピクセル数を設定します。
| value | 画像マージンのピクセル数 |
|
protected |
Sets the length of the codewords.
| lenCodewords | the length of the codewords |
|
protected |
Sets the options to generate the barcode. This can be all the PDF417_* constants.
| options | the options to generate the barcode |
| void pao.barcode.Pdf417.setSizeKind | ( | SIZE_KIND | sizeKind | ) |
データ列数・行数決定方法を設定します。
| sizeKind | データ列数・行数決定方法 |
| void pao.barcode.Pdf417.setStringEncoding | ( | String | value | ) | throws Exception |
文字エンコーディングを設定します。
| value | 文字エンコーディング |
|
protected |
Sets the bytes that form the barcode. This bytes should be interpreted in the codepage Cp437.
| text | the bytes that form the barcode |
|
protected |
Sets the text that will form the barcode. This text is converted to bytes using the encoding Cp437.
| s | the text that will form the barcode |
| UnsupportedEncodingException | if the encoding Cp437 is not supported |
| void pao.barcode.Pdf417.setUseAutoErrorLevel | ( | boolean | useAutoErrorLevel | ) |
自動エラーレベルを使用するかどうかを設定します。
| useAutoErrorLevel | 自動エラーレベルを使用する場合はtrue |
|
protected |
Sets the Y pixel height relative to X. It is usually 3.
| yHeight | the Y pixel height relative to X |
| void pao.barcode.Pdf417.WriteSVG | ( | byte | code[], |
| float | x, | ||
| float | y, | ||
| float | minLinePitch, | ||
| String | filePath ) throws Exception |
SVG形式でバーコードを出力します。
| code | バーコードとして生成するバイト配列 |
| x | バーコードのX座標 |
| y | バーコードのY座標 |
| minLinePitch | バーコードの最小ラインピッチ |
| filePath | SVGファイルパス |
| Exception | 例外 |
| void pao.barcode.Pdf417.WriteSVG | ( | String | code, |
| float | x, | ||
| float | y, | ||
| float | minLinePitch, | ||
| String | filePath ) throws Exception |
SVG形式でバーコードを出力します。
| code | バーコードとして生成するテキスト |
| x | バーコードのX座標 |
| y | バーコードのY座標 |
| minLinePitch | バーコードの最小ラインピッチ |
| filePath | SVGファイルパス |
| Exception | 例外 |
| String pao.barcode.Pdf417.writeSVGToString | ( | byte[] | code, |
| float | x, | ||
| float | y, | ||
| float | width, | ||
| float | height ) throws Exception |
Writes PDF417 barcode as SVG string
| code | Byte array to be generated as barcode |
| x | X position |
| y | Y position |
| width | Width of barcode |
| height | Height of barcode |
| Exception | if resources could not be found |
| String pao.barcode.Pdf417.writeSVGToString | ( | String | code, |
| float | x, | ||
| float | y, | ||
| float | width, | ||
| float | height ) throws Exception |
Writes PDF417 barcode as SVG string
| code | Text to be generated as barcode |
| x | X position |
| y | Y position |
| width | Width of barcode |
| height | Height of barcode |
| Exception | if resources could not be found |