729530c035
2010-10-12 Andrew John Hughes <ahughes@redhat.com> Import GNU Classpath (libgcj-snapshot-20100921). * libjava/Makefile.in: Regenerated. * libjava/javax/swing/text/html/StyleSheet.h, * libjava/javax/swing/text/html/MinimalHTMLWriter.h, * libjava/javax/swing/text/html/HTMLWriter.h, * libjava/javax/xml/stream/XMLEventFactory.h, * libjava/javax/xml/stream/XMLOutputFactory.h, * libjava/javax/xml/stream/events/Namespace.h, * libjava/javax/xml/stream/util/StreamReaderDelegate.h, * libjava/javax/security/auth/kerberos/KeyImpl.h, * libjava/javax/security/auth/kerberos/KerberosTicket.h: Regenerated. * libjava/classpath/Makefile.in, * libjava/classpath/depcomp, * libjava/classpath/scripts/Makefile.in, * libjava/classpath/resource/Makefile.in, * libjava/classpath/tools/Makefile.in: Regenerated. Use libtool from top-level config directory. * libjava/classpath/tools/classes/gnu/classpath/tools/StringToolkit.class, * libjava/classpath/tools/classes/gnu/classpath/tools/java2xhtml/Java2xhtml.class, * libjava/classpath/tools/classes/gnu/classpath/tools/java2xhtml/Java2xhtml$State.class, * libjava/classpath/tools/classes/gnu/classpath/tools/IOToolkit.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$3.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$5.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$7.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$9.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$OptionProcessor.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/RootDocImpl$ResolvedImportClassFile.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ClassComponent.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$21.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/TagImpl.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ClassDocProxy.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$23.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/BlockSourceComponent.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/DirectoryTree$FileNode.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$25.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/IgnoredFileParseException.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/TextTagImpl.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Parser$Context.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/InheritDocTagImpl.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/FunctionComponent.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/AdditionExpression.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/TypeCastExpression.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/SubtractionExpression.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/Type.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/BinaryEqualityExpression.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/InclusiveOrExpression.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/NegateExpression.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/GreaterThanExpression.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantDouble.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/EqualExpression.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantChar.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ExclusiveOrExpression.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantBoolean.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/BinaryBitwiseExpression.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/LogicalOrExpression.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/Evaluator.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/BinaryRelationExpression.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/BinaryShiftExpression.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/DivisionExpression.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantInteger.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ShiftLeftExpression.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantShort.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantLong.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/LogicalNotExpression.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/GreaterThanOrEqualExpression.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantByte.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/LogicalAndExpression.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/MultiplicationExpression.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/UnaryExpression.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantFloat.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ModuloExpression.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantString.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/NotExpression.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/UnknownIdentifierException.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/AndExpression.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConditionalExpression.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/Context.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantNull.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/BinaryComputationExpression.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/BitShiftRightExpression.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/LessThanOrEqualExpression.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ShiftRightExpression.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/BinaryLogicalExpression.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/LessThanExpression.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/IdentifierExpression.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/CircularExpressionException.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/BinaryExpression.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/IllegalExpressionException.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/NotEqualExpression.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantExpression.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/RootDocImpl$ResolvedImportNotFound.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ClassDocImpl.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ParamTagImpl.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Timer.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/SourceComponent.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/CommentComponent.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/RootDocImpl$ResolvedImportReflectionPackage.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/StaticBlockComponent.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ValueTagImpl.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/SeeTagImpl.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$11.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$13.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ConstructorDocImpl.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$15.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/TemporaryStore.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/RootDocImpl$ResolvedImportReflectionClass.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$17.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/BracketClose.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$19.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ParameterImpl.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/TypeImpl.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ArrayCharacterIterator.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/RootDocImpl$ScheduledClass.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/FieldComponent.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/RootDocImpl$ResolvedImportPackageFile.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$2.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/TimerDoclet.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/SlashSlashCommentComponent.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ErrorReporter.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$4.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$6.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/PackageComponent.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/MemberDocImpl.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$8.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ExecutableMemberDocImpl.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Parser$1.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/DirectoryTree.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Debug.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/DocImpl.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/MethodDocImpl.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ProgramElementDocImpl.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$20.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ClassDocReflectedImpl.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/FieldDocImpl.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/RootDocImpl.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$22.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$24.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/TimerDoclet$1.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/PackageDocImpl.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ThrowsTagImpl.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/EmptyStatementComponent.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/LinkTagImpl.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/AbstractTagImpl.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ParseException.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$10.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$12.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Parser.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Whitespace.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$14.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ImportComponent.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$16.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$18.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/SerialFieldTagImpl.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/SourcePositionImpl.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/JavadocWrapper.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$1.class, * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/TypeVariableImpl.class, * libjava/classpath/tools/classes/gnu/classpath/tools/NotifyingInputStreamReader.class, * libjava/classpath/tools/classes/gnu/classpath/tools/javah/MethodHelper.class, * libjava/classpath/tools/classes/gnu/classpath/tools/javah/GcjhMain.class, * libjava/classpath/tools/classes/gnu/classpath/tools/javah/JniStubPrinter.class, * libjava/classpath/tools/classes/gnu/classpath/tools/javah/JniIncludePrinter.class, * libjava/classpath/tools/classes/gnu/classpath/tools/javah/PathOptionGroup.class, * libjava/classpath/tools/classes/gnu/classpath/tools/javah/Keywords.class, * libjava/classpath/tools/classes/gnu/classpath/tools/javah/JniPrintStream.class, * libjava/classpath/tools/classes/gnu/classpath/tools/javah/CniStubPrinter.class, * libjava/classpath/tools/classes/gnu/classpath/tools/javah/Main.class, * libjava/classpath/tools/classes/gnu/classpath/tools/javah/CniPrintStream.class, * libjava/classpath/tools/classes/gnu/classpath/tools/javah/ClassWrapper.class, * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$3.class, * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/HashFinder.class, * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$4.class, * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$5.class, * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/ClassRmicCompiler$MethodRef.class, * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/WrapUnWrapper.class, * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$6.class, * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$7.class, * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$8.class, * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$9.class, * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Generator.class, * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/GiopIo.class, * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/MethodGenerator.class, * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/RmiMethodGenerator.class, * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/SourceRmicCompiler.class, * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Variables.class, * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/ClassRmicCompiler.class, * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main.class, * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/CompilationError.class, * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$10.class, * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$11.class, * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$12.class, * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$13.class, * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$14.class, * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$15.class, * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$16.class, * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$17.class, * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$18.class, * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/RMICException.class, * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$1.class, * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$2.class, * libjava/classpath/tools/classes/gnu/classpath/tools/serialver/SerialVer.class, * libjava/classpath/tools/classes/gnu/classpath/tools/serialver/SerialVer$1.class, * libjava/classpath/tools/classes/gnu/classpath/tools/serialver/SerialVer$2.class, * libjava/classpath/tools/classes/gnu/classpath/tools/serialver/SerialVer$3.class, * libjava/classpath/tools/classes/gnu/classpath/tools/MalformedInputEvent.class, * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/debugdoclet/DebugDoclet.class, * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/DocletConfigurationException.class, * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/AbstractDoclet$InterfaceRelation.class, * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/AbstractDoclet$DocletOptionTag.class, * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/Driver.class, * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/TargetContext.class, * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/doctranslet/OutputFileInfo.class, * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTransletOptions.class, * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTransletException.class, * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTranslet.class, * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTranslet$DocErrorReporterOutputStream.class, * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTransletConfigurationException.class, * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/doctranslet/JarClassLoader.class, * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/HtmlRepairer.class, * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/Driver1_4.class, * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/Driver$1.class, * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/Driver$UsageType.class, * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/Driver$NullErrorReporter.class, * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/HtmlRepairer$TagInfo.class, * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/DocletOptionColonSeparated.class, * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/AbstractDoclet$DocletOptionTaglet.class, * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/DocletOptionPackageWildcard.class, * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/AbstractDoclet$UsageType.class, * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/DocletOptionString.class, * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/CssClass.class, * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/HtmlDoclet.class, * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/HtmlPage.class, * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/ExternalDocSet.class, * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/HtmlDoclet$1.class, * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/HtmlDoclet$2.class, * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/HtmlDoclet$3.class, * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/HtmlDoclet$TreeNode.class, * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/HtmlTagletContext.class, * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/InvalidPackageWildcardException.class, * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/DocletOptionFlag.class, * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/AbstractDoclet.class, * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/PackageMatcher.class, * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/StandardTaglet.class, * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/DocletOptionFile.class, * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/DocletOption.class, * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/AbstractDoclet$IndexKey.class, * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/AbstractDoclet$DocletOptionGroup.class, * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/AbstractDoclet$DocletOptionTagletPath.class, * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/PackageGroup.class, * libjava/classpath/tools/classes/gnu/classpath/tools/FileSystemClassLoader$JarStreamInfo.class, * libjava/classpath/tools/classes/gnu/classpath/tools/FileSystemClassLoader$FileStreamInfo.class, * libjava/classpath/tools/classes/gnu/classpath/tools/taglets/CodeTaglet.class, * libjava/classpath/tools/classes/gnu/classpath/tools/taglets/GenericTaglet.class, * libjava/classpath/tools/classes/gnu/classpath/tools/taglets/ValueTaglet.class, * libjava/classpath/tools/classes/gnu/classpath/tools/taglets/AuthorTaglet$EmailReplacement.class, * libjava/classpath/tools/classes/gnu/classpath/tools/taglets/DeprecatedTaglet.class, * libjava/classpath/tools/classes/gnu/classpath/tools/taglets/SinceTaglet.class, * libjava/classpath/tools/classes/gnu/classpath/tools/taglets/AuthorTaglet.class, * libjava/classpath/tools/classes/gnu/classpath/tools/taglets/TagletContext.class, * libjava/classpath/tools/classes/gnu/classpath/tools/taglets/VersionTaglet.class, * libjava/classpath/tools/classes/gnu/classpath/tools/taglets/CopyrightTaglet.class, * libjava/classpath/tools/classes/gnu/classpath/tools/FileSystemClassLoader.class, * libjava/classpath/tools/classes/com/sun/tools/javadoc/Main.class: Regenerated. * libjava/classpath/doc/Makefile.in, * libjava/classpath/doc/api/Makefile.in, * libjava/classpath/doc/texinfo.tex, * libjava/classpath/external/Makefile.in, * libjava/classpath/external/jsr166/Makefile.in, * libjava/classpath/external/sax/Makefile.in, * libjava/classpath/external/w3c_dom/Makefile.in, * libjava/classpath/external/relaxngDatatype/Makefile.in, * libjava/classpath/include/Makefile.in: Regenerated. * libjava/classpath/m4/lib-prefix.m4, * libjava/classpath/m4/lib-link.m4, * libjava/classpath/m4/lib-ld.m4: Removed. * libjava/classpath/native/jni/classpath/Makefile.in, * libjava/classpath/native/jni/gstreamer-peer/Makefile.in, * libjava/classpath/native/jni/midi-dssi/Makefile.in, * libjava/classpath/native/jni/Makefile.in, * libjava/classpath/native/jni/gconf-peer/Makefile.in, * libjava/classpath/native/jni/java-io/Makefile.in, * libjava/classpath/native/jni/native-lib/Makefile.in, * libjava/classpath/native/jni/native-lib/cpnet.c, * libjava/classpath/native/jni/java-util/Makefile.in, * libjava/classpath/native/jni/java-lang/Makefile.in, * libjava/classpath/native/jni/midi-alsa/Makefile.in, * libjava/classpath/native/jni/java-nio/Makefile.in, * libjava/classpath/native/jni/java-net/Makefile.in, * libjava/classpath/native/jni/java-math/Makefile.in, * libjava/classpath/native/jni/xmlj/Makefile.in, * libjava/classpath/native/jni/qt-peer/Makefile.in, * libjava/classpath/native/jni/gtk-peer/Makefile.in, * libjava/classpath/native/Makefile.in, * libjava/classpath/native/jawt/Makefile.in, * libjava/classpath/native/fdlibm/Makefile.in, * libjava/classpath/native/plugin/Makefile.in, * libjava/classpath/lib/java/util/regex/Matcher.class, * libjava/classpath/lib/java/util/TreeMap$3.class, * libjava/classpath/lib/java/util/Scanner.class, * libjava/classpath/lib/Makefile.in, * libjava/classpath/lib/org/omg/PortableServer/_ServantActivatorStub.class, * libjava/classpath/lib/org/omg/PortableServer/_ServantLocatorStub.class, * libjava/classpath/lib/org/omg/CORBA/portable/InputStream.class, * libjava/classpath/lib/org/omg/CORBA/portable/ObjectImpl.class, * libjava/classpath/lib/org/omg/CORBA/portable/Delegate.class, * libjava/classpath/lib/org/omg/CORBA/LocalObject.class, * libjava/classpath/lib/org/omg/CORBA_2_3/portable/InputStream.class, * libjava/classpath/lib/org/omg/CORBA_2_3/portable/OutputStream.class, * libjava/classpath/lib/org/omg/DynamicAny/_DynSequenceStub.class, * libjava/classpath/lib/org/omg/DynamicAny/_DynValueStub.class, * libjava/classpath/lib/org/omg/DynamicAny/_DynStructStub.class, * libjava/classpath/lib/org/omg/DynamicAny/_DynEnumStub.class, * libjava/classpath/lib/org/omg/DynamicAny/_DynArrayStub.class, * libjava/classpath/lib/org/omg/DynamicAny/_DynAnyFactoryStub.class, * libjava/classpath/lib/org/omg/DynamicAny/_DynAnyStub.class, * libjava/classpath/lib/org/omg/DynamicAny/_DynUnionStub.class, * libjava/classpath/lib/org/omg/DynamicAny/_DynFixedStub.class, * libjava/classpath/lib/org/ietf/jgss/GSSManager.class, * libjava/classpath/lib/gnu/xml/stream/NamespaceImpl.class, * libjava/classpath/lib/gnu/xml/stream/XIncludeFilter.class, * libjava/classpath/lib/gnu/xml/stream/FilteredStreamReader.class, * libjava/classpath/lib/gnu/xml/stream/XMLEventFactoryImpl.class, * libjava/classpath/lib/gnu/xml/stream/XMLEventAllocatorImpl.class, * libjava/classpath/lib/gnu/xml/stream/XMLStreamWriterImpl.class, * libjava/classpath/lib/gnu/java/locale/LocaleData.class, * libjava/classpath/lib/gnu/javax/swing/text/html/css/Selector.class, * libjava/classpath/lib/gnu/javax/print/ipp/IppRequest$RequestWriter.class, * libjava/classpath/lib/gnu/javax/print/ipp/IppResponse$ResponseReader.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/printer/PrinterDriverInstaller.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/printer/CharsetConfigured.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/printer/NaturalLanguageConfigured.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/printer/MultipleOperationTimeOut.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/printer/PrinterCurrentTime.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/printer/DocumentFormat.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/printer/PrinterUpTime.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/printer/PrinterStateMessage.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/PrintQualitySupported.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/PrinterResolutionSupported.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/SidesSupported.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/MultipleDocumentJobsSupported.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/PageRangesSupported.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/OrientationRequestedSupported.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/MediaSupported.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/IppVersionsSupported.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/OperationsSupported.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/JobSheetsSupported.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/DocumentFormatSupported.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/UriSecuritySupported.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/GeneratedNaturalLanguageSupported.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/CharsetSupported.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/JobHoldUntilSupported.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/MultipleDocumentHandlingSupported.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/UriAuthenticationSupported.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/FinishingsSupported.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/CompressionSupported.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/PrinterUriSupported.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/JobSheetsDefault.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/DocumentFormatDefault.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/PrinterResolutionDefault.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/SidesDefault.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/JobPriorityDefault.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/JobHoldUntilDefault.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/NumberUpDefault.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/OrientationRequestedDefault.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/MediaDefault.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/MultipleDocumentHandlingDefault.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/FinishingsDefault.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/CopiesDefault.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/PrintQualityDefault.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/UnknownAttribute.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/DetailedStatusMessage.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/job/JobPrinterUri.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/job/AttributesCharset.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/job/JobStateMessage.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/job/AttributesNaturalLanguage.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/job/JobDetailedStatusMessages.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/job/JobId.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/job/JobDocumentAccessErrors.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/job/JobMoreInfo.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/job/JobUri.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/RequestedAttributes.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/StatusMessage.class, * libjava/classpath/lib/gnu/javax/print/ipp/attribute/DocumentAccessError.class, * libjava/classpath/lib/gnu/javax/print/ipp/IppUtilities.class, * libjava/classpath/lib/gnu/javax/print/ipp/IppPrintService.class, * libjava/classpath/lib/gnu/javax/print/ipp/IppResponse.class, * libjava/classpath/lib/javax/swing/tree/DefaultMutableTreeNode.class, * libjava/classpath/lib/javax/swing/tree/VariableHeightLayoutCache.class, * libjava/classpath/lib/javax/swing/tree/DefaultMutableTreeNode$PostorderEnumeration.class, * libjava/classpath/lib/javax/swing/tree/DefaultMutableTreeNode$BreadthFirstEnumeration.class, * libjava/classpath/lib/javax/swing/tree/DefaultMutableTreeNode$PreorderEnumeration.class, * libjava/classpath/lib/javax/swing/tree/FixedHeightLayoutCache.class, * libjava/classpath/lib/javax/swing/text/html/HTMLEditorKit.class, * libjava/classpath/lib/javax/swing/text/html/StyleSheet$BoxPainter.class, * libjava/classpath/lib/javax/swing/text/html/HTMLWriter.class, * libjava/classpath/lib/javax/swing/text/html/TableView$RowView.class, * libjava/classpath/lib/javax/swing/text/html/MultiAttributeSet$MultiNameEnumeration.class, * libjava/classpath/lib/javax/swing/text/html/MultiStyle.class, * libjava/classpath/lib/javax/swing/text/html/ImageView.class, * libjava/classpath/lib/javax/swing/text/html/TableView$CellView.class, * libjava/classpath/lib/javax/swing/text/html/MultiAttributeSet.class, * libjava/classpath/lib/javax/swing/text/html/ImageView$1.class, * libjava/classpath/lib/javax/swing/text/html/StyleSheet$ListPainter.class, * libjava/classpath/lib/javax/swing/text/html/TableView.class, * libjava/classpath/lib/javax/swing/text/html/StyleSheet.class, * libjava/classpath/lib/javax/swing/text/html/ObjectView.class, * libjava/classpath/lib/javax/swing/text/html/MinimalHTMLWriter.class, * libjava/classpath/lib/javax/swing/undo/UndoableEditSupport.class, * libjava/classpath/lib/javax/swing/undo/StateEdit.class, * libjava/classpath/lib/javax/xml/stream/XMLEventFactory.class, * libjava/classpath/lib/javax/xml/stream/events/Namespace.class, * libjava/classpath/lib/javax/xml/stream/XMLInputFactory.class, * libjava/classpath/lib/javax/xml/stream/util/StreamReaderDelegate.class, * libjava/classpath/lib/javax/xml/stream/XMLOutputFactory.class, * libjava/classpath/lib/javax/security/auth/kerberos/KerberosTicket.class, * libjava/classpath/lib/javax/security/auth/kerberos/KeyImpl.class, * libjava/classpath/missing, * libjava/classpath/aclocal.m4, * libjava/classpath/examples/Makefile.in, * libjava/classpath/install-sh, * libjava/gnu/xml/stream/FilteredStreamReader.h, * libjava/gnu/xml/stream/XMLStreamWriterImpl.h, * libjava/gnu/xml/stream/NamespaceImpl.h, * libjava/gnu/xml/stream/XIncludeFilter.h, * libjava/gnu/javax/swing/text/html/css/Selector.h, * libjava/gnu/javax/print/ipp/attribute/RequestedAttributes.h, * libjava/sources.am: Regenerated. 2010-05-27 Andrew John Hughes <ahughes@redhat.com> * configure.ac: Disable plugin by default and warn about unmaintained status when enabled. 2010-05-04 Andrew John Hughes <ahughes@redhat.com> * configure.ac: Call AC_PROG_JAVA_WORKS and AC_PROG_JAVAC_WORKS in place of AC_PROG_JAVA and AC_PROG_JAVAC respectively, as this is the real test we want. * m4/ac_prog_java.m4: (AC_PROG_JAVA): Don't include AC_PROG_JAVA_WORKS. * m4/ac_prog_java_works.m4: (AC_PROG_JAVA_WORKS): Require AC_PROG_JAVA and be defined only once. Require AC_PROG_JAVAC_WORKS for compilation of test class. Remove inclusion of AC_PROG_JAVAC. (AC_TRY_COMPILE_JAVA): Require AC_PROG_JAVAC_WORKS rather than AC_PROG_JAVAC. Be defined only once. * m4/ac_prog_javac.m: (AC_PROG_JAVAC): Be defined only once. Don't include AC_PROG_JAVAC_WORKS. * m4/ac_prog_javac_works.m4: (AC_PROG_JAVAC_WORKS): Be defined only once. Require AC_PROG_JAVAC. 2010-05-04 Andrew Haley <aph@redhat.com> * lib/gen-classlist.sh.in: Use absolute pathnames for all the directory names in the output file. 2010-05-04 Andrew John Hughes <ahughes@redhat.com> * m4/ac_prog_javac.m4: Capture all output from javac --version to avoid excess output. Make sure no appears when javac is not gcj. 2010-05-04 Andrew John Hughes <ahughes@redhat.com> * configure.ac: Add output to GMP directory detection and only perform when compiling GMP. 2010-05-04 Mike Stump <mikestump@comcast.net> * configure.ac: Allow prefix, libdir and includedir of GMP to be specified via --with-gmp, --with-gmp-include and --with-gmp-lib. 2010-04-28 Andrew John Hughes <ahughes@redhat.com> * gnu/javax/print/ipp/IppPrintService.java: (printerAttr): Add generic typing. (printServiceAttributeListener): Likewise. (flavors): Likewise. (printerUris): Likewise. (IppPrintService(URI uri, String username, String password)): Use generic types in initialising listener set. (getPrinterAttributes()): Add generic types. Remove cast. (getPrinterAttributeSet(Class<T>)): Return a set containing attributes of type T. Now creates a new set and checks that all elements of the original set can be cast and added to this new set. (getPrinterDefaultAttribute(Class<? extends Attribute>)): Add generic types. (processResponse()): Add generic types. (getAttribute(Class<T>)): Use generic types corresponding to parent interface. (getSupportedAttributeCategories()): Use generic types. (getSupportedAttributeValues()): Likewise. (handleSupportedAttributeValuesResponse(IppResponse,Class<? extends Attribute>)): Likewise. (isAttributeCategorySupported(Class<? extends Attribute>)): Likewise. * gnu/javax/print/ipp/IppResponse.java: (parseResponse(InputStream)): Use generic types. (parseAttributes(Map<Class<? extends Attribute>, Set<Attribute>, DataInputStream)): Likewise. (addAttribute(Map<Class<? extends Attribute>, Set<Attribute>>, Attribute): Likewise. (IppResponse(URI, short)): Create lists with appropriate type parameters. (getJobAttributes()): Use generic return type. (getOperationAttributes()): Likewise. (getPrinterAttributes()): Likewise. (getUnsupportedAttributes()): Likewise. * gnu/javax/print/ipp/attribute/supported/CompressionSupported.java: (getAssociatedAttributeArray(Set<Attribute>)): Use superclass Attribute as set type parameter and cast when looping over it. * gnu/javax/print/ipp/attribute/supported/FinishingsSupported.java, (getAssociatedAttributeArray(Set<Attribute>)): Use superclass Attribute as set type parameter and cast when looping over it. * gnu/javax/print/ipp/attribute/supported/JobSheetsSupported.java, (getAssociatedAttributeArray(Set<Attribute>)): Use superclass Attribute as set type parameter and cast when looping over it. * gnu/javax/print/ipp/attribute/supported/MediaSupported.java, (getAssociatedAttributeArray(Set<Attribute>)): Use superclass Attribute as set type parameter and cast when looping over it. * gnu/javax/print/ipp/attribute/supported/MultipleDocumentHandlingSupported.java, (getAssociatedAttributeArray(Set<Attribute>)): Use superclass Attribute as set type parameter and cast when looping over it. * gnu/javax/print/ipp/attribute/supported/OrientationRequestedSupported.java, (getAssociatedAttributeArray(Set<Attribute>)): Use superclass Attribute as set type parameter and cast when looping over it. * gnu/javax/print/ipp/attribute/supported/PrintQualitySupported.java, (getAssociatedAttributeArray(Set<Attribute>)): Use superclass Attribute as set type parameter and cast when looping over it. * gnu/javax/print/ipp/attribute/supported/PrinterResolutionSupported.java, (getAssociatedAttributeArray(Set<Attribute>)): Use superclass Attribute as set type parameter and cast when looping over it. 2010-04-28 Andrew John Hughes <ahughes@redhat.com> * gnu/javax/print/ipp/IppUtilities.java: (INTEGER_CLASS_ARRAY): Use generic typing. (TEXT_CLASS_ARRAY): Likewise. (classesByName): Likewise. (instanceByClass): Likewise. (getClass(String)): Remove cast. Return generic type. (getSupportedAttrName(Class<? extends Attribute>)): Remove cast. Add generic type to parameter. (getSupportedCategory(Class<?> extends Attribute>)): Likewise. (getEnumAttribute(String,Object)): Add missing generic types on Class. (getIntegerAttribute(String,int)): Likewise and on Constructor. (getTextAttribute(String,byte,byte[])): Likewise. 2010-04-27 Andrew John Hughes <ahughes@redhat.com> * gnu/javax/print/ipp/IppRequest.java: (write(RequestedAttributes)): Fix for change in return value of RequestedAttributes.getValues(). * gnu/javax/print/ipp/attribute/DetailedStatusMessage.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/DocumentAccessError.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/RequestedAttributes.java: (RequestedAttributes()): Use appropriate generic type with attributes ArrayList. (getValues()): Return an array-based snapshot of the current state of attributes rather than providing direct mutable access to it. * gnu/javax/print/ipp/attribute/StatusMessage.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/UnknownAttribute.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/defaults/CopiesDefault.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/defaults/DocumentFormatDefault.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/defaults/FinishingsDefault.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/defaults/JobHoldUntilDefault.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/defaults/JobPriorityDefault.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/defaults/JobSheetsDefault.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/defaults/MediaDefault.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/defaults/MultipleDocumentHandlingDefault.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/defaults/NumberUpDefault.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/defaults/OrientationRequestedDefault.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/defaults/PrintQualityDefault.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/defaults/PrinterResolutionDefault.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/defaults/SidesDefault.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/job/AttributesCharset.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/job/AttributesNaturalLanguage.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/job/JobDetailedStatusMessages.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/job/JobDocumentAccessErrors.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/job/JobId.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/job/JobMoreInfo.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/job/JobPrinterUri.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/job/JobStateMessage.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/job/JobUri.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/printer/CharsetConfigured.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/printer/DocumentFormat.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/printer/MultipleOperationTimeOut.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/printer/NaturalLanguageConfigured.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/printer/PrinterCurrentTime.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/printer/PrinterDriverInstaller.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/printer/PrinterStateMessage.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/printer/PrinterUpTime.java: (getCategory()): Fix return value. 2010-04-27 Andrew John Hughes <ahughes@redhat.com> * gnu/javax/print/CupsIppOperation.java, * gnu/javax/print/CupsMediaMapping.java, * gnu/javax/print/CupsPrintService.java, * gnu/javax/print/CupsPrintServiceLookup.java, * gnu/javax/print/CupsServer.java, * gnu/javax/print/PrintAttributeException.java, * gnu/javax/print/PrintFlavorException.java, * gnu/javax/print/PrintUriException.java, * gnu/javax/print/PrinterDialog.java, * gnu/javax/print/ipp/DocPrintJobImpl.java, * gnu/javax/print/ipp/IppDelimiterTag.java, * gnu/javax/print/ipp/IppException.java, * gnu/javax/print/ipp/IppMultiDocPrintService.java, * gnu/javax/print/ipp/IppRequest.java, * gnu/javax/print/ipp/IppResponse.java, * gnu/javax/print/ipp/IppStatusCode.java, * gnu/javax/print/ipp/IppUtilities.java, * gnu/javax/print/ipp/IppValueTag.java, * gnu/javax/print/ipp/MultiDocPrintJobImpl.java, * gnu/javax/print/ipp/attribute/CharsetSyntax.java, * gnu/javax/print/ipp/attribute/DefaultValueAttribute.java, * gnu/javax/print/ipp/attribute/DetailedStatusMessage.java, * gnu/javax/print/ipp/attribute/DocumentAccessError.java, * gnu/javax/print/ipp/attribute/NaturalLanguageSyntax.java, * gnu/javax/print/ipp/attribute/RequestedAttributes.java, * gnu/javax/print/ipp/attribute/StatusMessage.java, * gnu/javax/print/ipp/attribute/UnknownAttribute.java, * gnu/javax/print/ipp/attribute/defaults/CopiesDefault.java, * gnu/javax/print/ipp/attribute/defaults/DocumentFormatDefault.java, * gnu/javax/print/ipp/attribute/defaults/FinishingsDefault.java, * gnu/javax/print/ipp/attribute/defaults/JobHoldUntilDefault.java, * gnu/javax/print/ipp/attribute/defaults/JobPriorityDefault.java, * gnu/javax/print/ipp/attribute/defaults/JobSheetsDefault.java, * gnu/javax/print/ipp/attribute/defaults/MediaDefault.java, * gnu/javax/print/ipp/attribute/defaults/MultipleDocumentHandlingDefault.java, * gnu/javax/print/ipp/attribute/defaults/NumberUpDefault.java, * gnu/javax/print/ipp/attribute/defaults/OrientationRequestedDefault.java, * gnu/javax/print/ipp/attribute/defaults/PrintQualityDefault.java, * gnu/javax/print/ipp/attribute/defaults/PrinterResolutionDefault.java, * gnu/javax/print/ipp/attribute/defaults/SidesDefault.java, * gnu/javax/print/ipp/attribute/job/AttributesCharset.java, * gnu/javax/print/ipp/attribute/job/AttributesNaturalLanguage.java, * gnu/javax/print/ipp/attribute/job/JobDetailedStatusMessages.java, * gnu/javax/print/ipp/attribute/job/JobDocumentAccessErrors.java, * gnu/javax/print/ipp/attribute/job/JobId.java, * gnu/javax/print/ipp/attribute/job/JobMoreInfo.java, * gnu/javax/print/ipp/attribute/job/JobPrinterUri.java, * gnu/javax/print/ipp/attribute/job/JobStateMessage.java, * gnu/javax/print/ipp/attribute/job/JobUri.java, * gnu/javax/print/ipp/attribute/printer/CharsetConfigured.java, * gnu/javax/print/ipp/attribute/printer/DocumentFormat.java, * gnu/javax/print/ipp/attribute/printer/MultipleOperationTimeOut.java, * gnu/javax/print/ipp/attribute/printer/NaturalLanguageConfigured.java, * gnu/javax/print/ipp/attribute/printer/PrinterCurrentTime.java, * gnu/javax/print/ipp/attribute/printer/PrinterDriverInstaller.java, * gnu/javax/print/ipp/attribute/printer/PrinterStateMessage.java, * gnu/javax/print/ipp/attribute/printer/PrinterUpTime.java: Normalise whitespace; replace tabs with spaces and removing trailing whitespace. 2010-04-27 Andrew John Hughes <ahughes@redhat.com> * gnu/javax/print/ipp/IppPrintService.java: Fix whitespace. Use correct generic type for printerAttr map. (getPrinterAttributeSet(Class<? extends Attribute>)): Add appropriate generic type. * gnu/javax/print/ipp/attribute/supported/CharsetSupported.java: Fix whitespace. (getCategory()): Fix return type. * gnu/javax/print/ipp/attribute/supported/CompressionSupported.java: Fix whitespace. (getCategory()): Fix return type. (getAssociatedAttributeArray(Set<CompressionSupported>)): Add generic type to set and use for-each loop. * gnu/javax/print/ipp/attribute/supported/DocumentFormatSupported.java: Fix whitespace. (getCategory()): Fix return type. * gnu/javax/print/ipp/attribute/supported/FinishingsSupported.java: Fix whitespace. (getCategory()): Fix return type. (getAssociatedAttributeArray(Set<FinishingsSupported>)): Add generic type to set and use for-each loop. * gnu/javax/print/ipp/attribute/supported/GeneratedNaturalLanguageSupported.java: Fix whitespace. (getCategory()): Fix return type. * gnu/javax/print/ipp/attribute/supported/IppVersionsSupported.java: Fix whitespace. (getCategory()): Fix return type. * gnu/javax/print/ipp/attribute/supported/JobHoldUntilSupported.java: Fix whitespace. (getCategory()): Fix return type. * gnu/javax/print/ipp/attribute/supported/JobSheetsSupported.java: Fix whitespace. (getCategory()): Fix return type. (getAssociatedAttributeArray(Set<JobSheetsSupported>)): Add generic type to set and use for-each loop. * gnu/javax/print/ipp/attribute/supported/MediaSupported.java: Fix whitespace. (getCategory()): Fix return type. (getAssociatedAttributeArray(Set<MediaSupported>)): Add generic type to set and use for-each loop. * gnu/javax/print/ipp/attribute/supported/MultipleDocumentHandlingSupported.java: Fix whitespace. (getCategory()): Fix return type. (getAssociatedAttributeArray(Set<MultipleDocumentHandlingSupported>)): Add generic type to set and use for-each loop. * gnu/javax/print/ipp/attribute/supported/MultipleDocumentJobsSupported.java, Fix whitespace. (getCategory()): Fix return type. * gnu/javax/print/ipp/attribute/supported/OperationsSupported.java, Fix whitespace. (getCategory()): Fix return type. * gnu/javax/print/ipp/attribute/supported/OrientationRequestedSupported.java, Fix whitespace. (getCategory()): Fix return type. (getAssociatedAttributeArray(Set<OrientationRequestedSupported>)): Add generic type to set and use for-each loop. * gnu/javax/print/ipp/attribute/supported/PageRangesSupported.java, Fix whitespace. (getCategory()): Fix return type. * gnu/javax/print/ipp/attribute/supported/PrintQualitySupported.java, Fix whitespace. (getCategory()): Fix return type. (getAssociatedAttributeArray(Set<PrintQualitySupported>)): Add generic type to set and use for-each loop. * gnu/javax/print/ipp/attribute/supported/PrinterResolutionSupported.java, Fix whitespace. (getCategory()): Fix return type. (getAssociatedAttributeArray(Set<PrinterResolutionSupported>)): Add generic type to set and use for-each loop. * gnu/javax/print/ipp/attribute/supported/PrinterUriSupported.java, Fix whitespace. (getCategory()): Fix return type. * gnu/javax/print/ipp/attribute/supported/SidesSupported.java, Fix whitespace. (getCategory()): Fix return type. * gnu/javax/print/ipp/attribute/supported/UriAuthenticationSupported.java, Fix whitespace. (getCategory()): Fix return type. * gnu/javax/print/ipp/attribute/supported/UriSecuritySupported.java, Fix whitespace. (getCategory()): Fix return type. 2010-04-27 Andrew Haley <aph@redhat.com> * java/util/concurrent/CopyOnWriteArrayList.java: Fix for empty list. 2010-04-27 Andrew Haley <aph@redhat.com> * gnu/javax/print/ipp/IppResponse.java (parseAttributes): Handle IppValueTag.UNKNOWN. * gnu/javax/print/ipp/IppRequest.java (writeOperationAttributes): Handle RequestedAttributes. * gnu/javax/print/ipp/IppPrintService.java (processResponse): Add DocFlavor.SERVICE_FORMATTED.PAGEABLE and DocFlavor.SERVICE_FORMATTED.PRINTABLE. 2010-03-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> PR libgcj/38251 * tools/Makefile.am (dist-hook): Prune .svn directories in asm and classes copies. * tools/Makefile.in: Regenerate. Revert: 2008-11-05 Andrew Haley <aph@redhat.com> * tools/Makefile.am (UPDATE_TOOLS_ZIP, CREATE_TOOLS_ZIP): Exclude .svn direcories. 2010-01-30 Andrew John Hughes <ahughes@redhat.com> * doc/www.gnu.org/home.wml: Add newer JAPI results. 2010-01-30 Andrew John Hughes <ahughes@redhat.com> PR classpath/41686 * javax/security/auth/kerberos/KerberosTicket.java: Fix formatting. (toString()): Add full implementation. (getSessionKeyType()): Implemented. * javax/security/auth/kerberos/KeyImpl.java: (toString()): Implemented. 2010-01-30 Andrew John Hughes <ahughes@redhat.com> * autogen.sh: Allow libtool 2.* through. * configure.ac: Updated via autoupdate. * m4/lib-ld.m4, * m4/lib-link.m4, * m4/lib-prefix.m4: Drop old libtool macros which result in build failure. 2010-01-18 Andreas Tobler <andreast@fgznet.ch> * tools/Makefile.am (GJDOC_EX): Use find -name pattern -prune -o. * tools/Makefile.in: Regenerate. 2010-01-12 Jeroen Frijters <jeroen@frijters.net> * java/util/zip/Inflater. java (inflate(byte[],int,int)): Fix for #41696. 2009-11-18 Andrew Haley <aph@redhat.com> * java/util/TreeMap.java (anonymous class.size()): Debogosify. anonymous class.clear(): Likewise. 2009-10-22 Andrew Haley <aph@redhat.com> * native/jni/native-lib/cpnet.c (cpnet_addMembership): Fix aliasing warning. (cpnet_dropMembership): Likewise. 2009-10-22 Richard Guenther <rguenther@suse.de> PR cp-tools/39177 * tools/gnu/classpath/tools/jar/Creator.java (writeCommandLineEntries): Do not use uninitialized manifest. * tools/classes/gnu/classpath/tools/jar/Creator.class: Re-generated. 2009-07-08 Chris Burdess <dog@gnu.org> PR xml/40663: * javax/xml/stream/XMLEventFactory.java, * javax/xml/stream/XMLInputFactory.java, * javax/xml/stream/XMLOutputFactory.java, * javax/xml/stream/events/Namespace.java: Update API to match final version of StAX. * javax/xml/stream/util/ReaderDelegate.java: Removed. * javax/xml/stream/util/StreamReaderDelegate.java: Added (renamed from ReaderDelegate) * gnu/xml/stream/FilteredStreamReader.java, * gnu/xml/stream/NamespaceImpl.java, * gnu/xml/stream/XIncludeFilter.java, * gnu/xml/stream/XMLEventAllocatorImpl.java, * gnu/xml/stream/XMLEventFactoryImpl.java: Update implementation to match final version of StAX API. 2009-07-06 Ludovic Claude <ludovic.claude@laposte.net> PR xml/40653: * gnu/xml/stream/XMLStreamWriterImpl.java: Weaken testing of namespace prefix to match reference implementation and spec. 2009-07-07 Andrew John Hughes <ahughes@redhat.com> PR classpath/40630 * java/util/Scanner.java: (myCoreNext(boolean, Pattern)): Set tmp2 to null if the string is empty (i.e. we are at the end of the file). * java/util/regex/Matcher.java: (toMatchResult()): Check that match is non-null before attempting to clone it. 2009-07-07 Andrew John Hughes <ahughes@redhat.com> * java/util/Scanner.java, * java/util/regex/Matcher.java: Replace tab characters with spaces. 2009-03-29 Mark Wielaard <mark@klomp.org> * doc/www.gnu.org/faq/faq.wml: Fix link to cp-hacking.html. 2009-03-29 Mark Wielaard <mark@klomp.org> * m4/ac_prog_antlr.m4: Check whether ANTLR_JAR is empty. 2009-03-26 Andrew John Hughes <ahughes@redhat.com> PR classpath/39408: * tools/gnu/classpath/tools/javah/ClassWrapper.java: (linkSupers()): Make package-private. * tools/gnu/classpath/tools/javah/JniIncludePrinter.java: (writeFields(ClassWrapper, JniPrintStream)): Link in data from superclass before searching for fields. 2009-03-20 Andrew John Hughes <ahughes@redhat.com> * tools/gnu/classpath/tools/javah/ClassWrapper.java, * tools/gnu/classpath/tools/javah/CniPrintStream.java, * tools/gnu/classpath/tools/javah/CniStubPrinter.java, * tools/gnu/classpath/tools/javah/GcjhMain.java, * tools/gnu/classpath/tools/javah/JniIncludePrinter.java, * tools/gnu/classpath/tools/javah/JniPrintStream.java, * tools/gnu/classpath/tools/javah/JniStubPrinter.java, * tools/gnu/classpath/tools/javah/Keywords.java, * tools/gnu/classpath/tools/javah/Main.java, * tools/gnu/classpath/tools/javah/MethodHelper.java, * tools/gnu/classpath/tools/javah/PathOptionGroup.java: Fix generic issues in gjavah. 2009-03-17 Andrew John Hughes <ahughes@redhat.com> * tools/gnu/classpath/tools/FileSystemClassLoader.java, * tools/gnu/classpath/tools/doclets/xmldoclet/Driver.java, * tools/gnu/classpath/tools/doclets/xmldoclet/Driver1_4.java, * tools/gnu/classpath/tools/doclets/xmldoclet/HtmlRepairer.java, * tools/gnu/classpath/tools/doclets/xmldoclet/TargetContext.java, * tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/OutputFileInfo.java, * tools/gnu/classpath/tools/gjdoc/ErrorReporter.java, * tools/gnu/classpath/tools/gjdoc/TemporaryStore.java, * tools/gnu/classpath/tools/gjdoc/WritableType.java, * tools/gnu/classpath/tools/taglets/AuthorTaglet.java, * tools/gnu/classpath/tools/taglets/CopyrightTaglet.java, * tools/gnu/classpath/tools/taglets/DeprecatedTaglet.java, * tools/gnu/classpath/tools/taglets/GenericTaglet.java, * tools/gnu/classpath/tools/taglets/SinceTaglet.java, * tools/gnu/classpath/tools/taglets/VersionTaglet.java: Switch to UNIX line endings. 2009-03-17 Andrew John Hughes <ahughes@redhat.com> * tools/com/sun/tools/javadoc/Main.java, * tools/gnu/classpath/tools/FileSystemClassLoader.java, * tools/gnu/classpath/tools/IOToolkit.java, * tools/gnu/classpath/tools/MalformedInputEvent.java, * tools/gnu/classpath/tools/MalformedInputListener.java, * tools/gnu/classpath/tools/NotifyingInputStreamReader.java, * tools/gnu/classpath/tools/StringToolkit.java, * tools/gnu/classpath/tools/doclets/AbstractDoclet.java, * tools/gnu/classpath/tools/doclets/DocletConfigurationException.java, * tools/gnu/classpath/tools/doclets/DocletOption.java, * tools/gnu/classpath/tools/doclets/DocletOptionColonSeparated.java, * tools/gnu/classpath/tools/doclets/DocletOptionFile.java, * tools/gnu/classpath/tools/doclets/DocletOptionFlag.java, * tools/gnu/classpath/tools/doclets/DocletOptionPackageWildcard.java, * tools/gnu/classpath/tools/doclets/DocletOptionString.java, * tools/gnu/classpath/tools/doclets/InlineTagRenderer.java, * tools/gnu/classpath/tools/doclets/InvalidPackageWildcardException.java, * tools/gnu/classpath/tools/doclets/PackageGroup.java, * tools/gnu/classpath/tools/doclets/PackageMatcher.java, * tools/gnu/classpath/tools/doclets/StandardTaglet.java, * tools/gnu/classpath/tools/doclets/TagletPrinter.java, * tools/gnu/classpath/tools/doclets/debugdoclet/DebugDoclet.java, * tools/gnu/classpath/tools/doclets/htmldoclet/CssClass.java, * tools/gnu/classpath/tools/doclets/htmldoclet/ExternalDocSet.java, * tools/gnu/classpath/tools/doclets/htmldoclet/HtmlDoclet.java, * tools/gnu/classpath/tools/doclets/htmldoclet/HtmlPage.java, * tools/gnu/classpath/tools/doclets/htmldoclet/HtmlTagletContext.java, * tools/gnu/classpath/tools/doclets/xmldoclet/Driver.java, * tools/gnu/classpath/tools/doclets/xmldoclet/Driver1_4.java, * tools/gnu/classpath/tools/doclets/xmldoclet/HtmlRepairer.java, * tools/gnu/classpath/tools/doclets/xmldoclet/TargetContext.java, * tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTranslet.java, * tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTransletConfigurationException.java, * tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTransletException.java, * tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTransletOptions.java, * tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/JarClassLoader.java, * tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/OutputFileInfo.java, * tools/gnu/classpath/tools/gjdoc/AbstractTagImpl.java, * tools/gnu/classpath/tools/gjdoc/ArrayCharacterIterator.java, * tools/gnu/classpath/tools/gjdoc/ClassDocImpl.java, * tools/gnu/classpath/tools/gjdoc/ClassDocProxy.java, * tools/gnu/classpath/tools/gjdoc/ClassDocReflectedImpl.java, * tools/gnu/classpath/tools/gjdoc/ConstructorDocImpl.java, * tools/gnu/classpath/tools/gjdoc/Debug.java, * tools/gnu/classpath/tools/gjdoc/DirectoryTree.java, * tools/gnu/classpath/tools/gjdoc/DocImpl.java, * tools/gnu/classpath/tools/gjdoc/ErrorReporter.java, * tools/gnu/classpath/tools/gjdoc/ExecutableMemberDocImpl.java, * tools/gnu/classpath/tools/gjdoc/FieldDocImpl.java, * tools/gnu/classpath/tools/gjdoc/GjdocPackageDoc.java, * tools/gnu/classpath/tools/gjdoc/GjdocRootDoc.java, * tools/gnu/classpath/tools/gjdoc/InheritDocTagImpl.java, * tools/gnu/classpath/tools/gjdoc/JavadocWrapper.java, * tools/gnu/classpath/tools/gjdoc/LinkTagImpl.java, * tools/gnu/classpath/tools/gjdoc/Main.java, * tools/gnu/classpath/tools/gjdoc/MemberDocImpl.java, * tools/gnu/classpath/tools/gjdoc/MethodDocImpl.java, * tools/gnu/classpath/tools/gjdoc/PackageDocImpl.java, * tools/gnu/classpath/tools/gjdoc/ParamTagImpl.java, * tools/gnu/classpath/tools/gjdoc/ParameterImpl.java, * tools/gnu/classpath/tools/gjdoc/ParseException.java, * tools/gnu/classpath/tools/gjdoc/Parser.java, * tools/gnu/classpath/tools/gjdoc/ProgramElementDocImpl.java, * tools/gnu/classpath/tools/gjdoc/RootDocImpl.java, * tools/gnu/classpath/tools/gjdoc/SeeTagImpl.java, * tools/gnu/classpath/tools/gjdoc/SerialFieldTagImpl.java, * tools/gnu/classpath/tools/gjdoc/SourcePositionImpl.java, * tools/gnu/classpath/tools/gjdoc/TagContainer.java, * tools/gnu/classpath/tools/gjdoc/TagImpl.java, * tools/gnu/classpath/tools/gjdoc/TemporaryStore.java, * tools/gnu/classpath/tools/gjdoc/TextTagImpl.java, * tools/gnu/classpath/tools/gjdoc/ThrowsTagImpl.java, * tools/gnu/classpath/tools/gjdoc/Timer.java, * tools/gnu/classpath/tools/gjdoc/TimerDoclet.java, * tools/gnu/classpath/tools/gjdoc/TypeImpl.java, * tools/gnu/classpath/tools/gjdoc/TypeVariableImpl.java, * tools/gnu/classpath/tools/gjdoc/ValueTagImpl.java, * tools/gnu/classpath/tools/gjdoc/WritableType.java, * tools/gnu/classpath/tools/gjdoc/expr/AdditionExpression.java, * tools/gnu/classpath/tools/gjdoc/expr/AndExpression.java, * tools/gnu/classpath/tools/gjdoc/expr/BinaryBitwiseExpression.java, * tools/gnu/classpath/tools/gjdoc/expr/BinaryComputationExpression.java, * tools/gnu/classpath/tools/gjdoc/expr/BinaryEqualityExpression.java, * tools/gnu/classpath/tools/gjdoc/expr/BinaryExpression.java, * tools/gnu/classpath/tools/gjdoc/expr/BinaryLogicalExpression.java, * tools/gnu/classpath/tools/gjdoc/expr/BinaryRelationExpression.java, * tools/gnu/classpath/tools/gjdoc/expr/BinaryShiftExpression.java, * tools/gnu/classpath/tools/gjdoc/expr/BitShiftRightExpression.java, * tools/gnu/classpath/tools/gjdoc/expr/CircularExpressionException.java, * tools/gnu/classpath/tools/gjdoc/expr/ConditionalExpression.java, * tools/gnu/classpath/tools/gjdoc/expr/ConstantBoolean.java, * tools/gnu/classpath/tools/gjdoc/expr/ConstantByte.java, * tools/gnu/classpath/tools/gjdoc/expr/ConstantChar.java, * tools/gnu/classpath/tools/gjdoc/expr/ConstantDouble.java, * tools/gnu/classpath/tools/gjdoc/expr/ConstantExpression.java, * tools/gnu/classpath/tools/gjdoc/expr/ConstantFloat.java, * tools/gnu/classpath/tools/gjdoc/expr/ConstantInteger.java, * tools/gnu/classpath/tools/gjdoc/expr/ConstantLong.java, * tools/gnu/classpath/tools/gjdoc/expr/ConstantNull.java, * tools/gnu/classpath/tools/gjdoc/expr/ConstantShort.java, * tools/gnu/classpath/tools/gjdoc/expr/ConstantString.java, * tools/gnu/classpath/tools/gjdoc/expr/Context.java, * tools/gnu/classpath/tools/gjdoc/expr/DivisionExpression.java, * tools/gnu/classpath/tools/gjdoc/expr/EqualExpression.java, * tools/gnu/classpath/tools/gjdoc/expr/Evaluator.java, * tools/gnu/classpath/tools/gjdoc/expr/EvaluatorEnvironment.java, * tools/gnu/classpath/tools/gjdoc/expr/ExclusiveOrExpression.java, * tools/gnu/classpath/tools/gjdoc/expr/Expression.java, * tools/gnu/classpath/tools/gjdoc/expr/GreaterThanExpression.java, * tools/gnu/classpath/tools/gjdoc/expr/GreaterThanOrEqualExpression.java, * tools/gnu/classpath/tools/gjdoc/expr/IdentifierExpression.java, * tools/gnu/classpath/tools/gjdoc/expr/IllegalExpressionException.java, * tools/gnu/classpath/tools/gjdoc/expr/InclusiveOrExpression.java, * tools/gnu/classpath/tools/gjdoc/expr/LessThanExpression.java, * tools/gnu/classpath/tools/gjdoc/expr/LessThanOrEqualExpression.java, * tools/gnu/classpath/tools/gjdoc/expr/LogicalAndExpression.java, * tools/gnu/classpath/tools/gjdoc/expr/LogicalNotExpression.java, * tools/gnu/classpath/tools/gjdoc/expr/LogicalOrExpression.java, * tools/gnu/classpath/tools/gjdoc/expr/ModuloExpression.java, * tools/gnu/classpath/tools/gjdoc/expr/MultiplicationExpression.java, * tools/gnu/classpath/tools/gjdoc/expr/NegateExpression.java, * tools/gnu/classpath/tools/gjdoc/expr/NotEqualExpression.java, * tools/gnu/classpath/tools/gjdoc/expr/NotExpression.java, * tools/gnu/classpath/tools/gjdoc/expr/ShiftLeftExpression.java, * tools/gnu/classpath/tools/gjdoc/expr/ShiftRightExpression.java, * tools/gnu/classpath/tools/gjdoc/expr/SubtractionExpression.java, * tools/gnu/classpath/tools/gjdoc/expr/Type.java, * tools/gnu/classpath/tools/gjdoc/expr/TypeCastExpression.java, * tools/gnu/classpath/tools/gjdoc/expr/UnaryExpression.java, * tools/gnu/classpath/tools/gjdoc/expr/UnknownIdentifierException.java, * tools/gnu/classpath/tools/java2xhtml/Java2xhtml.java, * tools/gnu/classpath/tools/rmic/ClassRmicCompiler.java, * tools/gnu/classpath/tools/rmic/CompilationError.java, * tools/gnu/classpath/tools/rmic/Generator.java, * tools/gnu/classpath/tools/rmic/GiopIo.java, * tools/gnu/classpath/tools/rmic/HashFinder.java, * tools/gnu/classpath/tools/rmic/Main.java, * tools/gnu/classpath/tools/rmic/MethodGenerator.java, * tools/gnu/classpath/tools/rmic/RMICException.java, * tools/gnu/classpath/tools/rmic/RmiMethodGenerator.java, * tools/gnu/classpath/tools/rmic/RmicBackend.java, * tools/gnu/classpath/tools/rmic/SourceRmicCompiler.java, * tools/gnu/classpath/tools/rmic/Variables.java, * tools/gnu/classpath/tools/rmic/WrapUnWrapper.java, * tools/gnu/classpath/tools/serialver/SerialVer.java, * tools/gnu/classpath/tools/taglets/AuthorTaglet.java, * tools/gnu/classpath/tools/taglets/CodeTaglet.java, * tools/gnu/classpath/tools/taglets/CopyrightTaglet.java, * tools/gnu/classpath/tools/taglets/DeprecatedTaglet.java, * tools/gnu/classpath/tools/taglets/GenericTaglet.java, * tools/gnu/classpath/tools/taglets/GnuExtendedTaglet.java, * tools/gnu/classpath/tools/taglets/SinceTaglet.java, * tools/gnu/classpath/tools/taglets/TagletContext.java, * tools/gnu/classpath/tools/taglets/ValueTaglet.java, * tools/gnu/classpath/tools/taglets/VersionTaglet.java: Fix license headers to GPLv2+Classpath exception. 2009-03-09 Andrew John Hughes <ahughes@redhat.com> * gnu/javax/swing/text/html/css/Selector.java: Use CPStringBuilder. Use typed list of maps rather than an array for type safety. * javax/swing/text/html/HTMLEditorKit.java, * javax/swing/text/html/HTMLWriter.java: Add generic typing where appropriate. * javax/swing/text/html/ImageView.java: Remove unused AttributeSet variables. * javax/swing/text/html/MinimalHTMLWriter.java: Switch to an ArrayDeque to avoid unnecessary internal synchronisation on a private variable. Add generic typing. * javax/swing/text/html/MultiAttributeSet.java: Add generic typing. * javax/swing/text/html/MultiStyle.java: Add generic typing, make class package-private as not part of the standard classes. * javax/swing/text/html/ObjectView.java, * javax/swing/text/html/StyleSheet.java: Add generic typing. * javax/swing/text/html/TableView.java: Remove unused variable. * javax/swing/tree/DefaultMutableTreeNode.java: Add generic typing, mute warnings where necessary. * javax/swing/tree/FixedHeightLayoutCache.java: Add generic typing. * javax/swing/tree/TreeNode.java: Mute warnings where necessary. * javax/swing/tree/VariableHeightLayoutCache.java, * javax/swing/undo/StateEdit.java, * javax/swing/undo/UndoableEditSupport.java, * org/ietf/jgss/GSSManager.java: Add generic typing. 2009-02-14 Andrew John Hughes <ahughes@redhat.com> * org/omg/CORBA/LocalObject.java, * org/omg/CORBA/portable/Delegate.java, * org/omg/CORBA/portable/InputStream.java, * org/omg/CORBA/portable/ObjectImpl.java, * org/omg/CORBA_2_3/portable/InputStream.java, * org/omg/CORBA_2_3/portable/OutputStream.java, * org/omg/DynamicAny/_DynAnyFactoryStub.java, * org/omg/DynamicAny/_DynAnyStub.java, * org/omg/DynamicAny/_DynArrayStub.java, * org/omg/DynamicAny/_DynEnumStub.java, * org/omg/DynamicAny/_DynFixedStub.java, * org/omg/DynamicAny/_DynSequenceStub.java, * org/omg/DynamicAny/_DynStructStub.java, * org/omg/DynamicAny/_DynUnionStub.java, * org/omg/DynamicAny/_DynValueStub.java, * org/omg/PortableServer/_ServantActivatorStub.java, * org/omg/PortableServer/_ServantLocatorStub.java: Turn off warnings where Class is used; forced to use raw type for API compatibility. 2009-02-06 Andrew John Hughes <ahughes@redhat.com> * NEWS: Add stub for 0.99. * configure.ac: Bump to 0.99. * doc/www.gnu.org/announce/20090205.wml, * doc/www.gnu.org/downloads/downloads.wml, * doc/www.gnu.org/newsitems.txt: Update website. 2009-02-05 Andrew John Hughes <ahughes@redhat.com> * NEWS: Add VM updates. From-SVN: r165383
2224 lines
65 KiB
Java
2224 lines
65 KiB
Java
/* java.util.Scanner -- Parses primitive types and strings using regexps
|
|
Copyright (C) 2007 Free Software Foundation, Inc.
|
|
|
|
This file is part of GNU Classpath.
|
|
|
|
GNU Classpath is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 2, or (at your option)
|
|
any later version.
|
|
|
|
GNU Classpath is distributed in the hope that it will be useful, but
|
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with GNU Classpath; see the file COPYING. If not, write to the
|
|
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
02110-1301 USA.
|
|
|
|
Linking this library statically or dynamically with other modules is
|
|
making a combined work based on this library. Thus, the terms and
|
|
conditions of the GNU General Public License cover the whole
|
|
combination.
|
|
|
|
As a special exception, the copyright holders of this library give you
|
|
permission to link this library with independent modules to produce an
|
|
executable, regardless of the license terms of these independent
|
|
modules, and to copy and distribute the resulting executable under
|
|
terms of your choice, provided that you also meet, for each linked
|
|
independent module, the terms and conditions of the license of that
|
|
module. An independent module is a module which is not derived from
|
|
or based on this library. If you modify this library, you may extend
|
|
this exception to your version of the library, but you are not
|
|
obligated to do so. If you do not wish to do so, delete this
|
|
exception statement from your version. */
|
|
|
|
package java.util;
|
|
|
|
import java.io.BufferedInputStream;
|
|
import java.io.File;
|
|
import java.io.FileInputStream;
|
|
import java.io.FileNotFoundException;
|
|
import java.io.IOException;
|
|
import java.io.InputStream;
|
|
|
|
import java.math.BigDecimal;
|
|
import java.math.BigInteger;
|
|
|
|
import java.nio.ByteBuffer;
|
|
import java.nio.CharBuffer;
|
|
import java.nio.channels.ReadableByteChannel;
|
|
|
|
import java.text.DecimalFormat;
|
|
import java.text.DecimalFormatSymbols;
|
|
import java.text.NumberFormat;
|
|
import java.text.ParseException;
|
|
|
|
import java.util.Iterator;
|
|
import java.util.Locale;
|
|
import java.util.regex.MatchResult;
|
|
import java.util.regex.Matcher;
|
|
import java.util.regex.Pattern;
|
|
|
|
/**
|
|
* @author E0327023 Hernadi Laszlo
|
|
*/
|
|
public class Scanner
|
|
implements Iterator <String>
|
|
{
|
|
private static final String NOT_LONG = "\" is not a long"; //$NON-NLS-1$
|
|
|
|
private static final String ERR_PREFIX = "\""; //$NON-NLS-1$
|
|
|
|
private static final String NOT_INT = "\" is not an integer"; //$NON-NLS-1$
|
|
|
|
private static final String NOT_DOUBLE = "\" is not a double"; //$NON-NLS-1$
|
|
|
|
private static final String NOT_BYTE = "\" is not a byte"; //$NON-NLS-1$
|
|
|
|
private static final String NOT_BOOLEAN = "\" is not a boolean"; //$NON-NLS-1$
|
|
|
|
private static final String IS_NOT = "\" is not "; //$NON-NLS-1$
|
|
|
|
private static final String DEFAULT_PATTERN_S = "\\p{javaWhitespace}+"; //$NON-NLS-1$
|
|
|
|
private static final Pattern DEFAULT_PATTERN =
|
|
Pattern.compile (DEFAULT_PATTERN_S);
|
|
|
|
private static final String BIG_INTEGER = "BigInteger"; //$NON-NLS-1$
|
|
|
|
private final static String NEW_LINE =
|
|
System.getProperty ("line.separator");
|
|
|
|
private IOException lastIOException = null;
|
|
|
|
/**
|
|
* An InputStream source if a Constructor with an InputStream source is called, otherwise it
|
|
* stays <source> null </source>.
|
|
*/
|
|
private InputStream bIS = null;
|
|
|
|
/**
|
|
* Length of the input Buffer, which is the maximum bytes to be read at once.
|
|
*/
|
|
private final int MaxBufferLen = 1000000;
|
|
|
|
/**
|
|
* Minimum buffer length. If there are less chars in the Buffer than this value reading from
|
|
* source is tried.
|
|
*/
|
|
private final int MIN_BUF_LEN = 100;
|
|
|
|
/**
|
|
* Maximum number of processed chars in the Buffer. If exeeded, all processed chars from the
|
|
* beginning of the Buffer will be discarded to save space. The bytes left are copyed into a new
|
|
* Buffer.
|
|
*/
|
|
private final int MAX_PREFIX = 10000;
|
|
|
|
/**
|
|
* The Buffer which is used by the Matcher to find given patterns. It is filled up when matcher
|
|
* hits end or <code> MIN_BUF_LEN </code> is reached.
|
|
*/
|
|
private String actBuffer = new String ();
|
|
|
|
/**
|
|
* The current radix to use by the methods getNextXXX and hasNextXXX.
|
|
*/
|
|
private int currentRadix = 10;
|
|
|
|
/**
|
|
* The current locale.
|
|
*
|
|
* @see #useLocale(Locale)
|
|
* @see #locale()
|
|
*/
|
|
private Locale actLocale = Locale.getDefault ();
|
|
|
|
/**
|
|
* The current pattern for the matcher.
|
|
*/
|
|
private Pattern p = DEFAULT_PATTERN;
|
|
|
|
/**
|
|
* The current position in the Buffer, at which the next match should start.
|
|
*/
|
|
private int actPos = 0;
|
|
|
|
/**
|
|
* A global buffer to save new allocations by reading from source.
|
|
*/
|
|
private final byte[] tmpBuffer = new byte[this.MaxBufferLen];
|
|
|
|
/**
|
|
* The charsetName to use with the source.
|
|
*/
|
|
private String charsetName = null;
|
|
|
|
/**
|
|
* The Matcher which is used.
|
|
*/
|
|
private Matcher myMatcher = this.p.matcher (this.actBuffer);
|
|
|
|
/**
|
|
* The MatchResult is generated at each match, even if match() isn't called.
|
|
*/
|
|
private MatchResult actResult = null;
|
|
|
|
/**
|
|
* A Readable source if a Constructor with a Readable source is called, otherwise it stays
|
|
* <source> null </source>.
|
|
*/
|
|
private Readable readableSource = null;
|
|
|
|
/**
|
|
* A ReadableByteChannel source if a Constructor with a ReadableByteChannel source is called,
|
|
* otherwise it stays <source> null </source>.
|
|
*/
|
|
private ReadableByteChannel rbcSource = null;
|
|
|
|
/**
|
|
* Indicates if the close() method was called.
|
|
*/
|
|
private boolean isClosed = false;
|
|
|
|
/**
|
|
* For performance reasons the last Found is saved, if a hasNextXXX method was called.
|
|
*/
|
|
private String lastFound = null;
|
|
|
|
private boolean lastFoundPresent = false;
|
|
|
|
private int lastNextPos = 0;
|
|
|
|
private int lastPatternHash = 0;
|
|
|
|
private int last_RegionStart = 0;
|
|
|
|
private int last_RegionEnd = 0;
|
|
|
|
private boolean last_anchor = false;
|
|
|
|
private boolean last_transparent = false;
|
|
|
|
private MatchResult lastResult = null;
|
|
|
|
/**
|
|
* To keep track of the current position in the stream for the toString method, each time
|
|
* processed chars are removed the amount is added to processedChars.
|
|
*/
|
|
private int procesedChars = 0;
|
|
|
|
/**
|
|
* needInput is set <code> true </code> before a read method, and if there is no input it blocks
|
|
* and stays <code>true</code>. Right after a read it is set to <code>false</code>.
|
|
*/
|
|
private boolean needInput = false;
|
|
|
|
private boolean skipped = false;
|
|
|
|
/**
|
|
* <code> {@link #doSkipp} </code> indicates that the found pattern belongs to the result. If
|
|
* <code> {@link #doSkipp} </code> is false the match result ends at the beginning of the match.
|
|
* In both cases the current position is set after the pattern, if the found pattern has to be
|
|
* removed, a nextXXX method is called.
|
|
*/
|
|
private boolean doSkipp = false;
|
|
|
|
/**
|
|
* Indicates if the last match was valid or not.
|
|
*/
|
|
private boolean matchValid = false;
|
|
|
|
private NumberFormat actFormat = NumberFormat.getInstance (this.actLocale);
|
|
|
|
private DecimalFormat df = (DecimalFormat) this.actFormat;
|
|
|
|
/**
|
|
* Indicates if current Locale should be used at the input.
|
|
*/
|
|
private boolean useLocale = true;
|
|
|
|
private DecimalFormatSymbols dfs =
|
|
new DecimalFormatSymbols (this.actLocale);
|
|
|
|
/**
|
|
* Constructs a new Scanner with the given File as source.
|
|
* {@link #Scanner(InputStream, String)} is called with <code> null </code> as charsetName.
|
|
*
|
|
* @param source
|
|
* The File to use as source.
|
|
* @throws FileNotFoundException
|
|
* If the file is not found an Exception is thrown.
|
|
*/
|
|
public Scanner (final File source) throws FileNotFoundException // TESTED
|
|
{
|
|
this (source, null);
|
|
}
|
|
|
|
/**
|
|
* Constructs a new Scanner with the given File as source. <br>
|
|
* {@link #Scanner(InputStream, String)} is called with the given charsetName.
|
|
*
|
|
* @param source
|
|
* The File to use as source.
|
|
* @param charsetName
|
|
* Current charset name of the file. If charsetName is null it behaves if it was not
|
|
* set.
|
|
* @throws FileNotFoundException
|
|
* If the file is not found an Exception is thrown.
|
|
*/
|
|
public Scanner (final File source,
|
|
final String charsetName) throws FileNotFoundException
|
|
{
|
|
this (new FileInputStream (source), charsetName);
|
|
}
|
|
|
|
/**
|
|
* Constructs a new Scanner with the given inputStream. <br>
|
|
* {@link #Scanner(InputStream, String)} is called with <code> null </code> as charsetName.
|
|
*
|
|
* @param source
|
|
* The InputStream to use as source.
|
|
*/
|
|
public Scanner (final InputStream source) // TESTED
|
|
{
|
|
this (source, null);
|
|
}
|
|
|
|
/**
|
|
* Constructs a new Scanner with the InputSream and a charsetName. Afterwards the Buffer is
|
|
* filled.
|
|
*
|
|
* @param source
|
|
* The InputStream to use as source.
|
|
* @param charsetName
|
|
* The charsetName to apply on the source's data.
|
|
*/
|
|
public Scanner (final InputStream source, final String charsetName)
|
|
{
|
|
this.bIS = (new BufferedInputStream (source));
|
|
this.charsetName = charsetName;
|
|
myFillBuffer ();
|
|
}
|
|
|
|
/**
|
|
* Constructs a new Scanner with a Readable input as source.
|
|
*
|
|
* @param source
|
|
* The Readable to use as source.
|
|
*/
|
|
public Scanner (final Readable source)
|
|
{
|
|
this.readableSource = source;
|
|
myFillBuffer ();
|
|
}
|
|
|
|
/**
|
|
* Constructs a new Scanner with a ReadableByteChannel as
|
|
* source. Therfore the {@link #Scanner(ReadableByteChannel,
|
|
* String)} is called with <code> null </code> as charsetName.
|
|
*
|
|
* @param source
|
|
* The ReadableByteChannel to use as source.
|
|
*/
|
|
public Scanner (final ReadableByteChannel source)
|
|
{
|
|
this (source, null);
|
|
}
|
|
|
|
/**
|
|
* Constructs a new Scanner with a ReadableByteChannel as source and
|
|
* a given charsetName, which is to be applied on it. <br> It also
|
|
* initiates the main Buffer.
|
|
*
|
|
* @param source
|
|
* The ReadableByteChannel to use as source.
|
|
* @param charsetName
|
|
* The charsetName to be applied on the source.
|
|
*/
|
|
public Scanner (final ReadableByteChannel source, final String charsetName)
|
|
{
|
|
this.charsetName = charsetName;
|
|
this.rbcSource = source;
|
|
myFillBuffer ();
|
|
}
|
|
|
|
/**
|
|
* Constructs a new Scanner using the given String as input only.
|
|
*
|
|
* @param source
|
|
* The whole String to be used as source.
|
|
*/
|
|
public Scanner (final String source) // TESTED
|
|
{
|
|
this.actBuffer = new String (source);
|
|
this.myMatcher.reset (this.actBuffer);
|
|
}
|
|
|
|
/**
|
|
* Closes this Scanner. If an {@link IOException} occurs it is
|
|
* catched and is available under {@link #ioException()}.<br> After
|
|
* the Scanner is closed, all searches will lead to a {@link
|
|
* IllegalStateException}.
|
|
*/
|
|
public void close ()
|
|
{
|
|
try
|
|
{
|
|
if (this.bIS != null)
|
|
this.bIS.close ();
|
|
if (this.rbcSource != null)
|
|
this.rbcSource.close ();
|
|
this.isClosed = true;
|
|
}
|
|
catch (IOException ioe)
|
|
{
|
|
this.lastIOException = ioe;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Returns the current delimiter.
|
|
*
|
|
* @return the current delimiter.
|
|
*/
|
|
public Pattern delimiter () // TESTED
|
|
{
|
|
return this.p;
|
|
}
|
|
|
|
/**
|
|
* Tries to find the pattern in the current line.
|
|
*
|
|
* @param pattern The pattern which should be searched in the
|
|
* current line of the input.
|
|
* @throws NoSuchElementException
|
|
* If the pattern was not found.
|
|
* @return If the search was successful, the result or otherwise a
|
|
* {@link NoSuchElementException} is thrown.
|
|
*/
|
|
public String findInLine (final Pattern pattern) throws NoSuchElementException // TESTED
|
|
{
|
|
String tmpStr = myNextLine (false);
|
|
return myFindPInStr (pattern, tmpStr, 0);
|
|
}
|
|
|
|
/**
|
|
* Compiles the given pattern into a {@link Pattern} and calls
|
|
* {@link #findInLine(Pattern)} with the compiled pattern and
|
|
* returns whatever it returns.
|
|
*
|
|
* @param pattern
|
|
* The pattern which should be matched in the input.
|
|
* @throws NoSuchElementException
|
|
* If the pattern was not found.
|
|
* @return The match in the current line.
|
|
*/
|
|
public String findInLine (final String pattern) // TESTED
|
|
{
|
|
return findInLine (Pattern.compile (pattern));
|
|
}
|
|
|
|
/**
|
|
* Trys to match the pattern within the given horizon.
|
|
*
|
|
* @param pattern
|
|
* Pattern to search.
|
|
* @param horizon
|
|
* @return The result of the match.
|
|
* @throws IllegalArgumentException
|
|
* if the horizon is negative.
|
|
* @throws IllegalStateException
|
|
* if the Scanner is closed.
|
|
*/
|
|
public String findWithinHorizon (final Pattern pattern, final int horizon)
|
|
throws IllegalArgumentException, IllegalStateException
|
|
{
|
|
if (horizon < 0)
|
|
{
|
|
throw new IllegalArgumentException (horizon + " is negative");
|
|
}
|
|
|
|
if (this.isClosed)
|
|
{
|
|
throw new IllegalStateException ("Scanner is closed");
|
|
}
|
|
|
|
// doSkipp is set true to get the matching patern together with the found String
|
|
this.doSkipp = true;
|
|
String rc = myFindPInStr (pattern, this.actBuffer, horizon);
|
|
|
|
if (rc != null)
|
|
{
|
|
this.actPos += rc.length ();
|
|
}
|
|
|
|
return rc;
|
|
}
|
|
|
|
/**
|
|
* Compile the pattern and call {@link #findWithinHorizon(Pattern,
|
|
* int)}.
|
|
*
|
|
* @param pattern
|
|
* Pattern to search.
|
|
* @param horizon
|
|
* @return The result of the match.
|
|
* @throws IllegalArgumentException
|
|
* if the horizon is negative.
|
|
* @throws IllegalStateException
|
|
* if the Scanner is closed.
|
|
*/
|
|
public String findWithinHorizon (final String pattern, final int horizon)
|
|
throws IllegalArgumentException, IllegalStateException
|
|
{
|
|
return findWithinHorizon (Pattern.compile (pattern), horizon);
|
|
}
|
|
|
|
/**
|
|
* Checks if there is any next String using the current
|
|
* delimiter. Therefore the string must not be <code> null </code>
|
|
* and the length must be greater then 0. If a {@link
|
|
* NoSuchElementException} is thrown by the search method, it is
|
|
* catched and false is returned.
|
|
*
|
|
* @return <code> true </code> if there is any result using the current delimiter. This wouldn't
|
|
* lead to a {@link NoSuchElementException}.
|
|
* @throws IllegalStateException
|
|
* if the Scanner is closed.
|
|
*/
|
|
public boolean hasNext () throws IllegalStateException // TESTED
|
|
{
|
|
String tmpStr = null;
|
|
|
|
try
|
|
{
|
|
tmpStr = myCoreNext (false, this.p);
|
|
}
|
|
catch (NoSuchElementException nf)
|
|
{
|
|
}
|
|
|
|
if (tmpStr == null || tmpStr.length () <= 0)
|
|
{
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
/**
|
|
* Searches the pattern in the next subString before the next
|
|
* current delimiter.
|
|
*
|
|
* @param pattern
|
|
* The pattern to search for.
|
|
* @return <code> true </code> if the pattern is found before the current delimiter.
|
|
* @throws IllegalStateException
|
|
* if the Scanner is closed.
|
|
*/
|
|
public boolean hasNext (final Pattern pattern) throws IllegalStateException // TESTED
|
|
{
|
|
String tmpStr;
|
|
|
|
tmpStr = myNext (pattern, false);
|
|
|
|
if (tmpStr == null || tmpStr.length () <= 0)
|
|
{
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
/**
|
|
* Compiles the pattern to a {@link Pattern} and calls {@link
|
|
* #hasNext(Pattern)}.
|
|
*
|
|
* @see #hasNext(Pattern)
|
|
* @param pattern
|
|
* The pattern as string to search for.
|
|
* @return <code> true </code> if the pattern is found before the current delimiter.
|
|
* @throws IllegalStateException
|
|
* if the Scanner is closed.
|
|
*/
|
|
public boolean hasNext (final String pattern) throws IllegalStateException // TESTED
|
|
{
|
|
return hasNext (Pattern.compile (pattern));
|
|
}
|
|
|
|
/**
|
|
* Checks if the string to the next delimiter can be interpreted as
|
|
* a BigDecimal number. <br> BigDecimal numbers are always tryed
|
|
* with radix 10.
|
|
*
|
|
* @see #nextBigDecimal()
|
|
* @return <code> true </code> if the next string is a BigDecimal number.
|
|
* @throws IllegalStateException
|
|
* if the Scanner is closed.
|
|
*/
|
|
public boolean hasNextBigDecimal () throws IllegalStateException // TESTED
|
|
{
|
|
try
|
|
{
|
|
myBigDecimal (false);
|
|
return true;
|
|
}
|
|
catch (InputMismatchException nfe)
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Checks if the string to the next delimiter can be interpreted as
|
|
* a BigInteger number. <br> Call {@link #hasNextBigInteger(int)}
|
|
* with the current radix.
|
|
*
|
|
* @see #nextBigInteger()
|
|
* @return <code> true </code> if the next string is a BigInteger number.
|
|
* @throws IllegalStateException
|
|
* if the Scanner is closed.
|
|
*/
|
|
public boolean hasNextBigInteger () throws IllegalStateException // TESTED
|
|
{
|
|
return hasNextBigInteger (this.currentRadix);
|
|
}
|
|
|
|
/**
|
|
* Checks if the string to the next delimiter can be interpreted as
|
|
* a BigInteger number. <br>
|
|
*
|
|
* @param radix
|
|
* The radix to use for this check. The global radix of the Scanner will not be
|
|
* changed.
|
|
* @return <code> true </code> if the next string is a BigInteger number.
|
|
* @throws IllegalStateException
|
|
* if the Scanner is closed.
|
|
*/
|
|
public boolean hasNextBigInteger (final int radix) throws
|
|
IllegalStateException
|
|
{
|
|
try
|
|
{
|
|
myNextBigInteger (radix, false, BIG_INTEGER);
|
|
return true;
|
|
}
|
|
catch (InputMismatchException ime)
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Checks if the next string could be a boolean. The method handles
|
|
* the input not case sensitiv, so "true" and "TRUE" and even "tRuE"
|
|
* are <code> true </code>.
|
|
*
|
|
* @see #nextBoolean()
|
|
* @return Return <code> true </code> if the next string is a boolean.
|
|
* @throws IllegalStateException
|
|
* if the Scanner is closed.
|
|
*/
|
|
public boolean hasNextBoolean () throws IllegalStateException // TESTED
|
|
{
|
|
try
|
|
{
|
|
myNextBoolean (false);
|
|
return true;
|
|
}
|
|
catch (InputMismatchException ime)
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Checks if the string to the next delimiter can be interpreted as
|
|
* a byte number. <br> Calls {@link #hasNextByte(int)} with the
|
|
* current radix.
|
|
*
|
|
* @see #nextByte()
|
|
* @return <code> true </code> if the next string is a byte number.
|
|
* @throws IllegalStateException
|
|
* if the Scanner is closed.
|
|
*/
|
|
public boolean hasNextByte () throws IllegalStateException // TESTED
|
|
{
|
|
return hasNextByte (this.currentRadix);
|
|
}
|
|
|
|
/**
|
|
* Checks if the string to the next delimiter can be interpreted as
|
|
* a byte number with the given radix. <br> To check, the private
|
|
* method {@link #myNextByte(int, boolean)} is called, and if no
|
|
* error occurs the next string could be a byte.
|
|
*
|
|
* @see #nextByte(int)
|
|
* @param radix The radix to use for this check. The global radix of
|
|
* the Scanner will not be changed.
|
|
* @return <code> true </code> if the next string is a byte number.
|
|
* @throws IllegalStateException
|
|
* if the Scanner is closed.
|
|
*/
|
|
public boolean hasNextByte (final int radix) throws IllegalStateException
|
|
{
|
|
try
|
|
{
|
|
myNextByte (radix, false);
|
|
return true;
|
|
}
|
|
catch (InputMismatchException ime)
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Checks if the string to the next delimiter can be interpreted as
|
|
* a double number. <br> To check, the private method {@link
|
|
* #myNextDouble(boolean)} is called, and if no error occurs the
|
|
* next string could be a double.
|
|
*
|
|
* @see #nextDouble()
|
|
* @return <code> true </code> if the next string is a double number.
|
|
* @throws IllegalStateException
|
|
* if the Scanner is closed.
|
|
*/
|
|
public boolean hasNextDouble () throws IllegalStateException // TESTED
|
|
{
|
|
try
|
|
{
|
|
myNextDouble (false);
|
|
return true;
|
|
}
|
|
catch (InputMismatchException ime)
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Checks if the string to the next delimiter can be interpreted as
|
|
* a double number. Because every float is a double this is
|
|
* checked.<br> To check, the private method {@link
|
|
* #myNextDouble(boolean)} is called, and if no error occurs the
|
|
* next string could be a double.
|
|
*
|
|
* @see #nextFloat()
|
|
* @return <code> true </code> if the next string is a double number.
|
|
* @throws IllegalStateException
|
|
* if the Scanner is closed.
|
|
*/
|
|
public boolean hasNextFloat () throws IllegalStateException // TESTED
|
|
{
|
|
try
|
|
{
|
|
myNextDouble (false);
|
|
// myNextFloat(false);
|
|
return true;
|
|
}
|
|
catch (InputMismatchException ime)
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Checks if the string to the next delimiter can be interpreted as
|
|
* an int number. <br> To check, the private method {@link
|
|
* #myNextInt(int, boolean)} is called, and if no error occurs the
|
|
* next string could be an int.
|
|
*
|
|
* @see #nextInt(int)
|
|
* @return <code> true </code> if the next string is an int number.
|
|
* @throws IllegalStateException
|
|
* if the Scanner is closed.
|
|
*/
|
|
public boolean hasNextInt () throws IllegalStateException // TESTED
|
|
{
|
|
return hasNextInt (this.currentRadix);
|
|
}
|
|
|
|
/**
|
|
* Checks if the string to the next delimiter can be interpreted as
|
|
* an int number with the given radix. <br> To check, the private
|
|
* method {@link #myNextInt(int, boolean)} is called, and if no
|
|
* error occurs the next string could be an int.
|
|
*
|
|
* @see #nextInt(int)
|
|
* @param radix
|
|
* The radix to use for this check. The global radix of the Scanner will not be
|
|
* changed.
|
|
* @return <code> true </code> if the next string is an int number.
|
|
* @throws IllegalStateException
|
|
* if the Scanner is closed.
|
|
*/
|
|
public boolean hasNextInt (final int radix) throws IllegalStateException
|
|
{
|
|
try
|
|
{
|
|
myNextInt (radix, false);
|
|
return true;
|
|
}
|
|
catch (InputMismatchException ime)
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Checks if there is a current line, which ends at the next line
|
|
* break or the end of the input.
|
|
*
|
|
* @return <code> true </code> if there is a current line.
|
|
* @throws IllegalStateException
|
|
* if the Scanner is closed.
|
|
*/
|
|
public boolean hasNextLine () throws IllegalStateException // TESTED
|
|
{
|
|
return (myNextLine (false) != null);
|
|
}
|
|
|
|
/**
|
|
* Checks if the string to the next delimiter can be interpreted as
|
|
* a long number. <br> To check, the private method {@link
|
|
* #myNextLong(int, boolean)} is called, and if no error occurs the
|
|
* next string could be a long.
|
|
*
|
|
* @see #nextLong()
|
|
* @return <code> true </code> if the next string is a long number.
|
|
* @throws IllegalStateException
|
|
* if the Scanner is closed.
|
|
*/
|
|
public boolean hasNextLong () throws IllegalStateException // TESTED
|
|
{
|
|
return hasNextLong (this.currentRadix);
|
|
}
|
|
|
|
/**
|
|
* Checks if the string to the next delimiter can be interpreted as
|
|
* a long number with the given radix. <br> To check, the private
|
|
* method {@link #myNextLong(int, boolean)} is called, and if no
|
|
* error occurs the next string could be a long.
|
|
*
|
|
* @see #nextLong(int)
|
|
* @param radix
|
|
* The radix to use for this check. The global radix of the Scanner will not be
|
|
* changed.
|
|
* @return <code> true </code> if the next string is a long number.
|
|
* @throws IllegalStateException
|
|
* if the Scanner is closed.
|
|
*/
|
|
public boolean hasNextLong (final int radix) throws IllegalStateException
|
|
{
|
|
try
|
|
{
|
|
myNextLong (radix, false);
|
|
return true;
|
|
}
|
|
catch (InputMismatchException ime)
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Checks if the string to the next delimiter can be interpreted as
|
|
* a short number with the given radix. <br> To check, the private
|
|
* method {@link #myNextShort(int, boolean)} is called, and if no
|
|
* error occurs the next string could be a short.
|
|
*
|
|
* @see #nextShort(int)
|
|
* @return <code> true </code> if the next string is a short number.
|
|
* @throws IllegalStateException
|
|
* if the Scanner is closed.
|
|
*/
|
|
public boolean hasNextShort () throws IllegalStateException // TESTED
|
|
{
|
|
return hasNextShort (this.currentRadix);
|
|
}
|
|
|
|
/**
|
|
* Checks if the string to the next delimiter can be interpreted as
|
|
* a short number. <br> To check, the private method {@link
|
|
* #myNextShort(int, boolean)} is called, and if no error occurs the
|
|
* next string could be a short.
|
|
*
|
|
* @see #nextShort(int)
|
|
* @param radix
|
|
* The radix to use for this check. The global radix of the Scanner will not be
|
|
* changed.
|
|
* @return <code> true </code> if the next string is a short number.
|
|
* @throws IllegalStateException
|
|
* if the Scanner is closed.
|
|
*/
|
|
public boolean hasNextShort (final int radix) throws IllegalStateException
|
|
{
|
|
try
|
|
{
|
|
myNextShort (radix, false);
|
|
return true;
|
|
}
|
|
catch (InputMismatchException ime)
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Returns the last {@link IOException} occured.
|
|
*
|
|
* @return Returns the last {@link IOException}.
|
|
*/
|
|
public IOException ioException ()
|
|
{
|
|
return this.lastIOException;
|
|
}
|
|
|
|
/**
|
|
* Returns the current value of {@link #useLocale}. This is used to
|
|
* tell the Scanner if it should use the Locale format or just
|
|
* handle numbers of the default format.
|
|
*
|
|
* @see #setUseLocale(boolean)
|
|
* @return the useLoclae.
|
|
*/
|
|
public boolean isUseLocale () // TESTED
|
|
{
|
|
return this.useLocale;
|
|
}
|
|
|
|
/**
|
|
* Returns the current Locale. It is initialized with {@link
|
|
* Locale#getDefault()}.
|
|
*
|
|
* @see #useLocale(Locale)
|
|
* @return Returns the current Locale.
|
|
*/
|
|
public Locale locale () // TESTED
|
|
{
|
|
return this.actLocale;
|
|
}
|
|
|
|
/**
|
|
* Returns the last MatchResult found. This is updated after every
|
|
* successfully search.
|
|
*
|
|
* @return Returns the last {@link MatchResult} found.
|
|
*/
|
|
public MatchResult match () // TESTED
|
|
{
|
|
return this.actResult;
|
|
}
|
|
|
|
/**
|
|
* Uses the current delimiter to find the next string in the
|
|
* buffer. If a string is found the current position is set after
|
|
* the delimiter, otherwise a {@link NoSuchElementException} is
|
|
* thrown. A successful match sets the matchResult.
|
|
*
|
|
* @see #match()
|
|
* @return Returns the next string of the buffer.
|
|
* @throws NoSuchElementException
|
|
* If no element was found an exception is thrown.
|
|
* @throws IllegalStateException
|
|
* If the Scanner is closed.
|
|
*/
|
|
public String next () throws NoSuchElementException, IllegalStateException // TESTED
|
|
{
|
|
return myCoreNext (true, this.p);
|
|
}
|
|
|
|
/**
|
|
* Tries to match the buffer with the given pattern. The current
|
|
* delimiter will not be changed.
|
|
*
|
|
* @param pattern
|
|
* The pattern to match.
|
|
* @return Returns the next string matching the pattern.
|
|
* @throws NoSuchElementException
|
|
* If no element was found an exception is thrown.
|
|
* @throws IllegalStateException
|
|
* If the Scanner is closed.
|
|
*/
|
|
public String next (final Pattern pattern) throws NoSuchElementException, IllegalStateException // TESTED
|
|
{
|
|
return myNext (pattern, true);
|
|
}
|
|
|
|
/**
|
|
* Tries to match the buffer with the given pattern. The current
|
|
* delimiter will not be changed. Calls the {@link #next(Pattern)}
|
|
* with the compiled pattern.
|
|
*
|
|
* @see #next(Pattern)
|
|
* @param pattern
|
|
* The pattern to match.
|
|
* @return Returns the next string matching the pattern.
|
|
* @throws NoSuchElementException
|
|
* If no element was found an exception is thrown.
|
|
* @throws IllegalStateException
|
|
* If the Scanner is closed.
|
|
*/
|
|
public String next (final String pattern) throws NoSuchElementException, IllegalStateException // TESTED
|
|
{
|
|
return next (Pattern.compile (pattern));
|
|
}
|
|
|
|
/**
|
|
* Tries to interpret the next string as a BigDecimal value.
|
|
*
|
|
* @return Returns the BigDecimal value of the next string.
|
|
* @throws NoSuchElementException
|
|
* If no string is found or the string is not a BigDecimal.
|
|
* @throws IllegalStateException
|
|
* If the Scanner is closed.
|
|
*/
|
|
public BigDecimal nextBigDecimal () throws NoSuchElementException, IllegalStateException // TESTED
|
|
{
|
|
return myBigDecimal (true);
|
|
}
|
|
|
|
/**
|
|
* Tries to interpret the next string as a BigInteger value. Call
|
|
* {@link #nextBigInteger(int)} with the current radix as parameter,
|
|
* and return the value.
|
|
*
|
|
* @see #nextBigInteger(int)
|
|
* @return Returns the BigInteger value of the next string.
|
|
* @throws NoSuchElementException
|
|
* If no string is found or the string is not a BigInteger.
|
|
* @throws IllegalStateException
|
|
* If the Scanner is closed.
|
|
*/
|
|
public BigInteger nextBigInteger () throws NoSuchElementException, IllegalStateException // TESTED
|
|
{
|
|
return nextBigInteger (this.currentRadix);
|
|
}
|
|
|
|
/**
|
|
* Tries to interpret the next string as a BigInteger value with the
|
|
* given radix.
|
|
*
|
|
* @param radix
|
|
* The radix to be used for this BigInteger. The current radix of the Scanner is not
|
|
* changed.
|
|
* @return Returns the BigInteger value of the next string.
|
|
* @throws NoSuchElementException
|
|
* If no string is found or the string is not a BigInteger.
|
|
* @throws IllegalStateException
|
|
* If the Scanner is closed.
|
|
*/
|
|
public BigInteger nextBigInteger (final int radix) throws
|
|
NoSuchElementException, IllegalStateException
|
|
{
|
|
return myNextBigInteger (radix, true, BIG_INTEGER);
|
|
}
|
|
|
|
/**
|
|
* Tries to interpret the next string to the delimiter as a boolean
|
|
* value, ignoring case.
|
|
*
|
|
* @return Returns the boolean value of the next matching string or throws an exception.
|
|
* @throws NoSuchElementException
|
|
* If no string is found or the string is not a boolean.
|
|
* @throws IllegalStateException
|
|
* If the Scanner is closed.
|
|
*/
|
|
public boolean nextBoolean () throws NoSuchElementException, IllegalStateException // TESTED
|
|
{
|
|
return myNextBoolean (true);
|
|
}
|
|
|
|
/**
|
|
* Tries to interpret the next string as a byte value. Call {@link
|
|
* #nextByte(int)} with the current radix as parameter, and return
|
|
* the value.
|
|
*
|
|
* @see #nextByte(int)
|
|
* @return Returns the byte value of the next string.
|
|
* @throws NoSuchElementException
|
|
* If no string is found or the string is not a byte
|
|
* @throws IllegalStateException
|
|
* If the Scanner is closed.
|
|
*/
|
|
public byte nextByte () throws NoSuchElementException, IllegalStateException // TESTED
|
|
{
|
|
return nextByte (this.currentRadix);
|
|
}
|
|
|
|
/**
|
|
* Tries to interpret the next string as a byte value with the given
|
|
* radix.
|
|
*
|
|
* @param radix
|
|
* The radix to be used for this byte. The current radix of the Scanner is not
|
|
* changed.
|
|
* @return Returns the byte value of the next string.
|
|
* @throws NoSuchElementException
|
|
* If no string is found or the string is not a byte.
|
|
* @throws IllegalStateException
|
|
* If the Scanner is closed.
|
|
*/
|
|
public byte nextByte (final int radix) throws NoSuchElementException,
|
|
IllegalStateException
|
|
{
|
|
return myNextByte (radix, true);
|
|
}
|
|
|
|
/**
|
|
* Tries to interpret the next string as a double value.
|
|
*
|
|
* @return Returns the int value of the next string.
|
|
* @throws NoSuchElementException
|
|
* If no string is found or the string is not a double.
|
|
* @throws IllegalStateException
|
|
* If the Scanner is closed.
|
|
*/
|
|
public double nextDouble () throws NoSuchElementException, IllegalStateException // TESTED
|
|
{
|
|
return myNextDouble (true);
|
|
}
|
|
|
|
/**
|
|
* Tries to interpret the next string as a double value, and then
|
|
* casts down to float.
|
|
*
|
|
* @return Returns the int value of the next string.
|
|
* @throws NoSuchElementException
|
|
* If no string is found or the string is not a double.
|
|
* @throws IllegalStateException
|
|
* If the Scanner is closed.
|
|
*/
|
|
public float nextFloat () throws NoSuchElementException, IllegalStateException // TESTED
|
|
{
|
|
return (float) myNextDouble (true);
|
|
// return myNextFloat(true);
|
|
}
|
|
|
|
/**
|
|
* Tries to interpret the next string as an int value. Calls {@link
|
|
* #nextInt(int)} with the current radix as parameter, and return
|
|
* the value.
|
|
*
|
|
* @see #nextInt(int)
|
|
* @return Returns the int value of the next string.
|
|
* @throws NoSuchElementException
|
|
* If no string is found or the string is not an int.
|
|
* @throws IllegalStateException
|
|
* If the Scanner is closed.
|
|
*/
|
|
public int nextInt () throws NoSuchElementException, IllegalStateException // TESTED
|
|
{
|
|
return nextInt (this.currentRadix);
|
|
}
|
|
|
|
/**
|
|
* Tries to interpret the next string as an int value with the given
|
|
* radix.
|
|
*
|
|
* @param radix
|
|
* The radix to be used for this int. The current radix of the Scanner is not changed
|
|
* @return Returns the int value of the next string.
|
|
* @throws NoSuchElementException
|
|
* If no string is found or the string is not an int.
|
|
* @throws IllegalStateException
|
|
* If the Scanner is closed.
|
|
*/
|
|
public int nextInt (final int radix) throws NoSuchElementException,
|
|
IllegalStateException
|
|
{
|
|
return myNextInt (radix, true);
|
|
}
|
|
|
|
/**
|
|
* Tries to match the system line seperator, and returns the current
|
|
* line.
|
|
*
|
|
* @return Returns the current line.
|
|
* @throws NoSuchElementException
|
|
* If the current delimiter is not found.
|
|
* @throws IllegalStateException
|
|
* If the Scanner is closed.
|
|
*/
|
|
public String nextLine () throws NoSuchElementException, IllegalStateException // TESTED
|
|
{
|
|
return myNextLine (true);
|
|
}
|
|
|
|
/**
|
|
* Tries to interpret the next string as a long value. Calls {@link
|
|
* #nextLong(int)} with the current radix as parameter, and return
|
|
* the value.
|
|
*
|
|
* @see #nextLong(int)
|
|
* @return Returns the long value of the next string.
|
|
* @throws NoSuchElementException
|
|
* If no string is found or the string is not a long.
|
|
* @throws IllegalStateException
|
|
* If the Scanner is closed.
|
|
*/
|
|
public long nextLong () throws NoSuchElementException, IllegalStateException // TESTED
|
|
{
|
|
return nextLong (this.currentRadix);
|
|
}
|
|
|
|
/**
|
|
* Tries to interpret the next string as a long value with the given
|
|
* radix.
|
|
*
|
|
* @param radix
|
|
* The radix to be used for this long. The current radix of the Scanner is not
|
|
* changed
|
|
* @return Returns the long value of the next string.
|
|
* @throws NoSuchElementException
|
|
* If no string is found or the string is not a long.
|
|
* @throws IllegalStateException
|
|
* If the Scanner is closed.
|
|
*/
|
|
public long nextLong (final int radix) throws NoSuchElementException,
|
|
IllegalStateException
|
|
{
|
|
return myNextLong (radix, true);
|
|
}
|
|
|
|
/**
|
|
* Tries to interpret the next string as a short value. Calls {@link
|
|
* #nextShort(int)} with the current radix as parameter, and return
|
|
* the value.
|
|
*
|
|
* @see #nextShort(int)
|
|
* @return Returns the short value of the next string.
|
|
* @throws NoSuchElementException
|
|
* If no string is found or the string is not a short.
|
|
*/
|
|
public short nextShort () throws NoSuchElementException // TESTED
|
|
{
|
|
return nextShort (this.currentRadix);
|
|
}
|
|
|
|
/**
|
|
* Tries to interpret the next string as a short value with the
|
|
* given radix.
|
|
*
|
|
* @param radix
|
|
* The radix to be used for this short. The current radix of the Scanner is not
|
|
* changed.
|
|
* @return Returns the short value of the next string.
|
|
* @throws NoSuchElementException
|
|
* If no string is found or the string is not a short.
|
|
*/
|
|
public short nextShort (final int radix) throws NoSuchElementException
|
|
{
|
|
return myNextShort (radix, true);
|
|
}
|
|
|
|
/**
|
|
* @return Returns the current radix.
|
|
*/
|
|
public int radix ()
|
|
{
|
|
return this.currentRadix;
|
|
}
|
|
|
|
/**
|
|
* The remove operation is not supported by this implementation of
|
|
* Iterator.
|
|
*/
|
|
public void remove ()
|
|
{
|
|
}
|
|
|
|
/**
|
|
* @param useLocale the useLocale to set.
|
|
*/
|
|
public void setUseLocale (final boolean useLocale) // TESTED
|
|
{
|
|
this.useLocale = useLocale;
|
|
}
|
|
|
|
/**
|
|
* Skips the given pattern. Sets skipped <code>true</code>.
|
|
*
|
|
* @param pattern
|
|
* Pattern which should be skipped.
|
|
* @return <code>this</code> with the skipped buffer.
|
|
* @throws NoSuchElementException
|
|
* If the Pattern is not found.
|
|
*/
|
|
public Scanner skip (final Pattern pattern) throws NoSuchElementException
|
|
{
|
|
this.doSkipp = true;
|
|
int end;
|
|
boolean found;
|
|
Matcher matcher = pattern.matcher (this.actBuffer);
|
|
matcher.region (this.actPos - 1, this.actBuffer.length ());
|
|
|
|
found = matcher.find ();
|
|
found = myFillBuffer_loop (matcher, this.actPos - 1, found);
|
|
end = matcher.end ();
|
|
|
|
this.actPos = end + 1;
|
|
|
|
this.doSkipp = false;
|
|
this.skipped = true;
|
|
|
|
actResult = null;
|
|
|
|
if (!found)
|
|
{
|
|
throw new NoSuchElementException ();
|
|
}
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Skips a given pattern. Calls {@link #skip(Pattern)} with the
|
|
* compiled pattern.
|
|
*
|
|
* @see #skip(Pattern)
|
|
* @param pattern
|
|
* Pattern which should be skipped.
|
|
* @return <code>this</code> with the skipped buffer.
|
|
*/
|
|
public Scanner skip (final String pattern)
|
|
{
|
|
return skip (Pattern.compile (pattern));
|
|
}
|
|
|
|
/**
|
|
* Returns the string representation of this Scanner.
|
|
*/
|
|
@Override
|
|
public String toString ()
|
|
{
|
|
String tmpStr2;
|
|
String rc = this.getClass ().getName ();
|
|
tmpStr2 = rc;
|
|
tmpStr2 = "[delimiters=" + this.p.pattern () + "]";
|
|
rc += tmpStr2;
|
|
tmpStr2 = "[position=" + (this.procesedChars + this.actPos) + "]";
|
|
rc += tmpStr2;
|
|
tmpStr2 = "[match valid=" + this.matchValid + "]";
|
|
rc += tmpStr2;
|
|
tmpStr2 = "[need input=" + this.needInput + "]";
|
|
rc += tmpStr2;
|
|
tmpStr2 = "[source closed=" + this.isClosed + "]";
|
|
rc += tmpStr2;
|
|
tmpStr2 = "[skipped=" + this.skipped + "]";
|
|
rc += tmpStr2;
|
|
tmpStr2 = "[group separator=\\" + this.dfs.getGroupingSeparator () + "]";
|
|
rc += tmpStr2;
|
|
tmpStr2 = "[decimal separator=\\" + this.dfs.getDecimalSeparator () + "]";
|
|
rc += tmpStr2;
|
|
tmpStr2 =
|
|
"[positive prefix=" + myConvert (this.df.getPositivePrefix ()) + "]";
|
|
rc += tmpStr2;
|
|
tmpStr2 =
|
|
"[negative prefix=" + myConvert (this.df.getNegativePrefix ()) + "]";
|
|
rc += tmpStr2;
|
|
tmpStr2 =
|
|
"[positive suffix=" + myConvert (this.df.getPositiveSuffix ()) + "]";
|
|
rc += tmpStr2;
|
|
tmpStr2 =
|
|
"[negative suffix=" + myConvert (this.df.getNegativeSuffix ()) + "]";
|
|
rc += tmpStr2;
|
|
tmpStr2 = "[NaN string=" + myConvert (this.dfs.getNaN ()) + "]";
|
|
rc += tmpStr2;
|
|
tmpStr2 = "[infinity string=" + myConvert (this.dfs.getInfinity ()) + "]";
|
|
rc += tmpStr2;
|
|
return rc;
|
|
}
|
|
|
|
/**
|
|
* Sets the current pattern to the given parameter, and updates the
|
|
* {@link Matcher} with the new pattern.
|
|
*
|
|
* @param pattern
|
|
* The new pattern to use.
|
|
* @return Returns the Scanner (<code>this</code>) with the new pattern.
|
|
*/
|
|
public Scanner useDelimiter (final Pattern pattern) // TESTED
|
|
{
|
|
if (pattern != null)
|
|
{
|
|
this.p = pattern;
|
|
this.myMatcher = this.p.matcher (this.actBuffer);
|
|
}
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Sets the current pattern to the given parameter. Compiles the
|
|
* pattern and calls {@link #useDelimiter(Pattern)}
|
|
*
|
|
* @see #useDelimiter(Pattern)
|
|
* @param pattern
|
|
* The new pattern to use.
|
|
* @return Returns the Scanner (<code>this</code>) with the new pattern.
|
|
*/
|
|
public Scanner useDelimiter (final String pattern) // TESTED
|
|
{
|
|
return useDelimiter (Pattern.compile (pattern));
|
|
}
|
|
|
|
/**
|
|
* Sets the current Locale to the given parameter. Formats and
|
|
* Symbols are also set using the new Locale.
|
|
*
|
|
* @param locale The new Locale to use. If it is <code>null</code>
|
|
* nothing happens.
|
|
* @return Returns the Scanner (<code>this</code>) with the new Locale.
|
|
*/
|
|
public Scanner useLocale (final Locale locale) // TESTED
|
|
{
|
|
if (locale != null)
|
|
{
|
|
this.actLocale = locale;
|
|
this.actFormat = NumberFormat.getInstance (this.actLocale);
|
|
this.dfs = new DecimalFormatSymbols (this.actLocale);
|
|
this.df = (DecimalFormat) this.actFormat;
|
|
}
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Sets the current radix to the current value if the given radix is
|
|
* >= 2 and <= 36 otherwise an {@link IllegalArgumentException} is
|
|
* thrown.
|
|
*
|
|
* @param radix
|
|
* the new radix to use as default.
|
|
* @return <code> this </code> with the new radix value.
|
|
* @throws IllegalArgumentException
|
|
* When the given radix is out of bounds.
|
|
*/
|
|
public Scanner useRadix (final int radix) throws IllegalArgumentException
|
|
{
|
|
if (radix < 2 || radix > 36)
|
|
{
|
|
throw new IllegalArgumentException ();
|
|
}
|
|
this.currentRadix = radix;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Checks if it is necessary to apply the current Locale on the
|
|
* String. If so the String is converted using the {@link
|
|
* NumberFormat#parse(String)} into a Number and then back to a
|
|
* default stringrepresentation of that Number.
|
|
*
|
|
* @see #setUseLocale(boolean)
|
|
* @param str
|
|
* String to convert into another string.
|
|
* @param radix Radix of the Number in the original string. It has
|
|
* to be 10 for anything to happen.
|
|
* @return Eighter the Stringrepresention of the number without the
|
|
* Locale or an unchanged string.
|
|
* @throws ParseException
|
|
* if {@link NumberFormat#parse(String)} fails to parse.
|
|
*/
|
|
private String myApplyLocale (final String str,
|
|
final int radix) throws ParseException
|
|
{
|
|
String rc;
|
|
|
|
if (this.useLocale && radix == 10)
|
|
{
|
|
rc = this.actFormat.parse (str).toString ();
|
|
return rc;
|
|
}
|
|
|
|
return str;
|
|
}
|
|
|
|
/**
|
|
* If {@link #useLocale} is set and radix is 10 the string is tryed
|
|
* to be converted to string without Locale settings, because the
|
|
* "normal" convert from Local has only double precision and it is
|
|
* not enough for the about 50 digits of precision of the
|
|
* BigDecimal. So in the first step the string is seperated into the
|
|
* integer part which is converted to a long, and the fraction part
|
|
* is appended afterwards. Between the integer and the fraction part
|
|
* comes a ".". Finally the resulting string is returned.
|
|
*
|
|
* @see #setUseLocale(boolean)
|
|
* @param str String representation of a BigDecimal number.
|
|
* @return The default String representation (without Locale) of the
|
|
* BigInteger.
|
|
* @throws ParseException
|
|
* If the String has more than one decimal seperators a parse exception is thrown.
|
|
*/
|
|
private String myApplyLocaleBD (final String str) throws ParseException
|
|
{
|
|
if (!this.useLocale || this.currentRadix != 10)
|
|
{
|
|
return str;
|
|
}
|
|
|
|
String negPrefix = this.df.getNegativePrefix ();
|
|
String negSuffix = this.df.getNegativeSuffix ();
|
|
String posPrefix = this.df.getPositivePrefix ();
|
|
String posSuffix = this.df.getPositiveSuffix ();
|
|
|
|
char d = this.dfs.getDecimalSeparator ();
|
|
int begin1, begin2;
|
|
boolean isNegativ = false;
|
|
String parts = null;
|
|
|
|
String tmpStr1 = "";
|
|
|
|
begin1 = str.indexOf (d);
|
|
begin2 = str.indexOf (d, begin1 + 1);
|
|
|
|
if (begin2 > 0)
|
|
{
|
|
throw new ParseException ("more than one Decimal seperators", begin2);
|
|
}
|
|
|
|
parts = str.substring (0, begin1);
|
|
|
|
if ((negPrefix.length () > 0
|
|
&& str.substring (0, negPrefix.length ()).equals (negPrefix))
|
|
|| (negSuffix.length () > 0
|
|
&& str.substring (str.length () -
|
|
negSuffix.length ()).equals (negSuffix)))
|
|
{
|
|
parts += negSuffix;
|
|
isNegativ = true;
|
|
}
|
|
else
|
|
if ((posPrefix.length () > 0
|
|
&& str.substring (0, posPrefix.length ()).equals (posPrefix))
|
|
|| (posSuffix.length () > 0
|
|
&& str.substring (str.length () -
|
|
posSuffix.length ()).equals (posSuffix)))
|
|
{
|
|
parts += posSuffix;
|
|
}
|
|
|
|
tmpStr1 = this.actFormat.parse (parts).toString ();
|
|
|
|
if (isNegativ)
|
|
{
|
|
tmpStr1 +=
|
|
"." + str.substring (str.indexOf (d) + 1,
|
|
str.length () - negSuffix.length ());
|
|
}
|
|
else
|
|
{
|
|
tmpStr1 +=
|
|
"." + str.substring (str.indexOf (d) + 1,
|
|
str.length () - posSuffix.length ());
|
|
}
|
|
|
|
return tmpStr1;
|
|
}
|
|
|
|
/**
|
|
* Tries to interpret the next String as a BigDecimal. Therfore the
|
|
* next String is get with {@link #myCoreNext(boolean, Pattern)} and
|
|
* then {@link #myApplyLocaleBD(String)} is called to convert the
|
|
* String into a BigDecimal.
|
|
*
|
|
* @param delete
|
|
* Should the found string be deleted or not.
|
|
* @return Returns the BigDecimal value of the next string.
|
|
* @throws InputMismatchException
|
|
* If the string is not a BigDecimal
|
|
*/
|
|
private BigDecimal myBigDecimal (final boolean delete) throws
|
|
InputMismatchException
|
|
{
|
|
BigDecimal rc;
|
|
String tmp = myCoreNext (delete, this.p);
|
|
try
|
|
{
|
|
tmp = myApplyLocaleBD (tmp);
|
|
}
|
|
catch (ParseException e)
|
|
{
|
|
throw new InputMismatchException (ERR_PREFIX + tmp + IS_NOT +
|
|
"BigDecimal!!");
|
|
}
|
|
rc = new BigDecimal (tmp);
|
|
|
|
return rc;
|
|
}
|
|
|
|
/**
|
|
* Applies suffix ("\E") and prefix ("\Q") if str.length != 0 Used
|
|
* by the toString method.
|
|
*
|
|
* @param str
|
|
* the string on which the suffix and prefix should be applied.
|
|
* @return The new new string with the suffix and prefix.
|
|
*/
|
|
private String myConvert (final String str)
|
|
{
|
|
if (str != null && str.length () > 0)
|
|
{
|
|
return "\\Q" + str + "\\E";
|
|
}
|
|
return str;
|
|
}
|
|
|
|
/**
|
|
* Searches the current Matcher for the current Pattern. If the end
|
|
* is reached during the search it tried to read again from the
|
|
* source. The search results are always saved in {@link #actResult}
|
|
* which is returned when match() is called. If doSkip is true the
|
|
* pattern is also taken.
|
|
*
|
|
* @param delete
|
|
* if true the aktPos is set.
|
|
* @param pattern
|
|
* pattern to search for.
|
|
* @return Returns the String which matches the pattern.
|
|
* @throws NoSuchElementException
|
|
* If the search has no result.
|
|
*/
|
|
private String myCoreNext (final boolean delete, final Pattern pattern)
|
|
throws NoSuchElementException
|
|
{
|
|
if (this.isClosed)
|
|
{
|
|
throw new IllegalStateException ("Scanner closed");
|
|
}
|
|
if (shallUseLastFound (pattern != null ? pattern : this.p))
|
|
{
|
|
if (this.last_RegionEnd != this.myMatcher.regionEnd ())
|
|
{
|
|
System.out.println (this.last_RegionEnd + " != " +
|
|
this.myMatcher.regionEnd () + " (" +
|
|
(this.last_RegionEnd -
|
|
this.myMatcher.regionEnd ()) + ")");
|
|
}
|
|
if (delete)
|
|
{
|
|
this.actPos = this.lastNextPos;
|
|
this.lastFoundPresent = false;
|
|
this.actResult = this.lastResult;
|
|
}
|
|
return this.lastFound;
|
|
}
|
|
|
|
boolean found = false;
|
|
int left;
|
|
int endIndex;
|
|
|
|
String tmp2 = null;
|
|
|
|
if (this.actPos > this.MAX_PREFIX)
|
|
{
|
|
// skipp the processed chars so that the size of the buffer don't grow to much even with
|
|
// huge files
|
|
this.procesedChars += this.actPos;
|
|
this.actBuffer = this.actBuffer.substring (this.actPos);
|
|
this.actPos = 0;
|
|
this.myMatcher = pattern.matcher (this.actBuffer);
|
|
}
|
|
|
|
left = this.actBuffer.length () - this.actPos;
|
|
if (left < this.MIN_BUF_LEN)
|
|
{
|
|
myFillBuffer ();
|
|
}
|
|
found = this.myMatcher.find (this.actPos);
|
|
|
|
found = myFillBuffer_loop (this.myMatcher, this.actPos, found);
|
|
|
|
this.needInput = false;
|
|
|
|
if (found)
|
|
{
|
|
if (this.doSkipp)
|
|
{
|
|
endIndex = this.myMatcher.end ();
|
|
}
|
|
else
|
|
{
|
|
endIndex = this.myMatcher.start ();
|
|
}
|
|
tmp2 = this.actBuffer.substring (this.actPos, endIndex);
|
|
this.lastNextPos = this.myMatcher.end ();
|
|
/*
|
|
* if the delete flag is set, just set the current position after the end of the matched
|
|
* pattern.
|
|
*/
|
|
if (delete)
|
|
{
|
|
this.actPos = this.lastNextPos;
|
|
}
|
|
else
|
|
{
|
|
this.lastFound = tmp2;
|
|
this.lastFoundPresent = true;
|
|
this.lastPatternHash = pattern.hashCode ();
|
|
}
|
|
this.last_RegionStart = this.myMatcher.regionStart ();
|
|
this.last_RegionEnd = this.myMatcher.regionEnd ();
|
|
this.last_anchor = this.myMatcher.hasAnchoringBounds ();
|
|
this.last_transparent = this.myMatcher.hasTransparentBounds ();
|
|
}
|
|
else if (this.myMatcher.hitEnd ())
|
|
// the end of input is matched
|
|
{
|
|
tmp2 = this.actBuffer.substring (this.actPos);
|
|
if (tmp2.length() == 0)
|
|
tmp2 = null;
|
|
this.lastNextPos = this.actBuffer.length ();
|
|
if (delete)
|
|
{
|
|
this.actPos = this.lastNextPos;
|
|
}
|
|
else
|
|
{
|
|
this.lastFound = tmp2;
|
|
this.lastFoundPresent = true;
|
|
this.lastPatternHash = pattern.hashCode ();
|
|
}
|
|
this.last_RegionStart = this.myMatcher.regionStart ();
|
|
this.last_RegionEnd = this.myMatcher.regionEnd ();
|
|
this.last_anchor = this.myMatcher.hasAnchoringBounds ();
|
|
this.last_transparent = this.myMatcher.hasTransparentBounds ();
|
|
}
|
|
else
|
|
{
|
|
/*
|
|
* if no match found an Exception is throwed
|
|
*/
|
|
throw new NoSuchElementException ();
|
|
}
|
|
/*
|
|
* change the Result only when a nextXXX() method was called, not if a hasNextXXX() method
|
|
* is called
|
|
*/
|
|
if (delete)
|
|
{
|
|
this.actResult = this.myMatcher.toMatchResult ();
|
|
|
|
this.matchValid = this.actResult != null;
|
|
}
|
|
else
|
|
{
|
|
this.lastResult = this.myMatcher.toMatchResult ();
|
|
}
|
|
|
|
this.skipped = this.doSkipp;
|
|
this.doSkipp = false;
|
|
|
|
return tmp2;
|
|
}
|
|
|
|
/**
|
|
* Used to fill the String buffer from a source. Therfore the 3
|
|
* possible sources are checked if they are not <code>null</code>
|
|
* and this not used, otherwise the read method is called on the
|
|
* source. If a charsetName is set and not <code>null</code> it is
|
|
* applied to convert to String.
|
|
*/
|
|
private void myFillBuffer ()
|
|
{
|
|
int len;
|
|
String tmpStr;
|
|
CharBuffer cb = null;
|
|
ByteBuffer bb = null;
|
|
|
|
if (this.bIS != null)
|
|
{
|
|
try
|
|
{
|
|
len = this.bIS.read (this.tmpBuffer);
|
|
if (len < 0)
|
|
{
|
|
return;
|
|
}
|
|
if (this.charsetName != null)
|
|
{
|
|
tmpStr = new String (this.tmpBuffer, 0, len, this.charsetName);
|
|
}
|
|
else
|
|
{
|
|
tmpStr = new String (this.tmpBuffer, 0, len);
|
|
}
|
|
this.actBuffer += tmpStr;
|
|
}
|
|
catch (IOException e)
|
|
{
|
|
this.lastIOException = e;
|
|
}
|
|
}
|
|
else if (this.readableSource != null)
|
|
{
|
|
try
|
|
{
|
|
cb = CharBuffer.allocate (1000);
|
|
this.needInput = true;
|
|
len = this.readableSource.read (cb);
|
|
if (len < 0)
|
|
{
|
|
return;
|
|
}
|
|
this.needInput = false;
|
|
tmpStr = new String (cb.array ());
|
|
this.actBuffer += tmpStr;
|
|
}
|
|
catch (IOException e)
|
|
{
|
|
this.lastIOException = e;
|
|
}
|
|
}
|
|
else if (this.rbcSource != null)
|
|
{
|
|
try
|
|
{
|
|
bb = ByteBuffer.allocate (1000);
|
|
this.needInput = true;
|
|
len = this.rbcSource.read (bb);
|
|
this.needInput = false;
|
|
if (len < 0)
|
|
{
|
|
return;
|
|
}
|
|
if (this.charsetName != null)
|
|
{
|
|
tmpStr = new String (bb.array (), 0, len, this.charsetName);
|
|
}
|
|
else
|
|
{
|
|
tmpStr = new String (bb.array (), 0, len);
|
|
}
|
|
this.actBuffer += tmpStr;
|
|
}
|
|
catch (IOException e)
|
|
{
|
|
this.lastIOException = e;
|
|
}
|
|
}
|
|
|
|
this.myMatcher.reset (this.actBuffer);
|
|
}
|
|
|
|
/**
|
|
* A loop in which the {@link #myFillBuffer()} is called and checked
|
|
* if the pattern is found in the matcher and if the buffersize
|
|
* changes after the read.
|
|
*
|
|
* @param aktM
|
|
* The current Matcher.
|
|
* @param pos
|
|
* Position from which the matcher should start matching.
|
|
* @param found
|
|
* if already found.
|
|
* @return <code> true </code> if the matcher has found a match.
|
|
*/
|
|
private boolean myFillBuffer_loop (final Matcher aktM, final int pos,
|
|
boolean found)
|
|
{
|
|
int tmp;
|
|
|
|
tmp = this.actBuffer.length ();
|
|
while (aktM.hitEnd ()
|
|
&& ((this.bIS != null) || (this.readableSource != null)
|
|
|| (this.rbcSource != null)))
|
|
{
|
|
myFillBuffer ();
|
|
if (tmp == this.actBuffer.length ())
|
|
{
|
|
break;
|
|
}
|
|
found = aktM.find (pos);
|
|
this.needInput = true;
|
|
}
|
|
return found;
|
|
}
|
|
|
|
/**
|
|
* Used to find the given pattern in the given string before the
|
|
* given horizon. Therfore the current matcher is copied, and
|
|
* overwritten using the given pattern and the given Sting. <br>
|
|
* After the search the original values are restored, and skipped is
|
|
* set <code> true </code>.
|
|
*
|
|
* @param pattern
|
|
* Pattern which should be matched.
|
|
* @param str
|
|
* The String in which the pattern should be matched.
|
|
* @param horizon
|
|
* the horizon whithin the match should be, if 0 then it is ignored.
|
|
* @return Returns the String in the given String that matches the pattern.
|
|
*/
|
|
private String myFindPInStr (final Pattern pattern, final String str,
|
|
final int horizon)
|
|
{
|
|
String rc = null;
|
|
int curPos = this.actPos;
|
|
Matcher aktMatcher = this.myMatcher;
|
|
|
|
this.myMatcher = pattern.matcher (str);
|
|
if (horizon > 0)
|
|
{
|
|
this.myMatcher.useAnchoringBounds (true);
|
|
this.myMatcher.useTransparentBounds (true);
|
|
this.myMatcher.region (this.actPos, this.actPos + horizon);
|
|
}
|
|
rc = myCoreNext (true, pattern);
|
|
this.myMatcher = aktMatcher;
|
|
|
|
this.actPos = curPos;
|
|
this.skipped = true;
|
|
|
|
return rc;
|
|
}
|
|
|
|
/**
|
|
* Used by the {@link #hasNext(Pattern)} and {@link #next(Pattern)}
|
|
* methods. Therfore a substring is taken first to the current
|
|
* delimiter, afterwards the given pattern is searched in this
|
|
* subsring.<br> Finally the current Buffer and matcher (which have
|
|
* been temporarily changed) are set back.<br> <br> The {@link
|
|
* #skipped} is set <code> true </code>.
|
|
*
|
|
* @param pattern
|
|
* Pattern to find until the current delimiter.
|
|
* @param delete
|
|
* Is <code> true </code> if a next method is called.<br>
|
|
* Is <code> false </code> if a hasNext method is called.
|
|
* @return Returns the String which is returned by the public methods.
|
|
*/
|
|
private String myNext (final Pattern pattern, final boolean delete)
|
|
{
|
|
String tmpStr;
|
|
Matcher aktMatcher = this.myMatcher;
|
|
String result;
|
|
String currBuffer = this.actBuffer;
|
|
int currAktPos;
|
|
|
|
tmpStr = myCoreNext (delete, this.p);
|
|
this.myMatcher = pattern.matcher (tmpStr);
|
|
this.actBuffer = tmpStr;
|
|
currAktPos = this.actPos;
|
|
this.actPos = 0;
|
|
result = myCoreNext (delete, pattern);
|
|
this.actPos = currAktPos;
|
|
|
|
this.actBuffer = currBuffer;
|
|
this.myMatcher = aktMatcher;
|
|
this.skipped = true;
|
|
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* Calls the next() method internally to get the next String, and
|
|
* trys to apply a locale which is only applied if the radix is 10
|
|
* and useLocale is <code> true </code>. Afterwards it is tried to
|
|
* call the Constructor of a {@link BigInteger} with the given
|
|
* radix.
|
|
*
|
|
* @param radix The radix to use.
|
|
* @param delete If the found String should be removed from input or
|
|
* not.
|
|
* @param name name of "BigInteger" in case of an Error.
|
|
* @return Returns the new BigInteger created if there is no Error.
|
|
* @throws InputMismatchException
|
|
* If there is a {@link ParseException} or a {@link NumberFormatException}.
|
|
*/
|
|
private BigInteger myNextBigInteger (final int radix, final boolean delete,
|
|
final String name)
|
|
{
|
|
BigInteger rc;
|
|
String tmp = myPrepareForNext (this.p, delete);
|
|
|
|
try
|
|
{
|
|
tmp = myApplyLocale (tmp, radix);
|
|
rc = new BigInteger (tmp, radix);
|
|
return rc;
|
|
}
|
|
catch (NumberFormatException nfe)
|
|
{
|
|
}
|
|
catch (ParseException e)
|
|
{
|
|
}
|
|
throw new InputMismatchException (ERR_PREFIX + tmp + IS_NOT + name);
|
|
}
|
|
|
|
/**
|
|
* Checks if the next String is either "true" or "false", otherwise
|
|
* an {@link InputMismatchException} is thrown. It ignores the case
|
|
* of the string so that "true" and "TRUE" and even "TrUe" are
|
|
* accepted.
|
|
*
|
|
* @param delete Should the found value be removed from the input or
|
|
* not.
|
|
* @return Returns the boolean value (if it is a boolean).
|
|
* @throws InputMismatchException
|
|
* If the next String is not a boolean.
|
|
*/
|
|
private boolean myNextBoolean (final boolean delete) throws
|
|
InputMismatchException
|
|
{
|
|
String tmp = myPrepareForNext (this.p, delete);
|
|
if (tmp.equalsIgnoreCase ("true"))
|
|
{
|
|
return true;
|
|
}
|
|
else if (tmp.equalsIgnoreCase ("false"))
|
|
{
|
|
return false;
|
|
}
|
|
else
|
|
{
|
|
throw new InputMismatchException (ERR_PREFIX + tmp + NOT_BOOLEAN);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Calls the {@link #myPrepareForNext(Pattern, boolean)} which calls
|
|
* the {@link #myCoreNext(boolean, Pattern)} to return the next
|
|
* String matching the current delimier. Afterwards it is tryed to
|
|
* convert the String into a byte. Any Error will lead into a {@link
|
|
* InputMismatchException}.
|
|
*
|
|
* @param radix The radix to use.
|
|
* @param delete Should the found String be removed from the input.
|
|
* @return Returns the byte value of the String.
|
|
* @throws InputMismatchException if the next String is not a byte.
|
|
*/
|
|
private byte myNextByte (final int radix,
|
|
final boolean delete) throws InputMismatchException
|
|
{
|
|
byte rc;
|
|
String tmp = myPrepareForNext (this.p, delete);
|
|
|
|
try
|
|
{
|
|
tmp = myApplyLocale (tmp, radix);
|
|
rc = Byte.parseByte (tmp, radix);
|
|
return rc;
|
|
}
|
|
catch (NumberFormatException nfe)
|
|
{
|
|
}
|
|
catch (ParseException e)
|
|
{
|
|
}
|
|
throw new InputMismatchException (ERR_PREFIX + tmp + NOT_BYTE);
|
|
}
|
|
|
|
/**
|
|
* Tries to interpret the next String as a double value. To verify
|
|
* if the double value is correct, it is converted back to a String
|
|
* using the default Locale and this String is compared with the
|
|
* String from which the double was converted. If the two Strings
|
|
* don't match, an {@link InputMismatchException} is thrown.<br>
|
|
* <br> The radix used is always 10 even if the global radix is
|
|
* changed.
|
|
*
|
|
* @param delete Should the String be removed, if true it will be
|
|
* also removed if the String is not a double value.
|
|
* @return Returns the double value of the next String.
|
|
* @throws InputMismatchException if the next String is not a
|
|
* double.
|
|
*/
|
|
private double myNextDouble (final boolean delete) throws
|
|
InputMismatchException
|
|
{
|
|
double rc;
|
|
String tmp = myPrepareForNext (this.p, delete);
|
|
|
|
try
|
|
{
|
|
tmp = myApplyLocale (tmp, 10);
|
|
rc = Double.parseDouble (tmp);
|
|
if (("" + rc).equals (tmp))
|
|
{
|
|
return rc;
|
|
}
|
|
}
|
|
catch (ParseException e)
|
|
{
|
|
}
|
|
throw new InputMismatchException (ERR_PREFIX + tmp + NOT_DOUBLE);
|
|
}
|
|
|
|
/**
|
|
* Tries to interpret the next String as an int value. Therfore
|
|
* {@link #myApplyLocale(String, int)} decides if the current Locale
|
|
* should be applied or not and then the result is parsed using
|
|
* {@link Integer#parseInt(String, int)}. Any Error will lead to an
|
|
* {@link InputMismatchException}.
|
|
*
|
|
* @param radix The radix to use.
|
|
* @param delete <code> true </code> if the String should be deleted
|
|
* from the input.
|
|
* @return Returns the int value of the String.
|
|
* @throws InputMismatchException if the next String is not an int.
|
|
*/
|
|
private int myNextInt (final int radix,
|
|
final boolean delete) throws InputMismatchException
|
|
{
|
|
int rc;
|
|
String tmp = myPrepareForNext (this.p, delete);
|
|
try
|
|
{
|
|
tmp = myApplyLocale (tmp, radix);
|
|
rc = Integer.parseInt (tmp, radix);
|
|
return rc;
|
|
}
|
|
catch (NumberFormatException nfe)
|
|
{
|
|
}
|
|
catch (ParseException e)
|
|
{
|
|
}
|
|
throw new InputMismatchException (ERR_PREFIX + tmp + NOT_INT);
|
|
}
|
|
|
|
/**
|
|
* Finds the next line using the {@link #NEW_LINE} constant which is
|
|
* set to the system specific line seperator.
|
|
*
|
|
* @param delete should the found line be deleted from the input.
|
|
* @return the current line.
|
|
*/
|
|
private String myNextLine (final boolean delete)
|
|
{
|
|
return myPrepareForNext (Pattern.compile (NEW_LINE), delete);
|
|
}
|
|
|
|
/**
|
|
* Tries to interpret the next String as a long value with the given
|
|
* radix. Therfore the {@link Long#parseLong(String, int)} is called
|
|
* and every Error will lead into a {@link InputMismatchException}.
|
|
*
|
|
* @param radix The radix to be used.
|
|
* @param delete Should the found String be deleted from the input.
|
|
* @return the long value of the next String.
|
|
* @throws InputMismatchException if the next String is not a long.
|
|
*/
|
|
private long myNextLong (final int radix,
|
|
final boolean delete) throws InputMismatchException
|
|
{
|
|
long rc;
|
|
String tmp = myPrepareForNext (this.p, delete);
|
|
|
|
try
|
|
{
|
|
tmp = myApplyLocale (tmp, radix);
|
|
rc = Long.parseLong (tmp, radix);
|
|
return rc;
|
|
}
|
|
catch (NumberFormatException nfe)
|
|
{
|
|
}
|
|
catch (ParseException e)
|
|
{
|
|
}
|
|
throw new InputMismatchException (ERR_PREFIX + tmp + NOT_LONG);
|
|
}
|
|
|
|
/**
|
|
* Tries to interpret the next String as a short value with the
|
|
* given radix. Therfore the {@link Short#parseShort(String, int)}
|
|
* is called and every Error will lead into a {@link
|
|
* InputMismatchException} .
|
|
*
|
|
* @param radix
|
|
* The radix to be used.
|
|
* @param delete
|
|
* Should the found String be deleted from the input.
|
|
* @return the long value of the next String.
|
|
* @throws InputMismatchException
|
|
* if the next String is not a short.
|
|
*/
|
|
private short myNextShort (final int radix,
|
|
final boolean delete) throws
|
|
InputMismatchException
|
|
{
|
|
short rc;
|
|
String tmp = myPrepareForNext (this.p, delete);
|
|
|
|
try
|
|
{
|
|
tmp = myApplyLocale (tmp, radix);
|
|
rc = Short.parseShort (tmp, radix);
|
|
return rc;
|
|
}
|
|
catch (NumberFormatException nfe)
|
|
{
|
|
}
|
|
catch (ParseException e)
|
|
{
|
|
}
|
|
throw new InputMismatchException (ERR_PREFIX + tmp +
|
|
"\" is not a short");
|
|
}
|
|
|
|
/**
|
|
* Sets the current pattern to the given pattern and calls the
|
|
* {@link #myCoreNext(boolean, Pattern)}. Finally sets the pattern
|
|
* back to its old value.
|
|
*
|
|
* @param aktPattern Pattern to be used for the next match.
|
|
* @param delete Should the found String be deleted or not.
|
|
* @return Return the String returned from {@link
|
|
* #myCoreNext(boolean, Pattern)}.
|
|
*/
|
|
private String myPrepareForNext (final Pattern aktPattern,
|
|
final boolean delete)
|
|
{
|
|
|
|
String rc;
|
|
Pattern oldPattern = this.p;
|
|
useDelimiter (aktPattern);
|
|
|
|
rc = myCoreNext (delete, aktPattern);
|
|
|
|
useDelimiter (oldPattern);
|
|
|
|
return rc;
|
|
}
|
|
|
|
/**
|
|
* Determinates if the last found can be used, so that after a
|
|
* hasNextXXX the nextXXX has not to search if nothing has
|
|
* changed.<br /> Used in {@link #myCoreNext(boolean, Pattern)}.
|
|
*
|
|
* @param aktP The pattern which should be checked.
|
|
* @return <code> true </code> if the searchresult is already ready.
|
|
*/
|
|
private boolean shallUseLastFound (final Pattern aktP)
|
|
{
|
|
if (this.lastFoundPresent &&
|
|
this.lastPatternHash == aktP.hashCode () &&
|
|
this.last_RegionStart == this.myMatcher.regionStart () &&
|
|
this.last_anchor == this.myMatcher.hasAnchoringBounds () &&
|
|
this.last_transparent == this.myMatcher.hasTransparentBounds ())
|
|
{
|
|
if (this.last_RegionEnd != this.myMatcher.regionEnd ())
|
|
{
|
|
int tmpVal =
|
|
this.myMatcher.regionEnd () -
|
|
this.last_RegionEnd - this.MAX_PREFIX;
|
|
if (tmpVal > 0 && tmpVal < 20)
|
|
{
|
|
this.last_RegionEnd =
|
|
this.myMatcher.regionEnd ();
|
|
return true;
|
|
}
|
|
}
|
|
else
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
}
|