001/* 002 * jPOS Project [http://jpos.org] 003 * Copyright (C) 2000-2026 jPOS Software SRL 004 * 005 * This program is free software: you can redistribute it and/or modify 006 * it under the terms of the GNU Affero General Public License as 007 * published by the Free Software Foundation, either version 3 of the 008 * License, or (at your option) any later version. 009 * 010 * This program is distributed in the hope that it will be useful, 011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 013 * GNU Affero General Public License for more details. 014 * 015 * You should have received a copy of the GNU Affero General Public License 016 * along with this program. If not, see <http://www.gnu.org/licenses/>. 017 */ 018 019package org.jpos.iso.packager; 020 021import org.jpos.iso.ISOException; 022import org.jpos.iso.ISOFieldPackager; 023import org.jpos.iso.X92_BITMAP; 024 025import java.io.InputStream; 026 027/** 028 * @see GenericPackager 029 * @author Alejandro Revilla 030 * @version $$evision: $ $Date$ 031 */ 032 033public class X92GenericPackager extends GenericPackager { 034 protected static ISOFieldPackager bitMapPackager = 035 new X92_BITMAP (16, "X9.2 BIT MAP"); 036 037 public X92GenericPackager() throws ISOException { 038 super(); 039 } 040 public X92GenericPackager(String filename) throws ISOException { 041 super(filename); 042 } 043 public X92GenericPackager(InputStream stream) throws ISOException { 044 super(stream); 045 } 046 /** 047 * @return Bitmap's ISOFieldPackager 048 */ 049 protected ISOFieldPackager getBitMapfieldPackager() { 050 return bitMapPackager; 051 } 052 /** 053 * Although field 1 is not a Bitmap ANSI X9.2 do have 054 * a Bitmap field that have to be packed/unpacked 055 * @see org.jpos.iso.ISOBasePackager 056 * @return true 057 */ 058 protected boolean emitBitMap () { 059 return true; 060 } 061 /** 062 * @return 64 for ANSI X9.2 063 */ 064 protected int getMaxValidField() { 065 return 64; 066 } 067} 068