12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- package com.epson.mobilephone.common.maintain2;
- public class MaintainPrinterInfo2 {
- private static final int EPS_INK_NUM = 20;
- private static final int EPS_STATUS_NUM = 3;
- public static final int ESCPR_INK_STATUS_END = 2;
- public static final int ESCPR_INK_STATUS_FAIL = -2;
- public static final int ESCPR_INK_STATUS_LOW = 1;
- public static final int ESCPR_INK_STATUS_NOREAD = -4;
- public static final int ESCPR_INK_STATUS_NORMAL = 0;
- public static final int ESCPR_INK_STATUS_NOTAVAIL = -3;
- public static final int ESCPR_INK_STATUS_NOTPRESENT = -1;
- private int[] mInkColorCode = new int[20];
- private int[] mInkColorName = new int[20];
- private int mInkNum;
- private int[] mInkRemeiningAmount = new int[20];
- private int[] mInkStatus = new int[20];
- private int[] mStatus = new int[3];
- public int[] getMStatus() {
- return mStatus;
- }
- public void setMStatus(int[] iArr) {
- mStatus = iArr;
- }
- public int getInkNum() {
- return mInkNum;
- }
- public int getInkCode(int i) {
- if (i >= 0 && i <= mInkNum) {
- return mInkColorCode[i];
- }
- throw new ArrayIndexOutOfBoundsException();
- }
- public int getInkName(int i) {
- if (i >= 0 && i <= mInkNum) {
- return mInkColorName[i];
- }
- throw new ArrayIndexOutOfBoundsException();
- }
- public int getInkRemainingAmount(int i) {
- if (i < 0 || i > mInkNum) {
- throw new ArrayIndexOutOfBoundsException();
- }
- int i2 = mInkRemeiningAmount[i];
- if (i2 < 0) {
- return 0;
- }
- return i2;
- }
- public int getInkStatus(int i) {
- if (i < 0 || i > mInkNum) {
- throw new ArrayIndexOutOfBoundsException();
- }
- int[] iArr = mInkStatus;
- if (i > iArr.length) {
- return -2;
- }
- return iArr[i];
- }
- }
|