/** * Constructs a <CODE>PdfBoolean</CODE>-object. * * @param value the value of the new <CODE>PdfObject</CODE>, represented as a <CODE>String</CODE> * * @throws BadPdfFormatException thrown if the <VAR>value</VAR> isn't '<CODE>true</CODE>' or '<CODE>false</CODE>' */ public PdfBoolean(String value) throws BadPdfFormatException { super(BOOLEAN, value); if (value.equals(TRUE)) { this.value = true; } else if (value.equals(FALSE)) { this.value = false; } else { throw new BadPdfFormatException("The value has to be 'true' of 'false', instead of '" + value + "'."); } }
/** * Constructs a <CODE>PdfBoolean</CODE>-object. * * @param value the value of the new <CODE>PdfObject</CODE>, represented as a <CODE>String</CODE> * * @throws BadPdfFormatException thrown if the <VAR>value</VAR> isn't '<CODE>true</CODE>' or '<CODE>false</CODE>' */ public PdfBoolean(String value) throws BadPdfFormatException { super(BOOLEAN, value); if (value.equals(TRUE)) { this.value = true; } else if (value.equals(FALSE)) { this.value = false; } else { throw new BadPdfFormatException(MessageLocalization.getComposedMessage("the.value.has.to.be.true.of.false.instead.of.1", value)); } }
/** * Constructs a <CODE>PdfBoolean</CODE>-object. * * @param value the value of the new <CODE>PdfObject</CODE>, represented as a <CODE>String</CODE> * * @throws BadPdfFormatException thrown if the <VAR>value</VAR> isn't '<CODE>true</CODE>' or '<CODE>false</CODE>' */ public PdfBoolean(String value) throws BadPdfFormatException { super(BOOLEAN, value); if (value.equals(TRUE)) { this.value = true; } else if (value.equals(FALSE)) { this.value = false; } else { throw new BadPdfFormatException(MessageLocalization.getComposedMessage("the.value.has.to.be.true.of.false.instead.of.1", value)); } }
throw new BadPdfFormatException("Expect '(' and ')' at begin and end of the string.");
throw new BadPdfFormatException(e.getMessage());
throw new BadPdfFormatException(e.getMessage());
throw new BadPdfFormatException(e.getMessage());
break; default: throw new BadPdfFormatException(MessageLocalization.getComposedMessage("1.is.an.unknown.image.format", errorID)); throw new BadPdfFormatException(ioe.getMessage());
break; default: throw new BadPdfFormatException(errorID + " is an unknown Image format."); throw new BadPdfFormatException(ioe.getMessage());
break; default: throw new BadPdfFormatException(MessageLocalization.getComposedMessage("1.is.an.unknown.image.format", errorID)); throw new BadPdfFormatException(ioe.getMessage());