亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? isoamountfieldpackager.java

?? java pos,你可以直接編譯運行,
?? JAVA
字號:
/* * Copyright (c) 2000 jPOS.org. All rights reserved. *  * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: *  1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. *  2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. *  3. The end-user documentation included with the redistribution, if any, * must include the following acknowledgment: "This product includes software * developed by the jPOS project (http://www.jpos.org/)". Alternately, this * acknowledgment may appear in the software itself, if and wherever such * third-party acknowledgments normally appear. *  4. The names "jPOS" and "jPOS.org" must not be used to endorse or promote * products derived from this software without prior written permission. For * written permission, please contact license@jpos.org. *  5. Products derived from this software may not be called "jPOS", nor may * "jPOS" appear in their name, without prior written permission of the jPOS * project. *  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE JPOS * PROJECT OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ==================================================================== *  * This software consists of voluntary contributions made by many individuals * on behalf of the jPOS Project. For more information please see * <http://www.jpos.org/> . */package org.jpos.iso;import java.io.IOException;import java.io.InputStream;/** * @author joconnor * @version $Revision: 1.3 $ $Date: 2003/11/18 01:21:08 $ */public class ISOAmountFieldPackager extends ISOFieldPackager{    private Padder padder;    private Interpreter interpreter;    private Prefixer prefixer;    /**     * Creates an ISOAmountFieldPackager.     * @param maxLength The maximum length of the field in characters or bytes depending on the datatype.     * @param description The description of the field. For human readable output.     * @param padder The type of padding used.     * @param interpreter The interpreter used to encode the field.     * @param prefixer The type of length prefixer used to encode this field.     */    public ISOAmountFieldPackager(int maxLength, String description, Padder padder,                                   Interpreter interpreter, Prefixer prefixer)    {        super(maxLength, description);        this.padder = padder;        this.interpreter = interpreter;        this.prefixer = prefixer;    }    /**     * Constructs a default ISOAmountFieldPackager. There is no padding,     * no length prefix and a literal interpretation. The set methods must be called to     * make this ISOAmountFieldPackager useful.     */    public ISOAmountFieldPackager()    {        super();        this.padder = NullPadder.INSTANCE;        this.interpreter = LiteralInterpreter.INSTANCE;        this.prefixer = NullPrefixer.INSTANCE;    }    /**     * Constructs an ISOAmountFieldPackager with a specific Padder, Interpreter and Prefixer.     * The length and description should be set with setLength() and setDescription methods.     * @param padder The type of padding used.     * @param interpreter The interpreter used to encode the field.     * @param prefixer The type of length prefixer used to encode this field.     */    public ISOAmountFieldPackager(Padder padder, Interpreter interpreter, Prefixer prefixer)    {        super();        this.padder = padder;        this.interpreter = interpreter;        this.prefixer = prefixer;    }    /**     * Sets the Padder.     * @param padder The padder to use during packing and unpacking.     */    public void setPadder(Padder padder)    {        this.padder = padder;    }    /**     * Sets the Interpreter.     * @param interpreter The interpreter to use in packing and unpacking.     */    public void setInterpreter(Interpreter interpreter)    {        this.interpreter = interpreter;    }    /**     * Sets the length prefixer.     * @param prefixer The length prefixer to use during packing and unpacking.     */    public void setPrefixer(Prefixer prefixer)    {        this.prefixer = prefixer;    }    /**     * Returns the prefixer's packed length and the interpreter's packed length.	 * @see org.jpos.iso.ISOFieldPackager#getMaxPackedLength()	 */    public int getMaxPackedLength()    {        return prefixer.getPackedLength() + interpreter.getPackedLength(getLength());    }    /** Create a nice readable message for errors */    private String makeExceptionMessage(ISOComponent c, String operation) {        Object fieldKey = "unknown";        if (c != null)        {            try            {                fieldKey = c.getKey();            } catch (Exception ignore)            {            }        }        return this.getClass().getName() + ": Problem " + operation + " field " + fieldKey;    }    /**	 * Packs the component into a byte[].	 */    public byte[] pack(ISOComponent c) throws ISOException    {        try        {            String data = (String)c.getValue();            if (data.length() > getLength())            {                throw new ISOException("Field length " + data.length() + " too long. Max: " + getLength());            }            String sign = data.substring(0, 1);            String amount = data.substring(1);            String paddedData = padder.pad(amount, getLength()-1);            int signLength = interpreter.getPackedLength(1);            byte[] rawData = new byte[prefixer.getPackedLength()                    + signLength                    + interpreter.getPackedLength(paddedData.length())];            prefixer.encodeLength(paddedData.length(), rawData);            interpreter.interpret(sign, rawData, prefixer.getPackedLength());            interpreter.interpret(paddedData, rawData, prefixer.getPackedLength() + signLength);            return rawData;        } catch(Exception e)        {            throw new ISOException(makeExceptionMessage(c, "packing"), e);        }    }    /**     * Unpacks the byte array into the component.     * @param c The component to unpack into.     * @param b The byte array to unpack.     * @param offset The index in the byte array to start unpacking from.     * @return The number of bytes consumed unpacking the component.     */    public int unpack(ISOComponent c, byte[] b, int offset) throws ISOException    {        try        {            int len = prefixer.decodeLength(b, offset);            if (len == -1)            {                // The prefixer doesn't know how long the field is, so use    			// maxLength instead                len = getLength();            }            int lenLen = prefixer.getPackedLength();            String unpacked = interpreter.uninterpret(b, offset + lenLen, len);            c.setValue(unpacked);            return lenLen + interpreter.getPackedLength(len);        } catch(Exception e)        {            throw new ISOException(makeExceptionMessage(c, "unpacking"), e);        }    }        /**     * Unpack the input stream into the component.     * @param c  The Component to unpack into.     * @param in Input stream where the packed bytes come from.     * @exception IOException Thrown if there's a problem reading the input stream.     */    public void unpack (ISOComponent c, InputStream in)         throws IOException, ISOException    {        try        {            int lenLen = prefixer.getPackedLength ();            int len;            if (lenLen == 0)            {                len = getLength();            } else            {                len = prefixer.decodeLength (readBytes (in, lenLen), 0);            }            int packedLen = interpreter.getPackedLength(len);            String unpacked = interpreter.uninterpret(readBytes (in, packedLen), 0, len);            c.setValue(unpacked);        } catch(ISOException e)        {            throw new ISOException(makeExceptionMessage(c, "unpacking"), e);        }    }    /**     * Checks the length of the data against the maximum, and throws an IllegalArgumentException.     * This is designed to be called from field Packager constructors and the setLength()     * method.     * @param len The length of the data for this field packager.     * @param maxLength The maximum length allowed for this type of field packager.     *          This depends on the prefixer that is used.     * @throws IllegalArgumentException If len > maxLength.     */    protected void checkLength(int len, int maxLength) throws IllegalArgumentException    {        if (len > maxLength)        {            throw new IllegalArgumentException("Length " + len + " too long for " + getClass().getName());        }    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本伊人色综合网| 久久国内精品视频| 欧美v日韩v国产v| 91免费小视频| 激情文学综合丁香| 一区二区三区在线观看网站| 精品粉嫩超白一线天av| 欧美亚洲精品一区| 99久久精品国产导航| 国内成人精品2018免费看| 亚洲高清视频在线| 国产精品成人免费在线| 久久精品一区蜜桃臀影院| 777久久久精品| 欧美中文字幕一区二区三区| 不卡区在线中文字幕| 国产呦萝稀缺另类资源| 免费三级欧美电影| 亚洲成av人**亚洲成av**| 亚洲素人一区二区| 国产精品乱人伦中文| 久久精品人人做| 精品va天堂亚洲国产| 日韩一区二区三区视频| 欧美嫩在线观看| 欧美四级电影网| 欧美在线视频不卡| 一本到一区二区三区| 菠萝蜜视频在线观看一区| 国产精品一区二区三区四区 | 久久久久久久久久久久久久久99 | 国产精品一区二区免费不卡| 免播放器亚洲一区| 日韩激情av在线| 日韩在线播放一区二区| 亚洲va欧美va人人爽| 亚洲国产成人av网| 日韩精品一级二级| 日韩电影在线观看电影| 麻豆91免费观看| 精品一区二区三区视频在线观看| 日本午夜精品一区二区三区电影| 日韩电影在线观看一区| 美女脱光内衣内裤视频久久网站| 精品中文av资源站在线观看| 久久66热偷产精品| 国产精一品亚洲二区在线视频| 国产成人午夜视频| 99国产精品视频免费观看| 一本到三区不卡视频| 欧美视频在线一区二区三区| 91精品国产综合久久久久久久 | 亚洲精品中文在线观看| 亚洲精品亚洲人成人网在线播放| 一区二区三区在线免费播放| 亚洲成在线观看| 久久97超碰色| 成人免费高清在线| 一本高清dvd不卡在线观看| 欧美日本一区二区在线观看| 欧美一区二区三区性视频| 欧美精品一区二| 最新国产の精品合集bt伙计| 亚洲午夜精品久久久久久久久| 免费一区二区视频| 国产福利电影一区二区三区| 色婷婷综合视频在线观看| 欧美日本免费一区二区三区| 欧美tickling挠脚心丨vk| 国产精品高潮呻吟久久| 亚洲伊人色欲综合网| 久久99久久久久| 成人av免费在线播放| 欧美日韩一区二区欧美激情 | 亚洲婷婷综合久久一本伊一区| 亚洲综合一二三区| 韩国精品一区二区| 91精品91久久久中77777| 精品日韩一区二区三区免费视频| 国产精品你懂的在线| 亚瑟在线精品视频| 国产成人av在线影院| 欧美亚洲综合色| 国产亚洲va综合人人澡精品 | 成人aa视频在线观看| 欧美日韩精品系列| 国产精品美女www爽爽爽| 日韩av午夜在线观看| 99久久精品一区二区| 日韩一卡二卡三卡四卡| 亚洲品质自拍视频| 国产一本一道久久香蕉| 欧美日韩亚洲高清一区二区| 中文字幕精品三区| 蜜臀av性久久久久蜜臀aⅴ流畅| 91色婷婷久久久久合中文| 欧美精品一区二区三区蜜臀| 亚洲一卡二卡三卡四卡无卡久久 | 香蕉久久夜色精品国产使用方法| 国产精品66部| 欧美一区二区美女| 亚洲精品伦理在线| 丁香婷婷综合色啪| 欧美大胆一级视频| 三级精品在线观看| 色哟哟欧美精品| 国产精品色婷婷| 国产精品一卡二卡| 日韩美女在线视频| 日韩国产在线观看一区| 欧亚洲嫩模精品一区三区| 中文字幕中文字幕在线一区| 国产一区二区精品久久| 欧美一区二区二区| 亚洲成人av中文| 在线观看欧美黄色| 最新热久久免费视频| 国产精品一区专区| 337p粉嫩大胆色噜噜噜噜亚洲| 日本网站在线观看一区二区三区| 欧美性淫爽ww久久久久无| 亚洲免费伊人电影| 成人午夜视频在线| 欧美激情中文字幕| 国产福利精品一区| 欧美国产视频在线| 国产成人亚洲精品青草天美| 国产区在线观看成人精品| 极品美女销魂一区二区三区 | 99久久婷婷国产综合精品| 国产精品久久久久久户外露出 | 国产激情视频一区二区三区欧美| 精品国产凹凸成av人导航| 黄页网站大全一区二区| 久久久久久久久一| 国产成人av在线影院| 国产精品成人免费在线| av中文字幕在线不卡| 日韩理论片网站| 在线免费一区三区| 亚洲综合一区二区精品导航| 成人性视频免费网站| 久久婷婷综合激情| 国产一区二区在线观看免费 | 国产精品视频免费看| 成人av免费在线播放| 一区二区三区小说| 欧美日韩国产bt| 久久国产尿小便嘘嘘尿| 亚洲精品在线观看网站| 国产成人免费在线观看不卡| 国产三级欧美三级| 91麻豆免费看片| 亚洲电影一区二区三区| 日韩欧美的一区| 国产99一区视频免费| 亚洲欧美日韩电影| 欧美另类z0zxhd电影| 蜜桃视频在线一区| 国产欧美一区二区精品忘忧草| 成人午夜精品一区二区三区| 亚洲美女少妇撒尿| 日韩一区二区三区四区五区六区| 国产一区二区免费在线| 日韩理论在线观看| 日韩一区二区三区av| 国产精品一区二区三区99| 一区二区在线看| 欧美成人精品3d动漫h| 国产91精品免费| 亚洲r级在线视频| 久久久久久黄色| 在线免费一区三区| 国产一区二区三区四区五区美女 | 国产精品久久久久久久蜜臀| 在线国产电影不卡| 激情小说亚洲一区| 亚洲主播在线播放| 久久精品一区蜜桃臀影院| 欧美伊人久久久久久久久影院| 国产做a爰片久久毛片| 伊人色综合久久天天人手人婷| 日韩女优制服丝袜电影| 91麻豆国产在线观看| 蜜桃视频在线一区| 亚洲在线成人精品| 国产欧美精品日韩区二区麻豆天美| 日本久久电影网| 国产成人久久精品77777最新版本| 亚洲与欧洲av电影| 国产欧美日韩不卡免费| 日韩亚洲电影在线| 色噜噜狠狠色综合欧洲selulu| 激情小说欧美图片| 视频一区视频二区中文| 亚洲日本在线观看| 久久久欧美精品sm网站| 欧美一二三在线| 欧美日韩一级黄| 91在线视频播放地址|