/** * @return the value for this direction */ public COSBase getCOSBase() { return COSInteger.get(degrees); } }
@Override public Object visitFromInt(COSInteger obj) throws IOException { obj.writePDF( getStandardOutput() ); return null; }
/** * Returns a COSInteger instance with the given value. * * @param val integer value * @return COSInteger instance */ public static COSInteger get(long val) { if (LOW <= val && val <= HIGH) { int index = (int) val - LOW; // no synchronization needed if (STATIC[index] == null) { STATIC[index] = new COSInteger(val); } return STATIC[index]; } return new COSInteger(val); }
((COSInteger)o).writePDF( output ); output.write( SPACE );
/** * Returns a COSInteger instance with the given value. * * @param val integer value * @return COSInteger instance */ public static COSInteger get(long val) { if (LOW <= val && val <= HIGH) { int index = (int) val - LOW; // no synchronization needed if (STATIC[index] == null) { STATIC[index] = new COSInteger(val); } return STATIC[index]; } return new COSInteger(val); }
/** * If the value in the /P entry is an integer, this will get the page number (zero-based) in the * current document containing the file attachment annotation. * * @return the zero based page number or -1 if the /P entry value is missing or not a number. */ public int getPageNumber() { COSBase base = dict.getDictionaryObject(COSName.P); if (base instanceof COSInteger) { return ((COSInteger) base).intValue(); } return -1; }
/** * @return rendering mode */ @Override public Long getrenderingMode() { if (!this.arguments.isEmpty()) { COSBase renderingMode = this.arguments.get(0); if (renderingMode instanceof COSInteger) { return Long.valueOf(((COSInteger) renderingMode).longValue()); } } return null; } }
/** * This will set an object at a specific index. * * @param index zero based index into array. * @param intVal The object to set. */ public void set( int index, int intVal ) { objects.set( index, COSInteger.get(intVal) ); }
@Override public Object visitFromInt(COSInteger obj) throws IOException { obj.writePDF( getStandardOutput() ); return null; }
/** * Returns a COSInteger instance with the given value. * * @param val integer value * @return COSInteger instance */ public static COSInteger get(long val) { if (LOW <= val && val <= HIGH) { int index = (int) val - LOW; // no synchronization needed if (STATIC[index] == null) { STATIC[index] = new COSInteger(val); } return STATIC[index]; } return new COSInteger(val); }
/** * If the value in the /A entry is an integer, this will get the index (zero-based) of the * annotation in the /Annots array of the page specified by the /P entry. * * @return the zero based page number or -1 if the /P entry value is missing or not a number. */ public int getAnnotationIndex() { COSBase base = dict.getDictionaryObject(COSName.A); if (base instanceof COSInteger) { return ((COSInteger) base).intValue(); } return -1; }
@Override public Long getCCITTRows() { COSBase rows = base.getDictionaryObject(COSName.ROWS); return rows instanceof COSInteger ? ((COSInteger) rows).longValue() : null; }