protected EnumSyntax[] getEnumValueTable() { ArrayList completeList = new ArrayList(); for (int i=0; i < myEnumValueTable.length; i++) { completeList.add(myEnumValueTable[i]); } completeList.addAll(winEnumTable); MediaTray[] enumTable = new MediaTray[completeList.size()]; return (MediaTray[])completeList.toArray(enumTable); }
protected EnumSyntax[] getEnumValueTable() { ArrayList<MediaTray> completeList = new ArrayList<>(); for (int i=0; i < myEnumValueTable.length; i++) { completeList.add(myEnumValueTable[i]); } completeList.addAll(winEnumTable); MediaTray[] enumTable = new MediaTray[completeList.size()]; return completeList.toArray(enumTable); }
/** * Writes an attribute in EnumSyntax into the stream. * @param attribute the attribute * @throws IOException if thrown by the stream */ private void write(EnumSyntax attribute) throws IOException { // in JPS API enum syntax is used for enums, keyword and boolean types String name = ((Attribute) attribute).getName(); // the enum value types if (attribute instanceof Finishings || attribute instanceof OrientationRequested || attribute instanceof PrintQuality) { out.writeByte(IppValueTag.ENUM); out.writeShort(name.length()); out.write(name.getBytes()); out.writeShort(4); // length, enum is 4 bytes out.writeInt(attribute.getValue()); } // the boolean value type else if (attribute instanceof Fidelity) { out.writeByte(IppValueTag.BOOLEAN); out.writeShort(name.length()); out.write(name.getBytes()); out.writeShort(1); // length, boolean is 1 bytes out.writeByte(attribute.getValue() == 0 ? 0x00 : 0x01); } // the keyword value types else { String keyword = attribute.toString(); out.writeByte(IppValueTag.KEYWORD); out.writeShort(name.length()); out.write(name.getBytes()); out.writeShort(keyword.length()); out.write(keyword.getBytes()); } }
/** * Returns the enumeration value table for class CustomMediaTray. */ protected EnumSyntax[] getEnumValueTable() { MediaTray[] enumTable = new MediaTray[customEnumTable.size()]; return (MediaTray[])customEnumTable.toArray(enumTable); }
/** * Returns the enumeration value table for class CustomMediaSizeName. */ protected EnumSyntax[] getEnumValueTable() { MediaSizeName[] enumTable = new MediaSizeName[customEnumTable.size()]; return (MediaSizeName[])customEnumTable.toArray(enumTable); }
/** * Returns the enumeration value table for class PresentationDirection. */ protected EnumSyntax[] getEnumValueTable() { return myEnumValueTable; }
/** * Returns the enumeration value table for class SheetCollate. */ protected EnumSyntax[] getEnumValueTable() { return myEnumValueTable; }
/** * Returns the enumeration value table for class MediaSizeName. */ protected EnumSyntax[] getEnumValueTable() { return (EnumSyntax[])myEnumValueTable.clone(); }
/** * Returns the enumeration value table for class PDLOverrideSupported. */ protected EnumSyntax[] getEnumValueTable() { return (EnumSyntax[])myEnumValueTable.clone(); }
/** * Returns the enumeration value table for class PrinterState. */ protected EnumSyntax[] getEnumValueTable() { return myEnumValueTable; }
/** * Returns the enumeration value table for class Fidelity. */ protected EnumSyntax[] getEnumValueTable() { return myEnumValueTable; }
/** * Returns the enumeration value table for class MultipleDocumentHandling. */ protected EnumSyntax[] getEnumValueTable() { return (EnumSyntax[])myEnumValueTable.clone(); }
/** * Returns the enumeration value table for class DialogTypeSelection. */ protected EnumSyntax[] getEnumValueTable() { return myEnumValueTable; }
/** * Returns the enumeration value table for class Severity. */ protected EnumSyntax[] getEnumValueTable() { return myEnumValueTable; }
/** * Returns the enumeration value table for class Compression. */ protected EnumSyntax[] getEnumValueTable() { return (EnumSyntax[])myEnumValueTable.clone(); }
/** * Returns the enumeration value table for class PrinterStateReason. */ protected EnumSyntax[] getEnumValueTable() { return (EnumSyntax[])myEnumValueTable.clone(); }
/** * Returns the enumeration value table for class JobStateReason. */ protected EnumSyntax[] getEnumValueTable() { return (EnumSyntax[])myEnumValueTable.clone(); }
/** * Returns the enumeration value table for class ColorSupported. */ protected EnumSyntax[] getEnumValueTable() { return myEnumValueTable; }
/** * Returns the enumeration value table for class Sides. */ protected EnumSyntax[] getEnumValueTable() { return myEnumValueTable; }
/** * Returns the enumeration value table for class OrientationRequested. */ protected EnumSyntax[] getEnumValueTable() { return myEnumValueTable; }
/** * Returns the enumeration value table for class PrintQuality. */ protected EnumSyntax[] getEnumValueTable() { return (EnumSyntax[])myEnumValueTable.clone(); }
/** * Returns the enumeration value table for class PrinterIsAcceptingJobs. */ protected EnumSyntax[] getEnumValueTable() { return myEnumValueTable; }
/** * Returns the enumeration value table for class MediaTray. */ protected EnumSyntax[] getEnumValueTable() { return (EnumSyntax[])myEnumValueTable.clone(); }
/** * Returns the enumeration value table for class Finishings. */ protected EnumSyntax[] getEnumValueTable() { return (EnumSyntax[])myEnumValueTable.clone(); }
/** * Returns the enumeration value table for class JobSheets. */ protected EnumSyntax[] getEnumValueTable() { return (EnumSyntax[])myEnumValueTable.clone(); }
/** * Returns the enumeration value table for class JobState. */ protected EnumSyntax[] getEnumValueTable() { return myEnumValueTable; }
/** * Returns the enumeration value table for class Chromaticity. */ protected EnumSyntax[] getEnumValueTable() { return myEnumValueTable; }
protected EnumSyntax[] getEnumValueTable() { MediaSizeName[] enumTable = new MediaSizeName[winEnumTable.size()]; return (MediaSizeName[])winEnumTable.toArray(enumTable); }
@Override final protected EnumSyntax[] getEnumValueTable() { return enumValueTable; }