summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorAndrew John Hughes <gnu_andrew@member.fsf.org>2010-06-03 19:11:10 +0000
committerAndrew John Hughes <gnu_andrew@member.fsf.org>2010-06-03 19:11:10 +0000
commita17284098845d59d84bbf76b33190a5a91c12a82 (patch)
treec634c40062604cd1cdefa535b838926c9ede1a38 /gnu
parent43b6a8d2580b5c9549a58db41a0239f3929e4b91 (diff)
downloadclasspath-a17284098845d59d84bbf76b33190a5a91c12a82.tar.gz
Normalise whitespace.
2010-06-03 Andrew John Hughes <ahughes@redhat.com> * examples/gnu/classpath/examples/CORBA/NamingService/Demo.java, * examples/gnu/classpath/examples/CORBA/SimpleCommunication/Demo.java, * examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/StructureToPass.java, * examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/StructureToReturn.java, * examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/TreeNode.java, * examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/WeThrowThisException.java, * examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/WeThrowThisExceptionHelper.java, * examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/_DemoTesterImplBase.java, * examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/_DemoTesterStub.java, * examples/gnu/classpath/examples/CORBA/swing/x5/CanvasWorld.java, * examples/gnu/classpath/examples/CORBA/swing/x5/ChatConstants.java, * examples/gnu/classpath/examples/CORBA/swing/x5/ClientFrame.java, * examples/gnu/classpath/examples/CORBA/swing/x5/Demo.java, * examples/gnu/classpath/examples/CORBA/swing/x5/GameManager.java, * examples/gnu/classpath/examples/CORBA/swing/x5/GameManagerImpl.java, * examples/gnu/classpath/examples/CORBA/swing/x5/IorReader.java, * examples/gnu/classpath/examples/CORBA/swing/x5/OrbStarter.java, * examples/gnu/classpath/examples/CORBA/swing/x5/Player.java, * examples/gnu/classpath/examples/CORBA/swing/x5/PlayerImpl.java, * examples/gnu/classpath/examples/CORBA/swing/x5/PlayingDesk.java, * examples/gnu/classpath/examples/CORBA/swing/x5/State.java, * examples/gnu/classpath/examples/CORBA/swing/x5/X5Server.java, * examples/gnu/classpath/examples/CORBA/swing/x5/_GameManagerImpl_Tie.java, * examples/gnu/classpath/examples/CORBA/swing/x5/_GameManager_Stub.java, * examples/gnu/classpath/examples/CORBA/swing/x5/_PlayerImpl_Tie.java, * examples/gnu/classpath/examples/CORBA/swing/x5/_Player_Stub.java, * examples/gnu/classpath/examples/awt/AicasGraphicsBenchmark.java, * examples/gnu/classpath/examples/awt/Demo.java, * examples/gnu/classpath/examples/awt/HintingDemo.java, * examples/gnu/classpath/examples/datatransfer/Demo.java, * examples/gnu/classpath/examples/html/Demo.java, * examples/gnu/classpath/examples/java2d/J2dBenchmark.java, * examples/gnu/classpath/examples/java2d/J2dBenchmarkGUI.java, * examples/gnu/classpath/examples/java2d/JNIOverhead.java, * examples/gnu/classpath/examples/jawt/DemoJAWT.java, * examples/gnu/classpath/examples/management/TestClassLoading.java, * examples/gnu/classpath/examples/management/TestCompilation.java, * examples/gnu/classpath/examples/management/TestGarbageCollector.java, * examples/gnu/classpath/examples/management/TestMemory.java, * examples/gnu/classpath/examples/management/TestMemoryManager.java, * examples/gnu/classpath/examples/management/TestMemoryPool.java, * examples/gnu/classpath/examples/management/TestThread.java, * examples/gnu/classpath/examples/midi/Demo.java, * examples/gnu/classpath/examples/print/Demo.java, * examples/gnu/classpath/examples/sound/AudioPlayerSample.java, * examples/gnu/classpath/examples/swing/BrowserEditorKit.java, * examples/gnu/classpath/examples/swing/ButtonDemo.java, * examples/gnu/classpath/examples/swing/ComboBoxDemo.java, * examples/gnu/classpath/examples/swing/Demo.java, * examples/gnu/classpath/examples/swing/DemoFactory.java, * examples/gnu/classpath/examples/swing/DocumentFilterDemo.java, * examples/gnu/classpath/examples/swing/FileChooserDemo.java, * examples/gnu/classpath/examples/swing/HtmlDemo.java, * examples/gnu/classpath/examples/swing/ListDemo.java, * examples/gnu/classpath/examples/swing/MetalThemeEditor.java, * examples/gnu/classpath/examples/swing/NavigationFilterDemo.java, * examples/gnu/classpath/examples/swing/ScrollBarDemo.java, * examples/gnu/classpath/examples/swing/SliderDemo.java, * examples/gnu/classpath/examples/swing/SpinnerDemo.java, * examples/gnu/classpath/examples/swing/TabbedPaneDemo.java, * examples/gnu/classpath/examples/swing/TableDemo.java, * examples/gnu/classpath/examples/swing/TextAreaDemo.java, * examples/gnu/classpath/examples/swing/TextFieldDemo.java, * examples/gnu/classpath/examples/swing/TreeDemo.java, * gnu/CORBA/BigDecimalHelper.java, * gnu/CORBA/CDR/AbstractCdrInput.java, * gnu/CORBA/CDR/AbstractCdrOutput.java, * gnu/CORBA/CDR/AbstractDataInput.java, * gnu/CORBA/CDR/AbstractDataOutput.java, * gnu/CORBA/CDR/AligningInput.java, * gnu/CORBA/CDR/AligningOutput.java, * gnu/CORBA/CDR/ArrayValueHelper.java, * gnu/CORBA/CDR/BigEndianInputStream.java, * gnu/CORBA/CDR/BigEndianOutputStream.java, * gnu/CORBA/CDR/BufferedCdrOutput.java, * gnu/CORBA/CDR/BufferredCdrInput.java, * gnu/CORBA/CDR/HeadlessInput.java, * gnu/CORBA/CDR/IDLTypeHelper.java, * gnu/CORBA/CDR/LittleEndianOutputStream.java, * gnu/CORBA/CDR/UnknownExceptionCtxHandler.java, * gnu/CORBA/CDR/VMVio.java, * gnu/CORBA/CDR/Vio.java, * gnu/CORBA/CDR/gnuRuntime.java, * gnu/CORBA/CDR/gnuValueStream.java, * gnu/CORBA/CdrEncapsCodecImpl.java, * gnu/CORBA/CollocatedOrbs.java, * gnu/CORBA/Connected_objects.java, * gnu/CORBA/DefaultSocketFactory.java, * gnu/CORBA/DuplicateNameHolder.java, * gnu/CORBA/DynAn/AbstractAny.java, * gnu/CORBA/DynAn/DivideableAny.java, * gnu/CORBA/DynAn/NameValuePairHolder.java, * gnu/CORBA/DynAn/RecordAny.java, * gnu/CORBA/DynAn/ValueChangeListener.java, * gnu/CORBA/DynAn/gnuDynAny.java, * gnu/CORBA/DynAn/gnuDynAnyFactory.java, * gnu/CORBA/DynAn/gnuDynArray.java, * gnu/CORBA/DynAn/gnuDynEnum.java, * gnu/CORBA/DynAn/gnuDynFixed.java, * gnu/CORBA/DynAn/gnuDynSequence.java, * gnu/CORBA/DynAn/gnuDynUnion.java, * gnu/CORBA/DynAn/gnuDynValue.java, * gnu/CORBA/DynAn/gnuDynValueBox.java, * gnu/CORBA/DynAnySeqHolder.java, * gnu/CORBA/EmptyExceptionHolder.java, * gnu/CORBA/ForwardRequestHelper.java, * gnu/CORBA/GIOP/CharSets_OSF.java, * gnu/CORBA/GIOP/CloseMessage.java, * gnu/CORBA/GIOP/ErrorMessage.java, * gnu/CORBA/GIOP/MessageHeader.java, * gnu/CORBA/GIOP/ServiceContext.java, * gnu/CORBA/GIOP/v1_2/RequestHeader.java, * gnu/CORBA/GeneralHolder.java, * gnu/CORBA/IOR.java, * gnu/CORBA/Interceptor/ClientRequestInterceptors.java, * gnu/CORBA/Interceptor/ForwardRequestHolder.java, * gnu/CORBA/Interceptor/IORInterceptors.java, * gnu/CORBA/Interceptor/Registrator.java, * gnu/CORBA/Interceptor/ServerRequestInterceptors.java, * gnu/CORBA/Interceptor/gnuClientRequestInfo.java, * gnu/CORBA/Interceptor/gnuIcCurrent.java, * gnu/CORBA/Interceptor/gnuIorInfo.java, * gnu/CORBA/Interceptor/gnuServerRequestInfo.java, * gnu/CORBA/IorDelegate.java, * gnu/CORBA/IorObject.java, * gnu/CORBA/Minor.java, * gnu/CORBA/NameDynAnyPairHolder.java, * gnu/CORBA/NameDynAnyPairSeqHolder.java, * gnu/CORBA/NameValuePairHolder.java, * gnu/CORBA/NameValuePairSeqHolder.java, * gnu/CORBA/NamingService/NameParser.java, * gnu/CORBA/NamingService/NamingMap.java, * gnu/CORBA/NamingService/NamingServiceTransient.java, * gnu/CORBA/NamingService/TransientContext.java, * gnu/CORBA/ObjectCreator.java, * gnu/CORBA/OrbFocused.java, * gnu/CORBA/OrbFunctional.java, * gnu/CORBA/OrbRestricted.java, * gnu/CORBA/Poa/AOM.java, * gnu/CORBA/Poa/AccessiblePolicy.java, * gnu/CORBA/Poa/DynamicImpHandler.java, * gnu/CORBA/Poa/ForwardRequestHolder.java, * gnu/CORBA/Poa/ForwardedServant.java, * gnu/CORBA/Poa/InvalidPolicyHolder.java, * gnu/CORBA/Poa/LocalDelegate.java, * gnu/CORBA/Poa/LocalRequest.java, * gnu/CORBA/Poa/LocalServerRequest.java, * gnu/CORBA/Poa/ORB_1_4.java, * gnu/CORBA/Poa/ServantDelegateImpl.java, * gnu/CORBA/Poa/StandardPolicies.java, * gnu/CORBA/Poa/gnuAdapterActivator.java, * gnu/CORBA/Poa/gnuForwardRequest.java, * gnu/CORBA/Poa/gnuIdAssignmentPolicy.java, * gnu/CORBA/Poa/gnuIdUniquenessPolicy.java, * gnu/CORBA/Poa/gnuImplicitActivationPolicy.java, * gnu/CORBA/Poa/gnuLifespanPolicy.java, * gnu/CORBA/Poa/gnuPOA.java, * gnu/CORBA/Poa/gnuPOAManager.java, * gnu/CORBA/Poa/gnuPoaCurrent.java, * gnu/CORBA/Poa/gnuRequestProcessingPolicy.java, * gnu/CORBA/Poa/gnuServantObject.java, * gnu/CORBA/Poa/gnuServantRetentionPolicy.java, * gnu/CORBA/Poa/gnuThreadPolicy.java, * gnu/CORBA/ServiceRequestAdapter.java, * gnu/CORBA/SetOverrideTypeHolder.java, * gnu/CORBA/SimpleDelegate.java, * gnu/CORBA/SocketRepository.java, * gnu/CORBA/StreamHolder.java, * gnu/CORBA/TypeCodeHelper.java, * gnu/CORBA/TypeKindNamer.java, * gnu/CORBA/Version.java, * gnu/CORBA/_PolicyImplBase.java, * gnu/CORBA/gnuAny.java, * gnu/CORBA/gnuCodecFactory.java, * gnu/CORBA/gnuEnvironment.java, * gnu/CORBA/gnuRequest.java, * gnu/CORBA/gnuValueHolder.java, * gnu/CORBA/interfaces/SocketFactory.java, * gnu/CORBA/typecodes/AliasTypeCode.java, * gnu/CORBA/typecodes/ArrayTypeCode.java, * gnu/CORBA/typecodes/FixedTypeCode.java, * gnu/CORBA/typecodes/GeneralTypeCode.java, * gnu/CORBA/typecodes/PrimitiveTypeCode.java, * gnu/CORBA/typecodes/RecordTypeCode.java, * gnu/CORBA/typecodes/RecursiveTypeCode.java, * gnu/CORBA/typecodes/StringTypeCode.java, * gnu/classpath/Pair.java, * gnu/classpath/Pointer.java, * gnu/classpath/Pointer32.java, * gnu/classpath/Pointer64.java, * gnu/classpath/ServiceFactory.java, * gnu/classpath/ServiceProviderLoadingAction.java, * gnu/classpath/SystemProperties.java, * gnu/classpath/debug/Component.java, * gnu/classpath/debug/PreciseFilter.java, * gnu/classpath/debug/SystemLogger.java, * gnu/classpath/debug/TeeInputStream.java, * gnu/classpath/debug/TeeReader.java, * gnu/classpath/jdwp/Jdwp.java, * gnu/classpath/jdwp/JdwpConstants.java, * gnu/classpath/jdwp/event/BreakpointEvent.java, * gnu/classpath/jdwp/event/ClassPrepareEvent.java, * gnu/classpath/jdwp/event/ClassUnloadEvent.java, * gnu/classpath/jdwp/event/Event.java, * gnu/classpath/jdwp/event/EventManager.java, * gnu/classpath/jdwp/event/EventRequest.java, * gnu/classpath/jdwp/event/ExceptionEvent.java, * gnu/classpath/jdwp/event/MethodEntryEvent.java, * gnu/classpath/jdwp/event/MethodExitEvent.java, * gnu/classpath/jdwp/event/SingleStepEvent.java, * gnu/classpath/jdwp/event/ThreadEndEvent.java, * gnu/classpath/jdwp/event/VmDeathEvent.java, * gnu/classpath/jdwp/event/VmInitEvent.java, * gnu/classpath/jdwp/event/filters/ClassExcludeFilter.java, * gnu/classpath/jdwp/event/filters/ClassMatchFilter.java, * gnu/classpath/jdwp/event/filters/ClassOnlyFilter.java, * gnu/classpath/jdwp/event/filters/ExceptionOnlyFilter.java, * gnu/classpath/jdwp/event/filters/FieldOnlyFilter.java, * gnu/classpath/jdwp/event/filters/InstanceOnlyFilter.java, * gnu/classpath/jdwp/event/filters/StepFilter.java, * gnu/classpath/jdwp/event/filters/ThreadOnlyFilter.java, * gnu/classpath/jdwp/exception/InvalidClassException.java, * gnu/classpath/jdwp/exception/InvalidClassLoaderException.java, * gnu/classpath/jdwp/exception/InvalidEventTypeException.java, * gnu/classpath/jdwp/exception/InvalidFieldException.java, * gnu/classpath/jdwp/exception/InvalidFrameException.java, * gnu/classpath/jdwp/exception/InvalidLocationException.java, * gnu/classpath/jdwp/exception/InvalidMethodException.java, * gnu/classpath/jdwp/exception/InvalidObjectException.java, * gnu/classpath/jdwp/exception/InvalidSlotException.java, * gnu/classpath/jdwp/exception/InvalidStringException.java, * gnu/classpath/jdwp/exception/InvalidThreadException.java, * gnu/classpath/jdwp/exception/InvalidThreadGroupException.java, * gnu/classpath/jdwp/exception/NativeMethodException.java, * gnu/classpath/jdwp/exception/NotImplementedException.java, * gnu/classpath/jdwp/id/JdwpId.java, * gnu/classpath/jdwp/id/NullObjectId.java, * gnu/classpath/jdwp/processor/ArrayReferenceCommandSet.java, * gnu/classpath/jdwp/processor/ArrayTypeCommandSet.java, * gnu/classpath/jdwp/processor/ClassLoaderReferenceCommandSet.java, * gnu/classpath/jdwp/processor/ClassObjectReferenceCommandSet.java, * gnu/classpath/jdwp/processor/ClassTypeCommandSet.java, * gnu/classpath/jdwp/processor/CommandSet.java, * gnu/classpath/jdwp/processor/EventRequestCommandSet.java, * gnu/classpath/jdwp/processor/FieldCommandSet.java, * gnu/classpath/jdwp/processor/InterfaceTypeCommandSet.java, * gnu/classpath/jdwp/processor/MethodCommandSet.java, * gnu/classpath/jdwp/processor/ObjectReferenceCommandSet.java, * gnu/classpath/jdwp/processor/PacketProcessor.java, * gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java, * gnu/classpath/jdwp/processor/StackFrameCommandSet.java, * gnu/classpath/jdwp/processor/StringReferenceCommandSet.java, * gnu/classpath/jdwp/processor/ThreadGroupReferenceCommandSet.java, * gnu/classpath/jdwp/processor/ThreadReferenceCommandSet.java, * gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java, * gnu/classpath/jdwp/transport/JdwpCommandPacket.java, * gnu/classpath/jdwp/transport/JdwpConnection.java, * gnu/classpath/jdwp/transport/JdwpPacket.java, * gnu/classpath/jdwp/transport/JdwpReplyPacket.java, * gnu/classpath/jdwp/transport/SocketTransport.java, * gnu/classpath/jdwp/transport/TransportFactory.java, * gnu/classpath/jdwp/util/JdwpString.java, * gnu/classpath/jdwp/util/LineTable.java, * gnu/classpath/jdwp/util/Location.java, * gnu/classpath/jdwp/util/MethodResult.java, * gnu/classpath/jdwp/util/MonitorInfo.java, * gnu/classpath/jdwp/util/Signature.java, * gnu/classpath/jdwp/util/VariableTable.java, * gnu/classpath/jdwp/value/ArrayValue.java, * gnu/classpath/jdwp/value/BooleanValue.java, * gnu/classpath/jdwp/value/ByteValue.java, * gnu/classpath/jdwp/value/CharValue.java, * gnu/classpath/jdwp/value/DoubleValue.java, * gnu/classpath/jdwp/value/FloatValue.java, * gnu/classpath/jdwp/value/IntValue.java, * gnu/classpath/jdwp/value/LongValue.java, * gnu/classpath/jdwp/value/ObjectValue.java, * gnu/classpath/jdwp/value/ShortValue.java, * gnu/classpath/jdwp/value/StringValue.java, * gnu/classpath/jdwp/value/Value.java, * gnu/classpath/jdwp/value/ValueFactory.java, * gnu/classpath/jdwp/value/VoidValue.java, * gnu/classpath/toolkit/DefaultDaemonThreadFactory.java, * gnu/java/awt/AWTUtilities.java, * gnu/java/awt/BitMaskExtent.java, * gnu/java/awt/BitwiseXORComposite.java, * gnu/java/awt/Buffers.java, * gnu/java/awt/ClasspathGraphicsEnvironment.java, * gnu/java/awt/ClasspathToolkit.java, * gnu/java/awt/ComponentDataBlitOp.java, * gnu/java/awt/EmbeddedWindow.java, * gnu/java/awt/GradientPaintContext.java, * gnu/java/awt/color/CieXyzConverter.java, * gnu/java/awt/color/ClutProfileConverter.java, * gnu/java/awt/color/ColorLookUpTable.java, * gnu/java/awt/color/GrayProfileConverter.java, * gnu/java/awt/color/GrayScaleConverter.java, * gnu/java/awt/color/LinearRGBConverter.java, * gnu/java/awt/color/ProfileHeader.java, * gnu/java/awt/color/RgbProfileConverter.java, * gnu/java/awt/color/SrgbConverter.java, * gnu/java/awt/color/ToneReproductionCurve.java, * gnu/java/awt/dnd/GtkMouseDragGestureRecognizer.java, * gnu/java/awt/dnd/peer/gtk/GtkDragSourceContextPeer.java, * gnu/java/awt/dnd/peer/gtk/GtkDropTargetContextPeer.java, * gnu/java/awt/dnd/peer/gtk/GtkDropTargetPeer.java, * gnu/java/awt/font/FontDelegate.java, * gnu/java/awt/font/FontFactory.java, * gnu/java/awt/font/GNUGlyphVector.java, * gnu/java/awt/font/OpenTypeFontPeer.java, * gnu/java/awt/font/autofit/GlyphHints.java, * gnu/java/awt/font/autofit/Latin.java, * gnu/java/awt/font/autofit/Utils.java, * gnu/java/awt/font/opentype/CharGlyphMap.java, * gnu/java/awt/font/opentype/GlyphNamer.java, * gnu/java/awt/font/opentype/MacResourceFork.java, * gnu/java/awt/font/opentype/NameDecoder.java, * gnu/java/awt/font/opentype/OpenTypeFont.java, * gnu/java/awt/font/opentype/OpenTypeFontFactory.java, * gnu/java/awt/font/opentype/truetype/GlyphLoader.java, * gnu/java/awt/font/opentype/truetype/GlyphLocator.java, * gnu/java/awt/font/opentype/truetype/GlyphMeasurer.java, * gnu/java/awt/font/opentype/truetype/Point.java, * gnu/java/awt/font/opentype/truetype/TrueTypeScaler.java, * gnu/java/awt/font/opentype/truetype/VirtualMachine.java, * gnu/java/awt/font/opentype/truetype/Zone.java, * gnu/java/awt/font/opentype/truetype/ZonePathIterator.java, * gnu/java/awt/image/AsyncImage.java, * gnu/java/awt/image/ImageConverter.java, * gnu/java/awt/image/ImageDecoder.java, * gnu/java/awt/image/XBMDecoder.java, * gnu/java/awt/java2d/AbstractGraphics2D.java, * gnu/java/awt/java2d/AlphaCompositeContext.java, * gnu/java/awt/java2d/CubicSegment.java, * gnu/java/awt/java2d/LineSegment.java, * gnu/java/awt/java2d/PixelCoverage.java, * gnu/java/awt/java2d/QuadSegment.java, * gnu/java/awt/java2d/RasterGraphics.java, * gnu/java/awt/java2d/ScanlineConverter.java, * gnu/java/awt/java2d/ScanlineCoverage.java, * gnu/java/awt/java2d/Segment.java, * gnu/java/awt/java2d/TexturePaintContext.java, * gnu/java/awt/peer/ClasspathDesktopPeer.java, * gnu/java/awt/peer/ClasspathFontPeer.java, * gnu/java/awt/peer/GLightweightPeer.java, * gnu/java/awt/peer/GnomeDesktopPeer.java, * gnu/java/awt/peer/KDEDesktopPeer.java, * gnu/java/awt/peer/gtk/AsyncImage.java, * gnu/java/awt/peer/gtk/BufferedImageGraphics.java, * gnu/java/awt/peer/gtk/CairoGraphics2D.java, * gnu/java/awt/peer/gtk/CairoSurface.java, * gnu/java/awt/peer/gtk/CairoSurfaceGraphics.java, * gnu/java/awt/peer/gtk/ComponentGraphics.java, * gnu/java/awt/peer/gtk/ComponentGraphicsCopy.java, * gnu/java/awt/peer/gtk/FreetypeGlyphVector.java, * gnu/java/awt/peer/gtk/GdkFontPeer.java, * gnu/java/awt/peer/gtk/GdkGraphicsConfiguration.java, * gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java, * gnu/java/awt/peer/gtk/GdkPixbufDecoder.java, * gnu/java/awt/peer/gtk/GdkRobotPeer.java, * gnu/java/awt/peer/gtk/GdkScreenGraphicsDevice.java, * gnu/java/awt/peer/gtk/GtkButtonPeer.java, * gnu/java/awt/peer/gtk/GtkCheckboxPeer.java, * gnu/java/awt/peer/gtk/GtkChoicePeer.java, * gnu/java/awt/peer/gtk/GtkClipboard.java, * gnu/java/awt/peer/gtk/GtkComponentPeer.java, * gnu/java/awt/peer/gtk/GtkContainerPeer.java, * gnu/java/awt/peer/gtk/GtkCursor.java, * gnu/java/awt/peer/gtk/GtkDialogPeer.java, * gnu/java/awt/peer/gtk/GtkFileDialogPeer.java, * gnu/java/awt/peer/gtk/GtkFramePeer.java, * gnu/java/awt/peer/gtk/GtkGenericPeer.java, * gnu/java/awt/peer/gtk/GtkImage.java, * gnu/java/awt/peer/gtk/GtkImageConsumer.java, * gnu/java/awt/peer/gtk/GtkLabelPeer.java, * gnu/java/awt/peer/gtk/GtkListPeer.java, * gnu/java/awt/peer/gtk/GtkMenuComponentPeer.java, * gnu/java/awt/peer/gtk/GtkMenuPeer.java, * gnu/java/awt/peer/gtk/GtkMouseInfoPeer.java, * gnu/java/awt/peer/gtk/GtkPanelPeer.java, * gnu/java/awt/peer/gtk/GtkPopupMenuPeer.java, * gnu/java/awt/peer/gtk/GtkScrollbarPeer.java, * gnu/java/awt/peer/gtk/GtkSelection.java, * gnu/java/awt/peer/gtk/GtkToolkit.java, * gnu/java/awt/peer/gtk/GtkVolatileImage.java, * gnu/java/awt/peer/gtk/GtkWindowPeer.java, * gnu/java/awt/peer/gtk/VolatileImageGraphics.java, * gnu/java/awt/peer/headless/HeadlessGraphicsEnvironment.java, * gnu/java/awt/peer/qt/MainQtThread.java, * gnu/java/awt/peer/qt/QMatrix.java, * gnu/java/awt/peer/qt/QPainterPath.java, * gnu/java/awt/peer/qt/QPen.java, * gnu/java/awt/peer/qt/QtAudioClip.java, * gnu/java/awt/peer/qt/QtButtonPeer.java, * gnu/java/awt/peer/qt/QtCheckboxPeer.java, * gnu/java/awt/peer/qt/QtChoicePeer.java, * gnu/java/awt/peer/qt/QtComponentGraphics.java, * gnu/java/awt/peer/qt/QtComponentPeer.java, * gnu/java/awt/peer/qt/QtContainerPeer.java, * gnu/java/awt/peer/qt/QtDialogPeer.java, * gnu/java/awt/peer/qt/QtEmbeddedWindowPeer.java, * gnu/java/awt/peer/qt/QtFileDialogPeer.java, * gnu/java/awt/peer/qt/QtFontMetrics.java, * gnu/java/awt/peer/qt/QtFontPeer.java, * gnu/java/awt/peer/qt/QtFramePeer.java, * gnu/java/awt/peer/qt/QtGraphics.java, * gnu/java/awt/peer/qt/QtGraphicsEnvironment.java, * gnu/java/awt/peer/qt/QtImage.java, * gnu/java/awt/peer/qt/QtImageConsumer.java, * gnu/java/awt/peer/qt/QtImageDirectGraphics.java, * gnu/java/awt/peer/qt/QtImageGraphics.java, * gnu/java/awt/peer/qt/QtLabelPeer.java, * gnu/java/awt/peer/qt/QtListPeer.java, * gnu/java/awt/peer/qt/QtMenuBarPeer.java, * gnu/java/awt/peer/qt/QtMenuComponentPeer.java, * gnu/java/awt/peer/qt/QtMenuItemPeer.java, * gnu/java/awt/peer/qt/QtMenuPeer.java, * gnu/java/awt/peer/qt/QtPanelPeer.java, * gnu/java/awt/peer/qt/QtPopupMenuPeer.java, * gnu/java/awt/peer/qt/QtRepaintThread.java, * gnu/java/awt/peer/qt/QtScreenDevice.java, * gnu/java/awt/peer/qt/QtScreenDeviceConfiguration.java, * gnu/java/awt/peer/qt/QtScrollPanePeer.java, * gnu/java/awt/peer/qt/QtScrollbarPeer.java, * gnu/java/awt/peer/qt/QtTextAreaPeer.java, * gnu/java/awt/peer/qt/QtTextFieldPeer.java, * gnu/java/awt/peer/qt/QtToolkit.java, * gnu/java/awt/peer/qt/QtVolatileImage.java, * gnu/java/awt/peer/qt/QtWindowPeer.java, * gnu/java/awt/peer/swing/SwingButtonPeer.java, * gnu/java/awt/peer/swing/SwingCheckboxPeer.java, * gnu/java/awt/peer/swing/SwingComponent.java, * gnu/java/awt/peer/swing/SwingComponentPeer.java, * gnu/java/awt/peer/swing/SwingContainerPeer.java, * gnu/java/awt/peer/swing/SwingLabelPeer.java, * gnu/java/awt/peer/swing/SwingListPeer.java, * gnu/java/awt/peer/swing/SwingMenuItemPeer.java, * gnu/java/awt/peer/swing/SwingMenuPeer.java, * gnu/java/awt/peer/swing/SwingTextAreaPeer.java, * gnu/java/awt/peer/swing/SwingTextFieldPeer.java, * gnu/java/awt/peer/x/GLGraphics.java, * gnu/java/awt/peer/x/KeyboardMapping.java, * gnu/java/awt/peer/x/XEventPump.java, * gnu/java/awt/peer/x/XFontPeer.java, * gnu/java/awt/peer/x/XFramePeer.java, * gnu/java/awt/peer/x/XGraphics2D.java, * gnu/java/awt/peer/x/XGraphicsConfiguration.java, * gnu/java/awt/peer/x/XGraphicsDevice.java, * gnu/java/awt/peer/x/XGraphicsEnvironment.java, * gnu/java/awt/peer/x/XImage.java, * gnu/java/awt/peer/x/XToolkit.java, * gnu/java/awt/peer/x/XWindowPeer.java, * gnu/java/awt/print/JavaPrinterGraphics.java, * gnu/java/awt/print/JavaPrinterJob.java, * gnu/java/awt/print/PostScriptGraphics2D.java, * gnu/java/awt/print/SpooledDocument.java, * gnu/java/beans/BeanInfoEmbryo.java, * gnu/java/beans/DefaultExceptionListener.java, * gnu/java/beans/ExplicitBeanInfo.java, * gnu/java/beans/IntrospectionIncubator.java, * gnu/java/beans/decoder/AbstractContext.java, * gnu/java/beans/decoder/AbstractCreatableObjectContext.java, * gnu/java/beans/decoder/AbstractElementHandler.java, * gnu/java/beans/decoder/AbstractObjectContext.java, * gnu/java/beans/decoder/ArrayContext.java, * gnu/java/beans/decoder/ArrayHandler.java, * gnu/java/beans/decoder/AssemblyException.java, * gnu/java/beans/decoder/BooleanHandler.java, * gnu/java/beans/decoder/ByteHandler.java, * gnu/java/beans/decoder/CharHandler.java, * gnu/java/beans/decoder/ClassHandler.java, * gnu/java/beans/decoder/ConstructorContext.java, * gnu/java/beans/decoder/Context.java, * gnu/java/beans/decoder/DecoderContext.java, * gnu/java/beans/decoder/DoubleHandler.java, * gnu/java/beans/decoder/DummyContext.java, * gnu/java/beans/decoder/DummyHandler.java, * gnu/java/beans/decoder/ElementHandler.java, * gnu/java/beans/decoder/FloatHandler.java, * gnu/java/beans/decoder/GrowableArrayContext.java, * gnu/java/beans/decoder/IndexContext.java, * gnu/java/beans/decoder/IntHandler.java, * gnu/java/beans/decoder/JavaHandler.java, * gnu/java/beans/decoder/LongHandler.java, * gnu/java/beans/decoder/MethodContext.java, * gnu/java/beans/decoder/MethodFinder.java, * gnu/java/beans/decoder/NullHandler.java, * gnu/java/beans/decoder/ObjectContext.java, * gnu/java/beans/decoder/ObjectHandler.java, * gnu/java/beans/decoder/PersistenceParser.java, * gnu/java/beans/decoder/PropertyContext.java, * gnu/java/beans/decoder/ShortHandler.java, * gnu/java/beans/decoder/SimpleHandler.java, * gnu/java/beans/decoder/StaticMethodContext.java, * gnu/java/beans/decoder/StringHandler.java, * gnu/java/beans/decoder/VoidHandler.java, * gnu/java/beans/editors/ColorEditor.java, * gnu/java/beans/editors/FontEditor.java, * gnu/java/beans/editors/NativeBooleanEditor.java, * gnu/java/beans/editors/NativeByteEditor.java, * gnu/java/beans/editors/NativeDoubleEditor.java, * gnu/java/beans/editors/NativeFloatEditor.java, * gnu/java/beans/editors/NativeIntEditor.java, * gnu/java/beans/editors/NativeLongEditor.java, * gnu/java/beans/editors/NativeShortEditor.java, * gnu/java/beans/editors/StringEditor.java, * gnu/java/beans/encoder/ArrayPersistenceDelegate.java, * gnu/java/beans/encoder/ClassPersistenceDelegate.java, * gnu/java/beans/encoder/CollectionPersistenceDelegate.java, * gnu/java/beans/encoder/Context.java, * gnu/java/beans/encoder/GenericScannerState.java, * gnu/java/beans/encoder/IgnoringScannerState.java, * gnu/java/beans/encoder/MapPersistenceDelegate.java, * gnu/java/beans/encoder/ObjectId.java, * gnu/java/beans/encoder/PrimitivePersistenceDelegate.java, * gnu/java/beans/encoder/ReportingScannerState.java, * gnu/java/beans/encoder/Root.java, * gnu/java/beans/encoder/ScanEngine.java, * gnu/java/beans/encoder/ScannerState.java, * gnu/java/beans/encoder/StAXWriter.java, * gnu/java/beans/encoder/Writer.java, * gnu/java/beans/encoder/elements/ArrayInstantiation.java, * gnu/java/beans/encoder/elements/Array_Get.java, * gnu/java/beans/encoder/elements/ClassResolution.java, * gnu/java/beans/encoder/elements/Element.java, * gnu/java/beans/encoder/elements/List_Get.java, * gnu/java/beans/encoder/elements/List_Set.java, * gnu/java/beans/encoder/elements/MethodInvocation.java, * gnu/java/beans/encoder/elements/NullObject.java, * gnu/java/beans/encoder/elements/ObjectInstantiation.java, * gnu/java/beans/encoder/elements/ObjectReference.java, * gnu/java/beans/encoder/elements/PrimitiveInstantiation.java, * gnu/java/beans/encoder/elements/StaticFieldAccess.java, * gnu/java/beans/encoder/elements/StaticMethodInvocation.java, * gnu/java/beans/encoder/elements/StringReference.java, * gnu/java/io/ASN1ParsingException.java, * gnu/java/io/Base64InputStream.java, * gnu/java/io/ClassLoaderObjectInputStream.java, * gnu/java/io/NullOutputStream.java, * gnu/java/io/ObjectIdentityMap2Int.java, * gnu/java/io/ObjectIdentityWrapper.java, * gnu/java/io/PlatformHelper.java, * gnu/java/lang/CPStringBuilder.java, * gnu/java/lang/CharData.java, * gnu/java/lang/InstrumentationImpl.java, * gnu/java/lang/MainThread.java, * gnu/java/lang/management/BeanImpl.java, * gnu/java/lang/management/ClassLoadingMXBeanImpl.java, * gnu/java/lang/management/CompilationMXBeanImpl.java, * gnu/java/lang/management/GarbageCollectorMXBeanImpl.java, * gnu/java/lang/management/MemoryMXBeanImpl.java, * gnu/java/lang/management/MemoryManagerMXBeanImpl.java, * gnu/java/lang/management/MemoryPoolMXBeanImpl.java, * gnu/java/lang/management/OperatingSystemMXBeanImpl.java, * gnu/java/lang/management/RuntimeMXBeanImpl.java, * gnu/java/lang/management/ThreadMXBeanImpl.java, * gnu/java/lang/reflect/TypeSignature.java, * gnu/java/locale/LocaleHelper.java, * gnu/java/math/Fixed.java, * gnu/java/math/GMP.java, * gnu/java/math/MPN.java, * gnu/java/net/CRLFInputStream.java, * gnu/java/net/CRLFOutputStream.java, * gnu/java/net/DefaultContentHandlerFactory.java, * gnu/java/net/DefaultProxySelector.java, * gnu/java/net/EmptyX509TrustManager.java, * gnu/java/net/GetLocalHostAction.java, * gnu/java/net/HeaderFieldHelper.java, * gnu/java/net/IndexListParser.java, * gnu/java/net/LineInputStream.java, * gnu/java/net/PlainDatagramSocketImpl.java, * gnu/java/net/PlainSocketImpl.java, * gnu/java/net/loader/FileResource.java, * gnu/java/net/loader/FileURLLoader.java, * gnu/java/net/loader/JarURLLoader.java, * gnu/java/net/loader/JarURLResource.java, * gnu/java/net/loader/RemoteResource.java, * gnu/java/net/loader/RemoteURLLoader.java, * gnu/java/net/loader/Resource.java, * gnu/java/net/loader/URLLoader.java, * gnu/java/net/protocol/file/Connection.java, * gnu/java/net/protocol/file/Handler.java, * gnu/java/net/protocol/ftp/ActiveModeDTP.java, * gnu/java/net/protocol/ftp/BlockInputStream.java, * gnu/java/net/protocol/ftp/BlockOutputStream.java, * gnu/java/net/protocol/ftp/CompressedInputStream.java, * gnu/java/net/protocol/ftp/CompressedOutputStream.java, * gnu/java/net/protocol/ftp/DTP.java, * gnu/java/net/protocol/ftp/DTPInputStream.java, * gnu/java/net/protocol/ftp/DTPOutputStream.java, * gnu/java/net/protocol/ftp/FTPConnection.java, * gnu/java/net/protocol/ftp/FTPException.java, * gnu/java/net/protocol/ftp/FTPResponse.java, * gnu/java/net/protocol/ftp/FTPURLConnection.java, * gnu/java/net/protocol/ftp/Handler.java, * gnu/java/net/protocol/ftp/PassiveModeDTP.java, * gnu/java/net/protocol/ftp/StreamInputStream.java, * gnu/java/net/protocol/ftp/StreamOutputStream.java, * gnu/java/net/protocol/http/Authenticator.java, * gnu/java/net/protocol/http/ByteArrayRequestBodyWriter.java, * gnu/java/net/protocol/http/ChunkedInputStream.java, * gnu/java/net/protocol/http/Cookie.java, * gnu/java/net/protocol/http/CookieManager.java, * gnu/java/net/protocol/http/Credentials.java, * gnu/java/net/protocol/http/HTTPConnection.java, * gnu/java/net/protocol/http/HTTPDateFormat.java, * gnu/java/net/protocol/http/HTTPURLConnection.java, * gnu/java/net/protocol/http/Handler.java, * gnu/java/net/protocol/http/Headers.java, * gnu/java/net/protocol/http/Request.java, * gnu/java/net/protocol/http/RequestBodyWriter.java, * gnu/java/net/protocol/http/Response.java, * gnu/java/net/protocol/http/ResponseHeaderHandler.java, * gnu/java/net/protocol/http/SimpleCookieManager.java, * gnu/java/net/protocol/https/Handler.java, * gnu/java/net/protocol/jar/Connection.java, * gnu/java/net/protocol/jar/Handler.java, * gnu/java/nio/ChannelInputStream.java, * gnu/java/nio/ChannelOutputStream.java, * gnu/java/nio/ChannelReader.java, * gnu/java/nio/ChannelWriter.java, * gnu/java/nio/DatagramChannelImpl.java, * gnu/java/nio/DatagramChannelSelectionKey.java, * gnu/java/nio/EpollSelectionKeyImpl.java, * gnu/java/nio/EpollSelectorImpl.java, * gnu/java/nio/FileChannelImpl.java, * gnu/java/nio/FileLockImpl.java, * gnu/java/nio/InputStreamChannel.java, * gnu/java/nio/KqueueSelectionKeyImpl.java, * gnu/java/nio/KqueueSelectorImpl.java, * gnu/java/nio/NIODatagramSocket.java, * gnu/java/nio/NIOServerSocket.java, * gnu/java/nio/NIOSocket.java, * gnu/java/nio/NIOSocketImpl.java, * gnu/java/nio/OutputStreamChannel.java, * gnu/java/nio/PipeImpl.java, * gnu/java/nio/SelectionKeyImpl.java, * gnu/java/nio/SelectorImpl.java, * gnu/java/nio/SelectorProviderImpl.java, * gnu/java/nio/ServerSocketChannelImpl.java, * gnu/java/nio/ServerSocketChannelSelectionKey.java, * gnu/java/nio/SocketChannelImpl.java, * gnu/java/nio/SocketChannelSelectionKey.java, * gnu/java/nio/SocketChannelSelectionKeyImpl.java, * gnu/java/nio/VMChannelOwner.java, * gnu/java/nio/charset/ByteCharset.java, * gnu/java/nio/charset/ByteDecodeLoopHelper.java, * gnu/java/nio/charset/ByteEncodeLoopHelper.java, * gnu/java/nio/charset/Cp424.java, * gnu/java/nio/charset/Cp437.java, * gnu/java/nio/charset/Cp737.java, * gnu/java/nio/charset/Cp775.java, * gnu/java/nio/charset/Cp850.java, * gnu/java/nio/charset/Cp852.java, * gnu/java/nio/charset/Cp855.java, * gnu/java/nio/charset/Cp857.java, * gnu/java/nio/charset/Cp860.java, * gnu/java/nio/charset/Cp861.java, * gnu/java/nio/charset/Cp862.java, * gnu/java/nio/charset/Cp863.java, * gnu/java/nio/charset/Cp864.java, * gnu/java/nio/charset/Cp865.java, * gnu/java/nio/charset/Cp866.java, * gnu/java/nio/charset/Cp869.java, * gnu/java/nio/charset/Cp874.java, * gnu/java/nio/charset/EncodingHelper.java, * gnu/java/nio/charset/ISO_8859_1.java, * gnu/java/nio/charset/ISO_8859_13.java, * gnu/java/nio/charset/ISO_8859_15.java, * gnu/java/nio/charset/ISO_8859_2.java, * gnu/java/nio/charset/ISO_8859_3.java, * gnu/java/nio/charset/ISO_8859_4.java, * gnu/java/nio/charset/ISO_8859_5.java, * gnu/java/nio/charset/ISO_8859_6.java, * gnu/java/nio/charset/ISO_8859_7.java, * gnu/java/nio/charset/ISO_8859_8.java, * gnu/java/nio/charset/ISO_8859_9.java, * gnu/java/nio/charset/KOI_8.java, * gnu/java/nio/charset/MS874.java, * gnu/java/nio/charset/MacCentralEurope.java, * gnu/java/nio/charset/MacCroatian.java, * gnu/java/nio/charset/MacCyrillic.java, * gnu/java/nio/charset/MacDingbat.java, * gnu/java/nio/charset/MacGreek.java, * gnu/java/nio/charset/MacIceland.java, * gnu/java/nio/charset/MacRoman.java, * gnu/java/nio/charset/MacRomania.java, * gnu/java/nio/charset/MacSymbol.java, * gnu/java/nio/charset/MacThai.java, * gnu/java/nio/charset/MacTurkish.java, * gnu/java/
Diffstat (limited to 'gnu')
-rw-r--r--gnu/CORBA/BigDecimalHelper.java4
-rw-r--r--gnu/CORBA/CDR/AbstractCdrInput.java82
-rw-r--r--gnu/CORBA/CDR/AbstractCdrOutput.java22
-rw-r--r--gnu/CORBA/CDR/AbstractDataInput.java2
-rw-r--r--gnu/CORBA/CDR/AbstractDataOutput.java2
-rw-r--r--gnu/CORBA/CDR/AligningInput.java10
-rw-r--r--gnu/CORBA/CDR/AligningOutput.java10
-rw-r--r--gnu/CORBA/CDR/ArrayValueHelper.java2
-rw-r--r--gnu/CORBA/CDR/BigEndianInputStream.java2
-rw-r--r--gnu/CORBA/CDR/BigEndianOutputStream.java2
-rw-r--r--gnu/CORBA/CDR/BufferedCdrOutput.java6
-rw-r--r--gnu/CORBA/CDR/BufferredCdrInput.java22
-rw-r--r--gnu/CORBA/CDR/HeadlessInput.java8
-rw-r--r--gnu/CORBA/CDR/IDLTypeHelper.java6
-rw-r--r--gnu/CORBA/CDR/LittleEndianOutputStream.java2
-rw-r--r--gnu/CORBA/CDR/UnknownExceptionCtxHandler.java10
-rw-r--r--gnu/CORBA/CDR/VMVio.java4
-rw-r--r--gnu/CORBA/CDR/Vio.java82
-rw-r--r--gnu/CORBA/CDR/gnuRuntime.java16
-rw-r--r--gnu/CORBA/CDR/gnuValueStream.java14
-rw-r--r--gnu/CORBA/CdrEncapsCodecImpl.java8
-rw-r--r--gnu/CORBA/CollocatedOrbs.java28
-rw-r--r--gnu/CORBA/Connected_objects.java6
-rw-r--r--gnu/CORBA/DefaultSocketFactory.java2
-rw-r--r--gnu/CORBA/DuplicateNameHolder.java2
-rw-r--r--gnu/CORBA/DynAn/AbstractAny.java2
-rw-r--r--gnu/CORBA/DynAn/DivideableAny.java2
-rw-r--r--gnu/CORBA/DynAn/NameValuePairHolder.java2
-rw-r--r--gnu/CORBA/DynAn/RecordAny.java2
-rw-r--r--gnu/CORBA/DynAn/ValueChangeListener.java2
-rw-r--r--gnu/CORBA/DynAn/gnuDynAny.java2
-rw-r--r--gnu/CORBA/DynAn/gnuDynAnyFactory.java2
-rw-r--r--gnu/CORBA/DynAn/gnuDynArray.java2
-rw-r--r--gnu/CORBA/DynAn/gnuDynEnum.java2
-rw-r--r--gnu/CORBA/DynAn/gnuDynFixed.java2
-rw-r--r--gnu/CORBA/DynAn/gnuDynSequence.java2
-rw-r--r--gnu/CORBA/DynAn/gnuDynUnion.java2
-rw-r--r--gnu/CORBA/DynAn/gnuDynValue.java2
-rw-r--r--gnu/CORBA/DynAn/gnuDynValueBox.java2
-rw-r--r--gnu/CORBA/DynAnySeqHolder.java2
-rw-r--r--gnu/CORBA/EmptyExceptionHolder.java2
-rw-r--r--gnu/CORBA/ForwardRequestHelper.java6
-rw-r--r--gnu/CORBA/GIOP/CharSets_OSF.java2
-rw-r--r--gnu/CORBA/GIOP/CloseMessage.java8
-rw-r--r--gnu/CORBA/GIOP/ErrorMessage.java10
-rw-r--r--gnu/CORBA/GIOP/MessageHeader.java24
-rw-r--r--gnu/CORBA/GIOP/ServiceContext.java6
-rw-r--r--gnu/CORBA/GIOP/v1_2/RequestHeader.java6
-rw-r--r--gnu/CORBA/GeneralHolder.java2
-rw-r--r--gnu/CORBA/IOR.java20
-rw-r--r--gnu/CORBA/Interceptor/ClientRequestInterceptors.java2
-rw-r--r--gnu/CORBA/Interceptor/ForwardRequestHolder.java2
-rw-r--r--gnu/CORBA/Interceptor/IORInterceptors.java4
-rw-r--r--gnu/CORBA/Interceptor/Registrator.java4
-rw-r--r--gnu/CORBA/Interceptor/ServerRequestInterceptors.java2
-rw-r--r--gnu/CORBA/Interceptor/gnuClientRequestInfo.java2
-rw-r--r--gnu/CORBA/Interceptor/gnuIcCurrent.java2
-rw-r--r--gnu/CORBA/Interceptor/gnuIorInfo.java8
-rw-r--r--gnu/CORBA/Interceptor/gnuServerRequestInfo.java4
-rw-r--r--gnu/CORBA/IorDelegate.java10
-rw-r--r--gnu/CORBA/IorObject.java4
-rw-r--r--gnu/CORBA/Minor.java10
-rw-r--r--gnu/CORBA/NameDynAnyPairHolder.java2
-rw-r--r--gnu/CORBA/NameDynAnyPairSeqHolder.java2
-rw-r--r--gnu/CORBA/NameValuePairHolder.java2
-rw-r--r--gnu/CORBA/NameValuePairSeqHolder.java2
-rw-r--r--gnu/CORBA/NamingService/NameParser.java28
-rw-r--r--gnu/CORBA/NamingService/NamingMap.java2
-rw-r--r--gnu/CORBA/NamingService/NamingServiceTransient.java8
-rw-r--r--gnu/CORBA/NamingService/TransientContext.java8
-rw-r--r--gnu/CORBA/ObjectCreator.java42
-rw-r--r--gnu/CORBA/OrbFocused.java16
-rw-r--r--gnu/CORBA/OrbFunctional.java94
-rw-r--r--gnu/CORBA/OrbRestricted.java8
-rw-r--r--gnu/CORBA/Poa/AOM.java10
-rw-r--r--gnu/CORBA/Poa/AccessiblePolicy.java2
-rw-r--r--gnu/CORBA/Poa/DynamicImpHandler.java2
-rw-r--r--gnu/CORBA/Poa/ForwardRequestHolder.java2
-rw-r--r--gnu/CORBA/Poa/ForwardedServant.java2
-rw-r--r--gnu/CORBA/Poa/InvalidPolicyHolder.java2
-rw-r--r--gnu/CORBA/Poa/LocalDelegate.java16
-rw-r--r--gnu/CORBA/Poa/LocalRequest.java8
-rw-r--r--gnu/CORBA/Poa/LocalServerRequest.java2
-rw-r--r--gnu/CORBA/Poa/ORB_1_4.java4
-rw-r--r--gnu/CORBA/Poa/ServantDelegateImpl.java2
-rw-r--r--gnu/CORBA/Poa/StandardPolicies.java2
-rw-r--r--gnu/CORBA/Poa/gnuAdapterActivator.java2
-rw-r--r--gnu/CORBA/Poa/gnuForwardRequest.java2
-rw-r--r--gnu/CORBA/Poa/gnuIdAssignmentPolicy.java2
-rw-r--r--gnu/CORBA/Poa/gnuIdUniquenessPolicy.java2
-rw-r--r--gnu/CORBA/Poa/gnuImplicitActivationPolicy.java2
-rw-r--r--gnu/CORBA/Poa/gnuLifespanPolicy.java2
-rw-r--r--gnu/CORBA/Poa/gnuPOA.java82
-rw-r--r--gnu/CORBA/Poa/gnuPOAManager.java40
-rw-r--r--gnu/CORBA/Poa/gnuPoaCurrent.java2
-rw-r--r--gnu/CORBA/Poa/gnuRequestProcessingPolicy.java2
-rw-r--r--gnu/CORBA/Poa/gnuServantObject.java12
-rw-r--r--gnu/CORBA/Poa/gnuServantRetentionPolicy.java2
-rw-r--r--gnu/CORBA/Poa/gnuThreadPolicy.java2
-rw-r--r--gnu/CORBA/ServiceRequestAdapter.java2
-rw-r--r--gnu/CORBA/SetOverrideTypeHolder.java2
-rw-r--r--gnu/CORBA/SimpleDelegate.java4
-rw-r--r--gnu/CORBA/SocketRepository.java20
-rw-r--r--gnu/CORBA/StreamHolder.java2
-rw-r--r--gnu/CORBA/TypeCodeHelper.java2
-rw-r--r--gnu/CORBA/TypeKindNamer.java2
-rw-r--r--gnu/CORBA/Version.java6
-rw-r--r--gnu/CORBA/_PolicyImplBase.java4
-rw-r--r--gnu/CORBA/gnuAny.java16
-rw-r--r--gnu/CORBA/gnuCodecFactory.java2
-rw-r--r--gnu/CORBA/gnuEnvironment.java2
-rw-r--r--gnu/CORBA/gnuRequest.java8
-rw-r--r--gnu/CORBA/gnuValueHolder.java2
-rw-r--r--gnu/CORBA/interfaces/SocketFactory.java16
-rw-r--r--gnu/CORBA/typecodes/AliasTypeCode.java6
-rw-r--r--gnu/CORBA/typecodes/ArrayTypeCode.java8
-rw-r--r--gnu/CORBA/typecodes/FixedTypeCode.java8
-rw-r--r--gnu/CORBA/typecodes/GeneralTypeCode.java8
-rw-r--r--gnu/CORBA/typecodes/PrimitiveTypeCode.java6
-rw-r--r--gnu/CORBA/typecodes/RecordTypeCode.java8
-rw-r--r--gnu/CORBA/typecodes/RecursiveTypeCode.java6
-rw-r--r--gnu/CORBA/typecodes/StringTypeCode.java6
-rw-r--r--gnu/classpath/Pair.java10
-rw-r--r--gnu/classpath/Pointer.java2
-rw-r--r--gnu/classpath/Pointer32.java4
-rw-r--r--gnu/classpath/Pointer64.java4
-rw-r--r--gnu/classpath/ServiceFactory.java64
-rw-r--r--gnu/classpath/ServiceProviderLoadingAction.java2
-rw-r--r--gnu/classpath/SystemProperties.java34
-rw-r--r--gnu/classpath/debug/Component.java18
-rw-r--r--gnu/classpath/debug/PreciseFilter.java6
-rw-r--r--gnu/classpath/debug/SystemLogger.java6
-rw-r--r--gnu/classpath/debug/TeeInputStream.java2
-rw-r--r--gnu/classpath/debug/TeeReader.java2
-rw-r--r--gnu/classpath/jdwp/Jdwp.java208
-rw-r--r--gnu/classpath/jdwp/JdwpConstants.java14
-rw-r--r--gnu/classpath/jdwp/event/BreakpointEvent.java2
-rw-r--r--gnu/classpath/jdwp/event/ClassPrepareEvent.java2
-rw-r--r--gnu/classpath/jdwp/event/ClassUnloadEvent.java10
-rw-r--r--gnu/classpath/jdwp/event/Event.java36
-rw-r--r--gnu/classpath/jdwp/event/EventManager.java90
-rw-r--r--gnu/classpath/jdwp/event/EventRequest.java86
-rw-r--r--gnu/classpath/jdwp/event/ExceptionEvent.java20
-rw-r--r--gnu/classpath/jdwp/event/MethodEntryEvent.java10
-rw-r--r--gnu/classpath/jdwp/event/MethodExitEvent.java10
-rw-r--r--gnu/classpath/jdwp/event/SingleStepEvent.java10
-rw-r--r--gnu/classpath/jdwp/event/ThreadEndEvent.java1
-rw-r--r--gnu/classpath/jdwp/event/VmDeathEvent.java2
-rw-r--r--gnu/classpath/jdwp/event/VmInitEvent.java2
-rw-r--r--gnu/classpath/jdwp/event/filters/ClassExcludeFilter.java2
-rw-r--r--gnu/classpath/jdwp/event/filters/ClassMatchFilter.java32
-rw-r--r--gnu/classpath/jdwp/event/filters/ClassOnlyFilter.java24
-rw-r--r--gnu/classpath/jdwp/event/filters/ExceptionOnlyFilter.java16
-rw-r--r--gnu/classpath/jdwp/event/filters/FieldOnlyFilter.java4
-rw-r--r--gnu/classpath/jdwp/event/filters/InstanceOnlyFilter.java6
-rw-r--r--gnu/classpath/jdwp/event/filters/StepFilter.java4
-rw-r--r--gnu/classpath/jdwp/event/filters/ThreadOnlyFilter.java6
-rw-r--r--gnu/classpath/jdwp/exception/InvalidClassException.java2
-rw-r--r--gnu/classpath/jdwp/exception/InvalidClassLoaderException.java2
-rw-r--r--gnu/classpath/jdwp/exception/InvalidEventTypeException.java2
-rw-r--r--gnu/classpath/jdwp/exception/InvalidFieldException.java2
-rw-r--r--gnu/classpath/jdwp/exception/InvalidFrameException.java4
-rw-r--r--gnu/classpath/jdwp/exception/InvalidLocationException.java2
-rw-r--r--gnu/classpath/jdwp/exception/InvalidMethodException.java2
-rw-r--r--gnu/classpath/jdwp/exception/InvalidObjectException.java2
-rw-r--r--gnu/classpath/jdwp/exception/InvalidSlotException.java2
-rw-r--r--gnu/classpath/jdwp/exception/InvalidStringException.java4
-rw-r--r--gnu/classpath/jdwp/exception/InvalidThreadException.java2
-rw-r--r--gnu/classpath/jdwp/exception/InvalidThreadGroupException.java2
-rw-r--r--gnu/classpath/jdwp/exception/NativeMethodException.java2
-rw-r--r--gnu/classpath/jdwp/exception/NotImplementedException.java2
-rw-r--r--gnu/classpath/jdwp/id/JdwpId.java2
-rw-r--r--gnu/classpath/jdwp/id/NullObjectId.java2
-rw-r--r--gnu/classpath/jdwp/processor/ArrayReferenceCommandSet.java2
-rw-r--r--gnu/classpath/jdwp/processor/ArrayTypeCommandSet.java4
-rw-r--r--gnu/classpath/jdwp/processor/ClassLoaderReferenceCommandSet.java4
-rw-r--r--gnu/classpath/jdwp/processor/ClassObjectReferenceCommandSet.java4
-rw-r--r--gnu/classpath/jdwp/processor/ClassTypeCommandSet.java12
-rw-r--r--gnu/classpath/jdwp/processor/CommandSet.java4
-rw-r--r--gnu/classpath/jdwp/processor/EventRequestCommandSet.java38
-rw-r--r--gnu/classpath/jdwp/processor/FieldCommandSet.java4
-rw-r--r--gnu/classpath/jdwp/processor/InterfaceTypeCommandSet.java4
-rw-r--r--gnu/classpath/jdwp/processor/MethodCommandSet.java6
-rw-r--r--gnu/classpath/jdwp/processor/ObjectReferenceCommandSet.java12
-rw-r--r--gnu/classpath/jdwp/processor/PacketProcessor.java32
-rw-r--r--gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java8
-rw-r--r--gnu/classpath/jdwp/processor/StackFrameCommandSet.java10
-rw-r--r--gnu/classpath/jdwp/processor/StringReferenceCommandSet.java4
-rw-r--r--gnu/classpath/jdwp/processor/ThreadGroupReferenceCommandSet.java12
-rw-r--r--gnu/classpath/jdwp/processor/ThreadReferenceCommandSet.java18
-rw-r--r--gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java32
-rw-r--r--gnu/classpath/jdwp/transport/JdwpCommandPacket.java4
-rw-r--r--gnu/classpath/jdwp/transport/JdwpConnection.java116
-rw-r--r--gnu/classpath/jdwp/transport/JdwpPacket.java98
-rw-r--r--gnu/classpath/jdwp/transport/JdwpReplyPacket.java2
-rw-r--r--gnu/classpath/jdwp/transport/SocketTransport.java70
-rw-r--r--gnu/classpath/jdwp/transport/TransportFactory.java36
-rw-r--r--gnu/classpath/jdwp/util/JdwpString.java10
-rw-r--r--gnu/classpath/jdwp/util/LineTable.java8
-rw-r--r--gnu/classpath/jdwp/util/Location.java32
-rw-r--r--gnu/classpath/jdwp/util/MethodResult.java8
-rw-r--r--gnu/classpath/jdwp/util/MonitorInfo.java4
-rw-r--r--gnu/classpath/jdwp/util/Signature.java18
-rw-r--r--gnu/classpath/jdwp/util/VariableTable.java6
-rw-r--r--gnu/classpath/jdwp/value/ArrayValue.java10
-rw-r--r--gnu/classpath/jdwp/value/BooleanValue.java15
-rw-r--r--gnu/classpath/jdwp/value/ByteValue.java14
-rw-r--r--gnu/classpath/jdwp/value/CharValue.java15
-rw-r--r--gnu/classpath/jdwp/value/DoubleValue.java15
-rw-r--r--gnu/classpath/jdwp/value/FloatValue.java15
-rw-r--r--gnu/classpath/jdwp/value/IntValue.java15
-rw-r--r--gnu/classpath/jdwp/value/LongValue.java15
-rw-r--r--gnu/classpath/jdwp/value/ObjectValue.java12
-rw-r--r--gnu/classpath/jdwp/value/ShortValue.java15
-rw-r--r--gnu/classpath/jdwp/value/StringValue.java14
-rw-r--r--gnu/classpath/jdwp/value/Value.java40
-rw-r--r--gnu/classpath/jdwp/value/ValueFactory.java32
-rw-r--r--gnu/classpath/jdwp/value/VoidValue.java10
-rw-r--r--gnu/classpath/toolkit/DefaultDaemonThreadFactory.java4
-rw-r--r--gnu/java/awt/AWTUtilities.java168
-rw-r--r--gnu/java/awt/BitMaskExtent.java12
-rw-r--r--gnu/java/awt/BitwiseXORComposite.java14
-rw-r--r--gnu/java/awt/Buffers.java98
-rw-r--r--gnu/java/awt/ClasspathGraphicsEnvironment.java4
-rw-r--r--gnu/java/awt/ClasspathToolkit.java21
-rw-r--r--gnu/java/awt/ComponentDataBlitOp.java50
-rw-r--r--gnu/java/awt/EmbeddedWindow.java14
-rw-r--r--gnu/java/awt/GradientPaintContext.java56
-rw-r--r--gnu/java/awt/color/CieXyzConverter.java2
-rw-r--r--gnu/java/awt/color/ClutProfileConverter.java26
-rw-r--r--gnu/java/awt/color/ColorLookUpTable.java226
-rw-r--r--gnu/java/awt/color/GrayProfileConverter.java12
-rw-r--r--gnu/java/awt/color/GrayScaleConverter.java18
-rw-r--r--gnu/java/awt/color/LinearRGBConverter.java38
-rw-r--r--gnu/java/awt/color/ProfileHeader.java42
-rw-r--r--gnu/java/awt/color/RgbProfileConverter.java30
-rw-r--r--gnu/java/awt/color/SrgbConverter.java22
-rw-r--r--gnu/java/awt/color/ToneReproductionCurve.java62
-rw-r--r--gnu/java/awt/dnd/GtkMouseDragGestureRecognizer.java20
-rw-r--r--gnu/java/awt/dnd/peer/gtk/GtkDragSourceContextPeer.java26
-rw-r--r--gnu/java/awt/dnd/peer/gtk/GtkDropTargetContextPeer.java4
-rw-r--r--gnu/java/awt/dnd/peer/gtk/GtkDropTargetPeer.java2
-rw-r--r--gnu/java/awt/font/FontDelegate.java12
-rw-r--r--gnu/java/awt/font/FontFactory.java2
-rw-r--r--gnu/java/awt/font/GNUGlyphVector.java16
-rw-r--r--gnu/java/awt/font/OpenTypeFontPeer.java6
-rw-r--r--gnu/java/awt/font/autofit/GlyphHints.java2
-rw-r--r--gnu/java/awt/font/autofit/Latin.java14
-rw-r--r--gnu/java/awt/font/autofit/Utils.java2
-rw-r--r--gnu/java/awt/font/opentype/CharGlyphMap.java32
-rw-r--r--gnu/java/awt/font/opentype/GlyphNamer.java10
-rw-r--r--gnu/java/awt/font/opentype/MacResourceFork.java6
-rw-r--r--gnu/java/awt/font/opentype/NameDecoder.java30
-rw-r--r--gnu/java/awt/font/opentype/OpenTypeFont.java24
-rw-r--r--gnu/java/awt/font/opentype/OpenTypeFontFactory.java2
-rw-r--r--gnu/java/awt/font/opentype/truetype/GlyphLoader.java18
-rw-r--r--gnu/java/awt/font/opentype/truetype/GlyphLocator.java2
-rw-r--r--gnu/java/awt/font/opentype/truetype/GlyphMeasurer.java10
-rw-r--r--gnu/java/awt/font/opentype/truetype/Point.java2
-rw-r--r--gnu/java/awt/font/opentype/truetype/TrueTypeScaler.java4
-rw-r--r--gnu/java/awt/font/opentype/truetype/VirtualMachine.java32
-rw-r--r--gnu/java/awt/font/opentype/truetype/Zone.java2
-rw-r--r--gnu/java/awt/font/opentype/truetype/ZonePathIterator.java14
-rw-r--r--gnu/java/awt/image/AsyncImage.java4
-rw-r--r--gnu/java/awt/image/ImageConverter.java16
-rw-r--r--gnu/java/awt/image/ImageDecoder.java52
-rw-r--r--gnu/java/awt/image/XBMDecoder.java94
-rw-r--r--gnu/java/awt/java2d/AbstractGraphics2D.java52
-rw-r--r--gnu/java/awt/java2d/AlphaCompositeContext.java6
-rw-r--r--gnu/java/awt/java2d/CubicSegment.java12
-rw-r--r--gnu/java/awt/java2d/LineSegment.java8
-rw-r--r--gnu/java/awt/java2d/PixelCoverage.java2
-rw-r--r--gnu/java/awt/java2d/QuadSegment.java28
-rw-r--r--gnu/java/awt/java2d/RasterGraphics.java4
-rw-r--r--gnu/java/awt/java2d/ScanlineConverter.java4
-rw-r--r--gnu/java/awt/java2d/ScanlineCoverage.java6
-rw-r--r--gnu/java/awt/java2d/Segment.java8
-rw-r--r--gnu/java/awt/java2d/TexturePaintContext.java6
-rw-r--r--gnu/java/awt/peer/ClasspathDesktopPeer.java116
-rw-r--r--gnu/java/awt/peer/ClasspathFontPeer.java210
-rw-r--r--gnu/java/awt/peer/GLightweightPeer.java28
-rw-r--r--gnu/java/awt/peer/GnomeDesktopPeer.java30
-rw-r--r--gnu/java/awt/peer/KDEDesktopPeer.java22
-rw-r--r--gnu/java/awt/peer/gtk/AsyncImage.java2
-rw-r--r--gnu/java/awt/peer/gtk/BufferedImageGraphics.java109
-rw-r--r--gnu/java/awt/peer/gtk/CairoGraphics2D.java260
-rw-r--r--gnu/java/awt/peer/gtk/CairoSurface.java72
-rw-r--r--gnu/java/awt/peer/gtk/CairoSurfaceGraphics.java82
-rw-r--r--gnu/java/awt/peer/gtk/ComponentGraphics.java154
-rw-r--r--gnu/java/awt/peer/gtk/ComponentGraphicsCopy.java19
-rw-r--r--gnu/java/awt/peer/gtk/FreetypeGlyphVector.java96
-rw-r--r--gnu/java/awt/peer/gtk/GdkFontPeer.java76
-rw-r--r--gnu/java/awt/peer/gtk/GdkGraphicsConfiguration.java12
-rw-r--r--gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java26
-rw-r--r--gnu/java/awt/peer/gtk/GdkPixbufDecoder.java106
-rw-r--r--gnu/java/awt/peer/gtk/GdkRobotPeer.java6
-rw-r--r--gnu/java/awt/peer/gtk/GdkScreenGraphicsDevice.java108
-rw-r--r--gnu/java/awt/peer/gtk/GtkButtonPeer.java8
-rw-r--r--gnu/java/awt/peer/gtk/GtkCheckboxPeer.java14
-rw-r--r--gnu/java/awt/peer/gtk/GtkChoicePeer.java11
-rw-r--r--gnu/java/awt/peer/gtk/GtkClipboard.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkComponentPeer.java84
-rw-r--r--gnu/java/awt/peer/gtk/GtkContainerPeer.java8
-rw-r--r--gnu/java/awt/peer/gtk/GtkCursor.java2
-rw-r--r--gnu/java/awt/peer/gtk/GtkDialogPeer.java2
-rw-r--r--gnu/java/awt/peer/gtk/GtkFileDialogPeer.java12
-rw-r--r--gnu/java/awt/peer/gtk/GtkFramePeer.java16
-rw-r--r--gnu/java/awt/peer/gtk/GtkGenericPeer.java8
-rw-r--r--gnu/java/awt/peer/gtk/GtkImage.java42
-rw-r--r--gnu/java/awt/peer/gtk/GtkImageConsumer.java8
-rw-r--r--gnu/java/awt/peer/gtk/GtkLabelPeer.java2
-rw-r--r--gnu/java/awt/peer/gtk/GtkListPeer.java14
-rw-r--r--gnu/java/awt/peer/gtk/GtkMenuComponentPeer.java2
-rw-r--r--gnu/java/awt/peer/gtk/GtkMenuPeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkMouseInfoPeer.java7
-rw-r--r--gnu/java/awt/peer/gtk/GtkPanelPeer.java2
-rw-r--r--gnu/java/awt/peer/gtk/GtkPopupMenuPeer.java2
-rw-r--r--gnu/java/awt/peer/gtk/GtkScrollbarPeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkSelection.java14
-rw-r--r--gnu/java/awt/peer/gtk/GtkToolkit.java122
-rw-r--r--gnu/java/awt/peer/gtk/GtkVolatileImage.java16
-rw-r--r--gnu/java/awt/peer/gtk/GtkWindowPeer.java26
-rw-r--r--gnu/java/awt/peer/gtk/VolatileImageGraphics.java59
-rw-r--r--gnu/java/awt/peer/headless/HeadlessGraphicsEnvironment.java2
-rw-r--r--gnu/java/awt/peer/qt/MainQtThread.java4
-rw-r--r--gnu/java/awt/peer/qt/QMatrix.java7
-rw-r--r--gnu/java/awt/peer/qt/QPainterPath.java55
-rw-r--r--gnu/java/awt/peer/qt/QPen.java3
-rw-r--r--gnu/java/awt/peer/qt/QtAudioClip.java10
-rw-r--r--gnu/java/awt/peer/qt/QtButtonPeer.java14
-rw-r--r--gnu/java/awt/peer/qt/QtCheckboxPeer.java36
-rw-r--r--gnu/java/awt/peer/qt/QtChoicePeer.java16
-rw-r--r--gnu/java/awt/peer/qt/QtComponentGraphics.java22
-rw-r--r--gnu/java/awt/peer/qt/QtComponentPeer.java386
-rw-r--r--gnu/java/awt/peer/qt/QtContainerPeer.java13
-rw-r--r--gnu/java/awt/peer/qt/QtDialogPeer.java2
-rw-r--r--gnu/java/awt/peer/qt/QtEmbeddedWindowPeer.java4
-rw-r--r--gnu/java/awt/peer/qt/QtFileDialogPeer.java1
-rw-r--r--gnu/java/awt/peer/qt/QtFontMetrics.java2
-rw-r--r--gnu/java/awt/peer/qt/QtFontPeer.java42
-rw-r--r--gnu/java/awt/peer/qt/QtFramePeer.java36
-rw-r--r--gnu/java/awt/peer/qt/QtGraphics.java239
-rw-r--r--gnu/java/awt/peer/qt/QtGraphicsEnvironment.java6
-rw-r--r--gnu/java/awt/peer/qt/QtImage.java220
-rw-r--r--gnu/java/awt/peer/qt/QtImageConsumer.java48
-rw-r--r--gnu/java/awt/peer/qt/QtImageDirectGraphics.java38
-rw-r--r--gnu/java/awt/peer/qt/QtImageGraphics.java30
-rw-r--r--gnu/java/awt/peer/qt/QtLabelPeer.java4
-rw-r--r--gnu/java/awt/peer/qt/QtListPeer.java32
-rw-r--r--gnu/java/awt/peer/qt/QtMenuBarPeer.java9
-rw-r--r--gnu/java/awt/peer/qt/QtMenuComponentPeer.java26
-rw-r--r--gnu/java/awt/peer/qt/QtMenuItemPeer.java19
-rw-r--r--gnu/java/awt/peer/qt/QtMenuPeer.java37
-rw-r--r--gnu/java/awt/peer/qt/QtPanelPeer.java2
-rw-r--r--gnu/java/awt/peer/qt/QtPopupMenuPeer.java3
-rw-r--r--gnu/java/awt/peer/qt/QtRepaintThread.java90
-rw-r--r--gnu/java/awt/peer/qt/QtScreenDevice.java1
-rw-r--r--gnu/java/awt/peer/qt/QtScreenDeviceConfiguration.java26
-rw-r--r--gnu/java/awt/peer/qt/QtScrollPanePeer.java8
-rw-r--r--gnu/java/awt/peer/qt/QtScrollbarPeer.java8
-rw-r--r--gnu/java/awt/peer/qt/QtTextAreaPeer.java5
-rw-r--r--gnu/java/awt/peer/qt/QtTextFieldPeer.java5
-rw-r--r--gnu/java/awt/peer/qt/QtToolkit.java70
-rw-r--r--gnu/java/awt/peer/qt/QtVolatileImage.java152
-rw-r--r--gnu/java/awt/peer/qt/QtWindowPeer.java4
-rw-r--r--gnu/java/awt/peer/swing/SwingButtonPeer.java4
-rwxr-xr-xgnu/java/awt/peer/swing/SwingCheckboxPeer.java6
-rw-r--r--gnu/java/awt/peer/swing/SwingComponent.java2
-rw-r--r--gnu/java/awt/peer/swing/SwingComponentPeer.java24
-rw-r--r--gnu/java/awt/peer/swing/SwingContainerPeer.java10
-rw-r--r--gnu/java/awt/peer/swing/SwingLabelPeer.java8
-rw-r--r--gnu/java/awt/peer/swing/SwingListPeer.java6
-rw-r--r--gnu/java/awt/peer/swing/SwingMenuItemPeer.java2
-rw-r--r--gnu/java/awt/peer/swing/SwingMenuPeer.java2
-rw-r--r--gnu/java/awt/peer/swing/SwingTextAreaPeer.java10
-rw-r--r--gnu/java/awt/peer/swing/SwingTextFieldPeer.java6
-rw-r--r--gnu/java/awt/peer/x/GLGraphics.java4
-rw-r--r--gnu/java/awt/peer/x/KeyboardMapping.java2
-rw-r--r--gnu/java/awt/peer/x/XEventPump.java64
-rw-r--r--gnu/java/awt/peer/x/XFontPeer.java12
-rw-r--r--gnu/java/awt/peer/x/XFramePeer.java8
-rw-r--r--gnu/java/awt/peer/x/XGraphics2D.java13
-rw-r--r--gnu/java/awt/peer/x/XGraphicsConfiguration.java6
-rw-r--r--gnu/java/awt/peer/x/XGraphicsDevice.java6
-rw-r--r--gnu/java/awt/peer/x/XGraphicsEnvironment.java2
-rw-r--r--gnu/java/awt/peer/x/XImage.java18
-rw-r--r--gnu/java/awt/peer/x/XToolkit.java20
-rw-r--r--gnu/java/awt/peer/x/XWindowPeer.java20
-rw-r--r--gnu/java/awt/print/JavaPrinterGraphics.java185
-rw-r--r--gnu/java/awt/print/JavaPrinterJob.java52
-rw-r--r--gnu/java/awt/print/PostScriptGraphics2D.java518
-rw-r--r--gnu/java/awt/print/SpooledDocument.java10
-rw-r--r--gnu/java/beans/BeanInfoEmbryo.java180
-rw-r--r--gnu/java/beans/DefaultExceptionListener.java4
-rw-r--r--gnu/java/beans/ExplicitBeanInfo.java184
-rw-r--r--gnu/java/beans/IntrospectionIncubator.java724
-rw-r--r--gnu/java/beans/decoder/AbstractContext.java2
-rw-r--r--gnu/java/beans/decoder/AbstractCreatableObjectContext.java6
-rw-r--r--gnu/java/beans/decoder/AbstractElementHandler.java144
-rw-r--r--gnu/java/beans/decoder/AbstractObjectContext.java2
-rw-r--r--gnu/java/beans/decoder/ArrayContext.java12
-rw-r--r--gnu/java/beans/decoder/ArrayHandler.java52
-rw-r--r--gnu/java/beans/decoder/AssemblyException.java4
-rw-r--r--gnu/java/beans/decoder/BooleanHandler.java2
-rw-r--r--gnu/java/beans/decoder/ByteHandler.java2
-rw-r--r--gnu/java/beans/decoder/CharHandler.java2
-rw-r--r--gnu/java/beans/decoder/ClassHandler.java6
-rw-r--r--gnu/java/beans/decoder/ConstructorContext.java20
-rw-r--r--gnu/java/beans/decoder/Context.java2
-rw-r--r--gnu/java/beans/decoder/DecoderContext.java6
-rw-r--r--gnu/java/beans/decoder/DoubleHandler.java2
-rw-r--r--gnu/java/beans/decoder/DummyContext.java16
-rw-r--r--gnu/java/beans/decoder/DummyHandler.java12
-rw-r--r--gnu/java/beans/decoder/ElementHandler.java16
-rw-r--r--gnu/java/beans/decoder/FloatHandler.java2
-rw-r--r--gnu/java/beans/decoder/GrowableArrayContext.java12
-rw-r--r--gnu/java/beans/decoder/IndexContext.java12
-rw-r--r--gnu/java/beans/decoder/IntHandler.java2
-rw-r--r--gnu/java/beans/decoder/JavaHandler.java4
-rw-r--r--gnu/java/beans/decoder/LongHandler.java2
-rw-r--r--gnu/java/beans/decoder/MethodContext.java2
-rw-r--r--gnu/java/beans/decoder/MethodFinder.java264
-rw-r--r--gnu/java/beans/decoder/NullHandler.java2
-rw-r--r--gnu/java/beans/decoder/ObjectContext.java2
-rw-r--r--gnu/java/beans/decoder/ObjectHandler.java140
-rw-r--r--gnu/java/beans/decoder/PersistenceParser.java838
-rw-r--r--gnu/java/beans/decoder/PropertyContext.java22
-rw-r--r--gnu/java/beans/decoder/ShortHandler.java2
-rw-r--r--gnu/java/beans/decoder/SimpleHandler.java10
-rw-r--r--gnu/java/beans/decoder/StaticMethodContext.java14
-rw-r--r--gnu/java/beans/decoder/StringHandler.java2
-rw-r--r--gnu/java/beans/decoder/VoidHandler.java4
-rw-r--r--gnu/java/beans/editors/ColorEditor.java90
-rw-r--r--gnu/java/beans/editors/FontEditor.java44
-rw-r--r--gnu/java/beans/editors/NativeBooleanEditor.java38
-rw-r--r--gnu/java/beans/editors/NativeByteEditor.java20
-rw-r--r--gnu/java/beans/editors/NativeDoubleEditor.java20
-rw-r--r--gnu/java/beans/editors/NativeFloatEditor.java20
-rw-r--r--gnu/java/beans/editors/NativeIntEditor.java20
-rw-r--r--gnu/java/beans/editors/NativeLongEditor.java20
-rw-r--r--gnu/java/beans/editors/NativeShortEditor.java20
-rw-r--r--gnu/java/beans/editors/StringEditor.java20
-rw-r--r--gnu/java/beans/encoder/ArrayPersistenceDelegate.java16
-rw-r--r--gnu/java/beans/encoder/ClassPersistenceDelegate.java12
-rw-r--r--gnu/java/beans/encoder/CollectionPersistenceDelegate.java6
-rw-r--r--gnu/java/beans/encoder/Context.java20
-rw-r--r--gnu/java/beans/encoder/GenericScannerState.java12
-rw-r--r--gnu/java/beans/encoder/IgnoringScannerState.java14
-rw-r--r--gnu/java/beans/encoder/MapPersistenceDelegate.java2
-rw-r--r--gnu/java/beans/encoder/ObjectId.java4
-rw-r--r--gnu/java/beans/encoder/PrimitivePersistenceDelegate.java6
-rw-r--r--gnu/java/beans/encoder/ReportingScannerState.java26
-rw-r--r--gnu/java/beans/encoder/Root.java38
-rw-r--r--gnu/java/beans/encoder/ScanEngine.java114
-rw-r--r--gnu/java/beans/encoder/ScannerState.java42
-rw-r--r--gnu/java/beans/encoder/StAXWriter.java8
-rw-r--r--gnu/java/beans/encoder/Writer.java42
-rw-r--r--gnu/java/beans/encoder/elements/ArrayInstantiation.java2
-rw-r--r--gnu/java/beans/encoder/elements/Array_Get.java2
-rw-r--r--gnu/java/beans/encoder/elements/ClassResolution.java4
-rw-r--r--gnu/java/beans/encoder/elements/Element.java54
-rw-r--r--gnu/java/beans/encoder/elements/List_Get.java4
-rw-r--r--gnu/java/beans/encoder/elements/List_Set.java4
-rw-r--r--gnu/java/beans/encoder/elements/MethodInvocation.java8
-rw-r--r--gnu/java/beans/encoder/elements/NullObject.java2
-rw-r--r--gnu/java/beans/encoder/elements/ObjectInstantiation.java2
-rw-r--r--gnu/java/beans/encoder/elements/ObjectReference.java6
-rw-r--r--gnu/java/beans/encoder/elements/PrimitiveInstantiation.java2
-rw-r--r--gnu/java/beans/encoder/elements/StaticFieldAccess.java2
-rw-r--r--gnu/java/beans/encoder/elements/StaticMethodInvocation.java10
-rw-r--r--gnu/java/beans/encoder/elements/StringReference.java2
-rw-r--r--gnu/java/io/ASN1ParsingException.java18
-rw-r--r--gnu/java/io/Base64InputStream.java4
-rw-r--r--gnu/java/io/ClassLoaderObjectInputStream.java34
-rw-r--r--gnu/java/io/NullOutputStream.java2
-rw-r--r--gnu/java/io/ObjectIdentityMap2Int.java48
-rw-r--r--gnu/java/io/ObjectIdentityWrapper.java2
-rw-r--r--gnu/java/io/PlatformHelper.java8
-rw-r--r--gnu/java/lang/CPStringBuilder.java110
-rw-r--r--gnu/java/lang/CharData.java4
-rw-r--r--gnu/java/lang/InstrumentationImpl.java50
-rw-r--r--gnu/java/lang/MainThread.java10
-rw-r--r--gnu/java/lang/management/BeanImpl.java350
-rw-r--r--gnu/java/lang/management/ClassLoadingMXBeanImpl.java3
-rw-r--r--gnu/java/lang/management/CompilationMXBeanImpl.java8
-rw-r--r--gnu/java/lang/management/GarbageCollectorMXBeanImpl.java2
-rw-r--r--gnu/java/lang/management/MemoryMXBeanImpl.java158
-rw-r--r--gnu/java/lang/management/MemoryManagerMXBeanImpl.java2
-rw-r--r--gnu/java/lang/management/MemoryPoolMXBeanImpl.java25
-rw-r--r--gnu/java/lang/management/OperatingSystemMXBeanImpl.java4
-rw-r--r--gnu/java/lang/management/RuntimeMXBeanImpl.java28
-rw-r--r--gnu/java/lang/management/ThreadMXBeanImpl.java67
-rw-r--r--gnu/java/lang/reflect/TypeSignature.java2
-rw-r--r--gnu/java/locale/LocaleHelper.java5
-rw-r--r--gnu/java/math/Fixed.java8
-rw-r--r--gnu/java/math/GMP.java98
-rw-r--r--gnu/java/math/MPN.java596
-rw-r--r--gnu/java/net/CRLFInputStream.java7
-rw-r--r--gnu/java/net/CRLFOutputStream.java9
-rw-r--r--gnu/java/net/DefaultContentHandlerFactory.java6
-rw-r--r--gnu/java/net/DefaultProxySelector.java8
-rw-r--r--gnu/java/net/EmptyX509TrustManager.java3
-rw-r--r--gnu/java/net/GetLocalHostAction.java3
-rw-r--r--gnu/java/net/HeaderFieldHelper.java13
-rw-r--r--gnu/java/net/IndexListParser.java34
-rw-r--r--gnu/java/net/LineInputStream.java7
-rw-r--r--gnu/java/net/PlainDatagramSocketImpl.java14
-rw-r--r--gnu/java/net/PlainSocketImpl.java50
-rw-r--r--gnu/java/net/loader/FileResource.java2
-rw-r--r--gnu/java/net/loader/FileURLLoader.java20
-rw-r--r--gnu/java/net/loader/JarURLLoader.java6
-rw-r--r--gnu/java/net/loader/JarURLResource.java2
-rw-r--r--gnu/java/net/loader/RemoteResource.java2
-rw-r--r--gnu/java/net/loader/RemoteURLLoader.java2
-rw-r--r--gnu/java/net/loader/Resource.java2
-rw-r--r--gnu/java/net/loader/URLLoader.java2
-rw-r--r--gnu/java/net/protocol/file/Connection.java148
-rw-r--r--gnu/java/net/protocol/file/Handler.java16
-rw-r--r--gnu/java/net/protocol/ftp/ActiveModeDTP.java9
-rw-r--r--gnu/java/net/protocol/ftp/BlockInputStream.java3
-rw-r--r--gnu/java/net/protocol/ftp/BlockOutputStream.java3
-rw-r--r--gnu/java/net/protocol/ftp/CompressedInputStream.java9
-rw-r--r--gnu/java/net/protocol/ftp/CompressedOutputStream.java7
-rw-r--r--gnu/java/net/protocol/ftp/DTP.java3
-rw-r--r--gnu/java/net/protocol/ftp/DTPInputStream.java5
-rw-r--r--gnu/java/net/protocol/ftp/DTPOutputStream.java2
-rw-r--r--gnu/java/net/protocol/ftp/FTPConnection.java67
-rw-r--r--gnu/java/net/protocol/ftp/FTPException.java5
-rw-r--r--gnu/java/net/protocol/ftp/FTPResponse.java3
-rw-r--r--gnu/java/net/protocol/ftp/FTPURLConnection.java15
-rw-r--r--gnu/java/net/protocol/ftp/Handler.java3
-rw-r--r--gnu/java/net/protocol/ftp/PassiveModeDTP.java9
-rw-r--r--gnu/java/net/protocol/ftp/StreamInputStream.java5
-rw-r--r--gnu/java/net/protocol/ftp/StreamOutputStream.java9
-rw-r--r--gnu/java/net/protocol/http/Authenticator.java5
-rw-r--r--gnu/java/net/protocol/http/ByteArrayRequestBodyWriter.java5
-rw-r--r--gnu/java/net/protocol/http/ChunkedInputStream.java27
-rw-r--r--gnu/java/net/protocol/http/Cookie.java5
-rw-r--r--gnu/java/net/protocol/http/CookieManager.java4
-rw-r--r--gnu/java/net/protocol/http/Credentials.java5
-rw-r--r--gnu/java/net/protocol/http/HTTPConnection.java21
-rw-r--r--gnu/java/net/protocol/http/HTTPDateFormat.java19
-rw-r--r--gnu/java/net/protocol/http/HTTPURLConnection.java209
-rw-r--r--gnu/java/net/protocol/http/Handler.java3
-rw-r--r--gnu/java/net/protocol/http/Headers.java54
-rw-r--r--gnu/java/net/protocol/http/Request.java39
-rw-r--r--gnu/java/net/protocol/http/RequestBodyWriter.java5
-rw-r--r--gnu/java/net/protocol/http/Response.java15
-rw-r--r--gnu/java/net/protocol/http/ResponseHeaderHandler.java5
-rw-r--r--gnu/java/net/protocol/http/SimpleCookieManager.java5
-rw-r--r--gnu/java/net/protocol/https/Handler.java3
-rw-r--r--gnu/java/net/protocol/jar/Connection.java96
-rw-r--r--gnu/java/net/protocol/jar/Handler.java50
-rw-r--r--gnu/java/nio/ChannelInputStream.java10
-rw-r--r--gnu/java/nio/ChannelOutputStream.java6
-rw-r--r--gnu/java/nio/ChannelReader.java46
-rw-r--r--gnu/java/nio/ChannelWriter.java4
-rw-r--r--gnu/java/nio/DatagramChannelImpl.java42
-rw-r--r--gnu/java/nio/DatagramChannelSelectionKey.java2
-rw-r--r--gnu/java/nio/EpollSelectionKeyImpl.java2
-rw-r--r--gnu/java/nio/EpollSelectorImpl.java54
-rw-r--r--gnu/java/nio/FileChannelImpl.java198
-rw-r--r--gnu/java/nio/FileLockImpl.java10
-rw-r--r--gnu/java/nio/InputStreamChannel.java6
-rw-r--r--gnu/java/nio/KqueueSelectionKeyImpl.java24
-rw-r--r--gnu/java/nio/KqueueSelectorImpl.java68
-rw-r--r--gnu/java/nio/NIODatagramSocket.java4
-rw-r--r--gnu/java/nio/NIOServerSocket.java34
-rw-r--r--gnu/java/nio/NIOSocket.java8
-rw-r--r--gnu/java/nio/NIOSocketImpl.java2
-rw-r--r--gnu/java/nio/OutputStreamChannel.java10
-rw-r--r--gnu/java/nio/PipeImpl.java32
-rw-r--r--gnu/java/nio/SelectionKeyImpl.java14
-rw-r--r--gnu/java/nio/SelectorImpl.java56
-rw-r--r--gnu/java/nio/SelectorProviderImpl.java6
-rw-r--r--gnu/java/nio/ServerSocketChannelImpl.java6
-rw-r--r--gnu/java/nio/ServerSocketChannelSelectionKey.java2
-rw-r--r--gnu/java/nio/SocketChannelImpl.java42
-rw-r--r--gnu/java/nio/SocketChannelSelectionKey.java4
-rw-r--r--gnu/java/nio/SocketChannelSelectionKeyImpl.java2
-rw-r--r--gnu/java/nio/VMChannelOwner.java2
-rw-r--r--gnu/java/nio/charset/ByteCharset.java12
-rw-r--r--gnu/java/nio/charset/ByteDecodeLoopHelper.java10
-rw-r--r--gnu/java/nio/charset/ByteEncodeLoopHelper.java6
-rw-r--r--gnu/java/nio/charset/Cp424.java64
-rw-r--r--gnu/java/nio/charset/Cp437.java66
-rw-r--r--gnu/java/nio/charset/Cp737.java68
-rw-r--r--gnu/java/nio/charset/Cp775.java68
-rw-r--r--gnu/java/nio/charset/Cp850.java68
-rw-r--r--gnu/java/nio/charset/Cp852.java68
-rw-r--r--gnu/java/nio/charset/Cp855.java68
-rw-r--r--gnu/java/nio/charset/Cp857.java68
-rw-r--r--gnu/java/nio/charset/Cp860.java68
-rw-r--r--gnu/java/nio/charset/Cp861.java68
-rw-r--r--gnu/java/nio/charset/Cp862.java68
-rw-r--r--gnu/java/nio/charset/Cp863.java68
-rw-r--r--gnu/java/nio/charset/Cp864.java68
-rw-r--r--gnu/java/nio/charset/Cp865.java68
-rw-r--r--gnu/java/nio/charset/Cp866.java68
-rw-r--r--gnu/java/nio/charset/Cp869.java68
-rw-r--r--gnu/java/nio/charset/Cp874.java68
-rw-r--r--gnu/java/nio/charset/EncodingHelper.java117
-rw-r--r--gnu/java/nio/charset/ISO_8859_1.java6
-rw-r--r--gnu/java/nio/charset/ISO_8859_13.java89
-rw-r--r--gnu/java/nio/charset/ISO_8859_15.java105
-rw-r--r--gnu/java/nio/charset/ISO_8859_2.java37
-rw-r--r--gnu/java/nio/charset/ISO_8859_3.java101
-rw-r--r--gnu/java/nio/charset/ISO_8859_4.java37
-rw-r--r--gnu/java/nio/charset/ISO_8859_5.java97
-rw-r--r--gnu/java/nio/charset/ISO_8859_6.java107
-rw-r--r--gnu/java/nio/charset/ISO_8859_7.java103
-rw-r--r--gnu/java/nio/charset/ISO_8859_8.java103
-rw-r--r--gnu/java/nio/charset/ISO_8859_9.java101
-rw-r--r--gnu/java/nio/charset/KOI_8.java23
-rw-r--r--gnu/java/nio/charset/MS874.java68
-rw-r--r--gnu/java/nio/charset/MacCentralEurope.java70
-rw-r--r--gnu/java/nio/charset/MacCroatian.java68
-rw-r--r--gnu/java/nio/charset/MacCyrillic.java68
-rw-r--r--gnu/java/nio/charset/MacDingbat.java68
-rw-r--r--gnu/java/nio/charset/MacGreek.java68
-rw-r--r--gnu/java/nio/charset/MacIceland.java68
-rw-r--r--gnu/java/nio/charset/MacRoman.java68
-rw-r--r--gnu/java/nio/charset/MacRomania.java68
-rw-r--r--gnu/java/nio/charset/MacSymbol.java68
-rw-r--r--gnu/java/nio/charset/MacThai.java68
-rw-r--r--gnu/java/nio/charset/MacTurkish.java68
-rw-r--r--gnu/java/nio/charset/Provider.java30
-rw-r--r--gnu/java/nio/charset/US_ASCII.java6
-rw-r--r--gnu/java/nio/charset/UTF_16.java2
-rw-r--r--gnu/java/nio/charset/UTF_16BE.java2
-rw-r--r--gnu/java/nio/charset/UTF_16Decoder.java14
-rw-r--r--gnu/java/nio/charset/UTF_16Encoder.java26
-rw-r--r--gnu/java/nio/charset/UTF_16LE.java4
-rw-r--r--gnu/java/nio/charset/UTF_8.java26
-rw-r--r--gnu/java/nio/charset/UnicodeLittle.java4
-rw-r--r--gnu/java/nio/charset/Windows1250.java87
-rw-r--r--gnu/java/nio/charset/Windows1251.java81
-rw-r--r--gnu/java/nio/charset/Windows1252.java81
-rw-r--r--gnu/java/nio/charset/Windows1253.java81
-rw-r--r--gnu/java/nio/charset/Windows1254.java81
-rw-r--r--gnu/java/nio/charset/Windows1255.java81
-rw-r--r--gnu/java/nio/charset/Windows1256.java81
-rw-r--r--gnu/java/nio/charset/Windows1257.java81
-rw-r--r--gnu/java/nio/charset/Windows1258.java81
-rw-r--r--gnu/java/nio/charset/iconv/IconvCharset.java8
-rw-r--r--gnu/java/nio/charset/iconv/IconvDecoder.java16
-rw-r--r--gnu/java/nio/charset/iconv/IconvEncoder.java14
-rw-r--r--gnu/java/nio/charset/iconv/IconvProvider.java28
-rw-r--r--gnu/java/rmi/RMIMarshalledObjectInputStream.java10
-rw-r--r--gnu/java/rmi/RMIMarshalledObjectOutputStream.java15
-rw-r--r--gnu/java/rmi/activation/ActivationSystemTransient.java64
-rw-r--r--gnu/java/rmi/activation/BidiTable.java34
-rw-r--r--gnu/java/rmi/activation/DefaultActivationGroup.java34
-rw-r--r--gnu/java/rmi/activation/DefaultActivationSystem.java8
-rw-r--r--gnu/java/rmi/dgc/DGCImpl.java30
-rw-r--r--gnu/java/rmi/dgc/DGCImpl_Skel.java16
-rw-r--r--gnu/java/rmi/dgc/DGCImpl_Stub.java20
-rw-r--r--gnu/java/rmi/dgc/LeaseRenewingTask.java40
-rw-r--r--gnu/java/rmi/registry/RegistryImpl.java118
-rw-r--r--gnu/java/rmi/registry/RegistryImpl_Skel.java28
-rw-r--r--gnu/java/rmi/registry/RegistryImpl_Stub.java26
-rw-r--r--gnu/java/rmi/server/ActivatableRef.java14
-rw-r--r--gnu/java/rmi/server/ActivatableServerRef.java32
-rw-r--r--gnu/java/rmi/server/CombinedClassLoader.java12
-rw-r--r--gnu/java/rmi/server/ConnectionRunnerPool.java90
-rw-r--r--gnu/java/rmi/server/ProtocolConstants.java2
-rw-r--r--gnu/java/rmi/server/RMIClassLoaderImpl.java56
-rw-r--r--gnu/java/rmi/server/RMIDefaultSocketFactory.java8
-rw-r--r--gnu/java/rmi/server/RMIHashes.java9
-rw-r--r--gnu/java/rmi/server/RMIIncomingThread.java40
-rw-r--r--gnu/java/rmi/server/RMIObjectInputStream.java26
-rw-r--r--gnu/java/rmi/server/RMIObjectOutputStream.java18
-rw-r--r--gnu/java/rmi/server/UnicastConnection.java164
-rw-r--r--gnu/java/rmi/server/UnicastConnectionManager.java226
-rw-r--r--gnu/java/rmi/server/UnicastRef.java6
-rw-r--r--gnu/java/rmi/server/UnicastRemoteCall.java150
-rw-r--r--gnu/java/rmi/server/UnicastRemoteStub.java6
-rw-r--r--gnu/java/rmi/server/UnicastServer.java46
-rw-r--r--gnu/java/rmi/server/UnicastServerRef.java92
-rw-r--r--gnu/java/security/Engine.java8
-rw-r--r--gnu/java/security/OID.java2
-rw-r--r--gnu/java/security/PolicyFile.java8
-rw-r--r--gnu/java/security/Properties.java16
-rw-r--r--gnu/java/security/Registry.java2
-rw-r--r--gnu/java/security/Requires.java4
-rw-r--r--gnu/java/security/action/GetPropertyAction.java6
-rw-r--r--gnu/java/security/action/SetAccessibleAction.java10
-rw-r--r--gnu/java/security/der/DERValue.java6
-rw-r--r--gnu/java/security/hash/BaseHash.java10
-rw-r--r--gnu/java/security/hash/HashFactory.java6
-rw-r--r--gnu/java/security/hash/Haval.java8
-rw-r--r--gnu/java/security/hash/IMessageDigest.java20
-rw-r--r--gnu/java/security/hash/MD2.java2
-rw-r--r--gnu/java/security/hash/MD4.java2
-rw-r--r--gnu/java/security/hash/MD5.java2
-rw-r--r--gnu/java/security/hash/RipeMD128.java2
-rw-r--r--gnu/java/security/hash/RipeMD160.java2
-rw-r--r--gnu/java/security/hash/Sha160.java2
-rw-r--r--gnu/java/security/hash/Sha256.java2
-rw-r--r--gnu/java/security/hash/Sha384.java2
-rw-r--r--gnu/java/security/hash/Sha512.java2
-rw-r--r--gnu/java/security/hash/Tiger.java2
-rw-r--r--gnu/java/security/hash/Whirlpool.java4
-rw-r--r--gnu/java/security/jce/hash/HavalSpi.java2
-rw-r--r--gnu/java/security/jce/hash/MD2Spi.java2
-rw-r--r--gnu/java/security/jce/hash/MD4Spi.java2
-rw-r--r--gnu/java/security/jce/hash/MD5Spi.java2
-rw-r--r--gnu/java/security/jce/hash/MessageDigestAdapter.java6
-rw-r--r--gnu/java/security/jce/hash/RipeMD128Spi.java2
-rw-r--r--gnu/java/security/jce/hash/RipeMD160Spi.java2
-rw-r--r--gnu/java/security/jce/hash/Sha160Spi.java2
-rw-r--r--gnu/java/security/jce/hash/Sha256Spi.java2
-rw-r--r--gnu/java/security/jce/hash/Sha384Spi.java2
-rw-r--r--gnu/java/security/jce/hash/Sha512Spi.java2
-rw-r--r--gnu/java/security/jce/hash/TigerSpi.java2
-rw-r--r--gnu/java/security/jce/hash/WhirlpoolSpi.java2
-rw-r--r--gnu/java/security/jce/prng/HavalRandomSpi.java2
-rw-r--r--gnu/java/security/jce/prng/MD2RandomSpi.java2
-rw-r--r--gnu/java/security/jce/prng/MD4RandomSpi.java2
-rw-r--r--gnu/java/security/jce/prng/MD5RandomSpi.java2
-rw-r--r--gnu/java/security/jce/prng/RipeMD128RandomSpi.java2
-rw-r--r--gnu/java/security/jce/prng/RipeMD160RandomSpi.java2
-rw-r--r--gnu/java/security/jce/prng/SecureRandomAdapter.java10
-rw-r--r--gnu/java/security/jce/prng/Sha160RandomSpi.java2
-rw-r--r--gnu/java/security/jce/prng/Sha256RandomSpi.java2
-rw-r--r--gnu/java/security/jce/prng/Sha384RandomSpi.java2
-rw-r--r--gnu/java/security/jce/prng/Sha512RandomSpi.java2
-rw-r--r--gnu/java/security/jce/prng/TigerRandomSpi.java2
-rw-r--r--gnu/java/security/jce/prng/WhirlpoolRandomSpi.java2
-rw-r--r--gnu/java/security/jce/sig/DSSKeyFactory.java2
-rw-r--r--gnu/java/security/jce/sig/DSSKeyPairGeneratorSpi.java2
-rw-r--r--gnu/java/security/jce/sig/DSSParameters.java8
-rw-r--r--gnu/java/security/jce/sig/DSSRawSignatureSpi.java2
-rw-r--r--gnu/java/security/jce/sig/KeyPairGeneratorAdapter.java4
-rw-r--r--gnu/java/security/jce/sig/RSAPSSRawSignatureSpi.java2
-rw-r--r--gnu/java/security/jce/sig/SignatureAdapter.java6
-rw-r--r--gnu/java/security/key/IKeyPairCodec.java12
-rw-r--r--gnu/java/security/key/IKeyPairGenerator.java8
-rw-r--r--gnu/java/security/key/KeyPairCodecFactory.java10
-rw-r--r--gnu/java/security/key/KeyPairGeneratorFactory.java6
-rw-r--r--gnu/java/security/key/dss/DSSKey.java8
-rw-r--r--gnu/java/security/key/dss/DSSKeyPairGenerator.java6
-rw-r--r--gnu/java/security/key/dss/DSSKeyPairPKCS8Codec.java4
-rw-r--r--gnu/java/security/key/dss/DSSKeyPairRawCodec.java6
-rw-r--r--gnu/java/security/key/dss/DSSKeyPairX509Codec.java4
-rw-r--r--gnu/java/security/key/dss/DSSPrivateKey.java14
-rw-r--r--gnu/java/security/key/dss/DSSPublicKey.java14
-rw-r--r--gnu/java/security/key/dss/FIPS186.java4
-rw-r--r--gnu/java/security/key/rsa/GnuRSAKey.java12
-rw-r--r--gnu/java/security/key/rsa/GnuRSAPrivateKey.java14
-rw-r--r--gnu/java/security/key/rsa/GnuRSAPublicKey.java12
-rw-r--r--gnu/java/security/key/rsa/RSAKeyPairGenerator.java8
-rw-r--r--gnu/java/security/key/rsa/RSAKeyPairPKCS8Codec.java4
-rw-r--r--gnu/java/security/key/rsa/RSAKeyPairRawCodec.java4
-rw-r--r--gnu/java/security/key/rsa/RSAKeyPairX509Codec.java4
-rw-r--r--gnu/java/security/pkcs/PKCS7Data.java2
-rw-r--r--gnu/java/security/pkcs/PKCS7SignedData.java4
-rw-r--r--gnu/java/security/pkcs/SignerInfo.java8
-rw-r--r--gnu/java/security/prng/BasePRNG.java4
-rw-r--r--gnu/java/security/prng/EntropySource.java4
-rw-r--r--gnu/java/security/prng/IRandom.java18
-rw-r--r--gnu/java/security/prng/LimitReachedException.java2
-rw-r--r--gnu/java/security/prng/MDGenerator.java2
-rw-r--r--gnu/java/security/prng/PRNGFactory.java6
-rw-r--r--gnu/java/security/prng/RandomEventListener.java2
-rw-r--r--gnu/java/security/provider/DefaultPolicy.java6
-rw-r--r--gnu/java/security/provider/PKIXCertPathValidatorImpl.java4
-rw-r--r--gnu/java/security/sig/BaseSignature.java6
-rw-r--r--gnu/java/security/sig/ISignature.java18
-rw-r--r--gnu/java/security/sig/ISignatureCodec.java2
-rw-r--r--gnu/java/security/sig/SignatureCodecFactory.java6
-rw-r--r--gnu/java/security/sig/SignatureFactory.java6
-rw-r--r--gnu/java/security/sig/dss/DSSSignature.java6
-rw-r--r--gnu/java/security/sig/dss/DSSSignatureRawCodec.java4
-rw-r--r--gnu/java/security/sig/dss/DSSSignatureX509Codec.java8
-rw-r--r--gnu/java/security/sig/rsa/EME_PKCS1_V1_5.java10
-rw-r--r--gnu/java/security/sig/rsa/EMSA_PKCS1_V1_5.java2
-rw-r--r--gnu/java/security/sig/rsa/EMSA_PSS.java12
-rw-r--r--gnu/java/security/sig/rsa/RSA.java14
-rw-r--r--gnu/java/security/sig/rsa/RSAPKCS1V1_5Signature.java4
-rw-r--r--gnu/java/security/sig/rsa/RSAPKCS1V1_5SignatureRawCodec.java4
-rw-r--r--gnu/java/security/sig/rsa/RSAPKCS1V1_5SignatureX509Codec.java6
-rw-r--r--gnu/java/security/sig/rsa/RSAPSSSignature.java6
-rw-r--r--gnu/java/security/sig/rsa/RSAPSSSignatureRawCodec.java4
-rw-r--r--gnu/java/security/sig/rsa/RSASignatureFactory.java4
-rw-r--r--gnu/java/security/util/ByteArray.java38
-rw-r--r--gnu/java/security/util/ByteBufferOutputStream.java18
-rw-r--r--gnu/java/security/util/ExpirableObject.java8
-rw-r--r--gnu/java/security/util/FormatUtil.java8
-rw-r--r--gnu/java/security/util/IntegerUtil.java4
-rw-r--r--gnu/java/security/util/PRNG.java8
-rw-r--r--gnu/java/security/util/Prime.java142
-rw-r--r--gnu/java/security/util/Sequence.java6
-rw-r--r--gnu/java/security/util/SimpleList.java10
-rw-r--r--gnu/java/security/util/Util.java36
-rw-r--r--gnu/java/security/x509/X509CRLSelectorImpl.java1
-rw-r--r--gnu/java/security/x509/X509CertSelectorImpl.java1
-rw-r--r--gnu/java/security/x509/ext/CertificatePolicies.java2
-rw-r--r--gnu/java/security/x509/ext/GeneralName.java32
-rw-r--r--gnu/java/security/x509/ext/GeneralSubtree.java18
-rw-r--r--gnu/java/security/x509/ext/NameConstraints.java24
-rw-r--r--gnu/java/text/AttributedFormatBuffer.java36
-rw-r--r--gnu/java/text/BaseBreakIterator.java24
-rw-r--r--gnu/java/text/CharacterBreakIterator.java168
-rw-r--r--gnu/java/text/FormatBuffer.java12
-rw-r--r--gnu/java/text/FormatCharacterIterator.java270
-rw-r--r--gnu/java/text/LineBreakIterator.java186
-rw-r--r--gnu/java/text/SentenceBreakIterator.java282
-rw-r--r--gnu/java/text/StringFormatBuffer.java8
-rw-r--r--gnu/java/text/WordBreakIterator.java294
-rw-r--r--gnu/java/util/Base64.java4
-rw-r--r--gnu/java/util/DoubleEnumeration.java4
-rw-r--r--gnu/java/util/EmptyEnumeration.java2
-rw-r--r--gnu/java/util/WeakIdentityHashMap.java4
-rw-r--r--gnu/java/util/ZoneInfo.java1378
-rw-r--r--gnu/java/util/jar/JarUtils.java10
-rw-r--r--gnu/java/util/prefs/FileBasedFactory.java2
-rw-r--r--gnu/java/util/prefs/FileBasedPreferences.java4
-rw-r--r--gnu/java/util/prefs/GConfBasedFactory.java6
-rw-r--r--gnu/java/util/prefs/GConfBasedPreferences.java52
-rw-r--r--gnu/java/util/prefs/MemoryBasedFactory.java2
-rw-r--r--gnu/java/util/prefs/MemoryBasedPreferences.java2
-rw-r--r--gnu/java/util/prefs/NodeReader.java8
-rw-r--r--gnu/java/util/prefs/NodeWriter.java4
-rw-r--r--gnu/java/util/prefs/gconf/GConfNativePeer.java54
-rw-r--r--gnu/java/util/regex/BacktrackStack.java20
-rw-r--r--gnu/java/util/regex/CharIndexed.java2
-rw-r--r--gnu/java/util/regex/CharIndexedInputStream.java82
-rw-r--r--gnu/java/util/regex/RE.java3022
-rw-r--r--gnu/java/util/regex/REFilterInputStream.java42
-rw-r--r--gnu/java/util/regex/REMatch.java124
-rw-r--r--gnu/java/util/regex/REMatchEnumeration.java34
-rw-r--r--gnu/java/util/regex/RESyntax.java46
-rw-r--r--gnu/java/util/regex/REToken.java10
-rw-r--r--gnu/java/util/regex/RETokenAny.java20
-rw-r--r--gnu/java/util/regex/RETokenBackRef.java36
-rw-r--r--gnu/java/util/regex/RETokenChar.java52
-rw-r--r--gnu/java/util/regex/RETokenEnd.java58
-rw-r--r--gnu/java/util/regex/RETokenEndOfPreviousMatch.java6
-rw-r--r--gnu/java/util/regex/RETokenIndependent.java8
-rw-r--r--gnu/java/util/regex/RETokenLookAhead.java14
-rw-r--r--gnu/java/util/regex/RETokenLookBehind.java40
-rw-r--r--gnu/java/util/regex/RETokenNamedProperty.java118
-rw-r--r--gnu/java/util/regex/RETokenOneOf.java178
-rw-r--r--gnu/java/util/regex/RETokenPOSIX.java84
-rw-r--r--gnu/java/util/regex/RETokenRange.java30
-rw-r--r--gnu/java/util/regex/RETokenRepeated.java590
-rw-r--r--gnu/java/util/regex/RETokenStart.java92
-rw-r--r--gnu/java/util/regex/RETokenWordBoundary.java28
-rw-r--r--gnu/java/util/regex/UncheckedRE.java6
-rw-r--r--gnu/javax/activation/viewers/ImageViewer.java2
-rw-r--r--gnu/javax/activation/viewers/TextEditor.java4
-rw-r--r--gnu/javax/activation/viewers/TextViewer.java2
-rw-r--r--gnu/javax/crypto/assembly/Assembly.java24
-rw-r--r--gnu/javax/crypto/assembly/Cascade.java24
-rw-r--r--gnu/javax/crypto/assembly/CascadeStage.java2
-rw-r--r--gnu/javax/crypto/assembly/CascadeTransformer.java2
-rw-r--r--gnu/javax/crypto/assembly/DeflateTransformer.java2
-rw-r--r--gnu/javax/crypto/assembly/Direction.java2
-rw-r--r--gnu/javax/crypto/assembly/LoopbackTransformer.java2
-rw-r--r--gnu/javax/crypto/assembly/ModeStage.java2
-rw-r--r--gnu/javax/crypto/assembly/Operation.java2
-rw-r--r--gnu/javax/crypto/assembly/PaddingTransformer.java2
-rw-r--r--gnu/javax/crypto/assembly/Stage.java20
-rw-r--r--gnu/javax/crypto/assembly/Transformer.java28
-rw-r--r--gnu/javax/crypto/assembly/TransformerException.java8
-rw-r--r--gnu/javax/crypto/cipher/Anubis.java4
-rw-r--r--gnu/javax/crypto/cipher/BaseCipher.java4
-rw-r--r--gnu/javax/crypto/cipher/Blowfish.java2
-rw-r--r--gnu/javax/crypto/cipher/Cast5.java2
-rw-r--r--gnu/javax/crypto/cipher/CipherFactory.java6
-rw-r--r--gnu/javax/crypto/cipher/DES.java4
-rw-r--r--gnu/javax/crypto/cipher/IBlockCipher.java24
-rw-r--r--gnu/javax/crypto/cipher/IBlockCipherSpi.java14
-rw-r--r--gnu/javax/crypto/cipher/Khazad.java4
-rw-r--r--gnu/javax/crypto/cipher/NullCipher.java2
-rw-r--r--gnu/javax/crypto/cipher/Rijndael.java6
-rw-r--r--gnu/javax/crypto/cipher/Serpent.java2
-rw-r--r--gnu/javax/crypto/cipher/Square.java8
-rw-r--r--gnu/javax/crypto/cipher/TripleDES.java10
-rw-r--r--gnu/javax/crypto/cipher/Twofish.java2
-rw-r--r--gnu/javax/crypto/cipher/WeakKeyException.java2
-rw-r--r--gnu/javax/crypto/jce/DiffieHellmanImpl.java2
-rw-r--r--gnu/javax/crypto/jce/GnuCrypto.java8
-rw-r--r--gnu/javax/crypto/jce/GnuSasl.java4
-rw-r--r--gnu/javax/crypto/jce/PBKDF2SecretKeyFactory.java2
-rw-r--r--gnu/javax/crypto/jce/cipher/AESKeyWrapSpi.java4
-rw-r--r--gnu/javax/crypto/jce/cipher/AESSpi.java2
-rw-r--r--gnu/javax/crypto/jce/cipher/ARCFourSpi.java2
-rw-r--r--gnu/javax/crypto/jce/cipher/AnubisSpi.java2
-rw-r--r--gnu/javax/crypto/jce/cipher/BlowfishSpi.java2
-rw-r--r--gnu/javax/crypto/jce/cipher/Cast5Spi.java2
-rw-r--r--gnu/javax/crypto/jce/cipher/CipherAdapter.java12
-rw-r--r--gnu/javax/crypto/jce/cipher/DESSpi.java2
-rw-r--r--gnu/javax/crypto/jce/cipher/KeyWrappingAlgorithmAdapter.java14
-rw-r--r--gnu/javax/crypto/jce/cipher/KhazadSpi.java2
-rw-r--r--gnu/javax/crypto/jce/cipher/NullCipherSpi.java2
-rw-r--r--gnu/javax/crypto/jce/cipher/PBES2.java2
-rw-r--r--gnu/javax/crypto/jce/cipher/RijndaelSpi.java2
-rw-r--r--gnu/javax/crypto/jce/cipher/SerpentSpi.java2
-rw-r--r--gnu/javax/crypto/jce/cipher/SquareSpi.java2
-rw-r--r--gnu/javax/crypto/jce/cipher/TripleDESSpi.java2
-rw-r--r--gnu/javax/crypto/jce/cipher/TwofishSpi.java2
-rw-r--r--gnu/javax/crypto/jce/key/AnubisSecretKeyFactoryImpl.java2
-rw-r--r--gnu/javax/crypto/jce/key/BlowfishSecretKeyFactoryImpl.java2
-rw-r--r--gnu/javax/crypto/jce/key/Cast5SecretKeyFactoryImpl.java2
-rw-r--r--gnu/javax/crypto/jce/key/SecretKeyGeneratorImpl.java4
-rw-r--r--gnu/javax/crypto/jce/keyring/GnuKeyring.java8
-rw-r--r--gnu/javax/crypto/jce/mac/HMacHavalSpi.java2
-rw-r--r--gnu/javax/crypto/jce/mac/HMacMD2Spi.java2
-rw-r--r--gnu/javax/crypto/jce/mac/HMacMD4Spi.java2
-rw-r--r--gnu/javax/crypto/jce/mac/HMacMD5Spi.java2
-rw-r--r--gnu/javax/crypto/jce/mac/HMacRipeMD128Spi.java2
-rw-r--r--gnu/javax/crypto/jce/mac/HMacRipeMD160Spi.java2
-rw-r--r--gnu/javax/crypto/jce/mac/HMacSHA160Spi.java2
-rw-r--r--gnu/javax/crypto/jce/mac/HMacSHA256Spi.java2
-rw-r--r--gnu/javax/crypto/jce/mac/HMacSHA384Spi.java2
-rw-r--r--gnu/javax/crypto/jce/mac/HMacSHA512Spi.java2
-rw-r--r--gnu/javax/crypto/jce/mac/HMacTigerSpi.java2
-rw-r--r--gnu/javax/crypto/jce/mac/HMacWhirlpoolSpi.java2
-rw-r--r--gnu/javax/crypto/jce/mac/MacAdapter.java6
-rw-r--r--gnu/javax/crypto/jce/mac/TMMH16Spi.java2
-rw-r--r--gnu/javax/crypto/jce/mac/UHash32Spi.java2
-rw-r--r--gnu/javax/crypto/jce/mac/UMac32Spi.java2
-rw-r--r--gnu/javax/crypto/jce/params/BlockCipherParameters.java4
-rw-r--r--gnu/javax/crypto/jce/params/DEREncodingException.java2
-rw-r--r--gnu/javax/crypto/jce/params/DERReader.java2
-rw-r--r--gnu/javax/crypto/jce/params/DERWriter.java2
-rw-r--r--gnu/javax/crypto/jce/prng/ARCFourRandomSpi.java2
-rw-r--r--gnu/javax/crypto/jce/prng/CSPRNGSpi.java2
-rw-r--r--gnu/javax/crypto/jce/prng/FortunaImpl.java4
-rw-r--r--gnu/javax/crypto/jce/prng/ICMRandomSpi.java2
-rw-r--r--gnu/javax/crypto/jce/prng/UMacRandomSpi.java2
-rw-r--r--gnu/javax/crypto/jce/sig/DHParameters.java8
-rw-r--r--gnu/javax/crypto/jce/spec/BlockCipherParameterSpec.java12
-rw-r--r--gnu/javax/crypto/jce/spec/TMMHParameterSpec.java12
-rw-r--r--gnu/javax/crypto/jce/spec/UMac32ParameterSpec.java6
-rw-r--r--gnu/javax/crypto/key/BaseKeyAgreementParty.java4
-rw-r--r--gnu/javax/crypto/key/GnuPBEKey.java2
-rw-r--r--gnu/javax/crypto/key/GnuSecretKey.java12
-rw-r--r--gnu/javax/crypto/key/IKeyAgreementParty.java12
-rw-r--r--gnu/javax/crypto/key/IncomingMessage.java18
-rw-r--r--gnu/javax/crypto/key/KeyAgreementException.java14
-rw-r--r--gnu/javax/crypto/key/KeyAgreementFactory.java8
-rw-r--r--gnu/javax/crypto/key/OutgoingMessage.java14
-rw-r--r--gnu/javax/crypto/key/dh/DHKeyPairPKCS8Codec.java4
-rw-r--r--gnu/javax/crypto/key/dh/DHKeyPairRawCodec.java6
-rw-r--r--gnu/javax/crypto/key/dh/DHKeyPairX509Codec.java6
-rw-r--r--gnu/javax/crypto/key/dh/DiffieHellmanKeyAgreement.java4
-rw-r--r--gnu/javax/crypto/key/dh/DiffieHellmanReceiver.java4
-rw-r--r--gnu/javax/crypto/key/dh/DiffieHellmanSender.java4
-rw-r--r--gnu/javax/crypto/key/dh/ElGamalKeyAgreement.java2
-rw-r--r--gnu/javax/crypto/key/dh/ElGamalReceiver.java4
-rw-r--r--gnu/javax/crypto/key/dh/ElGamalSender.java4
-rw-r--r--gnu/javax/crypto/key/dh/GnuDHKey.java6
-rw-r--r--gnu/javax/crypto/key/dh/GnuDHKeyPairGenerator.java4
-rw-r--r--gnu/javax/crypto/key/dh/GnuDHPrivateKey.java12
-rw-r--r--gnu/javax/crypto/key/dh/GnuDHPublicKey.java12
-rw-r--r--gnu/javax/crypto/key/dh/RFC2631.java2
-rw-r--r--gnu/javax/crypto/key/srp6/SRP6Host.java2
-rw-r--r--gnu/javax/crypto/key/srp6/SRP6KeyAgreement.java14
-rw-r--r--gnu/javax/crypto/key/srp6/SRP6SaslClient.java6
-rw-r--r--gnu/javax/crypto/key/srp6/SRP6SaslServer.java6
-rw-r--r--gnu/javax/crypto/key/srp6/SRP6TLSClient.java2
-rw-r--r--gnu/javax/crypto/key/srp6/SRP6TLSServer.java2
-rw-r--r--gnu/javax/crypto/key/srp6/SRP6User.java2
-rw-r--r--gnu/javax/crypto/key/srp6/SRPAlgorithm.java2
-rw-r--r--gnu/javax/crypto/key/srp6/SRPKey.java12
-rw-r--r--gnu/javax/crypto/key/srp6/SRPKeyPairGenerator.java2
-rw-r--r--gnu/javax/crypto/key/srp6/SRPKeyPairRawCodec.java6
-rw-r--r--gnu/javax/crypto/key/srp6/SRPPrivateKey.java18
-rw-r--r--gnu/javax/crypto/key/srp6/SRPPublicKey.java14
-rw-r--r--gnu/javax/crypto/keyring/AuthenticatedEntry.java6
-rw-r--r--gnu/javax/crypto/keyring/BaseKeyring.java2
-rw-r--r--gnu/javax/crypto/keyring/BinaryDataEntry.java8
-rw-r--r--gnu/javax/crypto/keyring/CertPathEntry.java2
-rw-r--r--gnu/javax/crypto/keyring/CertificateEntry.java6
-rw-r--r--gnu/javax/crypto/keyring/CompressedEntry.java2
-rw-r--r--gnu/javax/crypto/keyring/EncryptedEntry.java2
-rw-r--r--gnu/javax/crypto/keyring/Entry.java8
-rw-r--r--gnu/javax/crypto/keyring/EnvelopeEntry.java18
-rw-r--r--gnu/javax/crypto/keyring/GnuPrivateKeyring.java4
-rw-r--r--gnu/javax/crypto/keyring/GnuPublicKeyring.java2
-rw-r--r--gnu/javax/crypto/keyring/IKeyring.java18
-rw-r--r--gnu/javax/crypto/keyring/IPrivateKeyring.java20
-rw-r--r--gnu/javax/crypto/keyring/IPublicKeyring.java10
-rw-r--r--gnu/javax/crypto/keyring/MalformedKeyringException.java2
-rw-r--r--gnu/javax/crypto/keyring/MaskableEnvelopeEntry.java6
-rw-r--r--gnu/javax/crypto/keyring/MeteredInputStream.java4
-rw-r--r--gnu/javax/crypto/keyring/PasswordAuthenticatedEntry.java2
-rw-r--r--gnu/javax/crypto/keyring/PasswordEncryptedEntry.java2
-rw-r--r--gnu/javax/crypto/keyring/PasswordProtectedEntry.java4
-rw-r--r--gnu/javax/crypto/keyring/PrimitiveEntry.java6
-rw-r--r--gnu/javax/crypto/keyring/PrivateKeyEntry.java6
-rw-r--r--gnu/javax/crypto/keyring/Properties.java18
-rw-r--r--gnu/javax/crypto/keyring/PublicKeyEntry.java4
-rw-r--r--gnu/javax/crypto/kwa/BaseKeyWrappingAlgorithm.java2
-rw-r--r--gnu/javax/crypto/kwa/IKeyWrappingAlgorithm.java12
-rw-r--r--gnu/javax/crypto/kwa/KeyWrappingAlgorithmFactory.java6
-rw-r--r--gnu/javax/crypto/kwa/TripleDESKeyWrap.java6
-rw-r--r--gnu/javax/crypto/mac/BaseMac.java6
-rw-r--r--gnu/javax/crypto/mac/HMac.java2
-rw-r--r--gnu/javax/crypto/mac/HMacFactory.java6
-rw-r--r--gnu/javax/crypto/mac/IMac.java18
-rw-r--r--gnu/javax/crypto/mac/MacFactory.java6
-rw-r--r--gnu/javax/crypto/mac/MacInputStream.java10
-rw-r--r--gnu/javax/crypto/mac/MacOutputStream.java10
-rw-r--r--gnu/javax/crypto/mac/OMAC.java2
-rw-r--r--gnu/javax/crypto/mac/TMMH16.java8
-rw-r--r--gnu/javax/crypto/mac/UHash32.java4
-rw-r--r--gnu/javax/crypto/mac/UMac32.java6
-rw-r--r--gnu/javax/crypto/mode/BaseMode.java12
-rw-r--r--gnu/javax/crypto/mode/CBC.java6
-rw-r--r--gnu/javax/crypto/mode/CFB.java6
-rw-r--r--gnu/javax/crypto/mode/CTR.java10
-rw-r--r--gnu/javax/crypto/mode/EAX.java2
-rw-r--r--gnu/javax/crypto/mode/ECB.java6
-rw-r--r--gnu/javax/crypto/mode/IAuthenticatedMode.java2
-rw-r--r--gnu/javax/crypto/mode/ICM.java6
-rw-r--r--gnu/javax/crypto/mode/IMode.java4
-rw-r--r--gnu/javax/crypto/mode/ModeFactory.java6
-rw-r--r--gnu/javax/crypto/mode/OFB.java6
-rw-r--r--gnu/javax/crypto/pad/BasePad.java8
-rw-r--r--gnu/javax/crypto/pad/IPad.java14
-rw-r--r--gnu/javax/crypto/pad/PKCS1_V1_5.java4
-rw-r--r--gnu/javax/crypto/pad/PKCS7.java4
-rw-r--r--gnu/javax/crypto/pad/PadFactory.java6
-rw-r--r--gnu/javax/crypto/pad/TBC.java4
-rw-r--r--gnu/javax/crypto/pad/WrongPaddingException.java2
-rw-r--r--gnu/javax/crypto/prng/ARCFour.java2
-rw-r--r--gnu/javax/crypto/prng/CSPRNG.java14
-rw-r--r--gnu/javax/crypto/prng/ICMGenerator.java6
-rw-r--r--gnu/javax/crypto/prng/IPBE.java2
-rw-r--r--gnu/javax/crypto/prng/PBKDF2.java4
-rw-r--r--gnu/javax/crypto/prng/PRNGFactory.java6
-rw-r--r--gnu/javax/crypto/prng/UMacGenerator.java2
-rw-r--r--gnu/javax/crypto/sasl/AuthInfo.java4
-rw-r--r--gnu/javax/crypto/sasl/AuthInfoProviderFactory.java2
-rw-r--r--gnu/javax/crypto/sasl/ClientFactory.java2
-rw-r--r--gnu/javax/crypto/sasl/ClientMechanism.java6
-rw-r--r--gnu/javax/crypto/sasl/ConfidentialityException.java6
-rw-r--r--gnu/javax/crypto/sasl/IAuthInfoProvider.java14
-rw-r--r--gnu/javax/crypto/sasl/IAuthInfoProviderFactory.java4
-rw-r--r--gnu/javax/crypto/sasl/IllegalMechanismStateException.java6
-rw-r--r--gnu/javax/crypto/sasl/InputBuffer.java20
-rw-r--r--gnu/javax/crypto/sasl/IntegrityException.java6
-rw-r--r--gnu/javax/crypto/sasl/NoSuchMechanismException.java4
-rw-r--r--gnu/javax/crypto/sasl/NoSuchUserException.java4
-rw-r--r--gnu/javax/crypto/sasl/OutputBuffer.java16
-rw-r--r--gnu/javax/crypto/sasl/SaslEncodingException.java4
-rw-r--r--gnu/javax/crypto/sasl/SaslInputStream.java8
-rw-r--r--gnu/javax/crypto/sasl/SaslOutputStream.java2
-rw-r--r--gnu/javax/crypto/sasl/SaslUtil.java2
-rw-r--r--gnu/javax/crypto/sasl/ServerFactory.java2
-rw-r--r--gnu/javax/crypto/sasl/ServerMechanism.java6
-rw-r--r--gnu/javax/crypto/sasl/UserAlreadyExistsException.java4
-rw-r--r--gnu/javax/crypto/sasl/anonymous/AnonymousClient.java2
-rw-r--r--gnu/javax/crypto/sasl/anonymous/AnonymousServer.java2
-rw-r--r--gnu/javax/crypto/sasl/anonymous/AnonymousUtil.java2
-rw-r--r--gnu/javax/crypto/sasl/crammd5/CramMD5AuthInfoProvider.java2
-rw-r--r--gnu/javax/crypto/sasl/crammd5/CramMD5Client.java2
-rw-r--r--gnu/javax/crypto/sasl/crammd5/CramMD5Registry.java2
-rw-r--r--gnu/javax/crypto/sasl/crammd5/CramMD5Server.java2
-rw-r--r--gnu/javax/crypto/sasl/crammd5/CramMD5Util.java2
-rw-r--r--gnu/javax/crypto/sasl/crammd5/PasswordFile.java2
-rw-r--r--gnu/javax/crypto/sasl/plain/PasswordFile.java2
-rw-r--r--gnu/javax/crypto/sasl/plain/PlainAuthInfoProvider.java2
-rw-r--r--gnu/javax/crypto/sasl/plain/PlainClient.java2
-rw-r--r--gnu/javax/crypto/sasl/plain/PlainRegistry.java2
-rw-r--r--gnu/javax/crypto/sasl/plain/PlainServer.java2
-rw-r--r--gnu/javax/crypto/sasl/srp/CALG.java12
-rw-r--r--gnu/javax/crypto/sasl/srp/ClientStore.java12
-rw-r--r--gnu/javax/crypto/sasl/srp/IALG.java6
-rw-r--r--gnu/javax/crypto/sasl/srp/KDF.java8
-rw-r--r--gnu/javax/crypto/sasl/srp/PasswordFile.java12
-rw-r--r--gnu/javax/crypto/sasl/srp/SRP.java12
-rw-r--r--gnu/javax/crypto/sasl/srp/SRPAuthInfoProvider.java2
-rw-r--r--gnu/javax/crypto/sasl/srp/SRPClient.java2
-rw-r--r--gnu/javax/crypto/sasl/srp/SRPRegistry.java2
-rw-r--r--gnu/javax/crypto/sasl/srp/SRPServer.java2
-rw-r--r--gnu/javax/crypto/sasl/srp/SecurityContext.java2
-rw-r--r--gnu/javax/crypto/sasl/srp/ServerStore.java14
-rw-r--r--gnu/javax/crypto/sasl/srp/StoreEntry.java4
-rw-r--r--gnu/javax/imageio/IIOInputStream.java2
-rw-r--r--gnu/javax/imageio/bmp/BMPDecoder.java148
-rw-r--r--gnu/javax/imageio/bmp/BMPEncoder.java10
-rw-r--r--gnu/javax/imageio/bmp/BMPException.java2
-rw-r--r--gnu/javax/imageio/bmp/BMPFileHeader.java64
-rw-r--r--gnu/javax/imageio/bmp/BMPImageReader.java99
-rw-r--r--gnu/javax/imageio/bmp/BMPImageReaderSpi.java86
-rw-r--r--gnu/javax/imageio/bmp/BMPImageWriter.java22
-rw-r--r--gnu/javax/imageio/bmp/BMPImageWriterSpi.java20
-rw-r--r--gnu/javax/imageio/bmp/BMPInfoHeader.java28
-rw-r--r--gnu/javax/imageio/bmp/DecodeBF16.java75
-rw-r--r--gnu/javax/imageio/bmp/DecodeBF32.java83
-rw-r--r--gnu/javax/imageio/bmp/DecodeRGB1.java56
-rw-r--r--gnu/javax/imageio/bmp/DecodeRGB24.java44
-rw-r--r--gnu/javax/imageio/bmp/DecodeRGB4.java62
-rw-r--r--gnu/javax/imageio/bmp/DecodeRGB8.java58
-rw-r--r--gnu/javax/imageio/bmp/DecodeRLE4.java211
-rw-r--r--gnu/javax/imageio/bmp/DecodeRLE8.java151
-rw-r--r--gnu/javax/imageio/bmp/EncodeRGB1.java8
-rw-r--r--gnu/javax/imageio/bmp/EncodeRGB16.java12
-rw-r--r--gnu/javax/imageio/bmp/EncodeRGB24.java8
-rw-r--r--gnu/javax/imageio/bmp/EncodeRGB32.java10
-rw-r--r--gnu/javax/imageio/bmp/EncodeRGB4.java8
-rw-r--r--gnu/javax/imageio/bmp/EncodeRGB8.java6
-rw-r--r--gnu/javax/imageio/bmp/EncodeRLE4.java22
-rw-r--r--gnu/javax/imageio/bmp/EncodeRLE8.java22
-rw-r--r--gnu/javax/imageio/gif/GIFFile.java296
-rw-r--r--gnu/javax/imageio/gif/GIFImageReader.java104
-rw-r--r--gnu/javax/imageio/gif/GIFImageReaderSpi.java50
-rw-r--r--gnu/javax/imageio/jpeg/DCT.java8
-rw-r--r--gnu/javax/imageio/jpeg/JPEGComponent.java18
-rw-r--r--gnu/javax/imageio/jpeg/JPEGDecoder.java10
-rw-r--r--gnu/javax/imageio/jpeg/JPEGImageInputStream.java8
-rw-r--r--gnu/javax/imageio/jpeg/JPEGImageReader.java2
-rw-r--r--gnu/javax/imageio/jpeg/JPEGImageReaderSpi.java8
-rw-r--r--gnu/javax/imageio/jpeg/JPEGMarker.java2
-rw-r--r--gnu/javax/imageio/jpeg/ZigZag.java22
-rw-r--r--gnu/javax/imageio/png/PNGChunk.java82
-rw-r--r--gnu/javax/imageio/png/PNGData.java10
-rw-r--r--gnu/javax/imageio/png/PNGDecoder.java254
-rw-r--r--gnu/javax/imageio/png/PNGEncoder.java144
-rw-r--r--gnu/javax/imageio/png/PNGException.java4
-rw-r--r--gnu/javax/imageio/png/PNGFile.java76
-rw-r--r--gnu/javax/imageio/png/PNGFilter.java228
-rw-r--r--gnu/javax/imageio/png/PNGGamma.java8
-rw-r--r--gnu/javax/imageio/png/PNGHeader.java76
-rw-r--r--gnu/javax/imageio/png/PNGICCProfile.java18
-rw-r--r--gnu/javax/imageio/png/PNGImageReader.java6
-rw-r--r--gnu/javax/imageio/png/PNGPalette.java52
-rw-r--r--gnu/javax/imageio/png/PNGPhys.java24
-rw-r--r--gnu/javax/imageio/png/PNGTime.java6
-rw-r--r--gnu/javax/management/ListenerData.java22
-rw-r--r--gnu/javax/management/Server.java912
-rw-r--r--gnu/javax/management/Translator.java508
-rw-r--r--gnu/javax/naming/giop/ContextContinuation.java84
-rw-r--r--gnu/javax/naming/giop/CorbalocParser.java30
-rw-r--r--gnu/javax/naming/giop/GiopNamingEnumeration.java22
-rw-r--r--gnu/javax/naming/giop/GiopNamingServiceFactory.java22
-rw-r--r--gnu/javax/naming/giop/GiopNamingServiceURLContext.java62
-rw-r--r--gnu/javax/naming/giop/ListBindingsEnumeration.java16
-rw-r--r--gnu/javax/naming/giop/ListEnumeration.java14
-rw-r--r--gnu/javax/naming/ictxImpl/trans/GnuName.java22
-rw-r--r--gnu/javax/naming/jndi/url/corbaname/corbanameURLContextFactory.java4
-rw-r--r--gnu/javax/naming/jndi/url/rmi/ContextContinuation.java68
-rw-r--r--gnu/javax/naming/jndi/url/rmi/ListBindingsEnumeration.java10
-rw-r--r--gnu/javax/naming/jndi/url/rmi/ListEnumeration.java14
-rw-r--r--gnu/javax/naming/jndi/url/rmi/RmiContinuation.java68
-rw-r--r--gnu/javax/naming/jndi/url/rmi/RmiNamingEnumeration.java16
-rw-r--r--gnu/javax/naming/jndi/url/rmi/rmiURLContext.java68
-rw-r--r--gnu/javax/naming/jndi/url/rmi/rmiURLContextFactory.java10
-rw-r--r--gnu/javax/net/ssl/AbstractSessionContext.java38
-rw-r--r--gnu/javax/net/ssl/PreSharedKeyManager.java6
-rw-r--r--gnu/javax/net/ssl/PreSharedKeyManagerParameters.java10
-rw-r--r--gnu/javax/net/ssl/SSLCipherSuite.java22
-rw-r--r--gnu/javax/net/ssl/SSLRecordHandler.java2
-rw-r--r--gnu/javax/net/ssl/Session.java42
-rw-r--r--gnu/javax/net/ssl/SessionStoreException.java4
-rw-r--r--gnu/javax/net/ssl/provider/AbstractHandshake.java156
-rw-r--r--gnu/javax/net/ssl/provider/Alert.java6
-rw-r--r--gnu/javax/net/ssl/provider/AlertException.java6
-rw-r--r--gnu/javax/net/ssl/provider/Builder.java6
-rw-r--r--gnu/javax/net/ssl/provider/Certificate.java2
-rw-r--r--gnu/javax/net/ssl/provider/CertificateBuilder.java4
-rw-r--r--gnu/javax/net/ssl/provider/CertificateRequest.java2
-rw-r--r--gnu/javax/net/ssl/provider/CertificateRequestBuilder.java8
-rw-r--r--gnu/javax/net/ssl/provider/CertificateStatusRequest.java36
-rw-r--r--gnu/javax/net/ssl/provider/CertificateStatusType.java4
-rw-r--r--gnu/javax/net/ssl/provider/CertificateURL.java66
-rw-r--r--gnu/javax/net/ssl/provider/CertificateVerify.java2
-rw-r--r--gnu/javax/net/ssl/provider/CipherSuite.java12
-rw-r--r--gnu/javax/net/ssl/provider/CipherSuiteList.java2
-rw-r--r--gnu/javax/net/ssl/provider/ClientCertificateTypeList.java4
-rw-r--r--gnu/javax/net/ssl/provider/ClientDHE_PSKParameters.java10
-rw-r--r--gnu/javax/net/ssl/provider/ClientDiffieHellmanPublic.java8
-rw-r--r--gnu/javax/net/ssl/provider/ClientHandshake.java152
-rw-r--r--gnu/javax/net/ssl/provider/ClientHello.java4
-rw-r--r--gnu/javax/net/ssl/provider/ClientHelloBuilder.java14
-rw-r--r--gnu/javax/net/ssl/provider/ClientHelloV2.java2
-rw-r--r--gnu/javax/net/ssl/provider/ClientKeyExchangeBuilder.java8
-rw-r--r--gnu/javax/net/ssl/provider/ClientPSKParameters.java8
-rw-r--r--gnu/javax/net/ssl/provider/ClientRSA_PSKParameters.java8
-rw-r--r--gnu/javax/net/ssl/provider/CompressionMethod.java4
-rw-r--r--gnu/javax/net/ssl/provider/CompressionMethodList.java2
-rw-r--r--gnu/javax/net/ssl/provider/Constructed.java8
-rw-r--r--gnu/javax/net/ssl/provider/Debug.java6
-rw-r--r--gnu/javax/net/ssl/provider/DelegatedTask.java12
-rw-r--r--gnu/javax/net/ssl/provider/EmptyExchangeKeys.java4
-rw-r--r--gnu/javax/net/ssl/provider/EncryptedPreMasterSecret.java6
-rw-r--r--gnu/javax/net/ssl/provider/ExchangeKeys.java2
-rw-r--r--gnu/javax/net/ssl/provider/Extension.java34
-rw-r--r--gnu/javax/net/ssl/provider/ExtensionList.java36
-rw-r--r--gnu/javax/net/ssl/provider/Handshake.java2
-rw-r--r--gnu/javax/net/ssl/provider/InputSecurityParameters.java24
-rw-r--r--gnu/javax/net/ssl/provider/Jessie.java4
-rw-r--r--gnu/javax/net/ssl/provider/MaxFragmentLength.java16
-rw-r--r--gnu/javax/net/ssl/provider/OutputSecurityParameters.java22
-rw-r--r--gnu/javax/net/ssl/provider/PreSharedKeyManagerFactoryImpl.java4
-rw-r--r--gnu/javax/net/ssl/provider/Random.java2
-rw-r--r--gnu/javax/net/ssl/provider/SSLContextImpl.java18
-rw-r--r--gnu/javax/net/ssl/provider/SSLEngineImpl.java102
-rw-r--r--gnu/javax/net/ssl/provider/SSLRSASignatureImpl.java6
-rw-r--r--gnu/javax/net/ssl/provider/SSLServerSocketFactoryImpl.java4
-rw-r--r--gnu/javax/net/ssl/provider/SSLServerSocketImpl.java6
-rw-r--r--gnu/javax/net/ssl/provider/SSLSocketFactoryImpl.java4
-rw-r--r--gnu/javax/net/ssl/provider/SSLSocketImpl.java32
-rw-r--r--gnu/javax/net/ssl/provider/SSLv3HMacMD5Impl.java4
-rw-r--r--gnu/javax/net/ssl/provider/SSLv3HMacSHAImpl.java4
-rw-r--r--gnu/javax/net/ssl/provider/ServerDHE_PSKParameters.java16
-rw-r--r--gnu/javax/net/ssl/provider/ServerDHParams.java8
-rw-r--r--gnu/javax/net/ssl/provider/ServerHandshake.java126
-rw-r--r--gnu/javax/net/ssl/provider/ServerHello.java4
-rw-r--r--gnu/javax/net/ssl/provider/ServerHelloBuilder.java14
-rw-r--r--gnu/javax/net/ssl/provider/ServerHelloDone.java2
-rw-r--r--gnu/javax/net/ssl/provider/ServerKeyExchangeBuilder.java8
-rw-r--r--gnu/javax/net/ssl/provider/ServerNameList.java46
-rw-r--r--gnu/javax/net/ssl/provider/ServerPSKParameters.java10
-rw-r--r--gnu/javax/net/ssl/provider/ServerRSA_PSKParameters.java2
-rw-r--r--gnu/javax/net/ssl/provider/SessionImpl.java30
-rw-r--r--gnu/javax/net/ssl/provider/Signature.java4
-rw-r--r--gnu/javax/net/ssl/provider/SignatureAlgorithm.java4
-rw-r--r--gnu/javax/net/ssl/provider/SimpleSessionContext.java12
-rw-r--r--gnu/javax/net/ssl/provider/TruncatedHMAC.java6
-rw-r--r--gnu/javax/net/ssl/provider/TrustedAuthorities.java54
-rw-r--r--gnu/javax/net/ssl/provider/UnresolvedExtensionValue.java12
-rw-r--r--gnu/javax/net/ssl/provider/Util.java10
-rw-r--r--gnu/javax/net/ssl/provider/X500PrincipalList.java4
-rw-r--r--gnu/javax/net/ssl/provider/X509KeyManagerFactory.java4
-rw-r--r--gnu/javax/net/ssl/provider/X509TrustManagerFactory.java10
-rw-r--r--gnu/javax/rmi/CORBA/CorbaInput.java2
-rw-r--r--gnu/javax/rmi/CORBA/CorbaOutput.java2
-rw-r--r--gnu/javax/rmi/CORBA/DefaultWriteObjectTester.java4
-rw-r--r--gnu/javax/rmi/CORBA/DelegateFactory.java10
-rw-r--r--gnu/javax/rmi/CORBA/GetDelegateInstanceException.java6
-rw-r--r--gnu/javax/rmi/CORBA/PortableRemoteObjectDelegateImpl.java18
-rw-r--r--gnu/javax/rmi/CORBA/RmiUtilities.java14
-rw-r--r--gnu/javax/rmi/CORBA/StubDelegateImpl.java14
-rw-r--r--gnu/javax/rmi/CORBA/TieTargetRecord.java2
-rw-r--r--gnu/javax/rmi/CORBA/UtilDelegateImpl.java30
-rw-r--r--gnu/javax/rmi/CORBA/ValueHandlerDelegateImpl.java12
-rw-r--r--gnu/javax/security/auth/callback/AWTCallbackHandler.java2
-rw-r--r--gnu/javax/security/auth/callback/AbstractCallbackHandler.java8
-rw-r--r--gnu/javax/security/auth/callback/CertificateCallback.java4
-rw-r--r--gnu/javax/security/auth/callback/ConsoleCallbackHandler.java2
-rw-r--r--gnu/javax/security/auth/callback/DefaultCallbackHandler.java2
-rw-r--r--gnu/javax/security/auth/callback/SwingCallbackHandler.java6
-rw-r--r--gnu/javax/security/auth/login/ConfigFileParser.java6
-rw-r--r--gnu/javax/security/auth/login/ConfigFileTokenizer.java4
-rw-r--r--gnu/javax/security/auth/login/GnuConfiguration.java22
-rw-r--r--gnu/javax/sound/AudioSecurityManager.java28
-rw-r--r--gnu/javax/sound/midi/alsa/AlsaInputPortDevice.java6
-rw-r--r--gnu/javax/sound/midi/alsa/AlsaMidiDeviceProvider.java56
-rw-r--r--gnu/javax/sound/midi/alsa/AlsaMidiSequencerDevice.java22
-rw-r--r--gnu/javax/sound/midi/alsa/AlsaOutputPortDevice.java2
-rw-r--r--gnu/javax/sound/midi/alsa/AlsaPortDevice.java16
-rw-r--r--gnu/javax/sound/midi/dssi/DSSIMidiDeviceProvider.java34
-rw-r--r--gnu/javax/sound/midi/dssi/DSSISynthesizer.java52
-rw-r--r--gnu/javax/sound/midi/file/ExtendedMidiFileFormat.java10
-rw-r--r--gnu/javax/sound/midi/file/MidiDataInputStream.java8
-rw-r--r--gnu/javax/sound/midi/file/MidiDataOutputStream.java36
-rw-r--r--gnu/javax/sound/midi/file/MidiFileReader.java66
-rw-r--r--gnu/javax/sound/midi/file/MidiFileWriter.java56
-rw-r--r--gnu/javax/sound/sampled/AU/AUReader.java99
-rw-r--r--gnu/javax/sound/sampled/WAV/WAVReader.java102
-rw-r--r--gnu/javax/sound/sampled/gstreamer/GStreamerMixer.java30
-rw-r--r--gnu/javax/sound/sampled/gstreamer/GStreamerMixerProvider.java10
-rw-r--r--gnu/javax/sound/sampled/gstreamer/io/GstAudioFileReader.java36
-rw-r--r--gnu/javax/sound/sampled/gstreamer/io/GstAudioFileReaderNativePeer.java98
-rw-r--r--gnu/javax/sound/sampled/gstreamer/io/GstInputStream.java28
-rw-r--r--gnu/javax/sound/sampled/gstreamer/lines/GstDataLine.java14
-rw-r--r--gnu/javax/sound/sampled/gstreamer/lines/GstNativeDataLine.java12
-rw-r--r--gnu/javax/sound/sampled/gstreamer/lines/GstPipeline.java110
-rw-r--r--gnu/javax/sound/sampled/gstreamer/lines/GstSourceDataLine.java18
-rw-r--r--gnu/javax/swing/plaf/gnu/GNULookAndFeel.java50
-rw-r--r--gnu/javax/swing/text/html/CharacterAttributeTranslator.java76
-rw-r--r--gnu/javax/swing/text/html/CombinedAttributes.java32
-rw-r--r--gnu/javax/swing/text/html/ImageViewIconFactory.java20
-rw-r--r--gnu/javax/swing/text/html/css/BorderStyle.java2
-rw-r--r--gnu/javax/swing/text/html/css/CSSParser.java18
-rw-r--r--gnu/javax/swing/text/html/css/CSSScanner.java8
-rw-r--r--gnu/javax/swing/text/html/css/Selector.java4
-rw-r--r--gnu/javax/swing/text/html/parser/GnuParserDelegator.java12
-rw-r--r--gnu/javax/swing/text/html/parser/HTML_401F.java4
-rw-r--r--gnu/javax/swing/text/html/parser/SmallHtmlAttributeSet.java18
-rw-r--r--gnu/javax/swing/text/html/parser/htmlAttributeSet.java20
-rw-r--r--gnu/javax/swing/text/html/parser/htmlValidator.java30
-rw-r--r--gnu/javax/swing/text/html/parser/models/list.java6
-rw-r--r--gnu/javax/swing/text/html/parser/support/Parser.java18
-rw-r--r--gnu/javax/swing/text/html/parser/support/low/ReaderTokenizer.java4
-rw-r--r--gnu/javax/swing/text/html/parser/support/textPreProcessor.java2
-rw-r--r--gnu/javax/swing/tree/GnuPath.java6
-rw-r--r--gnu/test/Fail.java2
-rw-r--r--gnu/test/Pass.java2
-rw-r--r--gnu/test/Test.java2
-rw-r--r--gnu/test/Unsupported.java2
-rw-r--r--gnu/xml/aelfred2/JAXPFactory.java35
-rw-r--r--gnu/xml/aelfred2/SAXDriver.java178
-rw-r--r--gnu/xml/aelfred2/XmlParser.java659
-rw-r--r--gnu/xml/aelfred2/XmlReader.java15
-rw-r--r--gnu/xml/dom/Consumer.java456
-rw-r--r--gnu/xml/dom/DTDAttributeTypeInfo.java3
-rw-r--r--gnu/xml/dom/DTDElementTypeInfo.java5
-rw-r--r--gnu/xml/dom/DomAttr.java45
-rw-r--r--gnu/xml/dom/DomCDATASection.java7
-rw-r--r--gnu/xml/dom/DomCharacterData.java33
-rw-r--r--gnu/xml/dom/DomComment.java7
-rw-r--r--gnu/xml/dom/DomDOMException.java21
-rw-r--r--gnu/xml/dom/DomDoctype.java56
-rw-r--r--gnu/xml/dom/DomDocument.java75
-rw-r--r--gnu/xml/dom/DomDocumentBuilder.java9
-rw-r--r--gnu/xml/dom/DomDocumentBuilderFactory.java7
-rw-r--r--gnu/xml/dom/DomDocumentConfiguration.java6
-rw-r--r--gnu/xml/dom/DomDocumentFragment.java9
-rw-r--r--gnu/xml/dom/DomElement.java22
-rw-r--r--gnu/xml/dom/DomEntity.java33
-rw-r--r--gnu/xml/dom/DomEntityReference.java8
-rw-r--r--gnu/xml/dom/DomEvent.java47
-rw-r--r--gnu/xml/dom/DomExtern.java13
-rw-r--r--gnu/xml/dom/DomImpl.java35
-rw-r--r--gnu/xml/dom/DomIterator.java49
-rw-r--r--gnu/xml/dom/DomNSResolverContext.java74
-rw-r--r--gnu/xml/dom/DomNamedNodeMap.java24
-rw-r--r--gnu/xml/dom/DomNode.java173
-rw-r--r--gnu/xml/dom/DomNodeIterator.java4
-rw-r--r--gnu/xml/dom/DomNotation.java13
-rw-r--r--gnu/xml/dom/DomNsNode.java21
-rw-r--r--gnu/xml/dom/DomProcessingInstruction.java15
-rw-r--r--gnu/xml/dom/DomText.java24
-rw-r--r--gnu/xml/dom/DomXPathExpression.java106
-rw-r--r--gnu/xml/dom/DomXPathNSResolver.java4
-rw-r--r--gnu/xml/dom/DomXPathResult.java2
-rw-r--r--gnu/xml/dom/ImplementationList.java2
-rw-r--r--gnu/xml/dom/ImplementationSource.java4
-rw-r--r--gnu/xml/dom/JAXPFactory.java55
-rw-r--r--gnu/xml/dom/html2/DomHTMLAnchorElement.java27
-rw-r--r--gnu/xml/dom/html2/DomHTMLAppletElement.java27
-rw-r--r--gnu/xml/dom/html2/DomHTMLAreaElement.java19
-rw-r--r--gnu/xml/dom/html2/DomHTMLBRElement.java5
-rw-r--r--gnu/xml/dom/html2/DomHTMLBaseElement.java7
-rw-r--r--gnu/xml/dom/html2/DomHTMLBaseFontElement.java9
-rw-r--r--gnu/xml/dom/html2/DomHTMLBodyElement.java15
-rw-r--r--gnu/xml/dom/html2/DomHTMLButtonElement.java13
-rw-r--r--gnu/xml/dom/html2/DomHTMLCollection.java5
-rw-r--r--gnu/xml/dom/html2/DomHTMLDListElement.java5
-rw-r--r--gnu/xml/dom/html2/DomHTMLDirectoryElement.java5
-rw-r--r--gnu/xml/dom/html2/DomHTMLDivElement.java5
-rw-r--r--gnu/xml/dom/html2/DomHTMLDocument.java3
-rw-r--r--gnu/xml/dom/html2/DomHTMLElement.java13
-rw-r--r--gnu/xml/dom/html2/DomHTMLEmbedElement.java24
-rw-r--r--gnu/xml/dom/html2/DomHTMLFieldSetElement.java3
-rw-r--r--gnu/xml/dom/html2/DomHTMLFontElement.java9
-rw-r--r--gnu/xml/dom/html2/DomHTMLFormElement.java15
-rw-r--r--gnu/xml/dom/html2/DomHTMLFrameElement.java19
-rw-r--r--gnu/xml/dom/html2/DomHTMLFrameSetElement.java7
-rw-r--r--gnu/xml/dom/html2/DomHTMLHRElement.java11
-rw-r--r--gnu/xml/dom/html2/DomHTMLHeadElement.java5
-rw-r--r--gnu/xml/dom/html2/DomHTMLHeadingElement.java5
-rw-r--r--gnu/xml/dom/html2/DomHTMLHtmlElement.java5
-rw-r--r--gnu/xml/dom/html2/DomHTMLIFrameElement.java23
-rw-r--r--gnu/xml/dom/html2/DomHTMLImageElement.java25
-rw-r--r--gnu/xml/dom/html2/DomHTMLImpl.java5
-rw-r--r--gnu/xml/dom/html2/DomHTMLInputElement.java37
-rw-r--r--gnu/xml/dom/html2/DomHTMLIsIndexElement.java5
-rw-r--r--gnu/xml/dom/html2/DomHTMLLIElement.java7
-rw-r--r--gnu/xml/dom/html2/DomHTMLLabelElement.java7
-rw-r--r--gnu/xml/dom/html2/DomHTMLLegendElement.java7
-rw-r--r--gnu/xml/dom/html2/DomHTMLLinkElement.java21
-rw-r--r--gnu/xml/dom/html2/DomHTMLMapElement.java7
-rw-r--r--gnu/xml/dom/html2/DomHTMLMenuElement.java5
-rw-r--r--gnu/xml/dom/html2/DomHTMLMetaElement.java11
-rw-r--r--gnu/xml/dom/html2/DomHTMLModElement.java7
-rw-r--r--gnu/xml/dom/html2/DomHTMLOListElement.java9
-rw-r--r--gnu/xml/dom/html2/DomHTMLObjectElement.java55
-rw-r--r--gnu/xml/dom/html2/DomHTMLOptGroupElement.java5
-rw-r--r--gnu/xml/dom/html2/DomHTMLOptionElement.java13
-rw-r--r--gnu/xml/dom/html2/DomHTMLParagraphElement.java5
-rw-r--r--gnu/xml/dom/html2/DomHTMLParamElement.java11
-rw-r--r--gnu/xml/dom/html2/DomHTMLParser.java22
-rw-r--r--gnu/xml/dom/html2/DomHTMLPreElement.java5
-rw-r--r--gnu/xml/dom/html2/DomHTMLQuoteElement.java5
-rw-r--r--gnu/xml/dom/html2/DomHTMLScriptElement.java5
-rw-r--r--gnu/xml/dom/html2/DomHTMLSelectElement.java21
-rw-r--r--gnu/xml/dom/html2/DomHTMLStyleElement.java9
-rw-r--r--gnu/xml/dom/html2/DomHTMLTableCaptionElement.java5
-rw-r--r--gnu/xml/dom/html2/DomHTMLTableCellElement.java31
-rw-r--r--gnu/xml/dom/html2/DomHTMLTableColElement.java15
-rw-r--r--gnu/xml/dom/html2/DomHTMLTableElement.java27
-rw-r--r--gnu/xml/dom/html2/DomHTMLTableRowElement.java17
-rw-r--r--gnu/xml/dom/html2/DomHTMLTableSectionElement.java15
-rw-r--r--gnu/xml/dom/html2/DomHTMLTextAreaElement.java23
-rw-r--r--gnu/xml/dom/html2/DomHTMLTitleElement.java5
-rw-r--r--gnu/xml/dom/html2/DomHTMLUListElement.java7
-rw-r--r--gnu/xml/dom/ls/DomLSException.java2
-rw-r--r--gnu/xml/dom/ls/DomLSInput.java5
-rw-r--r--gnu/xml/dom/ls/DomLSOutput.java4
-rw-r--r--gnu/xml/dom/ls/DomLSParser.java11
-rw-r--r--gnu/xml/dom/ls/DomLSSerializer.java7
-rw-r--r--gnu/xml/dom/ls/FilteredSAXEventSink.java37
-rw-r--r--gnu/xml/dom/ls/ReaderInputStream.java9
-rw-r--r--gnu/xml/dom/ls/SAXEventSink.java13
-rw-r--r--gnu/xml/dom/ls/WriterOutputStream.java5
-rw-r--r--gnu/xml/libxmlj/dom/GnomeAttr.java23
-rw-r--r--gnu/xml/libxmlj/dom/GnomeCDATASection.java2
-rw-r--r--gnu/xml/libxmlj/dom/GnomeCharacterData.java2
-rw-r--r--gnu/xml/libxmlj/dom/GnomeComment.java2
-rw-r--r--gnu/xml/libxmlj/dom/GnomeDOMException.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeDOMStringList.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeDocument.java34
-rw-r--r--gnu/xml/libxmlj/dom/GnomeDocumentBuilder.java28
-rw-r--r--gnu/xml/libxmlj/dom/GnomeDocumentBuilderFactory.java6
-rw-r--r--gnu/xml/libxmlj/dom/GnomeDocumentFragment.java2
-rw-r--r--gnu/xml/libxmlj/dom/GnomeDocumentType.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeElement.java16
-rw-r--r--gnu/xml/libxmlj/dom/GnomeEntity.java12
-rw-r--r--gnu/xml/libxmlj/dom/GnomeEntityReference.java2
-rw-r--r--gnu/xml/libxmlj/dom/GnomeNamedNodeMap.java6
-rw-r--r--gnu/xml/libxmlj/dom/GnomeNode.java24
-rw-r--r--gnu/xml/libxmlj/dom/GnomeNodeList.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeNotation.java2
-rw-r--r--gnu/xml/libxmlj/dom/GnomeProcessingInstruction.java2
-rw-r--r--gnu/xml/libxmlj/dom/GnomeText.java10
-rw-r--r--gnu/xml/libxmlj/dom/GnomeTypeInfo.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeXPathExpression.java6
-rw-r--r--gnu/xml/libxmlj/dom/GnomeXPathNSResolver.java5
-rw-r--r--gnu/xml/libxmlj/dom/GnomeXPathNodeList.java2
-rw-r--r--gnu/xml/libxmlj/dom/GnomeXPathResult.java6
-rw-r--r--gnu/xml/libxmlj/sax/GnomeLocator.java8
-rw-r--r--gnu/xml/libxmlj/sax/GnomeSAXParser.java4
-rw-r--r--gnu/xml/libxmlj/sax/GnomeSAXParserFactory.java4
-rw-r--r--gnu/xml/libxmlj/sax/GnomeXMLReader.java10
-rw-r--r--gnu/xml/libxmlj/sax/Namespaces.java6
-rw-r--r--gnu/xml/libxmlj/sax/StringArrayAttributes.java3
-rw-r--r--gnu/xml/libxmlj/sax/XMLName.java4
-rw-r--r--gnu/xml/libxmlj/transform/ErrorListenerErrorHandler.java8
-rwxr-xr-xgnu/xml/libxmlj/transform/GnomeTransformer.java30
-rwxr-xr-xgnu/xml/libxmlj/transform/GnomeTransformerFactory.java26
-rw-r--r--gnu/xml/libxmlj/transform/URIResolverEntityResolver.java2
-rw-r--r--gnu/xml/libxmlj/util/EmptyNodeList.java4
-rw-r--r--gnu/xml/libxmlj/util/NamedInputStream.java6
-rw-r--r--gnu/xml/libxmlj/util/StandaloneDocumentType.java12
-rw-r--r--gnu/xml/libxmlj/util/StandaloneLocator.java6
-rw-r--r--gnu/xml/libxmlj/util/XMLJ.java18
-rw-r--r--gnu/xml/pipeline/CallFilter.java160
-rw-r--r--gnu/xml/pipeline/DomConsumer.java1374
-rw-r--r--gnu/xml/pipeline/EventConsumer.java4
-rw-r--r--gnu/xml/pipeline/EventFilter.java636
-rw-r--r--gnu/xml/pipeline/LinkFilter.java192
-rw-r--r--gnu/xml/pipeline/NSFilter.java400
-rw-r--r--gnu/xml/pipeline/PipelineFactory.java1036
-rw-r--r--gnu/xml/pipeline/TeeConsumer.java310
-rw-r--r--gnu/xml/pipeline/TextConsumer.java26
-rw-r--r--gnu/xml/pipeline/ValidationConsumer.java2822
-rw-r--r--gnu/xml/pipeline/WellFormednessFilter.java330
-rw-r--r--gnu/xml/pipeline/XIncludeFilter.java620
-rw-r--r--gnu/xml/pipeline/XsltFilter.java100
-rw-r--r--gnu/xml/stream/AttributeImpl.java7
-rw-r--r--gnu/xml/stream/BufferedReader.java16
-rw-r--r--gnu/xml/stream/CRLFReader.java5
-rw-r--r--gnu/xml/stream/CharactersImpl.java11
-rw-r--r--gnu/xml/stream/CommentImpl.java7
-rw-r--r--gnu/xml/stream/DTDImpl.java7
-rw-r--r--gnu/xml/stream/EndDocumentImpl.java7
-rw-r--r--gnu/xml/stream/EndElementImpl.java7
-rw-r--r--gnu/xml/stream/EntityDeclarationImpl.java5
-rw-r--r--gnu/xml/stream/EntityReferenceImpl.java3
-rw-r--r--gnu/xml/stream/FilteredEventReader.java11
-rw-r--r--gnu/xml/stream/FilteredStreamReader.java7
-rw-r--r--gnu/xml/stream/NamespaceImpl.java7
-rw-r--r--gnu/xml/stream/NotationDeclarationImpl.java7
-rw-r--r--gnu/xml/stream/ProcessingInstructionImpl.java7
-rw-r--r--gnu/xml/stream/SAXParser.java18
-rw-r--r--gnu/xml/stream/SAXParserFactory.java8
-rw-r--r--gnu/xml/stream/StartDocumentImpl.java7
-rw-r--r--gnu/xml/stream/StartElementImpl.java7
-rw-r--r--gnu/xml/stream/UnicodeReader.java4
-rw-r--r--gnu/xml/stream/XIncludeFilter.java10
-rw-r--r--gnu/xml/stream/XMLEventAllocatorImpl.java7
-rw-r--r--gnu/xml/stream/XMLEventFactoryImpl.java15
-rw-r--r--gnu/xml/stream/XMLEventImpl.java7
-rw-r--r--gnu/xml/stream/XMLEventReaderImpl.java5
-rw-r--r--gnu/xml/stream/XMLEventWriterImpl.java9
-rw-r--r--gnu/xml/stream/XMLInputFactoryImpl.java27
-rw-r--r--gnu/xml/stream/XMLOutputFactoryImpl.java7
-rw-r--r--gnu/xml/stream/XMLParser.java97
-rw-r--r--gnu/xml/stream/XMLStreamWriterImpl.java30
-rw-r--r--gnu/xml/transform/AbstractNumberNode.java8
-rw-r--r--gnu/xml/transform/ApplyImportsNode.java5
-rw-r--r--gnu/xml/transform/ApplyTemplatesNode.java6
-rw-r--r--gnu/xml/transform/AttributeNode.java14
-rw-r--r--gnu/xml/transform/AttributeSet.java5
-rw-r--r--gnu/xml/transform/Bindings.java12
-rw-r--r--gnu/xml/transform/CallTemplateNode.java12
-rw-r--r--gnu/xml/transform/ChooseNode.java6
-rw-r--r--gnu/xml/transform/CommentNode.java6
-rw-r--r--gnu/xml/transform/CopyNode.java4
-rw-r--r--gnu/xml/transform/CopyOfNode.java8
-rw-r--r--gnu/xml/transform/CurrentFunction.java3
-rw-r--r--gnu/xml/transform/DOMSourceLocator.java4
-rw-r--r--gnu/xml/transform/DocumentFunction.java8
-rw-r--r--gnu/xml/transform/ElementAvailableFunction.java5
-rw-r--r--gnu/xml/transform/ElementNode.java12
-rw-r--r--gnu/xml/transform/ErrorListenerErrorHandler.java8
-rw-r--r--gnu/xml/transform/ForEachNode.java36
-rw-r--r--gnu/xml/transform/FormatNumberFunction.java3
-rw-r--r--gnu/xml/transform/FunctionAvailableFunction.java5
-rw-r--r--gnu/xml/transform/GenerateIdFunction.java3
-rw-r--r--gnu/xml/transform/IfNode.java8
-rw-r--r--gnu/xml/transform/Key.java5
-rw-r--r--gnu/xml/transform/KeyFunction.java7
-rw-r--r--gnu/xml/transform/LiteralNode.java4
-rw-r--r--gnu/xml/transform/MessageNode.java4
-rw-r--r--gnu/xml/transform/NamespaceProxy.java4
-rw-r--r--gnu/xml/transform/NodeNumberNode.java4
-rw-r--r--gnu/xml/transform/NumberNode.java4
-rw-r--r--gnu/xml/transform/OtherwiseNode.java6
-rw-r--r--gnu/xml/transform/ParameterNode.java13
-rw-r--r--gnu/xml/transform/ProcessingInstructionNode.java6
-rw-r--r--gnu/xml/transform/SAXSerializer.java2
-rw-r--r--gnu/xml/transform/SAXTemplatesHandler.java2
-rw-r--r--gnu/xml/transform/SAXTransformerHandler.java4
-rw-r--r--gnu/xml/transform/SortKey.java12
-rw-r--r--gnu/xml/transform/StreamSerializer.java32
-rw-r--r--gnu/xml/transform/StrippingInstruction.java6
-rw-r--r--gnu/xml/transform/Stylesheet.java69
-rw-r--r--gnu/xml/transform/SystemPropertyFunction.java3
-rw-r--r--gnu/xml/transform/Template.java14
-rw-r--r--gnu/xml/transform/TemplateNode.java2
-rw-r--r--gnu/xml/transform/TemplatesImpl.java2
-rw-r--r--gnu/xml/transform/TextNode.java4
-rw-r--r--gnu/xml/transform/TransformerFactoryImpl.java12
-rw-r--r--gnu/xml/transform/TransformerImpl.java6
-rw-r--r--gnu/xml/transform/TransformerOutputProperties.java7
-rw-r--r--gnu/xml/transform/URIResolverEntityResolver.java4
-rw-r--r--gnu/xml/transform/UnparsedEntityUriFunction.java3
-rw-r--r--gnu/xml/transform/ValueOfNode.java8
-rw-r--r--gnu/xml/transform/WhenNode.java8
-rw-r--r--gnu/xml/transform/WithParam.java2
-rw-r--r--gnu/xml/transform/XSLComparator.java96
-rw-r--r--gnu/xml/transform/XSLURIResolver.java9
-rw-r--r--gnu/xml/util/DoParse.java334
-rw-r--r--gnu/xml/util/DomParser.java1022
-rw-r--r--gnu/xml/util/Resolver.java218
-rw-r--r--gnu/xml/util/SAXNullTransformerFactory.java144
-rw-r--r--gnu/xml/util/XCat.java2250
-rw-r--r--gnu/xml/util/XHTMLWriter.java22
-rw-r--r--gnu/xml/util/XMLWriter.java2372
-rw-r--r--gnu/xml/validation/datatype/Annotation.java5
-rw-r--r--gnu/xml/validation/datatype/AnySimpleType.java5
-rw-r--r--gnu/xml/validation/datatype/AnyType.java5
-rw-r--r--gnu/xml/validation/datatype/AnyURIType.java5
-rw-r--r--gnu/xml/validation/datatype/AtomicSimpleType.java7
-rw-r--r--gnu/xml/validation/datatype/Base64BinaryType.java7
-rw-r--r--gnu/xml/validation/datatype/BooleanType.java7
-rw-r--r--gnu/xml/validation/datatype/ByteType.java7
-rw-r--r--gnu/xml/validation/datatype/DateTimeType.java7
-rw-r--r--gnu/xml/validation/datatype/DateType.java7
-rw-r--r--gnu/xml/validation/datatype/DecimalType.java7
-rw-r--r--gnu/xml/validation/datatype/DoubleType.java7
-rw-r--r--gnu/xml/validation/datatype/DurationType.java7
-rw-r--r--gnu/xml/validation/datatype/EntitiesType.java5
-rw-r--r--gnu/xml/validation/datatype/EntityType.java5
-rw-r--r--gnu/xml/validation/datatype/EnumerationFacet.java7
-rw-r--r--gnu/xml/validation/datatype/Facet.java5
-rw-r--r--gnu/xml/validation/datatype/FloatType.java7
-rw-r--r--gnu/xml/validation/datatype/FractionDigitsFacet.java9
-rw-r--r--gnu/xml/validation/datatype/GDayType.java9
-rw-r--r--gnu/xml/validation/datatype/GMonthDayType.java9
-rw-r--r--gnu/xml/validation/datatype/GMonthType.java9
-rw-r--r--gnu/xml/validation/datatype/GYearMonthType.java9
-rw-r--r--gnu/xml/validation/datatype/GYearType.java9
-rw-r--r--gnu/xml/validation/datatype/HexBinaryType.java5
-rw-r--r--gnu/xml/validation/datatype/IDRefType.java5
-rw-r--r--gnu/xml/validation/datatype/IDRefsType.java5
-rw-r--r--gnu/xml/validation/datatype/IDType.java5
-rw-r--r--gnu/xml/validation/datatype/IntType.java7
-rw-r--r--gnu/xml/validation/datatype/IntegerType.java7
-rw-r--r--gnu/xml/validation/datatype/LanguageType.java5
-rw-r--r--gnu/xml/validation/datatype/LengthFacet.java9
-rw-r--r--gnu/xml/validation/datatype/ListSimpleType.java9
-rw-r--r--gnu/xml/validation/datatype/LongType.java7
-rw-r--r--gnu/xml/validation/datatype/MaxExclusiveFacet.java9
-rw-r--r--gnu/xml/validation/datatype/MaxInclusiveFacet.java11
-rw-r--r--gnu/xml/validation/datatype/MaxLengthFacet.java5
-rw-r--r--gnu/xml/validation/datatype/MinExclusiveFacet.java11
-rw-r--r--gnu/xml/validation/datatype/MinInclusiveFacet.java11
-rw-r--r--gnu/xml/validation/datatype/MinLengthFacet.java5
-rw-r--r--gnu/xml/validation/datatype/NCNameType.java5
-rw-r--r--gnu/xml/validation/datatype/NMTokenType.java5
-rw-r--r--gnu/xml/validation/datatype/NMTokensType.java7
-rw-r--r--gnu/xml/validation/datatype/NameType.java5
-rw-r--r--gnu/xml/validation/datatype/NegativeIntegerType.java7
-rw-r--r--gnu/xml/validation/datatype/NonNegativeIntegerType.java7
-rw-r--r--gnu/xml/validation/datatype/NonPositiveIntegerType.java7
-rw-r--r--gnu/xml/validation/datatype/NormalizedStringType.java5
-rw-r--r--gnu/xml/validation/datatype/NotationType.java5
-rw-r--r--gnu/xml/validation/datatype/PatternFacet.java5
-rw-r--r--gnu/xml/validation/datatype/PositiveIntegerType.java7
-rw-r--r--gnu/xml/validation/datatype/QNameType.java5
-rw-r--r--gnu/xml/validation/datatype/ShortType.java7
-rw-r--r--gnu/xml/validation/datatype/SimpleType.java13
-rw-r--r--gnu/xml/validation/datatype/StringType.java3
-rw-r--r--gnu/xml/validation/datatype/TimeType.java9
-rw-r--r--gnu/xml/validation/datatype/TokenType.java5
-rw-r--r--gnu/xml/validation/datatype/TotalDigitsFacet.java9
-rw-r--r--gnu/xml/validation/datatype/Type.java5
-rw-r--r--gnu/xml/validation/datatype/TypeBuilder.java20
-rw-r--r--gnu/xml/validation/datatype/TypeLibrary.java6
-rw-r--r--gnu/xml/validation/datatype/TypeLibraryFactory.java4
-rw-r--r--gnu/xml/validation/datatype/UnionSimpleType.java7
-rw-r--r--gnu/xml/validation/datatype/UnsignedByteType.java7
-rw-r--r--gnu/xml/validation/datatype/UnsignedIntType.java7
-rw-r--r--gnu/xml/validation/datatype/UnsignedLongType.java7
-rw-r--r--gnu/xml/validation/datatype/UnsignedShortType.java7
-rw-r--r--gnu/xml/validation/datatype/WhiteSpaceFacet.java11
-rw-r--r--gnu/xml/validation/relaxng/AnyNameNameClass.java5
-rw-r--r--gnu/xml/validation/relaxng/AttributePattern.java3
-rw-r--r--gnu/xml/validation/relaxng/ChoiceNameClass.java5
-rw-r--r--gnu/xml/validation/relaxng/ChoicePattern.java3
-rw-r--r--gnu/xml/validation/relaxng/DataPattern.java5
-rw-r--r--gnu/xml/validation/relaxng/Define.java5
-rw-r--r--gnu/xml/validation/relaxng/ElementPattern.java3
-rw-r--r--gnu/xml/validation/relaxng/EmptyPattern.java3
-rw-r--r--gnu/xml/validation/relaxng/FullSyntaxBuilder.java24
-rw-r--r--gnu/xml/validation/relaxng/Grammar.java5
-rw-r--r--gnu/xml/validation/relaxng/GrammarException.java4
-rw-r--r--gnu/xml/validation/relaxng/GrammarValidator.java4
-rw-r--r--gnu/xml/validation/relaxng/GroupPattern.java5
-rw-r--r--gnu/xml/validation/relaxng/InterleavePattern.java5
-rw-r--r--gnu/xml/validation/relaxng/ListPattern.java3
-rw-r--r--gnu/xml/validation/relaxng/NSNameNameClass.java5
-rw-r--r--gnu/xml/validation/relaxng/NameClass.java4
-rw-r--r--gnu/xml/validation/relaxng/NameNameClass.java3
-rw-r--r--gnu/xml/validation/relaxng/NotAllowedPattern.java4
-rw-r--r--gnu/xml/validation/relaxng/OneOrMorePattern.java3
-rw-r--r--gnu/xml/validation/relaxng/Param.java3
-rw-r--r--gnu/xml/validation/relaxng/Pattern.java3
-rw-r--r--gnu/xml/validation/relaxng/RELAXNGSchemaFactory.java8
-rw-r--r--gnu/xml/validation/relaxng/RefPattern.java3
-rw-r--r--gnu/xml/validation/relaxng/TextPattern.java3
-rw-r--r--gnu/xml/validation/relaxng/ValuePattern.java5
-rw-r--r--gnu/xml/validation/xmlschema/AnyAttribute.java5
-rw-r--r--gnu/xml/validation/xmlschema/AttributeDeclaration.java9
-rw-r--r--gnu/xml/validation/xmlschema/AttributeUse.java7
-rw-r--r--gnu/xml/validation/xmlschema/ComplexType.java5
-rw-r--r--gnu/xml/validation/xmlschema/ElementDeclaration.java11
-rw-r--r--gnu/xml/validation/xmlschema/Particle.java5
-rw-r--r--gnu/xml/validation/xmlschema/ValidationException.java5
-rw-r--r--gnu/xml/validation/xmlschema/XMLSchema.java7
-rw-r--r--gnu/xml/validation/xmlschema/XMLSchemaAttributeTypeInfo.java5
-rw-r--r--gnu/xml/validation/xmlschema/XMLSchemaBuilder.java21
-rw-r--r--gnu/xml/validation/xmlschema/XMLSchemaElementTypeInfo.java5
-rw-r--r--gnu/xml/validation/xmlschema/XMLSchemaSchemaFactory.java9
-rw-r--r--gnu/xml/validation/xmlschema/XMLSchemaTypeInfo.java5
-rw-r--r--gnu/xml/validation/xmlschema/XMLSchemaTypeInfoProvider.java5
-rw-r--r--gnu/xml/validation/xmlschema/XMLSchemaValidator.java7
-rw-r--r--gnu/xml/validation/xmlschema/XMLSchemaValidatorHandler.java11
-rw-r--r--gnu/xml/xpath/AndExpr.java4
-rw-r--r--gnu/xml/xpath/ArithmeticExpr.java8
-rw-r--r--gnu/xml/xpath/BooleanFunction.java10
-rw-r--r--gnu/xml/xpath/CeilingFunction.java12
-rw-r--r--gnu/xml/xpath/ConcatFunction.java4
-rw-r--r--gnu/xml/xpath/Constant.java6
-rw-r--r--gnu/xml/xpath/ContainsFunction.java4
-rw-r--r--gnu/xml/xpath/CountFunction.java6
-rw-r--r--gnu/xml/xpath/DocumentOrderComparator.java4
-rw-r--r--gnu/xml/xpath/EqualityExpr.java46
-rw-r--r--gnu/xml/xpath/Expr.java64
-rw-r--r--gnu/xml/xpath/FalseFunction.java4
-rw-r--r--gnu/xml/xpath/FloorFunction.java4
-rw-r--r--gnu/xml/xpath/Function.java3
-rw-r--r--gnu/xml/xpath/FunctionCall.java6
-rw-r--r--gnu/xml/xpath/IdFunction.java4
-rw-r--r--gnu/xml/xpath/LangFunction.java6
-rw-r--r--gnu/xml/xpath/LastFunction.java4
-rw-r--r--gnu/xml/xpath/LocalNameFunction.java6
-rw-r--r--gnu/xml/xpath/NameFunction.java10
-rw-r--r--gnu/xml/xpath/NameTest.java4
-rw-r--r--gnu/xml/xpath/NamespaceTest.java4
-rw-r--r--gnu/xml/xpath/NamespaceUriFunction.java10
-rw-r--r--gnu/xml/xpath/NegativeExpr.java4
-rw-r--r--gnu/xml/xpath/NodeTypeTest.java4
-rw-r--r--gnu/xml/xpath/NormalizeSpaceFunction.java8
-rw-r--r--gnu/xml/xpath/NotFunction.java4
-rw-r--r--gnu/xml/xpath/NumberFunction.java4
-rw-r--r--gnu/xml/xpath/OrExpr.java4
-rw-r--r--gnu/xml/xpath/ParenthesizedExpr.java14
-rw-r--r--gnu/xml/xpath/Path.java4
-rw-r--r--gnu/xml/xpath/Pattern.java3
-rw-r--r--gnu/xml/xpath/PositionFunction.java4
-rw-r--r--gnu/xml/xpath/Predicate.java6
-rw-r--r--gnu/xml/xpath/RelationalExpr.java4
-rw-r--r--gnu/xml/xpath/Root.java4
-rw-r--r--gnu/xml/xpath/RoundFunction.java4
-rw-r--r--gnu/xml/xpath/Selector.java6
-rw-r--r--gnu/xml/xpath/StartsWithFunction.java4
-rw-r--r--gnu/xml/xpath/Steps.java22
-rw-r--r--gnu/xml/xpath/StringFunction.java6
-rw-r--r--gnu/xml/xpath/StringLengthFunction.java6
-rw-r--r--gnu/xml/xpath/SubstringAfterFunction.java4
-rw-r--r--gnu/xml/xpath/SubstringBeforeFunction.java4
-rw-r--r--gnu/xml/xpath/SubstringFunction.java6
-rw-r--r--gnu/xml/xpath/SumFunction.java16
-rw-r--r--gnu/xml/xpath/Test.java2
-rw-r--r--gnu/xml/xpath/TranslateFunction.java10
-rw-r--r--gnu/xml/xpath/TrueFunction.java4
-rw-r--r--gnu/xml/xpath/UnionExpr.java20
-rw-r--r--gnu/xml/xpath/VariableReference.java4
-rw-r--r--gnu/xml/xpath/XPathFactoryImpl.java4
-rw-r--r--gnu/xml/xpath/XPathImpl.java4
-rw-r--r--gnu/xml/xpath/XPathParser.java180
-rw-r--r--gnu/xml/xpath/XPathTokenizer.java8
1713 files changed, 29297 insertions, 29689 deletions
diff --git a/gnu/CORBA/BigDecimalHelper.java b/gnu/CORBA/BigDecimalHelper.java
index 33b74bb77..c5c8f99ab 100644
--- a/gnu/CORBA/BigDecimalHelper.java
+++ b/gnu/CORBA/BigDecimalHelper.java
@@ -117,7 +117,7 @@ public class BigDecimalHelper
if (f >= 0)
bout.write(f);
}
- // The last byte has 0xC or 0xD in the last halfbyte.
+ // The last byte has 0xC or 0xD in the last halfbyte.
while ((f & 0xF) <= 0x9);
return createFixed(scale, bout.toByteArray());
@@ -126,7 +126,7 @@ public class BigDecimalHelper
/**
* Write the big decimal as CORBA <code>fixed<.code>.
* The scale will not be stored.
- *
+ *
* @param out a stream to write into.
* @param x a big decimal to write.
*
diff --git a/gnu/CORBA/CDR/AbstractCdrInput.java b/gnu/CORBA/CDR/AbstractCdrInput.java
index f582c31bd..fae16eed9 100644
--- a/gnu/CORBA/CDR/AbstractCdrInput.java
+++ b/gnu/CORBA/CDR/AbstractCdrInput.java
@@ -86,13 +86,13 @@ import java.math.BigDecimal;
* from the given {@link java.io.InputStream}. The primitive types are aligned
* on they natural boundaries by implementing the abstract method
* {@link #align(int boundary)}.
- *
+ *
* The same class also implements {@link org.omg.CORBA.DataInputStream} to read
* the object content in a user defined way.
- *
+ *
* TODO This class uses 16 bits per Unicode character only, as it was until jdk
* 1.4 inclusive.
- *
+ *
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public abstract class AbstractCdrInput
@@ -173,7 +173,7 @@ public abstract class AbstractCdrInput
/**
* Creates the stream. The stream reads Big Endian by default.
- *
+ *
* @param readFrom a stream to read CORBA input from.
*/
public AbstractCdrInput(java.io.InputStream readFrom)
@@ -194,7 +194,7 @@ public abstract class AbstractCdrInput
/**
* Set the Big Endian or Little Endian encoding. The stream reads Big Endian
* by default.
- *
+ *
* @param use_big_endian if true, the stream expect the multi-byte data in
* the form "most significant byte first" (Big Endian). This is the
* java standard.
@@ -207,7 +207,7 @@ public abstract class AbstractCdrInput
/**
* Get the used encoding.
- *
+ *
* @return true for Big Endian, false for Little Endian.
*/
public boolean isBigEndian()
@@ -228,7 +228,7 @@ public abstract class AbstractCdrInput
/**
* Set the input stream that receives the CORBA input.
- *
+ *
* @param readFrom the stream.
*/
public void setInputStream(java.io.InputStream readFrom)
@@ -249,7 +249,7 @@ public abstract class AbstractCdrInput
/**
* Set the orb, associated with this stream.
- *
+ *
* @param an_orb
*/
public void setOrb(ORB an_orb)
@@ -323,7 +323,7 @@ public abstract class AbstractCdrInput
/**
* Return the associated {@link ORB}.
- *
+ *
* @return the associated {@link ORB} or null is no such is set.
*/
public ORB orb()
@@ -393,14 +393,14 @@ public abstract class AbstractCdrInput
* plain (not a string-encoded) IOR profile without the heading endian
* indicator. The responsible method for reading such data is
* {@link IOR.read_no_endian}.
- *
+ *
* The returned object is usually casted into the given type using the .narrow
* method of its helper, despite in some cases the direct cast would also
* work.
- *
+ *
* The null objects are recognised from the empty profile set. For such
* objects, null is returned.
- *
+ *
* @return the loaded and constructed object.
*/
public org.omg.CORBA.Object read_Object()
@@ -991,7 +991,7 @@ public abstract class AbstractCdrInput
* Read a singe byte string. The method firs reads the byte array and then
* calls a constructor to create a string from this array. The character
* encoding, if previously set, is taken into consideration.
- *
+ *
* @return a loaded string.
*/
public String read_string()
@@ -1195,7 +1195,7 @@ public abstract class AbstractCdrInput
/**
* Reads the string in wide character format (ussually UTF-16, Unicode). Takes
* the currently set charset into consideration.
- *
+ *
* If the native (UTF-16) encoding is used of the GIOP protocol is before 1.2,
* delegates functionality to "plain" {@link #read_wstring_UTF_16}.
*/
@@ -1239,7 +1239,7 @@ public abstract class AbstractCdrInput
{
int p = 0;
int n = read_long();
-
+
if (n<0)
{
MARSHAL m = new MARSHAL("Negative string size");
@@ -1336,9 +1336,9 @@ public abstract class AbstractCdrInput
* Read the object that is an instance of the given class. The current
* implementation delegates functionality to the parameterless
* {@link readObject()}.
- *
+ *
* @param klass a class of that this object the instance is.
- *
+ *
* @return the returned object.
*/
public org.omg.CORBA.Object read_Object(Class klass)
@@ -1348,11 +1348,11 @@ public abstract class AbstractCdrInput
/**
* Read a value type structure from the stream.
- *
+ *
* OMG specification states the writing format is outside the scope of GIOP
* definition. This implementation uses java serialization mechanism, calling
* {@link ObjectInputStream#readObject}
- *
+ *
* @return an value type structure, unmarshaled from the stream
*/
public Serializable read_Value()
@@ -1363,11 +1363,11 @@ public abstract class AbstractCdrInput
/**
* Read the abstract interface. An abstract interface can be either CORBA
* value type or CORBA object and is returned as an abstract java.lang.Object.
- *
+ *
* As specified in OMG specification, this reads a single boolean and then
* delegates either to {@link #read_Object()} (for false) or to
* {@link #read_Value()} (for true).
- *
+ *
* @return an abstract interface, unmarshaled from the stream
*/
public java.lang.Object read_Abstract()
@@ -1402,11 +1402,11 @@ public abstract class AbstractCdrInput
/**
* If required, allocate or resize the char array to fit the newly read
* values.
- *
+ *
* @param holder_value the existing char array, may be null.
* @param offset the required offset to read.
* @param length the length of the new sequence.
- *
+ *
* @return the allocated or resized array, same array if no such operations
* are required.
*/
@@ -1450,11 +1450,11 @@ public abstract class AbstractCdrInput
/**
* If required, allocate or resize the int array to fit the newly read values.
- *
+ *
* @param holder_value the existing int array, may be null.
* @param offset the required offset to read.
* @param length the length of the new sequence.
- *
+ *
* @return the allocated or resized array, same array if no such operations
* are required.
*/
@@ -1487,11 +1487,11 @@ public abstract class AbstractCdrInput
/**
* If required, allocate or resize the float array to fit the newly read
* values.
- *
+ *
* @param holder_value the existing float array, may be null.
* @param offset the required offset to read.
* @param length the length of the new sequence.
- *
+ *
* @return the allocated or resized array, same array if no such operations
* are required.
*/
@@ -1524,11 +1524,11 @@ public abstract class AbstractCdrInput
/**
* If required, allocate or resize the double array to fit the newly read
* values.
- *
+ *
* @param holder_value the existing double array, may be null.
* @param offset the required offset to read.
* @param length the length of the new sequence.
- *
+ *
* @return the allocated or resized array, same array if no such operations
* are required.
*/
@@ -1568,11 +1568,11 @@ public abstract class AbstractCdrInput
/**
* If required, allocate or resize the short array to fit the newly read
* values.
- *
+ *
* @param holder_value the existing short array, may be null.
* @param offset the required offset to read.
* @param length the length of the new sequence.
- *
+ *
* @return the allocated or resized array, same array if no such operations
* are required.
*/
@@ -1605,11 +1605,11 @@ public abstract class AbstractCdrInput
/**
* If required, allocate or resize the byte array to fit the newly read
* values.
- *
+ *
* @param holder_value the existing byte array, may be null.
* @param offset the required offset to read.
* @param length the length of the new sequence.
- *
+ *
* @return the allocated or resized array, same array if no such operations
* are required.
*/
@@ -1656,11 +1656,11 @@ public abstract class AbstractCdrInput
/**
* If required, allocate or resize the array of longs to fit the newly read
* values.
- *
+ *
* @param holder_value the existing array, may be null.
* @param offset the required offset to read.
* @param length the length of the new sequence.
- *
+ *
* @return the allocated or resized array, same array if no such operations
* are required.
*/
@@ -1693,11 +1693,11 @@ public abstract class AbstractCdrInput
/**
* If required, allocate or resize the array of booleans to fit the newly read
* values.
- *
+ *
* @param holder_value the existing array of booleans, may be null.
* @param offset the required offset to read.
* @param length the length of the new sequence.
- *
+ *
* @return the allocated or resized array, same array if no such operations
* are required.
*/
@@ -1733,11 +1733,11 @@ public abstract class AbstractCdrInput
/**
* If required, allocate or resize the array of Anys to fit the newly read
* values.
- *
+ *
* @param holder_value the existing array of Anys, may be null.
* @param offset the required offset to read.
* @param length the length of the new sequence.
- *
+ *
* @return the allocated or resized array, same array if no such operations
* are required.
*/
@@ -1758,11 +1758,11 @@ public abstract class AbstractCdrInput
/**
* This method is required to represent the DataInputStream as a value type
* object.
- *
+ *
* @return a single entity "IDL:omg.org/CORBA/DataInputStream:1.0", always.
*/
public String[] _truncatable_ids()
{
return new String[] { "IDL:omg.org/CORBA/DataInputStream:1.0" };
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/CDR/AbstractCdrOutput.java b/gnu/CORBA/CDR/AbstractCdrOutput.java
index 7f3e3ab0d..ab0b982ab 100644
--- a/gnu/CORBA/CDR/AbstractCdrOutput.java
+++ b/gnu/CORBA/CDR/AbstractCdrOutput.java
@@ -79,7 +79,7 @@ import java.math.BigDecimal;
* The same class also implements the {@link DataInputStream},
* providing support for writing the value type objects
* in a user defined way.
- *
+ *
* TODO This class uses 16 bits per Unicode character only, as it was until
* jdk 1.4 inclusive.
*
@@ -90,11 +90,11 @@ public abstract class AbstractCdrOutput
implements org.omg.CORBA.DataOutputStream
{
/**
- * The runtime, associated with this stream. This field is only used when
+ * The runtime, associated with this stream. This field is only used when
* reading and writing value types and filled-in in gnu.CORBA.CDR.Vio.
*/
- public transient gnuRuntime runtime;
-
+ public transient gnuRuntime runtime;
+
/**
* This instance is used to convert primitive data types into the
* byte sequences.
@@ -177,7 +177,7 @@ public abstract class AbstractCdrOutput
* stream is different from 0.
*/
public abstract void setOffset(int an_offset);
-
+
/**
* Clone all important settings to another stream.
*/
@@ -187,7 +187,7 @@ public abstract class AbstractCdrOutput
stream.setCodeSet(getCodeSet());
stream.setVersion(giop);
stream.setOrb(orb);
- }
+ }
/**
* Set the current code set context.
@@ -336,7 +336,7 @@ public abstract class AbstractCdrOutput
* Read the CORBA object. The object is written form of the plain (not a
* string-encoded) IOR profile without the heading endian indicator. The
* responsible method for reading such data is {@link IOR.write_no_endian}.
- *
+ *
* The null value is written as defined in OMG specification (zero length
* string, followed by an empty set of profiles).
*/
@@ -901,7 +901,7 @@ public abstract class AbstractCdrOutput
/**
* Writes the character as two byte short integer (Unicode value), high byte
* first. Writes in Big Endian, but never writes the endian indicator.
- *
+ *
* The character is always written using the native UTF-16BE charset because
* its size under arbitrary encoding is not evident.
*/
@@ -944,11 +944,11 @@ public abstract class AbstractCdrOutput
/**
* Write the array of wide chars.
- *
+ *
* @param chars the array of wide chars
* @param offset offset
* @param length length
- *
+ *
* The char array is always written using the native UTF-16BE charset because
* the character size under arbitrary encoding is not evident.
*/
@@ -1044,4 +1044,4 @@ public abstract class AbstractCdrOutput
{
write_value(value);
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/CDR/AbstractDataInput.java b/gnu/CORBA/CDR/AbstractDataInput.java
index 4d120fa2c..0ad98bed7 100644
--- a/gnu/CORBA/CDR/AbstractDataInput.java
+++ b/gnu/CORBA/CDR/AbstractDataInput.java
@@ -389,4 +389,4 @@ public interface AbstractDataInput
*/
int skipBytes(int n)
throws IOException;
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/CDR/AbstractDataOutput.java b/gnu/CORBA/CDR/AbstractDataOutput.java
index e37c0cb7d..e41ec598a 100644
--- a/gnu/CORBA/CDR/AbstractDataOutput.java
+++ b/gnu/CORBA/CDR/AbstractDataOutput.java
@@ -182,4 +182,4 @@ public interface AbstractDataOutput
*/
void writeDouble(double value)
throws IOException;
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/CDR/AligningInput.java b/gnu/CORBA/CDR/AligningInput.java
index e2710628a..8d438ab06 100644
--- a/gnu/CORBA/CDR/AligningInput.java
+++ b/gnu/CORBA/CDR/AligningInput.java
@@ -107,17 +107,17 @@ public class AligningInput
{
return buf;
}
-
+
/**
* Get the current position in the buffer.
- *
+ *
* @return The position in the buffer, taking offset into consideration.
*/
public int getPosition()
{
return pos + offset;
- }
-
+ }
+
/**
* Jump to the given position, taking offset into consideration.
*/
@@ -127,5 +127,5 @@ public class AligningInput
throw new ArrayIndexOutOfBoundsException(position
+ " is out of valid ["+offset+".." + (count+offset) + "[ range");
pos = position - offset;
- }
+ }
}
diff --git a/gnu/CORBA/CDR/AligningOutput.java b/gnu/CORBA/CDR/AligningOutput.java
index 135f75af6..b0c569ec8 100644
--- a/gnu/CORBA/CDR/AligningOutput.java
+++ b/gnu/CORBA/CDR/AligningOutput.java
@@ -117,17 +117,17 @@ public class AligningOutput
write(0);
}
}
-
+
/**
* Get the current position in the buffer.
- *
+ *
* @return The position in the buffer, taking offset into consideration.
*/
public int getPosition()
{
return size()+offset;
}
-
+
/**
* Seek to the given position (not in use).
*/
@@ -135,7 +135,7 @@ public class AligningOutput
{
count = position - offset;
}
-
+
/**
* Get the buffer without copying it. Use with care.
*/
@@ -143,6 +143,6 @@ public class AligningOutput
{
return buf;
}
-
+
}
diff --git a/gnu/CORBA/CDR/ArrayValueHelper.java b/gnu/CORBA/CDR/ArrayValueHelper.java
index 7a4d9c5aa..0578f13b8 100644
--- a/gnu/CORBA/CDR/ArrayValueHelper.java
+++ b/gnu/CORBA/CDR/ArrayValueHelper.java
@@ -63,7 +63,7 @@ import javax.rmi.CORBA.ValueHandler;
* Writes arrays as a boxed value types. A single instance is used to write a
* single array. This class is only used with RMI/IIOP, to handle array boxed
* values.
- *
+ *
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
class ArrayValueHelper
diff --git a/gnu/CORBA/CDR/BigEndianInputStream.java b/gnu/CORBA/CDR/BigEndianInputStream.java
index 1559d75a4..5579789a5 100644
--- a/gnu/CORBA/CDR/BigEndianInputStream.java
+++ b/gnu/CORBA/CDR/BigEndianInputStream.java
@@ -58,4 +58,4 @@ public class BigEndianInputStream
{
super(in);
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/CDR/BigEndianOutputStream.java b/gnu/CORBA/CDR/BigEndianOutputStream.java
index 7d3b02ec9..dda14a03a 100644
--- a/gnu/CORBA/CDR/BigEndianOutputStream.java
+++ b/gnu/CORBA/CDR/BigEndianOutputStream.java
@@ -59,4 +59,4 @@ public class BigEndianOutputStream
{
super(out);
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/CDR/BufferedCdrOutput.java b/gnu/CORBA/CDR/BufferedCdrOutput.java
index 69bf95beb..ae510b39c 100644
--- a/gnu/CORBA/CDR/BufferedCdrOutput.java
+++ b/gnu/CORBA/CDR/BufferedCdrOutput.java
@@ -42,7 +42,7 @@ import java.io.ByteArrayOutputStream;
/**
* A CORBA output stream, writing data into the internal buffer ({@link ByteArrayOutputStream}).
- *
+ *
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public class BufferedCdrOutput
@@ -61,7 +61,7 @@ public class BufferedCdrOutput
/**
* Creates the instance with the given initial buffer size.
- *
+ *
* @param bufSize the buffer size.
*/
public BufferedCdrOutput(int bufSize)
@@ -121,7 +121,7 @@ public class BufferedCdrOutput
/**
* Get the current position in the buffer.
- *
+ *
* @return The position in the buffer, taking offset into consideration.
*/
public int getPosition()
diff --git a/gnu/CORBA/CDR/BufferredCdrInput.java b/gnu/CORBA/CDR/BufferredCdrInput.java
index f0159a88d..accb65a0d 100644
--- a/gnu/CORBA/CDR/BufferredCdrInput.java
+++ b/gnu/CORBA/CDR/BufferredCdrInput.java
@@ -45,14 +45,14 @@ package gnu.CORBA.CDR;
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public class BufferredCdrInput
- extends AbstractCdrInput
+ extends AbstractCdrInput
implements gnuValueStream
{
- /**
- * Use serialVersionUID for interoperability.
+ /**
+ * Use serialVersionUID for interoperability.
*/
private static final long serialVersionUID = 1;
-
+
/**
* The byte array input stream to read data from.
*/
@@ -114,17 +114,17 @@ public class BufferredCdrInput
buffer.reset();
setInputStream(buffer);
}
-
+
/**
* Get the current position in the buffer.
- *
+ *
* @return The position in the buffer, taking offset into consideration.
*/
public int getPosition()
{
return buffer.getPosition();
}
-
+
/**
* Jump to the given position, taking offset into consideration.
*/
@@ -133,15 +133,15 @@ public class BufferredCdrInput
buffer.seek(position);
setInputStream(buffer);
}
-
+
/**
* Get the associated RunTime.
*/
public gnuRuntime getRunTime()
{
return runtime;
- }
-
+ }
+
/**
* Replace the instance of RunTime.
*/
@@ -149,5 +149,5 @@ public class BufferredCdrInput
{
runtime = a_runtime;
}
-
+
}
diff --git a/gnu/CORBA/CDR/HeadlessInput.java b/gnu/CORBA/CDR/HeadlessInput.java
index 273ecea50..5e97c73b8 100644
--- a/gnu/CORBA/CDR/HeadlessInput.java
+++ b/gnu/CORBA/CDR/HeadlessInput.java
@@ -71,10 +71,10 @@ import java.math.BigDecimal;
* Substitutes the main stream in factories when the header is already behind.
* Overrides methods that may be invoked from the factory, forcing not to read
* the header if called first time on this stream.
- *
+ *
* This stream reverts to default behavior if one or more call are made (reading
* value types that are nested fields of the value type).
- *
+ *
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public class HeadlessInput
@@ -103,7 +103,7 @@ public class HeadlessInput
/**
* Create an instance, reading from the given buffer.
- *
+ *
* @param a_stream a stream from where the data will be read.
* @param inheritSettings a stream from that endian and other settings are
* inherited.
@@ -746,4 +746,4 @@ public class HeadlessInput
stream.seek(position);
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/CDR/IDLTypeHelper.java b/gnu/CORBA/CDR/IDLTypeHelper.java
index 3259a4877..663e04196 100644
--- a/gnu/CORBA/CDR/IDLTypeHelper.java
+++ b/gnu/CORBA/CDR/IDLTypeHelper.java
@@ -52,7 +52,7 @@ import java.lang.reflect.Modifier;
/**
* Handles case when the CORBA IDL type with the known helper is wrapped into
* Value type.
- *
+ *
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public class IDLTypeHelper
@@ -118,7 +118,7 @@ public class IDLTypeHelper
catch (Exception ex)
{
MARSHAL m = new MARSHAL(msg() + " read(..)");
- m.minor = Minor.Boxed;
+ m.minor = Minor.Boxed;
m.initCause(ex);
throw m;
}
@@ -152,7 +152,7 @@ public class IDLTypeHelper
catch (Exception ex)
{
MARSHAL m = new MARSHAL(msg() + " write(..)");
- m.minor = Minor.Boxed;
+ m.minor = Minor.Boxed;
m.initCause(ex);
throw m;
}
diff --git a/gnu/CORBA/CDR/LittleEndianOutputStream.java b/gnu/CORBA/CDR/LittleEndianOutputStream.java
index 6791a82e7..f1b8e04b3 100644
--- a/gnu/CORBA/CDR/LittleEndianOutputStream.java
+++ b/gnu/CORBA/CDR/LittleEndianOutputStream.java
@@ -250,4 +250,4 @@ public class LittleEndianOutputStream
{
writeLong(Double.doubleToLongBits(value));
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/CDR/UnknownExceptionCtxHandler.java b/gnu/CORBA/CDR/UnknownExceptionCtxHandler.java
index 314dd8eb9..cb36f8c42 100644
--- a/gnu/CORBA/CDR/UnknownExceptionCtxHandler.java
+++ b/gnu/CORBA/CDR/UnknownExceptionCtxHandler.java
@@ -54,7 +54,7 @@ import javax.rmi.CORBA.Util;
/**
* Reads the data about an unknown exception from the UnknownExceptionInfo.
- *
+ *
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public class UnknownExceptionCtxHandler
@@ -109,16 +109,16 @@ public class UnknownExceptionCtxHandler
* Following the documentation, this must be just value type, but it seems
* that in Sun's implementation is is not, as starts from 0x0. For value type,
* this would be null.
- *
+ *
* TODO Implement reading and writing in Sun format, making Classpath IIOP
* interoperable with Sun's implementation. Current inmplementation reads and
* reproduces the exception class type only.
- *
+ *
* @param input the input stream to read the context (orb and other settings
* are inherited from the main stream that received the message).
- *
+ *
* @param contexts all service contexts that were present in the message.
- *
+ *
* @return the Throwable, extracted from context, on null, if this has failed.
*/
public static Throwable read(BufferredCdrInput input, ServiceContext[] contexts)
diff --git a/gnu/CORBA/CDR/VMVio.java b/gnu/CORBA/CDR/VMVio.java
index 9b719fd7c..47a6c0c25 100644
--- a/gnu/CORBA/CDR/VMVio.java
+++ b/gnu/CORBA/CDR/VMVio.java
@@ -36,13 +36,13 @@
exception statement from your version. */
/**
- * This is a temporary replacement for the native call that would allocate
+ * This is a temporary replacement for the native call that would allocate
* objects without public constructors. The replacement only allocates
* objects with public parameterless constructor and objects with public
* constructor taking string (like some Throwables).
*
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
- *
+ *
* TODO FIXME replace by native call like in VMObjectInputStream.
* Required modification of Classpath the build system.
*/
diff --git a/gnu/CORBA/CDR/Vio.java b/gnu/CORBA/CDR/Vio.java
index 86f842c34..1eecb651b 100644
--- a/gnu/CORBA/CDR/Vio.java
+++ b/gnu/CORBA/CDR/Vio.java
@@ -69,7 +69,7 @@ import javax.rmi.CORBA.ValueHandler;
/**
* A specialised class for reading and writing the value types.
- *
+ *
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public abstract class Vio
@@ -79,7 +79,7 @@ public abstract class Vio
* and is not required for interoperability with jdk 1.5, but is left in the
* implementation as the optional mode for solving possible interoperability
* problems with non-Sun CORBA implementations.
- *
+ *
* The current implementation would accept both single chunk or multiple
* chunks, but will always send a single chunk (if true) or unchunked data (if
* false).
@@ -155,11 +155,11 @@ public abstract class Vio
* required when an unitialised instance or at least class of the value type
* is known. Hence it may be faster to use the alternative methods,
* read(InputStream, Class) or read(InputStream, Serializable).
- *
+ *
* @param input a stream to read from.
- *
+ *
* @return the loaded value.
- *
+ *
* @throws MARSHAL if the reading has failed due any reason.
*/
public static Serializable read(InputStream input)
@@ -173,12 +173,12 @@ public abstract class Vio
* required when an unitialised instance or at least class of the value type
* is known. Hence it may be faster to use the alternative methods,
* read(InputStream, Class) or read(InputStream, Serializable).
- *
+ *
* @param input a stream to read from.
* @param repository_id a repository id of the object being read, may be null.
- *
+ *
* @return the loaded value.
- *
+ *
* @throws MARSHAL if the reading has failed due any reason.
*/
public static Serializable read(InputStream input, String repository_id)
@@ -240,7 +240,7 @@ public abstract class Vio
catch (Exception ex)
{
MARSHAL m = new MARSHAL();
- m.minor = Minor.Value;
+ m.minor = Minor.Value;
m.initCause(ex);
throw m;
}
@@ -249,12 +249,12 @@ public abstract class Vio
/**
* Read the value base from the given input stream when the value base class
* is available. Hence there is no need to guess it from the repository id.
- *
+ *
* @param input a stream to read from.
* @param value_class the class of the value being read.
- *
+ *
* @return the loaded value.
- *
+ *
* @throws MARSHAL if the reading has failed due any reason.
*/
public static Serializable read(InputStream input, Class value_class)
@@ -353,18 +353,18 @@ public abstract class Vio
* Read the value base from the given input stream when the unitialised
* instance is available. Hence there is no need to guess the class from the
* repository id and then to instantiate an instance.
- *
+ *
* @param input a stream to read from.
- *
+ *
* @param value_instance an pre-created instance of the value. If the helper
* is not null, this parameter is ignored an should be null.
- *
+ *
* @param helper a helper to create an instance and read the object- specific
* part of the record. If the value_instance is used instead, this parameter
* should be null.
- *
+ *
* @return the loaded value.
- *
+ *
* @throws MARSHAL if the reading has failed due any reason.
*/
public static Object read(InputStream input, Object value_instance,
@@ -431,10 +431,10 @@ public abstract class Vio
* Read using provided boxed value helper. This method expects the full value
* type header, followed by contents, that are delegated to the provided
* helper. It handles null.
- *
+ *
* @param input the stream to read from.
* @param helper the helper that reads the type-specific part of the content.
- *
+ *
* @return the value, created by the helper, or null if the header indicates
* that null was previously written.
*/
@@ -447,17 +447,17 @@ public abstract class Vio
* Fill in the instance fields by the data from the input stream. The method
* assumes that the value header, if any, is already behind. The information
* from the stream is stored into the passed ox parameter.
- *
+ *
* @param input an input stream to read from.
- *
+ *
* @param value a pre-instantiated value type object, must be either
* Streamable or CustomMarshal. If the helper is used, this parameter is
* ignored and should be null.
- *
+ *
* @param value_tag the tag that must be read previously.
* @param helper the helper for read object specific part; may be null to read
* in using other methods.
- *
+ *
* @return the value that was read.
*/
static Object read_instance(InputStream input, final int position,
@@ -542,13 +542,13 @@ public abstract class Vio
/**
* Read the chunked nested value from the given input stream, transferring the
* contents to the given output stream.
- *
+ *
* @param value_tag the value tag of the value being read.
* @param input the input stream from where the remainder of the nested value
* must be read.
* @param output the output stream where the unchunked nested value must be
* copied.
- *
+ *
* @return the tag that ended the nested value.
*/
public static int readNestedValue(int value_tag, InputStream input,
@@ -769,12 +769,12 @@ public abstract class Vio
/**
* Write the value base into the given stream.
- *
+ *
* @param output a stream to write to.
- *
+ *
* @param value a value type object, must be either Streamable or
* CustomMarshal.
- *
+ *
* @throws MARSHAL if the writing failed due any reason.
*/
public static void write(OutputStream output, Serializable value)
@@ -791,11 +791,11 @@ public abstract class Vio
/**
* Write the value base into the given stream, stating that it is an instance
* of the given class.
- *
+ *
* @param output a stream to write to.
- *
+ *
* @param value a value to write.
- *
+ *
* @throws MARSHAL if the writing failed due any reason.
*/
public static void write(OutputStream output, Serializable value,
@@ -831,11 +831,11 @@ public abstract class Vio
* Write the value base into the given stream, supplementing it with an array
* of the provided repository ids plus the repository id, derived from the
* passed value.
- *
+ *
* @param output a stream to write to.
- *
+ *
* @param value a value to write.
- *
+ *
* @throws MARSHAL if the writing failed due any reason.
*/
public static void write(OutputStream output, Serializable value,
@@ -857,7 +857,7 @@ public abstract class Vio
/**
* Write value when its repository Id is explicitly given. Only this Id is
* written, the type of value is not taken into consideration.
- *
+ *
* @param output an output stream to write into.
* @param value a value to write.
* @param id a value repository id.
@@ -873,7 +873,7 @@ public abstract class Vio
/**
* Write standard value type header, followed by contents, produced by the
* boxed value helper.
- *
+ *
* @param output the stream to write to.
* @param value the value to write, can be null.
* @param helper the helper that writes the value content if it is not null
@@ -902,7 +902,7 @@ public abstract class Vio
/**
* Write value when its repository Id is explicitly given. Does not handle
* null.
- *
+ *
* @param output an output stream to write into.
* @param value a value to write.
* @param ids a value repository id (can be either single string or string
@@ -1070,7 +1070,7 @@ public abstract class Vio
/**
* Read the indirection data and return the object that was already written to
* this stream.
- *
+ *
* @param an_input the input stream, must be BufferredCdrInput.
*/
static Serializable readIndirection(InputStream an_input)
@@ -1106,9 +1106,9 @@ public abstract class Vio
/**
* Check the passed value tag for correctness.
- *
+ *
* @param value_tag a tag to check, must be between 0x7fffff00 and 0x7fffffff
- *
+ *
* @throws MARSHAL if the tag is outside this interval.
*/
static void checkTag(int value_tag)
@@ -1452,7 +1452,7 @@ public abstract class Vio
* Instantiate an instance of this class anyway; also in the case when it has
* no parameterless or any other constructor. The fields will be assigned
* while reading the class from the stream.
- *
+ *
* @param clazz a class for that the instance should be instantiated.
*/
public static Object instantiateAnyWay(Class clazz)
diff --git a/gnu/CORBA/CDR/gnuRuntime.java b/gnu/CORBA/CDR/gnuRuntime.java
index 4af8c6851..1d07094e9 100644
--- a/gnu/CORBA/CDR/gnuRuntime.java
+++ b/gnu/CORBA/CDR/gnuRuntime.java
@@ -56,7 +56,7 @@ import java.util.TreeSet;
/**
* Our implementation of the sending context runtime.
- *
+ *
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public class gnuRuntime
@@ -165,7 +165,7 @@ public class gnuRuntime
/**
* Create Runtime.
- *
+ *
* @param a_id a repository Id, if only one Id was specified in the stream.
* @param a_ids a repository Ids, if the multiple Ids were specified in te
* stream.
@@ -200,7 +200,7 @@ public class gnuRuntime
/**
* Check if the object is already written.
- *
+ *
* @return the position, at that the object is allready written or -1 if it is
* not yet written.
*/
@@ -224,9 +224,9 @@ public class gnuRuntime
/**
* Get the object, written at the given position. This returs both shared
* objects and repository Ids.
- *
+ *
* @return the position, at that the object is allready written.
- *
+ *
* @throws MARSHAL if there is no object written at that position.
*/
public Object isObjectWrittenAt(int x, int offset)
@@ -238,7 +238,7 @@ public class gnuRuntime
return e.object;
else
{
- MARSHAL m = new MARSHAL("No object was written at " + x +
+ MARSHAL m = new MARSHAL("No object was written at " + x +
" (offset " + offset + ") r " + this + dump());
m.minor = Minor.Graph;
throw m;
@@ -268,7 +268,7 @@ public class gnuRuntime
public void multipleIdsWritten(String[] ids, int at)
{
if (sh_ids.containsKey(ids))
- throw new InternalError("Repetetive writing of the same string " +
+ throw new InternalError("Repetetive writing of the same string " +
ids + dump());
Entry e = new Entry();
@@ -281,7 +281,7 @@ public class gnuRuntime
/**
* Check if the object is already written.
- *
+ *
* @return the position, at that the object is allready written or -1 if it is
* not yet written.
*/
diff --git a/gnu/CORBA/CDR/gnuValueStream.java b/gnu/CORBA/CDR/gnuValueStream.java
index 663c99018..95d9edb2e 100644
--- a/gnu/CORBA/CDR/gnuValueStream.java
+++ b/gnu/CORBA/CDR/gnuValueStream.java
@@ -48,24 +48,24 @@ public interface gnuValueStream
{
/**
* Get the current position in the buffer.
- *
+ *
* @return The position in the buffer, taking offset into consideration.
*/
public int getPosition();
-
+
/**
* Jump to the given position, taking offset into consideration.
*/
public void seek(int position);
-
+
/**
- * Get the RunTime information.
+ * Get the RunTime information.
*/
public gnuRuntime getRunTime();
-
+
/**
- * Replace the instance of RunTime.
+ * Replace the instance of RunTime.
*/
public void setRunTime(gnuRuntime a_runtime);
-
+
}
diff --git a/gnu/CORBA/CdrEncapsCodecImpl.java b/gnu/CORBA/CdrEncapsCodecImpl.java
index 93dd1cdcd..1dc7f9282 100644
--- a/gnu/CORBA/CdrEncapsCodecImpl.java
+++ b/gnu/CORBA/CdrEncapsCodecImpl.java
@@ -57,7 +57,7 @@ import org.omg.IOP.CodecPackage.TypeMismatch;
/**
* The local {@link Codec} implementation for ENCODING_CDR_ENCAPS
* encoding. This is a local implementation; the remote side should
- * have its own Codec of this kind.
+ * have its own Codec of this kind.
*
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
@@ -66,8 +66,8 @@ public class CdrEncapsCodecImpl
extends LocalObject
implements Codec
{
- /**
- * Use serialVersionUID for interoperability.
+ /**
+ * Use serialVersionUID for interoperability.
*/
private static final long serialVersionUID = 1;
@@ -355,4 +355,4 @@ public class CdrEncapsCodecImpl
{
lengthIndicator = use_lengthIndicator;
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/CollocatedOrbs.java b/gnu/CORBA/CollocatedOrbs.java
index 51ad83623..5634ff3cf 100644
--- a/gnu/CORBA/CollocatedOrbs.java
+++ b/gnu/CORBA/CollocatedOrbs.java
@@ -51,33 +51,33 @@ import java.util.ArrayList;
* between two independent ORBs, instantiated via ORB.init. The call to the
* object, obtained via IOR reference from the ORB where it was locally
* connected is always local anyway.
- *
+ *
* For security reasons it may be sensible to keep this class and all support
* package private.
- *
+ *
* @author Audrius Meskauskas
*/
class CollocatedOrbs
{
/**
* This field is used in automated Classpath specific testing to disable
- * the direct calls.
+ * the direct calls.
*/
static boolean DIRECT_CALLS_ALLOWED = true;
-
+
/**
* Containts the references of the all running GNU Classpath ORBs in the
* local virtual machine. GNU Classpath ORBs register themselves here when
- * created and unregister when either ORB.destroy is called or in the
+ * created and unregister when either ORB.destroy is called or in the
* finalizer.
*/
private static ArrayList orbs = new ArrayList();
-
+
/**
* The address of the local host.
*/
static String localHost;
-
+
static
{
try
@@ -89,10 +89,10 @@ class CollocatedOrbs
throw new InternalError("Local host is not accessible:" + ex);
}
}
-
+
/**
* Register the new ORB
- *
+ *
* @param orb the orb to register
*/
static void registerOrb(OrbFunctional orb)
@@ -104,11 +104,11 @@ class CollocatedOrbs
orbs.add(orb);
}
}
-
+
/**
* Unregister the ORB. The ORB will no longer be reacheable locally but may
* be reacheable via network as if it would be remote.
- *
+ *
* @param orb the orb to unregister
*/
static void unregisterOrb(OrbFunctional orb)
@@ -120,11 +120,11 @@ class CollocatedOrbs
orbs.remove(orb);
}
}
-
+
/**
* Search the possibly local object. If the IOR is not local or none of the
* found ORBs of this virtual machine knows about it, null is returned.
- *
+ *
* @param ior the IOR to search
* @return the found local CORBA object or null in not found.
*/
@@ -156,5 +156,5 @@ class CollocatedOrbs
}
return null;
}
-
+
}
diff --git a/gnu/CORBA/Connected_objects.java b/gnu/CORBA/Connected_objects.java
index 655dbe388..62976c71f 100644
--- a/gnu/CORBA/Connected_objects.java
+++ b/gnu/CORBA/Connected_objects.java
@@ -242,14 +242,14 @@ public class Connected_objects
free_object_number++;
return instance_number;
}
-
+
/**
* Get the number of the connected objects.
- *
+ *
* @return the size of the internal map.
*/
public int size()
{
return objects.size();
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/DefaultSocketFactory.java b/gnu/CORBA/DefaultSocketFactory.java
index 51df04719..e540fd0a4 100644
--- a/gnu/CORBA/DefaultSocketFactory.java
+++ b/gnu/CORBA/DefaultSocketFactory.java
@@ -47,7 +47,7 @@ import java.net.Socket;
/**
* The default socket factory that forges "plain" server and client sockets. The
* class can be replaced by setting the gnu.CORBA.SocketFactory property.
- *
+ *
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public class DefaultSocketFactory
diff --git a/gnu/CORBA/DuplicateNameHolder.java b/gnu/CORBA/DuplicateNameHolder.java
index ad004bc41..d98f0ed40 100644
--- a/gnu/CORBA/DuplicateNameHolder.java
+++ b/gnu/CORBA/DuplicateNameHolder.java
@@ -103,4 +103,4 @@ public class DuplicateNameHolder
{
return DuplicateNameHelper.type();
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/DynAn/AbstractAny.java b/gnu/CORBA/DynAn/AbstractAny.java
index 7060f86b2..0f3b897df 100644
--- a/gnu/CORBA/DynAn/AbstractAny.java
+++ b/gnu/CORBA/DynAn/AbstractAny.java
@@ -174,4 +174,4 @@ public abstract class AbstractAny
{
return "Size mismatch, " + other + " (expected " + here + ")";
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/DynAn/DivideableAny.java b/gnu/CORBA/DynAn/DivideableAny.java
index 63fe117f4..ae73cfe6f 100644
--- a/gnu/CORBA/DynAn/DivideableAny.java
+++ b/gnu/CORBA/DynAn/DivideableAny.java
@@ -509,4 +509,4 @@ public abstract class DivideableAny
throw u;
}
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/DynAn/NameValuePairHolder.java b/gnu/CORBA/DynAn/NameValuePairHolder.java
index 2558f5335..c3214e6ad 100644
--- a/gnu/CORBA/DynAn/NameValuePairHolder.java
+++ b/gnu/CORBA/DynAn/NameValuePairHolder.java
@@ -91,4 +91,4 @@ public class NameValuePairHolder
{
NameValuePairHelper.write(output, value);
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/DynAn/RecordAny.java b/gnu/CORBA/DynAn/RecordAny.java
index a3e3680d9..8badd2011 100644
--- a/gnu/CORBA/DynAn/RecordAny.java
+++ b/gnu/CORBA/DynAn/RecordAny.java
@@ -402,4 +402,4 @@ public abstract class RecordAny
throw t;
}
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/DynAn/ValueChangeListener.java b/gnu/CORBA/DynAn/ValueChangeListener.java
index 597276159..4c3a456d2 100644
--- a/gnu/CORBA/DynAn/ValueChangeListener.java
+++ b/gnu/CORBA/DynAn/ValueChangeListener.java
@@ -47,4 +47,4 @@ package gnu.CORBA.DynAn;
public interface ValueChangeListener
{
void changed();
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/DynAn/gnuDynAny.java b/gnu/CORBA/DynAn/gnuDynAny.java
index 23141de3d..314426c82 100644
--- a/gnu/CORBA/DynAn/gnuDynAny.java
+++ b/gnu/CORBA/DynAn/gnuDynAny.java
@@ -942,4 +942,4 @@ public class gnuDynAny extends AbstractAny implements DynAny, Serializable
if (t.value() != final_type.kind().value())
throw new TypeMismatch(t.value() + "!=" + final_type.kind().value());
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/DynAn/gnuDynAnyFactory.java b/gnu/CORBA/DynAn/gnuDynAnyFactory.java
index b8b39bfbc..b42e63213 100644
--- a/gnu/CORBA/DynAn/gnuDynAnyFactory.java
+++ b/gnu/CORBA/DynAn/gnuDynAnyFactory.java
@@ -353,4 +353,4 @@ public class gnuDynAnyFactory
}
return created;
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/DynAn/gnuDynArray.java b/gnu/CORBA/DynAn/gnuDynArray.java
index dc056adff..5676c3d39 100644
--- a/gnu/CORBA/DynAn/gnuDynArray.java
+++ b/gnu/CORBA/DynAn/gnuDynArray.java
@@ -334,4 +334,4 @@ public class gnuDynArray
if (array.length != Array.getLength(members))
throw new InvalidValue(sizeMismatch(array.length, Array.getLength(members)));
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/DynAn/gnuDynEnum.java b/gnu/CORBA/DynAn/gnuDynEnum.java
index 6eb7fe2bc..76b0a9527 100644
--- a/gnu/CORBA/DynAn/gnuDynEnum.java
+++ b/gnu/CORBA/DynAn/gnuDynEnum.java
@@ -241,4 +241,4 @@ public class gnuDynEnum extends UndivideableAny implements DynEnum
a.type(official_type);
return a;
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/DynAn/gnuDynFixed.java b/gnu/CORBA/DynAn/gnuDynFixed.java
index 9655f0387..9c7ea8252 100644
--- a/gnu/CORBA/DynAn/gnuDynFixed.java
+++ b/gnu/CORBA/DynAn/gnuDynFixed.java
@@ -249,4 +249,4 @@ public class gnuDynFixed extends UndivideableAny implements DynFixed
g.insert_fixed(value, official_type);
return g;
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/DynAn/gnuDynSequence.java b/gnu/CORBA/DynAn/gnuDynSequence.java
index cfa122f07..d006c24a5 100644
--- a/gnu/CORBA/DynAn/gnuDynSequence.java
+++ b/gnu/CORBA/DynAn/gnuDynSequence.java
@@ -251,4 +251,4 @@ public class gnuDynSequence
if (get_length() != Array.getLength(members))
set_length(Array.getLength(members));
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/DynAn/gnuDynUnion.java b/gnu/CORBA/DynAn/gnuDynUnion.java
index 3cd8efe18..adbc5731d 100644
--- a/gnu/CORBA/DynAn/gnuDynUnion.java
+++ b/gnu/CORBA/DynAn/gnuDynUnion.java
@@ -434,4 +434,4 @@ public class gnuDynUnion
throw new Unexpected(ex);
}
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/DynAn/gnuDynValue.java b/gnu/CORBA/DynAn/gnuDynValue.java
index 57150f746..32b2f0d1a 100644
--- a/gnu/CORBA/DynAn/gnuDynValue.java
+++ b/gnu/CORBA/DynAn/gnuDynValue.java
@@ -377,4 +377,4 @@ public class gnuDynValue extends RecordAny implements DynValue,
from_any(a);
valueChanged();
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/DynAn/gnuDynValueBox.java b/gnu/CORBA/DynAn/gnuDynValueBox.java
index a13e9fc2c..9c50534ed 100644
--- a/gnu/CORBA/DynAn/gnuDynValueBox.java
+++ b/gnu/CORBA/DynAn/gnuDynValueBox.java
@@ -386,4 +386,4 @@ public class gnuDynValueBox
a.type(orb.get_primitive_tc(TCKind.tk_null));
return a;
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/DynAnySeqHolder.java b/gnu/CORBA/DynAnySeqHolder.java
index 52d66d9e9..4447aa685 100644
--- a/gnu/CORBA/DynAnySeqHolder.java
+++ b/gnu/CORBA/DynAnySeqHolder.java
@@ -113,4 +113,4 @@ public class DynAnySeqHolder
{
return DynAnySeqHelper.type();
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/EmptyExceptionHolder.java b/gnu/CORBA/EmptyExceptionHolder.java
index 6f84da8e5..a48b60562 100644
--- a/gnu/CORBA/EmptyExceptionHolder.java
+++ b/gnu/CORBA/EmptyExceptionHolder.java
@@ -128,4 +128,4 @@ public class EmptyExceptionHolder
throw bad;
}
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/ForwardRequestHelper.java b/gnu/CORBA/ForwardRequestHelper.java
index 5b77fa030..320b6d232 100644
--- a/gnu/CORBA/ForwardRequestHelper.java
+++ b/gnu/CORBA/ForwardRequestHelper.java
@@ -129,9 +129,9 @@ public abstract class ForwardRequestHelper
{
ORB orb = OrbRestricted.Singleton;
StructMember[] members = new StructMember[ 1 ];
-
+
TypeCode field;
-
+
field = ObjectHelper.type();
members [ 0 ] = new StructMember("forward_reference", field, null);
return orb.create_exception_tc(id(), "ForwardRequest", members);
@@ -149,4 +149,4 @@ public abstract class ForwardRequestHelper
output.write_string(id());
output.write_Object(value.forward_reference);
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/GIOP/CharSets_OSF.java b/gnu/CORBA/GIOP/CharSets_OSF.java
index bffb02678..6cefe995f 100644
--- a/gnu/CORBA/GIOP/CharSets_OSF.java
+++ b/gnu/CORBA/GIOP/CharSets_OSF.java
@@ -48,7 +48,7 @@ import java.util.Set;
* This class contains the codes, used to identify character sets
* in CORBA. These codes are defined in Open Software Foundation (OSF)
* code set registry.
- *
+ *
* The name of this class specially sets "OSF" apart if somebody would start
* searching Open Software Foundation abbreviation.
*
diff --git a/gnu/CORBA/GIOP/CloseMessage.java b/gnu/CORBA/GIOP/CloseMessage.java
index 38039c2ed..c555f2b94 100644
--- a/gnu/CORBA/GIOP/CloseMessage.java
+++ b/gnu/CORBA/GIOP/CloseMessage.java
@@ -58,11 +58,11 @@ import java.io.OutputStream;
public class CloseMessage
extends MessageHeader
{
- /**
- * Use serialVersionUID for interoperability.
+ /**
+ * Use serialVersionUID for interoperability.
*/
private static final long serialVersionUID = 1;
-
+
/**
* The singleton close message is typically enough, despite new
* instances may be instantiated if the specific version field
@@ -103,4 +103,4 @@ public class CloseMessage
throw m;
}
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/GIOP/ErrorMessage.java b/gnu/CORBA/GIOP/ErrorMessage.java
index 99942fee3..0bd48dea8 100644
--- a/gnu/CORBA/GIOP/ErrorMessage.java
+++ b/gnu/CORBA/GIOP/ErrorMessage.java
@@ -62,11 +62,11 @@ import org.omg.CORBA.ORB;
public class ErrorMessage
extends MessageHeader
{
- /**
- * Use serialVersionUID for interoperability.
+ /**
+ * Use serialVersionUID for interoperability.
*/
private static final long serialVersionUID = 1;
-
+
/**
* Create a new error message, setting the message field
* to the {@link MESSAGE_ERROR} and the version number to
@@ -83,7 +83,7 @@ public class ErrorMessage
*
* @param ior the IOR address (host and port, other fields
* are not used).
- *
+ *
* @param orb the ORB, sending the error message.
*/
public void send(IOR ior, ORB orb)
@@ -91,7 +91,7 @@ public class ErrorMessage
try
{
Socket socket;
-
+
if (orb instanceof OrbFunctional)
socket = ((OrbFunctional) orb).socketFactory.createClientSocket(
ior.Internet.host, ior.Internet.port);
diff --git a/gnu/CORBA/GIOP/MessageHeader.java b/gnu/CORBA/GIOP/MessageHeader.java
index f63cbea17..3137343ed 100644
--- a/gnu/CORBA/GIOP/MessageHeader.java
+++ b/gnu/CORBA/GIOP/MessageHeader.java
@@ -62,7 +62,7 @@ import java.util.Arrays;
/**
* The GIOP message header.
- *
+ *
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public class MessageHeader
@@ -159,7 +159,7 @@ public class MessageHeader
/**
* Create an empty message header, corresponding the given version.
- *
+ *
* @param major the major message header version.
* @param minor the minot message header version.
*/
@@ -187,7 +187,7 @@ public class MessageHeader
/**
* Set the encoding to use.
- *
+ *
* @param use_big_endian if true (default), the Big Endian encoding is used.
* If false, the Little Endian encoding is used.
*/
@@ -209,9 +209,9 @@ public class MessageHeader
/**
* Get the message type as string.
- *
+ *
* @param type the message type as int (the field {@link message_type}).
- *
+ *
* @return the message type as string.
*/
public String getTypeString(int type)
@@ -228,7 +228,7 @@ public class MessageHeader
/**
* Creates reply header, matching the message header version number.
- *
+ *
* @return one of {@link gnu.CORBA.GIOP.v1_0.ReplyHeader},
* {@link gnu.CORBA.GIOP.v1_2.ReplyHeader}, etc - depending on the version
* number in this header.
@@ -243,7 +243,7 @@ public class MessageHeader
/**
* Creates request header, matching the message header version number.
- *
+ *
* @return one of {@link gnu.CORBA.GIOP.v1_0.RequestHeader},
* {@link gnu.CORBA.GIOP.v1_2.RequestHeader}, etc - depending on the version
* number in this header.
@@ -274,11 +274,11 @@ public class MessageHeader
/**
* Read the header from the stream.
- *
+ *
* @param istream a stream to read from.
* @throws MARSHAL if this is not a GIOP 1.0 header.
*/
- public void read(java.io.InputStream istream)
+ public void read(java.io.InputStream istream)
throws MARSHAL, EOFException
{
try
@@ -336,7 +336,7 @@ public class MessageHeader
/**
* Get the short string summary of the message.
- *
+ *
* @return a short message summary.
*/
public String toString()
@@ -348,7 +348,7 @@ public class MessageHeader
/**
* Write the header to stream.
- *
+ *
* @param out a stream to write into.
*/
public void write(java.io.OutputStream out)
@@ -382,7 +382,7 @@ public class MessageHeader
/**
* Read data, followed by the message header. Handle fragmented messages.
- *
+ *
* @param source the data source to read from.
* @param service the socket on that the time outs are set. Can be null (no
* timeouts are set).
diff --git a/gnu/CORBA/GIOP/ServiceContext.java b/gnu/CORBA/GIOP/ServiceContext.java
index 78519510c..673ae0ba9 100644
--- a/gnu/CORBA/GIOP/ServiceContext.java
+++ b/gnu/CORBA/GIOP/ServiceContext.java
@@ -48,7 +48,7 @@ import org.omg.CORBA.portable.IDLEntity;
/**
* Contains the ORB service data being passed.
- *
+ *
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public class ServiceContext
@@ -134,7 +134,7 @@ public class ServiceContext
/**
* Read the context values from the stream.
- *
+ *
* @param istream a stream to read from.
*/
public static ServiceContext read(AbstractCdrInput istream)
@@ -172,7 +172,7 @@ public class ServiceContext
/**
* Write the context values into the stream.
- *
+ *
* @param ostream a stream to write the data to.
*/
public void write(AbstractCdrOutput ostream)
diff --git a/gnu/CORBA/GIOP/v1_2/RequestHeader.java b/gnu/CORBA/GIOP/v1_2/RequestHeader.java
index 2afa4b3a1..d083536a7 100644
--- a/gnu/CORBA/GIOP/v1_2/RequestHeader.java
+++ b/gnu/CORBA/GIOP/v1_2/RequestHeader.java
@@ -59,11 +59,11 @@ import org.omg.CORBA.NO_IMPLEMENT;
public class RequestHeader
extends gnu.CORBA.GIOP.v1_0.RequestHeader
{
- /**
- * Use serialVersionUID for interoperability.
+ /**
+ * Use serialVersionUID for interoperability.
*/
private static final long serialVersionUID = 1;
-
+
/**
* Indicates that the object is addressed by the object key.
*/
diff --git a/gnu/CORBA/GeneralHolder.java b/gnu/CORBA/GeneralHolder.java
index ffba69d79..d4550bf68 100644
--- a/gnu/CORBA/GeneralHolder.java
+++ b/gnu/CORBA/GeneralHolder.java
@@ -175,4 +175,4 @@ public class GeneralHolder
throw new Unexpected(ex);
}
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/IOR.java b/gnu/CORBA/IOR.java
index 7f63471ee..1a476b094 100644
--- a/gnu/CORBA/IOR.java
+++ b/gnu/CORBA/IOR.java
@@ -142,7 +142,7 @@ public class IOR
b.append(' ');
return b.toString();
}
-
+
/**
* Get a better formatted multiline string representation.
*/
@@ -162,7 +162,7 @@ public class IOR
b.append("\n");
return b.toString();
}
-
+
/**
* Write into CDR stream.
@@ -613,9 +613,9 @@ public class IOR
return b.toString();
}
-
+
/**
- * Returns a multiline formatted human readable string representation of
+ * Returns a multiline formatted human readable string representation of
* this IOR object.
*/
public String toStringFormatted()
@@ -629,7 +629,7 @@ public class IOR
if (Big_Endian)
b.append("\n Big endian encoding");
else
- b.append("\n Little endian encoding.");
+ b.append("\n Little endian encoding.");
b.append("\nObject Key\n ");
@@ -645,7 +645,7 @@ public class IOR
b.append(Internet.CodeSets.wide.toStringFormatted());
return b.toString();
- }
+ }
/**
* Returs a stringified reference.
@@ -774,7 +774,7 @@ public class IOR
// The future supported tagged profiles should be added here.
throw new BAD_PARAM("Unsupported profile type " + profile.tag);
}
-
+
/**
* Checks for equality.
*/
@@ -786,10 +786,10 @@ public class IOR
boolean hosts = true;
IOR other = (IOR) x;
-
+
if (Internet==null || other.Internet==null)
return Internet == other.Internet;
-
+
if (key != null && other.key != null)
keys = Arrays.equals(key, other.key);
else
@@ -804,7 +804,7 @@ public class IOR
else
return false;
}
-
+
/**
* Get the hashcode of this IOR.
*/
diff --git a/gnu/CORBA/Interceptor/ClientRequestInterceptors.java b/gnu/CORBA/Interceptor/ClientRequestInterceptors.java
index 5c15e121d..783e321d7 100644
--- a/gnu/CORBA/Interceptor/ClientRequestInterceptors.java
+++ b/gnu/CORBA/Interceptor/ClientRequestInterceptors.java
@@ -136,4 +136,4 @@ public class ClientRequestInterceptors
{
return getClass().getName();
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/Interceptor/ForwardRequestHolder.java b/gnu/CORBA/Interceptor/ForwardRequestHolder.java
index d9ced03a3..a250ceaa1 100644
--- a/gnu/CORBA/Interceptor/ForwardRequestHolder.java
+++ b/gnu/CORBA/Interceptor/ForwardRequestHolder.java
@@ -103,4 +103,4 @@ public class ForwardRequestHolder implements Streamable
{
return ForwardRequestHelper.type();
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/Interceptor/IORInterceptors.java b/gnu/CORBA/Interceptor/IORInterceptors.java
index d8dcabf12..67474c173 100644
--- a/gnu/CORBA/Interceptor/IORInterceptors.java
+++ b/gnu/CORBA/Interceptor/IORInterceptors.java
@@ -162,7 +162,7 @@ public class IORInterceptors implements IORInterceptor_3_0Operations
/**
* Call this method for all registered CORBA 3.0 interceptors.
- *
+ *
* @throws OBJ_ADAPTER minor 6 on any failure (as defined by OMG specs).
*/
public void components_established(IORInfo info)
@@ -186,4 +186,4 @@ public class IORInterceptors implements IORInterceptor_3_0Operations
}
}
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/Interceptor/Registrator.java b/gnu/CORBA/Interceptor/Registrator.java
index e0ce16a14..23ae54a10 100644
--- a/gnu/CORBA/Interceptor/Registrator.java
+++ b/gnu/CORBA/Interceptor/Registrator.java
@@ -184,7 +184,7 @@ public class Registrator extends LocalObject implements ORBInitInfo
{
String cn = sk.substring(m_prefix.length());
Class iClass = ObjectCreator.forName(cn);
-
+
ORBInitializer initializer =
(ORBInitializer) iClass.newInstance();
m_initializers.add(initializer);
@@ -469,4 +469,4 @@ public class Registrator extends LocalObject implements ORBInitInfo
{
return m_ior.size() > 0;
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/Interceptor/ServerRequestInterceptors.java b/gnu/CORBA/Interceptor/ServerRequestInterceptors.java
index 4b9bede98..5cb5b1ab4 100644
--- a/gnu/CORBA/Interceptor/ServerRequestInterceptors.java
+++ b/gnu/CORBA/Interceptor/ServerRequestInterceptors.java
@@ -136,4 +136,4 @@ public class ServerRequestInterceptors
{
return getClass().getName();
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/Interceptor/gnuClientRequestInfo.java b/gnu/CORBA/Interceptor/gnuClientRequestInfo.java
index beb81c81f..226e7f316 100644
--- a/gnu/CORBA/Interceptor/gnuClientRequestInfo.java
+++ b/gnu/CORBA/Interceptor/gnuClientRequestInfo.java
@@ -334,4 +334,4 @@ public class gnuClientRequestInfo extends LocalObject
{
return request.get_request_service_context(ctx_name);
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/Interceptor/gnuIcCurrent.java b/gnu/CORBA/Interceptor/gnuIcCurrent.java
index a33afc336..caed69aeb 100644
--- a/gnu/CORBA/Interceptor/gnuIcCurrent.java
+++ b/gnu/CORBA/Interceptor/gnuIcCurrent.java
@@ -252,4 +252,4 @@ public class gnuIcCurrent extends ObjectImpl implements Current
throw new InvalidSlot("Slot " + slot_id);
}
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/Interceptor/gnuIorInfo.java b/gnu/CORBA/Interceptor/gnuIorInfo.java
index 256a28cb5..257c49728 100644
--- a/gnu/CORBA/Interceptor/gnuIorInfo.java
+++ b/gnu/CORBA/Interceptor/gnuIorInfo.java
@@ -137,7 +137,7 @@ public class gnuIorInfo extends LocalObject implements IORInfo
}
/**
- * Set the object factory of the current POA.
+ * Set the object factory of the current POA.
*/
public void current_factory(ObjectReferenceFactory factory)
{
@@ -145,12 +145,12 @@ public class gnuIorInfo extends LocalObject implements IORInfo
}
/**
- * The method currently uses system identity hashcode that should be
+ * The method currently uses system identity hashcode that should be
* different for each object.
*/
public int manager_id()
{
- // The System.identityHashCode is also called in gnuPoaManager.
+ // The System.identityHashCode is also called in gnuPoaManager.
return System.identityHashCode(poa.the_POAManager());
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/Interceptor/gnuServerRequestInfo.java b/gnu/CORBA/Interceptor/gnuServerRequestInfo.java
index 8d5c681e7..03ad773d9 100644
--- a/gnu/CORBA/Interceptor/gnuServerRequestInfo.java
+++ b/gnu/CORBA/Interceptor/gnuServerRequestInfo.java
@@ -472,5 +472,5 @@ public class gnuServerRequestInfo extends LocalObject
{
return OrbFunctional.server_id;
}
-
-} \ No newline at end of file
+
+}
diff --git a/gnu/CORBA/IorDelegate.java b/gnu/CORBA/IorDelegate.java
index a2c5a0469..5f0a59df4 100644
--- a/gnu/CORBA/IorDelegate.java
+++ b/gnu/CORBA/IorDelegate.java
@@ -152,18 +152,18 @@ public class IorDelegate extends SimpleDelegate
* request to the new direction. The ReplyHeader.LOCATION_FORWARD_PERM will
* cause additionally to remember the new location by this delegate, so
* subsequent calls will be immediately delivered to the new target.
- *
+ *
* @param target the target object.
* @param output the output stream, previously returned by
* {@link #request(org.omg.CORBA.Object, String, boolean)}.
- *
+ *
* @return the input stream, to read the response from or null for a one-way
* request.
- *
+ *
* @throws SystemException if the SystemException has been thrown on the
* remote side (the exact type and the minor code matches the data of the
* remote exception that has been thrown).
- *
+ *
* @throws org.omg.CORBA.portable.ApplicationException as specified.
* @throws org.omg.CORBA.portable.RemarshalException as specified.
*/
@@ -422,4 +422,4 @@ public class IorDelegate extends SimpleDelegate
{
return false;
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/IorObject.java b/gnu/CORBA/IorObject.java
index 02f5a495d..921d18d00 100644
--- a/gnu/CORBA/IorObject.java
+++ b/gnu/CORBA/IorObject.java
@@ -83,7 +83,7 @@ public class IorObject
_set_delegate(new IorDelegate(orb, ior));
id = new String[] { ior.Id };
}
-
+
/**
* Get the IOR of this object.
*/
@@ -115,4 +115,4 @@ public class IorObject
{
_get_delegate().release(this);
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/Minor.java b/gnu/CORBA/Minor.java
index 511a34d55..8832162bc 100644
--- a/gnu/CORBA/Minor.java
+++ b/gnu/CORBA/Minor.java
@@ -43,7 +43,7 @@ package gnu.CORBA;
* Provides information and operations, related to about the 20 bit vendor minor
* code Id. This code is included into all CORBA system exceptions and is also
* transferred to remote side.
- *
+ *
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public interface Minor
@@ -257,22 +257,22 @@ public interface Minor
* for the given policy type.
*/
int PolicyType = 15 | vendor;
-
+
/* NO_RESOURCES */
-
+
/**
* Unable to get a free port for a new socket. Proably too many objects under
* unsuitable POA policy.
*/
int Ports = 20 | vendor;
-
+
/**
* Too many parallel calls (too many parallel threads). The thread control
* prevents malicios client from knocking the server out by suddenly
* submitting large number of requests.
*/
int Threads = 21 | vendor;
-
+
/**
* The IOR starts with file://, http:// or ftp://, but this local or remote
* resource is not accessible.
diff --git a/gnu/CORBA/NameDynAnyPairHolder.java b/gnu/CORBA/NameDynAnyPairHolder.java
index 6ceb9aae0..e8047b8d7 100644
--- a/gnu/CORBA/NameDynAnyPairHolder.java
+++ b/gnu/CORBA/NameDynAnyPairHolder.java
@@ -112,4 +112,4 @@ public class NameDynAnyPairHolder
{
return NameDynAnyPairHelper.type();
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/NameDynAnyPairSeqHolder.java b/gnu/CORBA/NameDynAnyPairSeqHolder.java
index 71b6174c1..8bf8ee89d 100644
--- a/gnu/CORBA/NameDynAnyPairSeqHolder.java
+++ b/gnu/CORBA/NameDynAnyPairSeqHolder.java
@@ -112,4 +112,4 @@ public class NameDynAnyPairSeqHolder
{
return NameDynAnyPairSeqHelper.type();
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/NameValuePairHolder.java b/gnu/CORBA/NameValuePairHolder.java
index 9a939d5e3..d757bdb39 100644
--- a/gnu/CORBA/NameValuePairHolder.java
+++ b/gnu/CORBA/NameValuePairHolder.java
@@ -102,4 +102,4 @@ public class NameValuePairHolder
{
return NameValuePairHelper.type();
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/NameValuePairSeqHolder.java b/gnu/CORBA/NameValuePairSeqHolder.java
index 216d78e04..5515bd306 100644
--- a/gnu/CORBA/NameValuePairSeqHolder.java
+++ b/gnu/CORBA/NameValuePairSeqHolder.java
@@ -102,4 +102,4 @@ public class NameValuePairSeqHolder
{
return NameValuePairSeqHelper.type();
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/NamingService/NameParser.java b/gnu/CORBA/NamingService/NameParser.java
index 5d4b729a5..93e4e3b16 100644
--- a/gnu/CORBA/NamingService/NameParser.java
+++ b/gnu/CORBA/NamingService/NameParser.java
@@ -68,15 +68,15 @@ import java.util.StringTokenizer;
/**
* Parses the alternative IOR representations into our IOR structure.
- *
+ *
* TODO This parser currently supports only one address per target string. A
* string with the multiple addresses will be accepted, but only the last
* address will be taken into consideration. The fault tolerance is not yet
* implemented.
- *
+ *
* The key string is filtered using {@link java.net.URLDecoder} that replaces
* the agreed escape sequences by the corresponding non alphanumeric characters.
- *
+ *
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public class NameParser
@@ -96,17 +96,17 @@ public class NameParser
* The IOR prefix.
*/
public static final String pxIOR = "ior";
-
+
/**
* The file:// prefix.
*/
public static final String pxFILE = "file://";
-
+
/**
* The ftp:// prefix.
*/
public static final String pxFTP = "ftp://";
-
+
/**
* The http:// prefix.
*/
@@ -149,7 +149,7 @@ public class NameParser
/**
* Parse CORBALOC.
- *
+ *
* The expected format is: <br>
* 1. corbaloc:[iiop][version.subversion@]:host[:port]/key <br>
* 2. corbaloc:rir:[/key] <br>
@@ -158,12 +158,12 @@ public class NameParser
* 5. file://[file name]<br>
* 6. http://[url]<br>
* 7. ftp://[url]<br>
- *
+ *
* Protocol defaults to IOP, the object key defaults to the NameService.
- *
+ *
* @param corbaloc the string to parse.
* @param orb the ORB, needed to create IORs and resolve rir references.
- *
+ *
* @return the resolved object.
*/
public synchronized org.omg.CORBA.Object corbaloc(String corbaloc,
@@ -172,7 +172,7 @@ public class NameParser
{
return corbaloc(corbaloc, orb, 0);
}
-
+
/**
* Parse controlling against the infinite recursion loop.
*/
@@ -184,7 +184,7 @@ public class NameParser
// by malicious attempt.
if (recursion > 10)
throw new DATA_CONVERSION("More than 10 redirections");
-
+
if (corbaloc.startsWith(pxFILE))
return corbaloc(readFile(corbaloc.substring(pxFILE.length())), orb, recursion+1);
else if (corbaloc.startsWith(pxHTTP))
@@ -347,7 +347,7 @@ public class NameParser
else
throw new DATA_CONVERSION("Unsupported protocol '" + t[p] + "'");
}
-
+
/**
* Read IOR from the file in the local file system.
*/
@@ -376,7 +376,7 @@ public class NameParser
throw (d);
}
}
-
+
/**
* Read IOR from the remote URL.
*/
diff --git a/gnu/CORBA/NamingService/NamingMap.java b/gnu/CORBA/NamingService/NamingMap.java
index f4e940ea9..40fef0a3a 100644
--- a/gnu/CORBA/NamingService/NamingMap.java
+++ b/gnu/CORBA/NamingService/NamingMap.java
@@ -95,7 +95,7 @@ public class NamingMap
if (containsValue(object))
throw new AlreadyBound("The object has another name");
}
-
+
// There are no restrictions in binding the object.
rebind(name, object);
}
diff --git a/gnu/CORBA/NamingService/NamingServiceTransient.java b/gnu/CORBA/NamingService/NamingServiceTransient.java
index a8cd0b313..5ccc4d8cc 100644
--- a/gnu/CORBA/NamingService/NamingServiceTransient.java
+++ b/gnu/CORBA/NamingService/NamingServiceTransient.java
@@ -51,11 +51,11 @@ import java.io.UnsupportedEncodingException;
* The server for the gnu classpath naming service. This is an executable class
* that must be started to launch the GNU Classpath CORBA transient naming
* service.
- *
+ *
* GNU Classpath currently works with this naming service and is also
* interoperable with the Sun Microsystems naming services from releases 1.3 and
* 1.4, both transient <i>tnameserv</i> and persistent <i>orbd</i>.
- *
+ *
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public class NamingServiceTransient
@@ -69,7 +69,7 @@ public class NamingServiceTransient
/**
* Get the object key for the naming service. The default key is the string
* "NameService" in ASCII.
- *
+ *
* @return the byte array.
*/
public static byte[] getDefaultKey()
@@ -86,7 +86,7 @@ public class NamingServiceTransient
/**
* Start the naming service on the current host at the given port.
- *
+ *
* @param portArgument the port on which the service will be
* started, or -1 to use the default port, 900
* @param fileArgument if non-null, store the IOR string of this
diff --git a/gnu/CORBA/NamingService/TransientContext.java b/gnu/CORBA/NamingService/TransientContext.java
index cec87931e..6ed07d799 100644
--- a/gnu/CORBA/NamingService/TransientContext.java
+++ b/gnu/CORBA/NamingService/TransientContext.java
@@ -77,7 +77,7 @@ public class TransientContext
* Use serial version UID for interoperability.
*/
private static final long serialVersionUID = 2;
-
+
/**
* The already named contexts.
*/
@@ -87,7 +87,7 @@ public class TransientContext
* The already named objects.
*/
protected final NamingMap named_objects;
-
+
/**
* Create the naming conetxt with default (transient) naming maps.
*/
@@ -95,10 +95,10 @@ public class TransientContext
{
this(new NamingMap(), new NamingMap());
}
-
+
/**
* Create the naming conetxt with the two provided naming maps.
- *
+ *
* @param context_map the map for contexts
* @param object_map the map for objectss
*/
diff --git a/gnu/CORBA/ObjectCreator.java b/gnu/CORBA/ObjectCreator.java
index 939d69233..292495a1f 100644
--- a/gnu/CORBA/ObjectCreator.java
+++ b/gnu/CORBA/ObjectCreator.java
@@ -68,7 +68,7 @@ import javax.rmi.CORBA.Util;
/**
* Creates java objects from the agreed IDL names for the simple case when the
* CORBA object is directly mapped into the locally defined java class.
- *
+ *
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public class ObjectCreator
@@ -110,7 +110,7 @@ public class ObjectCreator
* Try to instantiate an object with the given IDL name. The object must be
* mapped to the local java class. The omg.org domain must be mapped into the
* object in either org/omg or gnu/CORBA namespace.
- *
+ *
* @param idl name
* @return instantiated object instance or null if no such available.
*/
@@ -165,10 +165,10 @@ public class ObjectCreator
/**
* Read the system exception from the given stream.
- *
+ *
* @param input the CDR stream to read from.
* @param contexts the service contexts in request/reply header/
- *
+ *
* @return the exception that has been stored in the stream (IDL name, minor
* code and completion status).
*/
@@ -228,10 +228,10 @@ public class ObjectCreator
* Reads the user exception, having the given Id, from the input stream. The
* id is expected to be in the form like
* 'IDL:test/org/omg/CORBA/ORB/communication/ourUserException:1.0'
- *
+ *
* @param idl the exception idl name.
* @param input the stream to read from.
- *
+ *
* @return the loaded exception.
* @return null if the helper class cannot be found.
*/
@@ -261,7 +261,7 @@ public class ObjectCreator
/**
* Gets the helper class name from the string like
* 'IDL:test/org/omg/CORBA/ORB/communication/ourUserException:1.0'
- *
+ *
* @param IDL the idl name.
*/
public static String toHelperName(String IDL)
@@ -280,7 +280,7 @@ public class ObjectCreator
/**
* Writes the system exception data to CDR output stream.
- *
+ *
* @param output a stream to write data to.
* @param ex an exception to write.
*/
@@ -295,9 +295,9 @@ public class ObjectCreator
/**
* Converts the given IDL name to class name.
- *
+ *
* @param IDL the idl name.
- *
+ *
*/
protected static String toClassName(String prefix, String IDL)
{
@@ -317,9 +317,9 @@ public class ObjectCreator
* Converts the given IDL name to class name and tries to load the matching
* class. The OMG prefix (omg.org) is replaced by the java prefix org.omg. No
* other prefixes are added.
- *
+ *
* @param IDL the idl name.
- *
+ *
* @return the matching class or null if no such is available.
*/
public static Class Idl2class(String IDL)
@@ -362,9 +362,9 @@ public class ObjectCreator
* and create an object instance with parameterless constructor. The OMG
* prefix (omg.org) is replaced by the java prefix org.omg. No other prefixes
* are added.
- *
+ *
* @param IDL the idl name.
- *
+ *
* @return instantiated object instance or null if such attempt was not
* successful.
*/
@@ -390,9 +390,9 @@ public class ObjectCreator
* inherits from IDLEntity, ValueBase or SystemException, returns repository
* Id in the IDL:(..) form. If it does not, returns repository Id in the
* RMI:(..) form.
- *
+ *
* @param cx the class for that the name must be computed.
- *
+ *
* @return the idl or rmi name.
*/
public static synchronized String getRepositoryId(Class cx)
@@ -427,12 +427,12 @@ public class ObjectCreator
* Insert the passed parameter into the given Any, assuming that the helper
* class is available. The helper class must have the "Helper" suffix and be
* in the same package as the class of the object being inserted.
- *
+ *
* @param into the target to insert.
- *
+ *
* @param object the object to insert. It can be any object as far as the
* corresponding helper is provided.
- *
+ *
* @return true on success, false otherwise.
*/
public static boolean insertWithHelper(Any into, Object object)
@@ -547,7 +547,7 @@ public class ObjectCreator
}
}
}
-
+
/**
* Load the class with the given name. This method tries to use the context
* class loader first. If this fails, it searches for the suitable class
@@ -587,4 +587,4 @@ public class ObjectCreator
}
throw new ClassNotFoundException(className);
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/OrbFocused.java b/gnu/CORBA/OrbFocused.java
index 572acbc11..de5d49e36 100644
--- a/gnu/CORBA/OrbFocused.java
+++ b/gnu/CORBA/OrbFocused.java
@@ -62,16 +62,16 @@ import java.util.StringTokenizer;
* to allow CORBA to work on one fixed port or (for better performance) on a
* small fixed range of ports. This does not restrict the maximal number of the
* connected objects as the objects can share the same port.
- *
+ *
* The used port or the used port range can be specified via property
* gnu.CORBA.ListenerPort. The value of this property is a single port or range
* of ports, boundary values (inclusive) being separeted by dash (for instance,
* "1245-1250").
- *
+ *
* It is possible to instantiate multiple instances of the focused ORBs and
* combine them with the ordinary ORBs. If you instantiate several instances of
* the focused ORBs on the same host, they used port sets should not overlap.
- *
+ *
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public class OrbFocused
@@ -136,7 +136,7 @@ public class OrbFocused
/**
* Set the port range.
- *
+ *
* @param from - start of the port range, inclusive.
* @param to - end of the port range, inclusive.
*/
@@ -231,7 +231,7 @@ public class OrbFocused
/**
* Start the ORBs main working cycle (receive invocation - invoke on the local
* object - send response - wait for another invocation).
- *
+ *
* The method only returns after calling {@link #shutdown(boolean)}.
*/
public void run()
@@ -281,7 +281,7 @@ public class OrbFocused
* Connect the given CORBA object to this ORB, explicitly specifying the
* object key and the identity of the thread (and port), where the object must
* be served. The identity is normally the POA.
- *
+ *
* The new port server will be started only if there is no one already running
* for the same identity. Otherwise, the task of the existing port server will
* be widened, including duty to serve the given object. All objects,
@@ -289,13 +289,13 @@ public class OrbFocused
* subsequently in the same thread. The method is used when the expected
* number of the objects is too large to have a single port and thread per
* object. This method is used by POAs, having a single thread policy.
- *
+ *
* @param object the object, must implement the {@link InvokeHandler})
* interface.
* @param key the object key, usually used to identify the object from remote
* side.
* @param port the port, where the object must be connected.
- *
+ *
* @throws BAD_PARAM if the object does not implement the
* {@link InvokeHandler}).
*/
diff --git a/gnu/CORBA/OrbFunctional.java b/gnu/CORBA/OrbFunctional.java
index 25344cb2e..88848dd1b 100644
--- a/gnu/CORBA/OrbFunctional.java
+++ b/gnu/CORBA/OrbFunctional.java
@@ -184,7 +184,7 @@ public class OrbFunctional extends OrbRestricted
/**
* Perform a single serving step.
- *
+ *
* @throws java.lang.Exception
*/
void tick()
@@ -251,19 +251,19 @@ public class OrbFunctional extends OrbRestricted
* for a free port.
*/
public static int DEFAULT_INITIAL_PORT = 1126;
-
+
/**
* When trying to open the socket on a random port, start of the interval to
* try.
*/
public static int RANDOM_PORT_FROM = 1024;
-
+
/**
* When trying to open the socket on a random port, end of the interval to
* try.
*/
public static int RANDOM_PORT_TO = 4024;
-
+
/**
* The number of attempts to try when opening random port.
*/
@@ -296,18 +296,18 @@ public class OrbFunctional extends OrbRestricted
* The string, defining the naming service initial reference.
*/
public static final String NAME_SERVICE = "NameService";
-
+
/**
* Defines the ORB ID that is accessible by IOR interceptors.
*/
public static final String ORB_ID = "org.omg.CORBA.ORBid";
-
-
+
+
/**
* Defines the SERVER ID that is accessible by IOR interceptors.
*/
public static final String SERVER_ID = "org.omg.CORBA.ServerId";
-
+
/**
* The if the client has once opened a socket, it should start sending the
* message header in a given time. Otherwise the server will close the socket.
@@ -331,7 +331,7 @@ public class OrbFunctional extends OrbRestricted
*/
public static String AFTER_RECEIVING =
"gnu.classpath.CORBA.TOUT_AFTER_RECEIVING";
-
+
/**
* The server waits for this duration after the potentially transient error
* during its servicing cycle.
@@ -366,7 +366,7 @@ public class OrbFunctional extends OrbRestricted
* received task. We make it 40 minutes.
*/
public int TOUT_AFTER_RECEIVING = 40 * 60 * 1000;
-
+
/**
* The server waits for this duration after the potentially transient error
* during its servicing cycle.
@@ -381,17 +381,17 @@ public class OrbFunctional extends OrbRestricted
* seven seconds.
*/
public static int TANDEM_REQUESTS = 7000;
-
+
/**
* The Id of this ORB.
*/
public String orb_id = "orb_"+hashCode();
-
+
/**
* The Id of this Server. This field is defined static to ensure it has
* the same value over all ORB's in this machine.
*/
- public static String server_id = "server_"+OrbFunctional.class.hashCode();
+ public static String server_id = "server_"+OrbFunctional.class.hashCode();
/**
* The map of the already conncted objects.
@@ -440,7 +440,7 @@ public class OrbFunctional extends OrbRestricted
* The port, on that the name service is expected to be running.
*/
private int ns_port = 900;
-
+
/**
* The name parser.
*/
@@ -468,7 +468,7 @@ public class OrbFunctional extends OrbRestricted
* exceeding this limit, the NO_RESOURCES is thrown back to the client.
*/
private int MAX_RUNNING_THREADS = 256;
-
+
/**
* The producer of the client and server sockets for this ORB.
*/
@@ -516,9 +516,9 @@ public class OrbFunctional extends OrbRestricted
/**
* Get the currently free port, starting from the initially set port and going
* up max 20 steps, then trying to bind into any free address.
- *
+ *
* @return the currently available free port.
- *
+ *
* @throws NO_RESOURCES if the server socked cannot be opened on the local
* host.
*/
@@ -595,7 +595,7 @@ public class OrbFunctional extends OrbRestricted
* on this port first. It the port is busy, or if more objects are connected,
* the subsequent object will receive a larger port values, skipping
* unavailable ports, if required. The change applies globally.
- *
+ *
* @param a_Port a port, on that the server is listening for requests.
*/
public static void setPort(int a_Port)
@@ -988,17 +988,17 @@ public class OrbFunctional extends OrbRestricted
CollocatedOrbs.unregisterOrb(this);
}
}
-
+
/**
* Start the server in a new thread, if not already running. This method is
- * used to ensure that the objects being transfered will be served from the
+ * used to ensure that the objects being transfered will be served from the
* remote side, if required. If the ORB is started using this method, it
* starts as a daemon thread.
*/
public void ensureRunning()
{
final OrbFunctional THIS = this;
-
+
if (!running)
{
Thread t = new Thread()
@@ -1039,9 +1039,9 @@ public class OrbFunctional extends OrbRestricted
* representation. The object can (an usually is) located on a remote
* computer, possibly running a different (not necessary java) CORBA
* implementation.
- *
+ *
* @param an_ior the object IOR representation string.
- *
+ *
* @return the found CORBA object.
* @see object_to_string(org.omg.CORBA.Object)
*/
@@ -1049,7 +1049,7 @@ public class OrbFunctional extends OrbRestricted
{
return nameParser.corbaloc(an_ior, this);
}
-
+
/**
* Convert ior reference to CORBA object.
*/
@@ -1106,10 +1106,10 @@ public class OrbFunctional extends OrbRestricted
/**
* Find and return the object, that must be previously connected to this ORB.
* Return null if no such object is available.
- *
+ *
* @param key the object key.
* @param port the port where the object is connected.
- *
+ *
* @return the connected object, null if none.
*/
protected org.omg.CORBA.Object find_connected_object(byte[] key, int port)
@@ -1126,9 +1126,9 @@ public class OrbFunctional extends OrbRestricted
/**
* Set the ORB parameters. This method is normally called from
* {@link #init(Applet, Properties)}.
- *
+ *
* @param app the current applet.
- *
+ *
* @param props application specific properties, passed as the second
* parameter in {@link #init(Applet, Properties)}. Can be <code>null</code>.
*/
@@ -1184,11 +1184,11 @@ public class OrbFunctional extends OrbRestricted
/**
* Set the ORB parameters. This method is normally called from
* {@link #init(String[], Properties)}.
- *
+ *
* @param para the parameters, that were passed as the parameters to the
* <code>main(String[] args)</code> method of the current standalone
* application.
- *
+ *
* @param props application specific properties that were passed as a second
* parameter in {@link init(String[], Properties)}). Can be <code>null</code>.
*/
@@ -1433,11 +1433,11 @@ public class OrbFunctional extends OrbRestricted
/**
* A single servicing step, when the client socket is alrady open.
- *
+ *
* Normally, each task matches a single remote invocation. However under
* frequent tandem submissions the same task may span over several
* invocations.
- *
+ *
* @param service the opened client socket.
* @param no_resources if true, the "NO RESOURCES" exception is thrown to the
* client.
@@ -1555,12 +1555,12 @@ public class OrbFunctional extends OrbRestricted
catch (SystemException ex)
{
sysEx = ex;
-
+
org.omg.CORBA.portable.OutputStream ech = handler.createExceptionReply();
-
+
rh_reply.service_context = UnknownExceptionCtxHandler.addExceptionContext(
rh_reply.service_context, ex, ech);
-
+
ObjectCreator.writeSystemException(ech, ex);
}
catch (Exception except)
@@ -1620,7 +1620,7 @@ public class OrbFunctional extends OrbRestricted
}
finally
{
- try
+ try
{
if (service!=null && !service.isClosed())
service.close();
@@ -1631,7 +1631,7 @@ public class OrbFunctional extends OrbRestricted
}
}
}
-
+
/**
* Set the ORB parameters from the properties that were accumulated
* from several locations.
@@ -1658,7 +1658,7 @@ public class OrbFunctional extends OrbRestricted
TOUT_AFTER_RECEIVING =
Integer.parseInt(props.getProperty(AFTER_RECEIVING));
if (props.containsKey(SERVER_ERROR_PAUSE))
- TWAIT_SERVER_ERROR_PAUSE =
+ TWAIT_SERVER_ERROR_PAUSE =
Integer.parseInt(props.getProperty(SERVER_ERROR_PAUSE));
}
catch (NumberFormatException ex)
@@ -1668,7 +1668,7 @@ public class OrbFunctional extends OrbRestricted
"'"
);
}
-
+
if (props.containsKey(SocketFactory.PROPERTY))
{
String factory = null;
@@ -1676,7 +1676,7 @@ public class OrbFunctional extends OrbRestricted
{
factory = props.getProperty(SocketFactory.PROPERTY);
if (factory!=null)
- socketFactory = (SocketFactory)
+ socketFactory = (SocketFactory)
ObjectCreator.forName(factory).newInstance();
}
catch (Exception ex)
@@ -1686,13 +1686,13 @@ public class OrbFunctional extends OrbRestricted
throw p;
}
}
-
+
if (props.containsKey(ORB_ID))
orb_id = props.getProperty(ORB_ID);
-
+
if (props.containsKey(SERVER_ID))
server_id = props.getProperty(SERVER_ID);
-
+
Enumeration en = props.elements();
while (en.hasMoreElements())
{
@@ -1781,14 +1781,14 @@ public class OrbFunctional extends OrbRestricted
running = false;
super.finalize();
}
-
+
/**
* Get the number of objects that are connected to this ORB.
- *
+ *
* @return the number of objects, connected to this ORB.
*/
public int countConnectedObjects()
- {
+ {
return connected_objects.size();
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/OrbRestricted.java b/gnu/CORBA/OrbRestricted.java
index 4ae50b1a3..35f0b1724 100644
--- a/gnu/CORBA/OrbRestricted.java
+++ b/gnu/CORBA/OrbRestricted.java
@@ -527,7 +527,7 @@ public class OrbRestricted extends org.omg.CORBA_2_3.ORB
super.destroy();
}
-
+
/**
* Create a typecode, representing a tree-like structure.
* This structure contains a member that is a sequence of the same type,
@@ -565,7 +565,7 @@ public class OrbRestricted extends org.omg.CORBA_2_3.ORB
r.add(new StructMember("", recurs, null));
return r;
}
-
+
/**
* Get the default context of this ORB. This is an initial root of all
* contexts.
@@ -579,5 +579,5 @@ public class OrbRestricted extends org.omg.CORBA_2_3.ORB
{
return new gnuContext("", null);
}
-
-} \ No newline at end of file
+
+}
diff --git a/gnu/CORBA/Poa/AOM.java b/gnu/CORBA/Poa/AOM.java
index f8820bff8..4b2264f3c 100644
--- a/gnu/CORBA/Poa/AOM.java
+++ b/gnu/CORBA/Poa/AOM.java
@@ -162,9 +162,9 @@ public class AOM
/**
* Get the record of the stored object. If the object is mapped several times
* under the different keys, one of the mappings is used.
- *
+ *
* @param stored_object the stored object
- *
+ *
* @return the record about the stored object, null if this object is not
* stored here.
*/
@@ -214,9 +214,9 @@ public class AOM
/**
* Find the reference info for the given servant. If the servant is mapped to
* several objects, this returns the first found occurence.
- *
+ *
* @param servant a servant to find.
- *
+ *
* @return the servant/object/POA binding or null if no such found.
*/
public Obj findServant(Servant servant)
@@ -403,4 +403,4 @@ public class AOM
return r;
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/Poa/AccessiblePolicy.java b/gnu/CORBA/Poa/AccessiblePolicy.java
index 44ebaf453..5468d2292 100644
--- a/gnu/CORBA/Poa/AccessiblePolicy.java
+++ b/gnu/CORBA/Poa/AccessiblePolicy.java
@@ -59,4 +59,4 @@ public interface AccessiblePolicy
*/
int getCode();
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/Poa/DynamicImpHandler.java b/gnu/CORBA/Poa/DynamicImpHandler.java
index 903f8bfbb..4ee02995d 100644
--- a/gnu/CORBA/Poa/DynamicImpHandler.java
+++ b/gnu/CORBA/Poa/DynamicImpHandler.java
@@ -82,4 +82,4 @@ public class DynamicImpHandler
{
throw new BAD_OPERATION(servant + " is not an InvokeHandler.");
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/Poa/ForwardRequestHolder.java b/gnu/CORBA/Poa/ForwardRequestHolder.java
index 5e2455952..a85173526 100644
--- a/gnu/CORBA/Poa/ForwardRequestHolder.java
+++ b/gnu/CORBA/Poa/ForwardRequestHolder.java
@@ -104,4 +104,4 @@ public class ForwardRequestHolder
{
ForwardRequestHelper.write(output, value);
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/Poa/ForwardedServant.java b/gnu/CORBA/Poa/ForwardedServant.java
index b1d5eaf8c..c54a02654 100644
--- a/gnu/CORBA/Poa/ForwardedServant.java
+++ b/gnu/CORBA/Poa/ForwardedServant.java
@@ -206,4 +206,4 @@ public class ForwardedServant
{
return ref._ids();
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/Poa/InvalidPolicyHolder.java b/gnu/CORBA/Poa/InvalidPolicyHolder.java
index 154762acf..b415034a3 100644
--- a/gnu/CORBA/Poa/InvalidPolicyHolder.java
+++ b/gnu/CORBA/Poa/InvalidPolicyHolder.java
@@ -103,4 +103,4 @@ public class InvalidPolicyHolder
{
return InvalidPolicyHelper.type();
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/Poa/LocalDelegate.java b/gnu/CORBA/Poa/LocalDelegate.java
index 72dd8f0cf..7b42fde1e 100644
--- a/gnu/CORBA/Poa/LocalDelegate.java
+++ b/gnu/CORBA/Poa/LocalDelegate.java
@@ -70,7 +70,7 @@ import java.util.Arrays;
* A local delegate, transferring all object requests to the locally available
* servant. This class is involved in handling the method invocations on the
* local object, obtained by POA.create_reference_with_id.
- *
+ *
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public class LocalDelegate
@@ -98,7 +98,7 @@ public class LocalDelegate
poa = a_poa;
Id = an_id;
}
-
+
/**
* Get the IOR of the connected object.
*/
@@ -171,9 +171,9 @@ public class LocalDelegate
/**
* Check if this object could be named by the given repository id.
- *
+ *
* @param idl_id the repository id to check.
- *
+ *
* @return true if it is one of the possible repository ids of this object.
*/
public boolean is_a(org.omg.CORBA.Object a_servant, String idl_id)
@@ -238,11 +238,11 @@ public class LocalDelegate
/**
* Create a request to invoke the method of this CORBA object.
- *
+ *
* @param operation the name of the method to invoke.
* @param response_expected specifies if this is one way message or the
* response to the message is expected.
- *
+ *
* @return the stream where the method arguments should be written.
*/
public org.omg.CORBA.portable.OutputStream request(
@@ -289,7 +289,7 @@ public class LocalDelegate
/**
* Make an invocation.
- *
+ *
* @param target not in use.
* @param output the stream request that should be returned by
* {@link #m_request} in this method.
@@ -382,4 +382,4 @@ public class LocalDelegate
{
release(target);
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/Poa/LocalRequest.java b/gnu/CORBA/Poa/LocalRequest.java
index 4a9ef8d90..ca5b57b00 100644
--- a/gnu/CORBA/Poa/LocalRequest.java
+++ b/gnu/CORBA/Poa/LocalRequest.java
@@ -199,8 +199,8 @@ public class LocalRequest extends gnuRequest implements ResponseHandler,
public org.omg.CORBA.portable.InputStream v_invoke(InvokeHandler handler)
{
// Check maybe POA is in the discarding mode (will throw TRANSIENT if it is).
- poa.checkDiscarding();
-
+ poa.checkDiscarding();
+
// Local request must be intercepted both by server and request
// interceptors.
boolean s_intercept = false;
@@ -249,7 +249,7 @@ public class LocalRequest extends gnuRequest implements ResponseHandler,
s_interceptor.receive_request_service_contexts(s_info);
}
-
+
if (handler == null)
{
handler = object.getHandler(operation(), cookie, false);
@@ -684,4 +684,4 @@ public class LocalRequest extends gnuRequest implements ResponseHandler,
{
return poa;
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/Poa/LocalServerRequest.java b/gnu/CORBA/Poa/LocalServerRequest.java
index 6d0b39650..714e029fe 100644
--- a/gnu/CORBA/Poa/LocalServerRequest.java
+++ b/gnu/CORBA/Poa/LocalServerRequest.java
@@ -196,4 +196,4 @@ public class LocalServerRequest
{
set_exception(exc);
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/Poa/ORB_1_4.java b/gnu/CORBA/Poa/ORB_1_4.java
index 4fc51ff15..360537e2c 100644
--- a/gnu/CORBA/Poa/ORB_1_4.java
+++ b/gnu/CORBA/Poa/ORB_1_4.java
@@ -255,7 +255,7 @@ public class ORB_1_4
super.set_parameters(para, props);
registerInterceptors(props, para);
}
-
+
/**
* This method is called by RMI-IIOP {@link javax.rmi.Tie#orb(ORB)}, passing
* <code>this</code> as parameter. The ORB will try to connect that tie as
@@ -288,6 +288,6 @@ public class ORB_1_4
throw bad;
}
}
- }
+ }
}
diff --git a/gnu/CORBA/Poa/ServantDelegateImpl.java b/gnu/CORBA/Poa/ServantDelegateImpl.java
index e65214d4a..2123a1c9c 100644
--- a/gnu/CORBA/Poa/ServantDelegateImpl.java
+++ b/gnu/CORBA/Poa/ServantDelegateImpl.java
@@ -229,4 +229,4 @@ public class ServantDelegateImpl
if (servant != some_servant)
throw new InternalError("Only one servant per delegate is supported.");
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/Poa/StandardPolicies.java b/gnu/CORBA/Poa/StandardPolicies.java
index b2edc4056..6b84031f1 100644
--- a/gnu/CORBA/Poa/StandardPolicies.java
+++ b/gnu/CORBA/Poa/StandardPolicies.java
@@ -125,4 +125,4 @@ public class StandardPolicies
}
return complete;
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/Poa/gnuAdapterActivator.java b/gnu/CORBA/Poa/gnuAdapterActivator.java
index 17d5a0f9e..fc64e6bb1 100644
--- a/gnu/CORBA/Poa/gnuAdapterActivator.java
+++ b/gnu/CORBA/Poa/gnuAdapterActivator.java
@@ -78,4 +78,4 @@ public class gnuAdapterActivator
}
return true;
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/Poa/gnuForwardRequest.java b/gnu/CORBA/Poa/gnuForwardRequest.java
index 02fc42470..01c6cccd5 100644
--- a/gnu/CORBA/Poa/gnuForwardRequest.java
+++ b/gnu/CORBA/Poa/gnuForwardRequest.java
@@ -87,4 +87,4 @@ public class gnuForwardRequest
else
throw new BAD_PARAM("ObjectImpl expected");
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/Poa/gnuIdAssignmentPolicy.java b/gnu/CORBA/Poa/gnuIdAssignmentPolicy.java
index 91531909a..1234abce6 100644
--- a/gnu/CORBA/Poa/gnuIdAssignmentPolicy.java
+++ b/gnu/CORBA/Poa/gnuIdAssignmentPolicy.java
@@ -77,4 +77,4 @@ public class gnuIdAssignmentPolicy
{
return (IdAssignmentPolicyValue) getValue();
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/Poa/gnuIdUniquenessPolicy.java b/gnu/CORBA/Poa/gnuIdUniquenessPolicy.java
index 0b5fa1420..21d8c54c4 100644
--- a/gnu/CORBA/Poa/gnuIdUniquenessPolicy.java
+++ b/gnu/CORBA/Poa/gnuIdUniquenessPolicy.java
@@ -77,4 +77,4 @@ public class gnuIdUniquenessPolicy
{
return (IdUniquenessPolicyValue) getValue();
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/Poa/gnuImplicitActivationPolicy.java b/gnu/CORBA/Poa/gnuImplicitActivationPolicy.java
index f1721beef..96ce42708 100644
--- a/gnu/CORBA/Poa/gnuImplicitActivationPolicy.java
+++ b/gnu/CORBA/Poa/gnuImplicitActivationPolicy.java
@@ -77,4 +77,4 @@ public class gnuImplicitActivationPolicy
{
return (ImplicitActivationPolicyValue) getValue();
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/Poa/gnuLifespanPolicy.java b/gnu/CORBA/Poa/gnuLifespanPolicy.java
index f26596cd9..6efb9d603 100644
--- a/gnu/CORBA/Poa/gnuLifespanPolicy.java
+++ b/gnu/CORBA/Poa/gnuLifespanPolicy.java
@@ -77,4 +77,4 @@ public class gnuLifespanPolicy
{
return (LifespanPolicyValue) getValue();
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/Poa/gnuPOA.java b/gnu/CORBA/Poa/gnuPOA.java
index 32fc5bfd2..5d323305a 100644
--- a/gnu/CORBA/Poa/gnuPOA.java
+++ b/gnu/CORBA/Poa/gnuPOA.java
@@ -110,16 +110,16 @@ public class gnuPOA
{
/**
* The object reference template, associated with this POA.
- *
+ *
* @since 1.5
*/
class RefTemplate implements ObjectReferenceTemplate
{
- /**
- * Use serialVersionUID for interoperability.
+ /**
+ * Use serialVersionUID for interoperability.
*/
private static final long serialVersionUID = 1;
-
+
RefTemplate()
{
// The adapter name is computed once.
@@ -140,12 +140,12 @@ public class gnuPOA
for (int i = 0; i < m_adapter_name.length; i++)
m_adapter_name[i] = (String) names.get(m_adapter_name.length - i - 1);
}
-
+
/**
* The adapter name
*/
final String[] m_adapter_name;
-
+
/**
* Get the name of this POA.
*/
@@ -186,24 +186,24 @@ public class gnuPOA
return ref_template_ids;
}
}
-
- /**
- * Use serialVersionUID for interoperability.
+
+ /**
+ * Use serialVersionUID for interoperability.
*/
private static final long serialVersionUID = 1;
-
+
/**
* The adapter reference template.
*/
ObjectReferenceTemplate refTemplate;
-
+
/**
* The reference template repository ids. Defined outside the class as it
* cannot have static members.
*/
- final static String[] ref_template_ids =
+ final static String[] ref_template_ids =
new String[] { ObjectReferenceTemplateHelper.id() };
-
+
/**
* The active object map, mapping between object keys, objects and servants.
*/
@@ -287,7 +287,7 @@ public class gnuPOA
* necessity of the frequent checks.
*/
public final boolean retain_servant;
-
+
/**
* The object reference factory, used to create the new object
* references.
@@ -339,7 +339,7 @@ public class gnuPOA
retain_servant = applies(ServantRetentionPolicyValue.RETAIN);
validatePolicies(a_policies);
-
+
refTemplate = new RefTemplate();
}
@@ -538,16 +538,16 @@ public class gnuPOA
* Generate the Object Id for the given servant and add the servant to the
* Active Object Map using this Id a a key. If the servant activator is set,
* its incarnate method will be called.
- *
+ *
* @param a_servant a servant that would serve the object with the returned
* Object Id. If null is passed, under apporoprate policies the servant
* activator is invoked.
- *
+ *
* @return the generated objert Id for the given servant.
- *
+ *
* @throws ServantAlreadyActive if this servant is already in the Active
* Object Map and the UNIQUE_ID policy applies.
- *
+ *
* @throws WrongPolicy if the required policies SYSTEM_ID and RETAIN do not
* apply to this POA.
*/
@@ -589,12 +589,12 @@ public class gnuPOA
* Add the given servant to the Active Object Map as a servant for the object
* with the provided Object Id. If the servant activator is set, its incarnate
* method will be called.
- *
+ *
* @param an_Object_Id an object id for the given object.
* @param a_servant a servant that will serve the object with the given Object
* Id. If null is passed, under apporoprate policies the servant activator is
* invoked.
- *
+ *
* @throws ObjectAlreadyActive if the given object id is already in the Active
* Object Map.
* @throws ServantAlreadyActive if the UNIQUE_ID policy applies and this
@@ -659,13 +659,13 @@ public class gnuPOA
/**
* Locate the servant for this object Id and connect it to ORB.
- *
+ *
* @param an_Object_Id the object id.
* @param a_servant the servant (may be null).
* @param exists an existing active object map entry.
* @param use_forwarding allow to throw the gnuForwardRequest if the activator
* throws ForwardRequest.
- *
+ *
* @throws OBJ_ADAPTER minor 4 if the servant cannot be located (the required
* servant manager may be missing).
*/
@@ -1054,12 +1054,12 @@ public class gnuPOA
/**
* Returns the servant that is serving this object.
- *
+ *
* @return if the RETAIN policy applies and the object is in the Active Object
* Map, the method returns the servant, associated with this object.
* Otherwise, if the USE_DEFAULT_SERVANT policy applies, the method returns
* the default servant (if one was set).
- *
+ *
* @throws ObjectNotActive if none of the conditions above are satisfied.
* @throws WrongAdapter if the object reference was not created with this POA.
* @throws WrongPolicy. This method requires either RETAIN or
@@ -1076,7 +1076,7 @@ public class gnuPOA
{
String object;
if (the_Object == null)
- object = "null passed";
+ object = "null passed";
else if (the_Object instanceof gnuServantObject)
{
gnuServantObject gs = (gnuServantObject) the_Object;
@@ -1123,7 +1123,7 @@ public class gnuPOA
* executing a request on the default servant, the method returns the ObjectId
* associated with the current invocation. </li>
* </ul>
- *
+ *
* @throws ServantNotActive in all cases, not listed in the list above.
* @throws WrongPolicy The method requres USE_DEFAULT_SERVANT policy or a
* combination of the RETAIN policy and either the UNIQUE_ID or
@@ -1182,12 +1182,12 @@ public class gnuPOA
* this case, if the servant activator is set, the
* {@link ServantActivatorOperations#incarnate} method will be called.
* </p>
- *
+ *
* @throws ServantNotActive if the servant is inactive and no
* IMPLICIT_ACTIVATION policy applies.
* @throws WrongPolicy This method needs the RETAIN policy and either the
* UNIQUE_ID or IMPLICIT_ACTIVATION policies.
- *
+ *
* @return the object, exposing the given servant in the context of this POA.
*/
public org.omg.CORBA.Object servant_to_reference(Servant the_Servant)
@@ -1237,15 +1237,15 @@ public class gnuPOA
/**
* Incarnate in cases when request forwarding is not expected because the
* servant must be provided by the servant activator.
- *
+ *
* @param x the aom entry, where the object is replaced by value, returned by
* servant activator (if not null).
- *
+ *
* @param object_key the object key.
- *
+ *
* @param a_servant the servant that was passed as a parameter in the
* activation method.
- *
+ *
* @param use_forwarding if true, the gnuForwardRequest is throw under the
* forwarding exception (for remote client). Otherwise, the request is
* internally redirected (for local invocation).
@@ -1415,14 +1415,14 @@ public class gnuPOA
* The remote invocation on the target, belonging to the POA that is currently
* destroyed return the remote exception ({@link TRANSIENT}, minor code 4).
* </p>
- *
+ *
* @param etherealize_objects if true, and POA has RETAIN policy, and the
* servant manager is available, the servant manager method
* {@link ServantActivatorOperations#etherealize} is called for each <i>active</i>
* object in the Active Object Map. This method should not try to access POA
* being destroyed. If <code>destroy</code> is called multiple times before
* the destruction completes, the etherialization should be invoked only once.
- *
+ *
* @param wait_for_completion if true, the method waits till the POA being
* destroyed completes all current requests and etherialization. If false, the
* method returns immediately.
@@ -1669,7 +1669,7 @@ public class gnuPOA
}
return h;
}
-
+
/**
* Recursively searches for the given key in the POA tree.
* @param ior_key the key, ecapsulating both object
@@ -1748,7 +1748,7 @@ public class gnuPOA
else
return null;
}
-
+
/**
* Recursively searches for the given servant in the POA tree.
*/
@@ -1768,7 +1768,7 @@ public class gnuPOA
}
return h;
}
-
+
/**
* Get the object reference template of this POA.
* Instantiate a singleton instance, if required.
@@ -1777,15 +1777,15 @@ public class gnuPOA
{
if (refTemplate == null)
refTemplate = new RefTemplate();
-
+
return refTemplate;
}
-
+
public ObjectReferenceFactory getReferenceFactory()
{
return m_object_factory;
}
-
+
public void setReferenceFactory(ObjectReferenceFactory factory)
{
m_object_factory = factory;
diff --git a/gnu/CORBA/Poa/gnuPOAManager.java b/gnu/CORBA/Poa/gnuPOAManager.java
index 28f4ecd28..db43751a7 100644
--- a/gnu/CORBA/Poa/gnuPOAManager.java
+++ b/gnu/CORBA/Poa/gnuPOAManager.java
@@ -60,11 +60,11 @@ public class gnuPOAManager
extends LocalObject
implements POAManager
{
- /**
- * Use serialVersionUID for interoperability.
+ /**
+ * Use serialVersionUID for interoperability.
*/
private static final long serialVersionUID = 1;
-
+
/**
* The POAs, controlled by this manager.
*/
@@ -75,7 +75,7 @@ public class gnuPOAManager
* in the holding state.
*/
State state = State.HOLDING;
-
+
/**
* Get the state of the POA manager.
*/
@@ -99,8 +99,8 @@ public class gnuPOAManager
state = State.ACTIVE;
else
throw new AdapterInactive();
-
- notifyInterceptors(state.value());
+
+ notifyInterceptors(state.value());
}
/**
@@ -120,9 +120,9 @@ public class gnuPOAManager
state = State.HOLDING;
else
throw new AdapterInactive();
-
+
notifyInterceptors(state.value());
-
+
if (wait_for_completion)
waitForIdle();
}
@@ -154,9 +154,9 @@ public class gnuPOAManager
if (state == State.INACTIVE)
throw new AdapterInactive("Repetetive inactivation");
state = State.INACTIVE;
-
- notifyInterceptors(state.value());
-
+
+ notifyInterceptors(state.value());
+
if (wait_for_completion)
waitForIdle();
@@ -191,9 +191,9 @@ public class gnuPOAManager
state = State.DISCARDING;
else
throw new AdapterInactive();
-
- notifyInterceptors(state.value());
-
+
+ notifyInterceptors(state.value());
+
if (wait_for_completion)
waitForIdle();
}
@@ -209,10 +209,10 @@ public class gnuPOAManager
{
if (state == State.ACTIVE)
throw new BAD_INV_ORDER("The state is active");
-
+
gnuPOA poa;
Iterator iter = POAs.iterator();
-
+
while (iter.hasNext())
{
poa = (gnuPOA) iter.next();
@@ -240,16 +240,16 @@ public class gnuPOAManager
{
POAs.remove(poa);
}
-
+
/**
* This method is called when POA is destryed. The interceptors are
* notified.
*/
public void poaDestroyed(gnuPOA poa)
{
- notifyInterceptors(NON_EXISTENT.value);
+ notifyInterceptors(NON_EXISTENT.value);
}
-
+
/**
* Notify CORBA 3.0 interceptors about the status change.
*/
@@ -269,4 +269,4 @@ public class gnuPOAManager
}
}
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/Poa/gnuPoaCurrent.java b/gnu/CORBA/Poa/gnuPoaCurrent.java
index 927d02fe3..d489d0e83 100644
--- a/gnu/CORBA/Poa/gnuPoaCurrent.java
+++ b/gnu/CORBA/Poa/gnuPoaCurrent.java
@@ -176,4 +176,4 @@ public class gnuPoaCurrent
threads.remove(t.getName());
}
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/Poa/gnuRequestProcessingPolicy.java b/gnu/CORBA/Poa/gnuRequestProcessingPolicy.java
index 2f77639c6..4e322e5e2 100644
--- a/gnu/CORBA/Poa/gnuRequestProcessingPolicy.java
+++ b/gnu/CORBA/Poa/gnuRequestProcessingPolicy.java
@@ -77,4 +77,4 @@ public class gnuRequestProcessingPolicy
{
return (RequestProcessingPolicyValue) getValue();
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/Poa/gnuServantObject.java b/gnu/CORBA/Poa/gnuServantObject.java
index 7e9b4f2f5..17ef452a7 100644
--- a/gnu/CORBA/Poa/gnuServantObject.java
+++ b/gnu/CORBA/Poa/gnuServantObject.java
@@ -131,7 +131,7 @@ public class gnuServantObject extends ObjectImpl
* ids are requested from the servant.
*/
public final String[] repository_ids;
-
+
/**
* True indicates that the NO_RETAIN policy applies for the servant.
* The servant must be discarded after the each call.
@@ -155,16 +155,16 @@ public class gnuServantObject extends ObjectImpl
manager = a_poa.the_POAManager();
poa = a_poa;
orb = an_orb;
-
- noRetain = poa.applies(ServantRetentionPolicyValue.NON_RETAIN);
+
+ noRetain = poa.applies(ServantRetentionPolicyValue.NON_RETAIN);
}
-
+
/**
* Get the IOR as it would be for this object.
*/
public IOR getIor()
{
- return orb.getLocalIor(this);
+ return orb.getLocalIor(this);
}
/**
@@ -192,7 +192,7 @@ public class gnuServantObject extends ObjectImpl
}
repository_ids = null;
orb = an_orb;
-
+
noRetain = poa != null && poa.applies(ServantRetentionPolicyValue.NON_RETAIN);
}
diff --git a/gnu/CORBA/Poa/gnuServantRetentionPolicy.java b/gnu/CORBA/Poa/gnuServantRetentionPolicy.java
index 9fb61ab3f..95958d299 100644
--- a/gnu/CORBA/Poa/gnuServantRetentionPolicy.java
+++ b/gnu/CORBA/Poa/gnuServantRetentionPolicy.java
@@ -77,4 +77,4 @@ public class gnuServantRetentionPolicy
{
return (ServantRetentionPolicyValue) getValue();
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/Poa/gnuThreadPolicy.java b/gnu/CORBA/Poa/gnuThreadPolicy.java
index 1de94a101..e7dac0f6a 100644
--- a/gnu/CORBA/Poa/gnuThreadPolicy.java
+++ b/gnu/CORBA/Poa/gnuThreadPolicy.java
@@ -77,4 +77,4 @@ public class gnuThreadPolicy
{
return (ThreadPolicyValue) getValue();
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/ServiceRequestAdapter.java b/gnu/CORBA/ServiceRequestAdapter.java
index c55405ced..0c21f6f45 100644
--- a/gnu/CORBA/ServiceRequestAdapter.java
+++ b/gnu/CORBA/ServiceRequestAdapter.java
@@ -164,4 +164,4 @@ public class ServiceRequestAdapter
throw new InternalError();
}
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/SetOverrideTypeHolder.java b/gnu/CORBA/SetOverrideTypeHolder.java
index 12b4b9f0c..478ec3f70 100644
--- a/gnu/CORBA/SetOverrideTypeHolder.java
+++ b/gnu/CORBA/SetOverrideTypeHolder.java
@@ -87,4 +87,4 @@ public class SetOverrideTypeHolder
{
SetOverrideTypeHelper.write(out, value);
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/SimpleDelegate.java b/gnu/CORBA/SimpleDelegate.java
index cb0a7d603..d1c6ab407 100644
--- a/gnu/CORBA/SimpleDelegate.java
+++ b/gnu/CORBA/SimpleDelegate.java
@@ -118,7 +118,7 @@ public class SimpleDelegate
g.set_args(parameters);
if (returns != null)
g.set_result(returns);
- return g;
+ return g;
}
/**
@@ -315,4 +315,4 @@ public class SimpleDelegate
g.m_target = target;
return g;
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/SocketRepository.java b/gnu/CORBA/SocketRepository.java
index 5d4a5099c..71e073adb 100644
--- a/gnu/CORBA/SocketRepository.java
+++ b/gnu/CORBA/SocketRepository.java
@@ -57,7 +57,7 @@ public class SocketRepository
* The socket map.
*/
private static HashMap sockets = new HashMap();
-
+
/**
* Put a socket. This method also discards all not reusable sockets from
* the map.
@@ -74,28 +74,28 @@ public class SocketRepository
gc();
}
}
-
+
/**
* Removes all non reusable sockets. As it is private,
- * we know we call from the synchronized code already.
+ * we know we call from the synchronized code already.
*/
private static void gc()
{
Iterator iter = sockets.entrySet().iterator();
-
+
Map.Entry e;
Socket sx;
-
+
while (iter.hasNext())
{
e = (Map.Entry) iter.next();
sx = (Socket) e.getValue();
-
+
if (not_reusable(sx))
iter.remove();
}
}
-
+
/**
* Return true if the socket is no longer reusable.
*/
@@ -107,9 +107,9 @@ public class SocketRepository
/**
* Get a socket.
- *
+ *
* @param key a socket key.
- *
+ *
* @return an opened socket for reuse, null if no such available or it is
* closed, its input or output has been shutown or otherwise the socket is not
* reuseable.
@@ -145,4 +145,4 @@ public class SocketRepository
}
}
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/StreamHolder.java b/gnu/CORBA/StreamHolder.java
index de2fda0ba..992b4af21 100644
--- a/gnu/CORBA/StreamHolder.java
+++ b/gnu/CORBA/StreamHolder.java
@@ -120,4 +120,4 @@ public class StreamHolder
{
return stream;
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/TypeCodeHelper.java b/gnu/CORBA/TypeCodeHelper.java
index 4ffb0b744..46831e8d2 100644
--- a/gnu/CORBA/TypeCodeHelper.java
+++ b/gnu/CORBA/TypeCodeHelper.java
@@ -84,7 +84,7 @@ public class TypeCodeHelper
p.setLength(in.read_long());
rt = p;
break;
-
+
case TCKind._tk_string :
case TCKind._tk_wstring :
s = new StringTypeCode(kind);
diff --git a/gnu/CORBA/TypeKindNamer.java b/gnu/CORBA/TypeKindNamer.java
index 3296db360..464fd98a1 100644
--- a/gnu/CORBA/TypeKindNamer.java
+++ b/gnu/CORBA/TypeKindNamer.java
@@ -180,4 +180,4 @@ public class TypeKindNamer
return "type of kind '" + type.kind().value() + "'";
}
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/Version.java b/gnu/CORBA/Version.java
index efc27c220..20449a389 100644
--- a/gnu/CORBA/Version.java
+++ b/gnu/CORBA/Version.java
@@ -99,7 +99,7 @@ public class Version
Version that = (Version) other;
return same(that);
}
-
+
/**
* Get the hashcode, higher 8 bits being the major version and lower 8 bits
* the minor version.
@@ -107,7 +107,7 @@ public class Version
public int hashCode()
{
return major << 8 | minor;
- }
+ }
/**
* Read from the input stream, major number first.
@@ -218,5 +218,5 @@ public class Version
throw m;
}
}
-
+
}
diff --git a/gnu/CORBA/_PolicyImplBase.java b/gnu/CORBA/_PolicyImplBase.java
index 17a5f4a40..a235080c1 100644
--- a/gnu/CORBA/_PolicyImplBase.java
+++ b/gnu/CORBA/_PolicyImplBase.java
@@ -165,7 +165,7 @@ public abstract class _PolicyImplBase
output.write_long(policyCode);
}
else
- throw new BAD_OPERATION(method, Minor.Method,
+ throw new BAD_OPERATION(method, Minor.Method,
CompletionStatus.COMPLETED_MAYBE);
return output;
@@ -229,4 +229,4 @@ public abstract class _PolicyImplBase
{
return x == null ? false : getValue().equals(x);
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/gnuAny.java b/gnu/CORBA/gnuAny.java
index 729386da2..6692d623e 100644
--- a/gnu/CORBA/gnuAny.java
+++ b/gnu/CORBA/gnuAny.java
@@ -90,11 +90,11 @@ import java.util.zip.Adler32;
public class gnuAny
extends Any
{
- /**
- * Use serialVersionUID for interoperability.
+ /**
+ * Use serialVersionUID for interoperability.
*/
private static final long serialVersionUID = 1;
-
+
/**
* The value, returned by {@link #type()} if the value has been
* not intialized.
@@ -209,7 +209,7 @@ public class gnuAny
return Arrays.equals(ba, bb);
}
-
+
/**
* Get the content - dependent hashcode.
*/
@@ -224,10 +224,10 @@ public class gnuAny
BufferedCdrOutput a = new BufferedCdrOutput();
a.setOrb(orb);
write_value(a);
-
+
adler.update(a.buffer.toByteArray());
adler.update(type().kind().value());
-
+
return (int) adler.getValue() & Integer.MAX_VALUE;
}
}
@@ -856,7 +856,7 @@ public class gnuAny
/**
* Check if the current value if the value of the given kind.
- *
+ *
* @param kind a kind to check.
* @throws BAD_OPERATION if the value is not set of is different kind.
*/
@@ -904,4 +904,4 @@ public class gnuAny
typecode = null;
xKind = -1;
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/gnuCodecFactory.java b/gnu/CORBA/gnuCodecFactory.java
index 8cf9ccf7b..5dfd56df1 100644
--- a/gnu/CORBA/gnuCodecFactory.java
+++ b/gnu/CORBA/gnuCodecFactory.java
@@ -87,4 +87,4 @@ public class gnuCodecFactory extends LocalObject implements CodecFactory
new Version(for_encoding.major_version, for_encoding.minor_version)
);
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/gnuEnvironment.java b/gnu/CORBA/gnuEnvironment.java
index ba02e3b19..beb805e6f 100644
--- a/gnu/CORBA/gnuEnvironment.java
+++ b/gnu/CORBA/gnuEnvironment.java
@@ -51,7 +51,7 @@ public class gnuEnvironment
* The stored exception.
*/
protected Exception exception;
-
+
/** {@inheritDoc} */
public void clear()
{
diff --git a/gnu/CORBA/gnuRequest.java b/gnu/CORBA/gnuRequest.java
index 3ec2a797f..56c9dbb1f 100644
--- a/gnu/CORBA/gnuRequest.java
+++ b/gnu/CORBA/gnuRequest.java
@@ -592,7 +592,7 @@ public class gnuRequest extends Request implements Cloneable
{
final gnuRequest cloned = Clone();
cloned.oneWay = true;
-
+
new Thread()
{
public void run()
@@ -714,7 +714,7 @@ public class gnuRequest extends Request implements Cloneable
/**
* Do the actual invocation. This implementation requires to set the IOR
* property ({@link #setIOR(IOR)} before calling this method.
- *
+ *
* @throws BAD_INV_ORDER, minor code 0, if the IOR has not been previously set
* or if the direct argument addition is mixed with the direct
* argument writing into the output stream.
@@ -936,7 +936,7 @@ public synchronized RawReply submit()
throws SystemException, ForwardRequest
{
RawReply response = submit();
-
+
// If this is a one way message, do not care about the response.
if (oneWay && response == EMPTY)
return;
@@ -1420,4 +1420,4 @@ public synchronized RawReply submit()
CompletionStatus.COMPLETED_MAYBE
);
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/gnuValueHolder.java b/gnu/CORBA/gnuValueHolder.java
index 8263113ec..d3f2b6b58 100644
--- a/gnu/CORBA/gnuValueHolder.java
+++ b/gnu/CORBA/gnuValueHolder.java
@@ -132,4 +132,4 @@ public class gnuValueHolder
helper_NA = true;
}
}
-} \ No newline at end of file
+}
diff --git a/gnu/CORBA/interfaces/SocketFactory.java b/gnu/CORBA/interfaces/SocketFactory.java
index 7797dcbf9..d1d7d418b 100644
--- a/gnu/CORBA/interfaces/SocketFactory.java
+++ b/gnu/CORBA/interfaces/SocketFactory.java
@@ -49,11 +49,11 @@ import java.net.Socket;
* for implementing the desired timeout policies, for HTTP tunnels and in some
* other similar cases. While such functionality is provided by near all
* existing CORBA implementations, no standard mechanism is defined.
- *
+ *
* The socket factory may need to put additional information to the IORs of the
* objects, released by the ORB. Because of this reason, this interface extends
* IORInterceptorOperations.
- *
+ *
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public interface SocketFactory
@@ -63,28 +63,28 @@ public interface SocketFactory
* factory class, the name of that (String) is the value of this property.
*/
final String PROPERTY = "gnu.CORBA.SocketFactory";
-
+
/**
* Create a server socket that should serve remote invocations on the given
* port. The ORB may use this socket to serve either one or more objects.
- *
+ *
* @param port the port, on that the socket should be listening for requests.
* The port policy can be controlled by {@link gnuPortManager}.
- *
+ *
* @throws IOException if the socket cannot be created on the given port due
* any reasons. The ORB may try to open the socket on another port, calling
* this method with the different parameter.
*/
ServerSocket createServerSocket(int port)
throws IOException;
-
+
/**
* Create a client socket that should send a request to the remote side. When
* returned, the socket should be opened and ready to communicate.
- *
+ *
* @param port the port, on that the socket should be openend. The port is
* usually part of the internet profile.
- *
+ *
* @throws IOException if the socket cannot be created on the given port due
* any reasons. The ORB may try to open the socket on another port, calling
* this method with the different parameter.
diff --git a/gnu/CORBA/typecodes/AliasTypeCode.java b/gnu/CORBA/typecodes/AliasTypeCode.java
index 3cb8ebfb3..41d0fbe8a 100644
--- a/gnu/CORBA/typecodes/AliasTypeCode.java
+++ b/gnu/CORBA/typecodes/AliasTypeCode.java
@@ -51,11 +51,11 @@ import org.omg.CORBA.TypeCodePackage.BadKind;
public class AliasTypeCode
extends PrimitiveTypeCode
{
- /**
- * Use serialVersionUID for interoperability.
+ /**
+ * Use serialVersionUID for interoperability.
*/
private static final long serialVersionUID = 1;
-
+
/**
* The typecode repository id.
*/
diff --git a/gnu/CORBA/typecodes/ArrayTypeCode.java b/gnu/CORBA/typecodes/ArrayTypeCode.java
index bb798101a..394efb36a 100644
--- a/gnu/CORBA/typecodes/ArrayTypeCode.java
+++ b/gnu/CORBA/typecodes/ArrayTypeCode.java
@@ -50,12 +50,12 @@ import org.omg.CORBA.TypeCodePackage.BadKind;
public class ArrayTypeCode
extends PrimitiveTypeCode
{
- /**
- * Use serialVersionUID for interoperability.
+ /**
+ * Use serialVersionUID for interoperability.
*/
private static final long serialVersionUID = 1;
-
-
+
+
/**
* The array components.
*/
diff --git a/gnu/CORBA/typecodes/FixedTypeCode.java b/gnu/CORBA/typecodes/FixedTypeCode.java
index af7f46ecf..9e9f3eff6 100644
--- a/gnu/CORBA/typecodes/FixedTypeCode.java
+++ b/gnu/CORBA/typecodes/FixedTypeCode.java
@@ -52,12 +52,12 @@ import org.omg.CORBA.TypeCodePackage.BadKind;
public class FixedTypeCode
extends PrimitiveTypeCode
{
- /**
- * Use serialVersionUID for interoperability.
+ /**
+ * Use serialVersionUID for interoperability.
*/
private static final long serialVersionUID = 1;
-
-
+
+
/**
* The number of the used digits.
*/
diff --git a/gnu/CORBA/typecodes/GeneralTypeCode.java b/gnu/CORBA/typecodes/GeneralTypeCode.java
index 0a907844a..a00f69823 100644
--- a/gnu/CORBA/typecodes/GeneralTypeCode.java
+++ b/gnu/CORBA/typecodes/GeneralTypeCode.java
@@ -59,12 +59,12 @@ import org.omg.CORBA.TypeCodePackage.BadKind;
public class GeneralTypeCode
extends PrimitiveTypeCode
{
- /**
- * Use serialVersionUID for interoperability.
+ /**
+ * Use serialVersionUID for interoperability.
*/
private static final long serialVersionUID = 1;
-
-
+
+
/**
* Indicates that the field value has not been previously set.
*/
diff --git a/gnu/CORBA/typecodes/PrimitiveTypeCode.java b/gnu/CORBA/typecodes/PrimitiveTypeCode.java
index 22d39a82c..8f8ce3ea3 100644
--- a/gnu/CORBA/typecodes/PrimitiveTypeCode.java
+++ b/gnu/CORBA/typecodes/PrimitiveTypeCode.java
@@ -64,11 +64,11 @@ public class PrimitiveTypeCode
extends TypeCode
implements IDLEntity, Serializable
{
- /**
- * Use serialVersionUID for interoperability.
+ /**
+ * Use serialVersionUID for interoperability.
*/
private static final long serialVersionUID = 1;
-
+
/**
* The kind of this TypeCode.
*/
diff --git a/gnu/CORBA/typecodes/RecordTypeCode.java b/gnu/CORBA/typecodes/RecordTypeCode.java
index 89f342546..8f13de9a9 100644
--- a/gnu/CORBA/typecodes/RecordTypeCode.java
+++ b/gnu/CORBA/typecodes/RecordTypeCode.java
@@ -58,11 +58,11 @@ import org.omg.CORBA.ValueMember;
public class RecordTypeCode
extends GeneralTypeCode
{
- /**
- * Use serialVersionUID for interoperability.
+ /**
+ * Use serialVersionUID for interoperability.
*/
private static final long serialVersionUID = 1;
-
+
/**
* The individual field of the record.
*/
@@ -151,7 +151,7 @@ public class RecordTypeCode
f.name = m.name;
f.type = m.type;
f.visibility = m.access;
-
+
}
/**
diff --git a/gnu/CORBA/typecodes/RecursiveTypeCode.java b/gnu/CORBA/typecodes/RecursiveTypeCode.java
index 8ec2f5474..727773674 100644
--- a/gnu/CORBA/typecodes/RecursiveTypeCode.java
+++ b/gnu/CORBA/typecodes/RecursiveTypeCode.java
@@ -48,11 +48,11 @@ import org.omg.CORBA.TCKind;
public class RecursiveTypeCode
extends PrimitiveTypeCode
{
- /**
- * Use serialVersionUID for interoperability.
+ /**
+ * Use serialVersionUID for interoperability.
*/
private static final long serialVersionUID = 1;
-
+
/**
* The id of the type for that this type serves as a
* placeholder.
diff --git a/gnu/CORBA/typecodes/StringTypeCode.java b/gnu/CORBA/typecodes/StringTypeCode.java
index 2d1689b45..7f463d7b0 100644
--- a/gnu/CORBA/typecodes/StringTypeCode.java
+++ b/gnu/CORBA/typecodes/StringTypeCode.java
@@ -48,11 +48,11 @@ import org.omg.CORBA.TCKind;
public class StringTypeCode
extends PrimitiveTypeCode
{
- /**
- * Use serialVersionUID for interoperability.
+ /**
+ * Use serialVersionUID for interoperability.
*/
private static final long serialVersionUID = 1;
-
+
private int len = 0;
/**
diff --git a/gnu/classpath/Pair.java b/gnu/classpath/Pair.java
index 57af37a74..f7a07a29c 100644
--- a/gnu/classpath/Pair.java
+++ b/gnu/classpath/Pair.java
@@ -101,11 +101,11 @@ public class Pair<A,B>
{
if (obj instanceof Pair)
{
- Pair<A,B> p = (Pair<A,B>) obj;
- A lp = p.getLeft();
- B rp = p.getRight();
- return (lp == null ? left == null : lp.equals(left)) &&
- (rp == null ? right == null : rp.equals(right));
+ Pair<A,B> p = (Pair<A,B>) obj;
+ A lp = p.getLeft();
+ B rp = p.getRight();
+ return (lp == null ? left == null : lp.equals(left)) &&
+ (rp == null ? right == null : rp.equals(right));
}
return false;
}
diff --git a/gnu/classpath/Pointer.java b/gnu/classpath/Pointer.java
index 27634a894..bc1ce62c2 100644
--- a/gnu/classpath/Pointer.java
+++ b/gnu/classpath/Pointer.java
@@ -39,7 +39,7 @@ exception statement from your version. */
package gnu.classpath;
-/** A type used to indicate special data used by native code that should not
+/** A type used to indicate special data used by native code that should not
be marked by the garbage collector. */
public abstract class Pointer
diff --git a/gnu/classpath/Pointer32.java b/gnu/classpath/Pointer32.java
index 42b6c1d2d..13d72e12e 100644
--- a/gnu/classpath/Pointer32.java
+++ b/gnu/classpath/Pointer32.java
@@ -38,13 +38,13 @@ exception statement from your version. */
package gnu.classpath;
/**
- * A type used to indicate special data used by native code that should not
+ * A type used to indicate special data used by native code that should not
* be marked by the garbage collector.
*/
public final class Pointer32 extends Pointer
{
final int data;
-
+
public Pointer32(int data)
{
this.data = data;
diff --git a/gnu/classpath/Pointer64.java b/gnu/classpath/Pointer64.java
index 6d27e1ba1..5db60a80e 100644
--- a/gnu/classpath/Pointer64.java
+++ b/gnu/classpath/Pointer64.java
@@ -38,13 +38,13 @@ exception statement from your version. */
package gnu.classpath;
/**
- * A type used to indicate special data used by native code that should not
+ * A type used to indicate special data used by native code that should not
* be marked by the garbage collector.
*/
public final class Pointer64 extends Pointer
{
final long data;
-
+
public Pointer64(long data)
{
this.data = data;
diff --git a/gnu/classpath/ServiceFactory.java b/gnu/classpath/ServiceFactory.java
index 6c9728e0c..f41d8e191 100644
--- a/gnu/classpath/ServiceFactory.java
+++ b/gnu/classpath/ServiceFactory.java
@@ -224,7 +224,7 @@ public final class ServiceFactory
* <code>null</code>.
*/
public static <P> Iterator<P> lookupProviders(Class<P> spi,
- ClassLoader loader)
+ ClassLoader loader)
{
return lookupProviders(spi, loader, false);
}
@@ -268,8 +268,8 @@ public final class ServiceFactory
* <code>null</code>.
*/
public static <P> Iterator<P> lookupProviders(Class<P> spi,
- ClassLoader loader,
- boolean error)
+ ClassLoader loader,
+ boolean error)
{
String resourceName;
Enumeration<URL> urls;
@@ -292,18 +292,18 @@ public final class ServiceFactory
* does not return anything (no providers installed).
*/
log(Level.WARNING, "cannot access {0}", resourceName, ioex);
- if (error)
- throw new ServiceConfigurationError("Failed to access + " +
- resourceName, ioex);
- else
- {
- List<P> empty = Collections.emptyList();
- return empty.iterator();
- }
+ if (error)
+ throw new ServiceConfigurationError("Failed to access + " +
+ resourceName, ioex);
+ else
+ {
+ List<P> empty = Collections.emptyList();
+ return empty.iterator();
+ }
}
return new ServiceIterator<P>(spi, urls, loader, error,
- AccessController.getContext());
+ AccessController.getContext());
}
@@ -379,7 +379,7 @@ public final class ServiceFactory
* been fetched.
*/
private BufferedReader reader;
-
+
/**
* The URL currently being processed. This is only used for
@@ -425,7 +425,7 @@ public final class ServiceFactory
* and initializing service providers.
*/
ServiceIterator(Class<P> spi, Enumeration<URL> urls, ClassLoader loader,
- boolean error, AccessControlContext securityContext)
+ boolean error, AccessControlContext securityContext)
{
this.spi = spi;
this.urls = urls;
@@ -468,7 +468,7 @@ public final class ServiceFactory
private P loadNextServiceProvider()
{
String line;
-
+
if (reader == null)
advanceReader();
@@ -489,9 +489,9 @@ public final class ServiceFactory
log(Level.WARNING, "IOException upon reading {0}", currentURL,
readProblem);
line = null;
- if (error)
- throw new ServiceConfigurationError("Error reading " +
- currentURL, readProblem);
+ if (error)
+ throw new ServiceConfigurationError("Error reading " +
+ currentURL, readProblem);
}
/* When we are at the end of one list of services,
@@ -540,16 +540,16 @@ public final class ServiceFactory
+ " of \"{1}\". Specified"
+ " by \"META-INF/services/{1}\" in {2}.";
- log(Level.WARNING, msg,
+ log(Level.WARNING, msg,
new Object[] { line, spi.getName(), currentURL },
ex);
- if (error)
- throw new ServiceConfigurationError("Cannot load service "+
- "provider class " +
- line + " specified by "+
- "\"META-INF/services/"+
- spi.getName() + "\" in "+
- currentURL, ex);
+ if (error)
+ throw new ServiceConfigurationError("Cannot load service "+
+ "provider class " +
+ line + " specified by "+
+ "\"META-INF/services/"+
+ spi.getName() + "\" in "+
+ currentURL, ex);
continue;
}
}
@@ -570,9 +570,9 @@ public final class ServiceFactory
catch (Exception ex)
{
log(Level.WARNING, "cannot close {0}", currentURL, ex);
- if (error)
- throw new ServiceConfigurationError("Cannot close " +
- currentURL, ex);
+ if (error)
+ throw new ServiceConfigurationError("Cannot close " +
+ currentURL, ex);
}
reader = null;
currentURL = null;
@@ -591,9 +591,9 @@ public final class ServiceFactory
catch (Exception ex)
{
log(Level.WARNING, "cannot open {0}", currentURL, ex);
- if (error)
- throw new ServiceConfigurationError("Cannot open " +
- currentURL, ex);
+ if (error)
+ throw new ServiceConfigurationError("Cannot open " +
+ currentURL, ex);
}
}
while (reader == null);
diff --git a/gnu/classpath/ServiceProviderLoadingAction.java b/gnu/classpath/ServiceProviderLoadingAction.java
index 51f5a2fa9..78a11cd50 100644
--- a/gnu/classpath/ServiceProviderLoadingAction.java
+++ b/gnu/classpath/ServiceProviderLoadingAction.java
@@ -108,7 +108,7 @@ final class ServiceProviderLoadingAction<P>
this.loader = loader;
}
-
+
/**
* Loads an implementation class for a service provider, and creates
* a new instance of the loaded class by invoking its public
diff --git a/gnu/classpath/SystemProperties.java b/gnu/classpath/SystemProperties.java
index d091f1ed0..4aad2612e 100644
--- a/gnu/classpath/SystemProperties.java
+++ b/gnu/classpath/SystemProperties.java
@@ -75,31 +75,31 @@ public class SystemProperties
// Set base URL if not already set.
if (defaultProperties.get("gnu.classpath.home.url") == null)
defaultProperties.put("gnu.classpath.home.url",
- "file://"
- + Configuration.CLASSPATH_HOME
- + "/lib");
+ "file://"
+ + Configuration.CLASSPATH_HOME
+ + "/lib");
// Set short name if not already set.
if (defaultProperties.get("gnu.classpath.vm.shortname") == null)
{
- String value = defaultProperties.getProperty("java.vm.name");
- int index = value.lastIndexOf(' ');
- if (index != -1)
- value = value.substring(index + 1);
- defaultProperties.put("gnu.classpath.vm.shortname", value);
+ String value = defaultProperties.getProperty("java.vm.name");
+ int index = value.lastIndexOf(' ');
+ if (index != -1)
+ value = value.substring(index + 1);
+ defaultProperties.put("gnu.classpath.vm.shortname", value);
}
// Network properties
if (defaultProperties.get("http.agent") == null)
{
- String userAgent = ("gnu-classpath/"
- + defaultProperties.getProperty("gnu.classpath.version")
- + " ("
- + defaultProperties.getProperty("gnu.classpath.vm.shortname")
- + "/"
- + defaultProperties.getProperty("java.vm.version")
- + ")");
- defaultProperties.put("http.agent", userAgent);
+ String userAgent = ("gnu-classpath/"
+ + defaultProperties.getProperty("gnu.classpath.version")
+ + " ("
+ + defaultProperties.getProperty("gnu.classpath.vm.shortname")
+ + "/"
+ + defaultProperties.getProperty("java.vm.version")
+ + ")");
+ defaultProperties.put("http.agent", userAgent);
}
// 8859_1 is a safe default encoding to use when not explicitly set
@@ -160,7 +160,7 @@ public class SystemProperties
/**
* Removes the supplied system property and its current value.
* If the specified property does not exist, nothing happens.
- *
+ *
* @throws NullPointerException if the property name is null.
* @return the value of the removed property, or null if no
* such property exists.
diff --git a/gnu/classpath/debug/Component.java b/gnu/classpath/debug/Component.java
index dce257502..3cad8a2a7 100644
--- a/gnu/classpath/debug/Component.java
+++ b/gnu/classpath/debug/Component.java
@@ -97,7 +97,7 @@ public final class Component extends Level
* Trace details about the SSL key exchange.
*/
public static final Component SSL_KEY_EXCHANGE = new Component ("SSL KEY EXCHANGE", 2);
-
+
/**
* Trace running of delegated tasks.
*/
@@ -120,7 +120,7 @@ public final class Component extends Level
* java.policy files.
*/
public static final Component POLICY = new Component ("POLICY", 7);
-
+
/**
* Trace ipp implementation.
*/
@@ -151,15 +151,15 @@ public final class Component extends Level
{
try
{
- Field f = Component.class.getField (name.toUpperCase ());
- if (!Modifier.isStatic (f.getModifiers ())
- || Component.class.isAssignableFrom (f.getClass ()))
- return null;
- return (Component) f.get (null);
+ Field f = Component.class.getField (name.toUpperCase ());
+ if (!Modifier.isStatic (f.getModifiers ())
+ || Component.class.isAssignableFrom (f.getClass ()))
+ return null;
+ return (Component) f.get (null);
}
catch (Throwable _)
{
- return null;
+ return null;
}
}
@@ -172,4 +172,4 @@ public final class Component extends Level
{
return endIndex;
}
-} \ No newline at end of file
+}
diff --git a/gnu/classpath/debug/PreciseFilter.java b/gnu/classpath/debug/PreciseFilter.java
index 7b88b2c8c..91f5a9e6c 100644
--- a/gnu/classpath/debug/PreciseFilter.java
+++ b/gnu/classpath/debug/PreciseFilter.java
@@ -95,11 +95,11 @@ public final class PreciseFilter implements Filter
{
try
{
- return isEnabled ((Component) record.getLevel ());
+ return isEnabled ((Component) record.getLevel ());
}
catch (ClassCastException cce)
{
- return true;
+ return true;
}
}
-} \ No newline at end of file
+}
diff --git a/gnu/classpath/debug/SystemLogger.java b/gnu/classpath/debug/SystemLogger.java
index 8919e80c7..eaca0fe98 100644
--- a/gnu/classpath/debug/SystemLogger.java
+++ b/gnu/classpath/debug/SystemLogger.java
@@ -79,7 +79,7 @@ public final class SystemLogger extends Logger
// XXX Check some permission here?
return SYSTEM;
}
-
+
/**
* Keep only one instance of the system logger.
*/
@@ -87,10 +87,10 @@ public final class SystemLogger extends Logger
{
super("gnu.classpath", null);
}
-
+
/**
* Variable-arguments log method.
- *
+ *
* @param level The level to log to.
* @param format The format string.
* @param args The arguments.
diff --git a/gnu/classpath/debug/TeeInputStream.java b/gnu/classpath/debug/TeeInputStream.java
index ef6b2ed3d..0b17633f6 100644
--- a/gnu/classpath/debug/TeeInputStream.java
+++ b/gnu/classpath/debug/TeeInputStream.java
@@ -94,5 +94,5 @@ public class TeeInputStream
{
return false;
}
-
+
}
diff --git a/gnu/classpath/debug/TeeReader.java b/gnu/classpath/debug/TeeReader.java
index 8fa742e21..d1f755dc9 100644
--- a/gnu/classpath/debug/TeeReader.java
+++ b/gnu/classpath/debug/TeeReader.java
@@ -94,5 +94,5 @@ public class TeeReader
{
return false;
}
-
+
}
diff --git a/gnu/classpath/jdwp/Jdwp.java b/gnu/classpath/jdwp/Jdwp.java
index 1d2329255..e90a2c762 100644
--- a/gnu/classpath/jdwp/Jdwp.java
+++ b/gnu/classpath/jdwp/Jdwp.java
@@ -118,14 +118,14 @@ public class Jdwp
/**
* Get the thread group used by JDWP threads
- *
+ *
* @return the thread group
*/
public ThreadGroup getJdwpThreadGroup()
{
return _group;
}
-
+
/**
* Should the virtual machine suspend on startup?
*/
@@ -134,9 +134,9 @@ public class Jdwp
Jdwp jdwp = getDefault ();
if (jdwp != null)
{
- String suspend = (String) jdwp._properties.get (_PROPERTY_SUSPEND);
- if (suspend != null && suspend.equals ("y"))
- return true;
+ String suspend = (String) jdwp._properties.get (_PROPERTY_SUSPEND);
+ if (suspend != null && suspend.equals ("y"))
+ return true;
}
return false;
@@ -167,10 +167,10 @@ public class Jdwp
_packetProcessor = new PacketProcessor (_connection);
_ppThread = new Thread (_group, new Runnable ()
{
- public void run ()
- {
- AccessController.doPrivileged (_packetProcessor);
- }
+ public void run ()
+ {
+ AccessController.doPrivileged (_packetProcessor);
+ }
}, "packet processor");
_ppThread.start ();
}
@@ -178,24 +178,24 @@ public class Jdwp
/**
* Shutdown the JDWP back-end
*
- * NOTE: This does not quite work properly. See notes in
+ * NOTE: This does not quite work properly. See notes in
* run() on this subject (catch of InterruptedException).
*/
public void shutdown ()
{
if (!_shutdown)
{
- _packetProcessor.shutdown ();
- _ppThread.interrupt ();
- _connection.shutdown ();
- _shutdown = true;
- isDebugging = false;
+ _packetProcessor.shutdown ();
+ _ppThread.interrupt ();
+ _connection.shutdown ();
+ _shutdown = true;
+ isDebugging = false;
- /* FIXME: probably need to check state of user's
- program -- if it is suspended, we need to either
- resume or kill them. */
+ /* FIXME: probably need to check state of user's
+ program -- if it is suspended, we need to either
+ resume or kill them. */
- interrupt ();
+ interrupt ();
}
}
@@ -215,25 +215,25 @@ public class Jdwp
Jdwp jdwp = getDefault();
if (jdwp != null)
{
- EventManager em = EventManager.getDefault();
- EventRequest[] requests = em.getEventRequests(event);
- for (int i = 0; i < requests.length; ++i)
- {
- try
- {
- sendEvent(requests[i], event);
- jdwp._enforceSuspendPolicy(requests[i].getSuspendPolicy());
- }
- catch (Exception e)
- {
- /* Really not much we can do. For now, just print out
- a warning to the user. */
- System.out.println ("Jdwp.notify: caught exception: " + e);
- }
- }
+ EventManager em = EventManager.getDefault();
+ EventRequest[] requests = em.getEventRequests(event);
+ for (int i = 0; i < requests.length; ++i)
+ {
+ try
+ {
+ sendEvent(requests[i], event);
+ jdwp._enforceSuspendPolicy(requests[i].getSuspendPolicy());
+ }
+ catch (Exception e)
+ {
+ /* Really not much we can do. For now, just print out
+ a warning to the user. */
+ System.out.println ("Jdwp.notify: caught exception: " + e);
+ }
+ }
}
}
-
+
/**
* Notify the debugger of "co-located" events. This method should
* not be called if debugging is not active (but it would not
@@ -248,45 +248,45 @@ public class Jdwp
public static void notify(Event[] events)
{
Jdwp jdwp = getDefault();
-
+
if (jdwp != null)
{
- byte suspendPolicy = JdwpConstants.SuspendPolicy.NONE;
- EventManager em = EventManager.getDefault();
- ArrayList allEvents = new ArrayList ();
- ArrayList allRequests = new ArrayList ();
- for (int i = 0; i < events.length; ++i)
- {
- EventRequest[] r = em.getEventRequests(events[i]);
- for (int j = 0; j < r.length; ++j)
- {
- /* This is hacky, but it's not clear whether this
- can really happen, and if it does, what should
- occur. */
- allEvents.add (events[i]);
- allRequests.add (r[j]);
-
- // Perhaps this is overkill?
- if (r[j].getSuspendPolicy() > suspendPolicy)
- suspendPolicy = r[j].getSuspendPolicy();
- }
- }
-
- try
- {
- Event[] e = new Event[allEvents.size()];
- allEvents.toArray(e);
- EventRequest[] r = new EventRequest[allRequests.size()];
- allRequests.toArray(r);
- sendEvents(r, e, suspendPolicy);
- jdwp._enforceSuspendPolicy(suspendPolicy);
- }
- catch (Exception e)
- {
- /* Really not much we can do. For now, just print out
- a warning to the user. */
- System.out.println ("Jdwp.notify: caught exception: " + e);
- }
+ byte suspendPolicy = JdwpConstants.SuspendPolicy.NONE;
+ EventManager em = EventManager.getDefault();
+ ArrayList allEvents = new ArrayList ();
+ ArrayList allRequests = new ArrayList ();
+ for (int i = 0; i < events.length; ++i)
+ {
+ EventRequest[] r = em.getEventRequests(events[i]);
+ for (int j = 0; j < r.length; ++j)
+ {
+ /* This is hacky, but it's not clear whether this
+ can really happen, and if it does, what should
+ occur. */
+ allEvents.add (events[i]);
+ allRequests.add (r[j]);
+
+ // Perhaps this is overkill?
+ if (r[j].getSuspendPolicy() > suspendPolicy)
+ suspendPolicy = r[j].getSuspendPolicy();
+ }
+ }
+
+ try
+ {
+ Event[] e = new Event[allEvents.size()];
+ allEvents.toArray(e);
+ EventRequest[] r = new EventRequest[allRequests.size()];
+ allRequests.toArray(r);
+ sendEvents(r, e, suspendPolicy);
+ jdwp._enforceSuspendPolicy(suspendPolicy);
+ }
+ catch (Exception e)
+ {
+ /* Really not much we can do. For now, just print out
+ a warning to the user. */
+ System.out.println ("Jdwp.notify: caught exception: " + e);
+ }
}
}
@@ -303,7 +303,7 @@ public class Jdwp
throws IOException
{
sendEvents (new EventRequest[] { request }, new Event[] { event },
- request.getSuspendPolicy());
+ request.getSuspendPolicy());
}
/**
@@ -317,16 +317,16 @@ public class Jdwp
* @throws IOException if a communications failure occurs
*/
public static void sendEvents (EventRequest[] requests, Event[] events,
- byte suspendPolicy)
+ byte suspendPolicy)
throws IOException
{
Jdwp jdwp = getDefault();
if (jdwp != null)
{
- synchronized (jdwp._connection)
- {
- jdwp._connection.sendEvents (requests, events, suspendPolicy);
- }
+ synchronized (jdwp._connection)
+ {
+ jdwp._connection.sendEvents (requests, events, suspendPolicy);
+ }
}
}
@@ -337,16 +337,16 @@ public class Jdwp
switch (suspendPolicy)
{
case EventRequest.SUSPEND_NONE:
- // do nothing
- break;
+ // do nothing
+ break;
case EventRequest.SUSPEND_THREAD:
- VMVirtualMachine.suspendThread (Thread.currentThread ());
- break;
+ VMVirtualMachine.suspendThread (Thread.currentThread ());
+ break;
case EventRequest.SUSPEND_ALL:
- VMVirtualMachine.suspendAllThreads ();
- break;
+ VMVirtualMachine.suspendAllThreads ();
+ break;
}
}
@@ -360,8 +360,8 @@ public class Jdwp
{
synchronized (_initLock)
{
- ++_initCount;
- _initLock.notify ();
+ ++_initCount;
+ _initLock.notify ();
}
}
@@ -369,22 +369,22 @@ public class Jdwp
{
try
{
- _doInitialization ();
-
- /* We need a little internal synchronization here, so that
- when this thread dies, the back-end will be fully initialized,
- ready to start servicing the VM and debugger. */
- synchronized (_initLock)
- {
- while (_initCount != 2)
- _initLock.wait ();
- }
- _initLock = null;
+ _doInitialization ();
+
+ /* We need a little internal synchronization here, so that
+ when this thread dies, the back-end will be fully initialized,
+ ready to start servicing the VM and debugger. */
+ synchronized (_initLock)
+ {
+ while (_initCount != 2)
+ _initLock.wait ();
+ }
+ _initLock = null;
}
catch (Throwable t)
{
- System.out.println ("Exception in JDWP back-end: " + t);
- System.exit (1);
+ System.out.println ("Exception in JDWP back-end: " + t);
+ System.exit (1);
}
/* Force creation of the EventManager. If the event manager
@@ -407,10 +407,10 @@ public class Jdwp
String[] options = configString.split (",");
for (int i = 0; i < options.length; ++i)
{
- String[] property = options[i].split ("=");
- if (property.length == 2)
- _properties.put (property[0], property[1]);
- // ignore malformed options
+ String[] property = options[i].split ("=");
+ if (property.length == 2)
+ _properties.put (property[0], property[1]);
+ // ignore malformed options
}
}
}
diff --git a/gnu/classpath/jdwp/JdwpConstants.java b/gnu/classpath/jdwp/JdwpConstants.java
index f38774d62..80dd3f73a 100644
--- a/gnu/classpath/jdwp/JdwpConstants.java
+++ b/gnu/classpath/jdwp/JdwpConstants.java
@@ -51,7 +51,7 @@ public class JdwpConstants
public static final int MAJOR = 1;
public static final int MINOR = 4;
}
-
+
////////////////////////////////////////
// Commands/Sets //
////////////////////////////////////////
@@ -77,7 +77,7 @@ public class JdwpConstants
public static final byte CAPABILITIES = 12;
public static final byte CLASS_PATHS = 13;
public static final byte DISPOSE_OBJECTS = 14;
- public static final byte HOLD_EVENTS = 15;
+ public static final byte HOLD_EVENTS = 15;
public static final byte RELEASE_EVENTS = 16;
public static final byte CAPABILITIES_NEW = 17;
public static final byte REDEFINE_CLASSES = 18;
@@ -94,7 +94,7 @@ public class JdwpConstants
public static final byte CLASS_LOADER= 2;
public static final byte MODIFIERS = 3;
public static final byte FIELDS = 4;
- public static final byte METHODS = 5;
+ public static final byte METHODS = 5;
public static final byte GET_VALUES = 6;
public static final byte SOURCE_FILE = 7;
public static final byte NESTED_TYPES = 8;
@@ -587,7 +587,7 @@ public class JdwpConstants
public static final byte METHOD_ENTRY = 40;
public static final byte METHOD_EXIT = 41;
public static final byte VM_INIT = 90;
- public static final byte VM_DEATH = 99;
+ public static final byte VM_DEATH = 99;
public static final byte VM_DISCONNECTED = 100;
public static final byte VM_START = VM_INIT;
@@ -617,7 +617,7 @@ public class JdwpConstants
public static final byte THREAD_ONLY = 3;
/**
- * For class prepare events, restricts generated events
+ * For class prepare events, restricts generated events
* to be the preparation of the given reference type and any
* subtypes.
*
@@ -647,7 +647,7 @@ public class JdwpConstants
/**
* Restricts reported events to those for classes whose name does not
* match the given restricted regular expression.
- *
+ *
* For class prepare events, the prepared class name is matched.
* For class unload events, the unloaded class name is matched.
* For other events, the class name of the event's location is matched.
@@ -682,7 +682,7 @@ public class JdwpConstants
/**
* Restricts reported step events to those which satisfy depth and
* size constraints.
- *
+ *
* May be used with step event kinds only.
*/
public static final byte STEP = 10;
diff --git a/gnu/classpath/jdwp/event/BreakpointEvent.java b/gnu/classpath/jdwp/event/BreakpointEvent.java
index abf280d6e..46e50de16 100644
--- a/gnu/classpath/jdwp/event/BreakpointEvent.java
+++ b/gnu/classpath/jdwp/event/BreakpointEvent.java
@@ -62,7 +62,7 @@ public class BreakpointEvent
// Location where breakpoint occurred
private Location _location;
-
+
//object instance
private Object _instance;
diff --git a/gnu/classpath/jdwp/event/ClassPrepareEvent.java b/gnu/classpath/jdwp/event/ClassPrepareEvent.java
index 5341daa42..f21f8e7c0 100644
--- a/gnu/classpath/jdwp/event/ClassPrepareEvent.java
+++ b/gnu/classpath/jdwp/event/ClassPrepareEvent.java
@@ -141,7 +141,7 @@ public class ClassPrepareEvent
tid.write (outStream);
rid.writeTagged (outStream);
JdwpString.writeString (outStream,
- Signature.computeClassSignature (_class));
+ Signature.computeClassSignature (_class));
outStream.writeInt (_status);
}
}
diff --git a/gnu/classpath/jdwp/event/ClassUnloadEvent.java b/gnu/classpath/jdwp/event/ClassUnloadEvent.java
index 4ba8bc806..a35d3b9bd 100644
--- a/gnu/classpath/jdwp/event/ClassUnloadEvent.java
+++ b/gnu/classpath/jdwp/event/ClassUnloadEvent.java
@@ -47,7 +47,7 @@ import java.io.IOException;
/**
* "Notification of a class unload in the target VM" -- JDWP 1.4.2
- *
+ *
* @author Kyle Galloway (kgallowa@redhat.com)
*/
public class ClassUnloadEvent
@@ -58,7 +58,7 @@ public class ClassUnloadEvent
/**
* Constructs a new <code>ClassUnloadEvent</code>
- *
+ *
* @param signature the signature reported from the VM
*/
public ClassUnloadEvent(String signature)
@@ -70,7 +70,7 @@ public class ClassUnloadEvent
/**
* Returns a specific filtering parameter for this event. Class is the only
* valid type.
- *
+ *
* @param type the type of parameter desired
* @returns the desired parameter or <code>null</code>
*/
@@ -82,10 +82,10 @@ public class ClassUnloadEvent
/**
* Writes the event to the given stream
- *
+ *
* @param outStream the output stream to write the event to
*/
- protected void _writeData(DataOutputStream outStream)
+ protected void _writeData(DataOutputStream outStream)
throws IOException
{
VMIdManager idm = VMIdManager.getDefault();
diff --git a/gnu/classpath/jdwp/event/Event.java b/gnu/classpath/jdwp/event/Event.java
index c89b25cb9..492cadbcc 100644
--- a/gnu/classpath/jdwp/event/Event.java
+++ b/gnu/classpath/jdwp/event/Event.java
@@ -58,22 +58,22 @@ public abstract class Event
* The class of the object in which the event occurred
*/
public static final int EVENT_CLASS = 1;
-
+
/**
* The thread where the event occurred
*/
public static final int EVENT_THREAD = 2;
-
+
/**
* The location where an event occurred
*/
public static final int EVENT_LOCATION = 3;
-
+
/**
* The instance of the class where the event occurred
*/
public static final int EVENT_INSTANCE = 4;
-
+
/**
* The field acted on by an event
*/
@@ -88,7 +88,7 @@ public abstract class Event
* Whether this exception was caught (only valid for ExceptionEvents)
*/
public static final int EVENT_EXCEPTION_CAUGHT = 7;
-
+
// The kind of event represented by this event
private byte _eventKind;
@@ -144,25 +144,25 @@ public abstract class Event
* @returns a <code>JdwpPacket</code> of the events
*/
public static JdwpPacket toPacket (DataOutputStream dos,
- Event[] events,
- EventRequest[] requests,
- byte suspendPolicy)
+ Event[] events,
+ EventRequest[] requests,
+ byte suspendPolicy)
{
JdwpPacket pkt;
try
{
- dos.writeByte (suspendPolicy);
- dos.writeInt (events.length);
- for (int i = 0; i < events.length; ++i)
- _toData (dos, events[i], requests[i]);
-
- pkt
- = new JdwpCommandPacket (JdwpConstants.CommandSet.Event.CS_VALUE,
- JdwpConstants.CommandSet.Event.COMPOSITE);
+ dos.writeByte (suspendPolicy);
+ dos.writeInt (events.length);
+ for (int i = 0; i < events.length; ++i)
+ _toData (dos, events[i], requests[i]);
+
+ pkt
+ = new JdwpCommandPacket (JdwpConstants.CommandSet.Event.CS_VALUE,
+ JdwpConstants.CommandSet.Event.COMPOSITE);
}
catch (IOException ioe)
{
- pkt = null;
+ pkt = null;
}
return pkt;
@@ -170,7 +170,7 @@ public abstract class Event
// Helper function for toPacket
private static void _toData (DataOutputStream dos, Event event,
- EventRequest request)
+ EventRequest request)
throws IOException
{
dos.writeByte (event._eventKind);
diff --git a/gnu/classpath/jdwp/event/EventManager.java b/gnu/classpath/jdwp/event/EventManager.java
index aa3d5d629..3f34a5ee9 100644
--- a/gnu/classpath/jdwp/event/EventManager.java
+++ b/gnu/classpath/jdwp/event/EventManager.java
@@ -53,10 +53,10 @@ import java.util.Iterator;
* Manages event requests and filters event notifications.
*
* The purpose of this class is actually two-fold:
- *
+ *
* 1) Maintain a list of event requests from the debugger
* 2) Filter event notifications from the VM
- *
+ *
* If an event request arrives from the debugger, the back-end will
* call {@link #requestEvent}, which will first check for a valid event.
* If it is valid, <code>EventManager</code> will record the request
@@ -65,7 +65,7 @@ import java.util.Iterator;
* breakpoints and other execution-related events), or it may decide to
* allow the <code>EventManager</code> to handle notifications and all
* filtering (which is convenient for other events such as class (un)loading).
- *
+ *
* @author Keith Seitz (keiths@redhat.com)
*/
public class EventManager
@@ -96,53 +96,53 @@ public class EventManager
// Add lists for all the event types
_requests.put (new Byte (EventRequest.EVENT_SINGLE_STEP),
- new Hashtable ());
+ new Hashtable ());
_requests.put (new Byte (EventRequest.EVENT_BREAKPOINT),
- new Hashtable ());
+ new Hashtable ());
_requests.put (new Byte (EventRequest.EVENT_FRAME_POP),
- new Hashtable ());
+ new Hashtable ());
_requests.put (new Byte (EventRequest.EVENT_EXCEPTION),
- new Hashtable ());
+ new Hashtable ());
_requests.put (new Byte (EventRequest.EVENT_USER_DEFINED),
- new Hashtable ());
+ new Hashtable ());
_requests.put (new Byte (EventRequest.EVENT_THREAD_START),
- new Hashtable ());
+ new Hashtable ());
_requests.put (new Byte (EventRequest.EVENT_THREAD_END),
- new Hashtable ());
+ new Hashtable ());
_requests.put (new Byte (EventRequest.EVENT_CLASS_PREPARE),
- new Hashtable ());
+ new Hashtable ());
_requests.put (new Byte (EventRequest.EVENT_CLASS_UNLOAD),
- new Hashtable ());
+ new Hashtable ());
_requests.put (new Byte (EventRequest.EVENT_CLASS_LOAD),
- new Hashtable ());
+ new Hashtable ());
_requests.put (new Byte (EventRequest.EVENT_FIELD_ACCESS),
- new Hashtable ());
+ new Hashtable ());
_requests.put (new Byte (EventRequest.EVENT_FIELD_MODIFY),
- new Hashtable ());
+ new Hashtable ());
_requests.put (new Byte (EventRequest.EVENT_METHOD_ENTRY),
- new Hashtable ());
+ new Hashtable ());
_requests.put (new Byte (EventRequest.EVENT_METHOD_EXIT),
- new Hashtable ());
+ new Hashtable ());
_requests.put (new Byte (EventRequest.EVENT_VM_INIT),
- new Hashtable ());
+ new Hashtable ());
_requests.put (new Byte (EventRequest.EVENT_VM_DEATH),
- new Hashtable ());
+ new Hashtable ());
// Add auto-generated event notifications
// only two: VM_INIT, VM_DEATH
try
{
- byte sp = (Jdwp.suspendOnStartup()
- ? EventRequest.SUSPEND_THREAD : EventRequest.SUSPEND_NONE);
- requestEvent (new EventRequest (0,
- EventRequest.EVENT_VM_INIT, sp));
- requestEvent (new EventRequest (0,
- EventRequest.EVENT_VM_DEATH,
- EventRequest.SUSPEND_NONE));
+ byte sp = (Jdwp.suspendOnStartup()
+ ? EventRequest.SUSPEND_THREAD : EventRequest.SUSPEND_NONE);
+ requestEvent (new EventRequest (0,
+ EventRequest.EVENT_VM_INIT, sp));
+ requestEvent (new EventRequest (0,
+ EventRequest.EVENT_VM_DEATH,
+ EventRequest.SUSPEND_NONE));
}
catch (JdwpException e)
{
- // This can't happen
+ // This can't happen
}
}
@@ -163,8 +163,8 @@ public class EventManager
requests = (Hashtable) _requests.get(kind);
if (requests == null)
{
- // Did not get a valid event type
- throw new IllegalArgumentException("invalid event kind: " + kind);
+ // Did not get a valid event type
+ throw new IllegalArgumentException("invalid event kind: " + kind);
}
// Loop through the requests. Must look at ALL requests in order
@@ -172,9 +172,9 @@ public class EventManager
Iterator rIter = requests.values().iterator();
while (rIter.hasNext())
{
- EventRequest request = (EventRequest) rIter.next();
- if (request.matches(event))
- interestedEvents.add(request);
+ EventRequest request = (EventRequest) rIter.next();
+ if (request.matches(event))
+ interestedEvents.add(request);
}
EventRequest[] r = new EventRequest[interestedEvents.size()];
@@ -205,8 +205,8 @@ public class EventManager
requests = (Hashtable) _requests.get (kind);
if (requests == null)
{
- // Did not get a valid event type
- throw new InvalidEventTypeException (request.getEventKind ());
+ // Did not get a valid event type
+ throw new InvalidEventTypeException (request.getEventKind ());
}
// Register the event with the VM
@@ -229,16 +229,16 @@ public class EventManager
requests = (Hashtable) _requests.get (new Byte (kind));
if (requests == null)
{
- // Did not get a valid event type
- throw new IllegalArgumentException ("invalid event kind: " + kind);
+ // Did not get a valid event type
+ throw new IllegalArgumentException ("invalid event kind: " + kind);
}
Integer iid = new Integer (id);
EventRequest request = (EventRequest) requests.get (iid);
if (request != null)
{
- VMVirtualMachine.unregisterEvent (request);
- requests.remove (iid);
+ VMVirtualMachine.unregisterEvent (request);
+ requests.remove (iid);
}
}
@@ -255,8 +255,8 @@ public class EventManager
Hashtable requests = (Hashtable) _requests.get (new Byte (kind));
if (requests == null)
{
- // Did not get a valid event type
- throw new IllegalArgumentException ("invalid event kind: " + kind);
+ // Did not get a valid event type
+ throw new IllegalArgumentException ("invalid event kind: " + kind);
}
VMVirtualMachine.clearEvents (kind);
@@ -277,8 +277,8 @@ public class EventManager
Hashtable requests = (Hashtable) _requests.get (new Byte (kind));
if (requests == null)
{
- // Did not get a valid event type
- throw new IllegalArgumentException ("invalid event kind: " + kind);
+ // Did not get a valid event type
+ throw new IllegalArgumentException ("invalid event kind: " + kind);
}
return (EventRequest) requests.get (new Integer (id));
@@ -296,10 +296,10 @@ public class EventManager
Hashtable requests = (Hashtable) _requests.get (new Byte (kind));
if (requests == null)
{
- // Did not get a valid event type
- throw new IllegalArgumentException ("invalid event kind: " + kind);
+ // Did not get a valid event type
+ throw new IllegalArgumentException ("invalid event kind: " + kind);
}
-
+
return requests.values ();
}
}
diff --git a/gnu/classpath/jdwp/event/EventRequest.java b/gnu/classpath/jdwp/event/EventRequest.java
index 34637f6a2..891da229b 100644
--- a/gnu/classpath/jdwp/event/EventRequest.java
+++ b/gnu/classpath/jdwp/event/EventRequest.java
@@ -88,13 +88,13 @@ public class EventRequest
/**
* User-defined event
*/
- public static final byte EVENT_USER_DEFINED =
+ public static final byte EVENT_USER_DEFINED =
JdwpConstants.EventKind.USER_DEFINED;
/**
* Thread start event
*/
- public static final byte EVENT_THREAD_START =
+ public static final byte EVENT_THREAD_START =
JdwpConstants.EventKind.THREAD_START;
/**
@@ -142,7 +142,7 @@ public class EventRequest
/**
* Method exit event
*/
- public static final byte EVENT_METHOD_EXIT =
+ public static final byte EVENT_METHOD_EXIT =
JdwpConstants.EventKind.METHOD_EXIT;
/**
@@ -165,7 +165,7 @@ public class EventRequest
/**
* Do not suspend any threads
*/
- public static final byte SUSPEND_NONE =
+ public static final byte SUSPEND_NONE =
JdwpConstants.SuspendPolicy.NONE;
/**
@@ -207,7 +207,7 @@ public class EventRequest
_filters = new LinkedList ();
synchronized (_idLock)
{
- _id = ++_last_id;
+ _id = ++_last_id;
}
_kind = kind;
_suspendPolicy = suspendPolicy;
@@ -243,75 +243,75 @@ public class EventRequest
Class clazz = filter.getClass ();
if (clazz == ClassExcludeFilter.class)
{
- if (_kind == EVENT_THREAD_START
- || _kind == EVENT_THREAD_END)
- valid = false;
+ if (_kind == EVENT_THREAD_START
+ || _kind == EVENT_THREAD_END)
+ valid = false;
}
else if (clazz == ClassMatchFilter.class)
{
- if (_kind == EVENT_THREAD_START
- || _kind == EVENT_THREAD_END)
- valid = false;
+ if (_kind == EVENT_THREAD_START
+ || _kind == EVENT_THREAD_END)
+ valid = false;
}
else if (clazz == ClassOnlyFilter.class)
{
- if (_kind == EVENT_CLASS_UNLOAD
- || _kind == EVENT_THREAD_START
- || _kind == EVENT_THREAD_END)
- valid = false;
+ if (_kind == EVENT_CLASS_UNLOAD
+ || _kind == EVENT_THREAD_START
+ || _kind == EVENT_THREAD_END)
+ valid = false;
}
else if (clazz == ConditionalFilter.class)
{
- // JDWP 1.4 does not say much about this
+ // JDWP 1.4 does not say much about this
}
else if (clazz == CountFilter.class)
{
- // may be used with any event
+ // may be used with any event
}
else if (clazz == ExceptionOnlyFilter.class)
{
- if (_kind != EVENT_EXCEPTION)
- valid = false;
+ if (_kind != EVENT_EXCEPTION)
+ valid = false;
}
else if (clazz == FieldOnlyFilter.class)
{
- if (_kind != EVENT_FIELD_ACCESS
- && _kind != EVENT_FIELD_MODIFY)
- valid = false;
+ if (_kind != EVENT_FIELD_ACCESS
+ && _kind != EVENT_FIELD_MODIFY)
+ valid = false;
}
else if (clazz == InstanceOnlyFilter.class)
{
- if (_kind == EVENT_CLASS_PREPARE
- || _kind == EVENT_CLASS_UNLOAD
- || _kind == EVENT_THREAD_START
- || _kind == EVENT_THREAD_END)
- valid = false;
+ if (_kind == EVENT_CLASS_PREPARE
+ || _kind == EVENT_CLASS_UNLOAD
+ || _kind == EVENT_THREAD_START
+ || _kind == EVENT_THREAD_END)
+ valid = false;
}
else if (clazz == LocationOnlyFilter.class)
{
- if (_kind != EVENT_BREAKPOINT
- && _kind != EVENT_FIELD_ACCESS
- && _kind != EVENT_FIELD_MODIFY
- && _kind != EVENT_SINGLE_STEP
- && _kind != EVENT_EXCEPTION)
- valid = false;
+ if (_kind != EVENT_BREAKPOINT
+ && _kind != EVENT_FIELD_ACCESS
+ && _kind != EVENT_FIELD_MODIFY
+ && _kind != EVENT_SINGLE_STEP
+ && _kind != EVENT_EXCEPTION)
+ valid = false;
}
else if (clazz == StepFilter.class)
{
- if (_kind != EVENT_SINGLE_STEP)
- valid = false;
+ if (_kind != EVENT_SINGLE_STEP)
+ valid = false;
}
else if (clazz == ThreadOnlyFilter.class)
{
- if (_kind == EVENT_CLASS_UNLOAD)
- valid = false;
+ if (_kind == EVENT_CLASS_UNLOAD)
+ valid = false;
}
if (!valid)
{
- String msg = ("cannot use " + filter.getClass ().getName ()
- + " with class unload events");
- throw new JdwpIllegalArgumentException (msg);
+ String msg = ("cannot use " + filter.getClass ().getName ()
+ + " with class unload events");
+ throw new JdwpIllegalArgumentException (msg);
}
// Add filter to list
@@ -373,9 +373,9 @@ public class EventRequest
Iterator iter = _filters.iterator ();
while (iter.hasNext ())
{
- IEventFilter filter = (IEventFilter) iter.next ();
- if (!filter.matches (theEvent))
- matches = false;
+ IEventFilter filter = (IEventFilter) iter.next ();
+ if (!filter.matches (theEvent))
+ matches = false;
}
return matches;
diff --git a/gnu/classpath/jdwp/event/ExceptionEvent.java b/gnu/classpath/jdwp/event/ExceptionEvent.java
index 1bb339969..e63f5df12 100644
--- a/gnu/classpath/jdwp/event/ExceptionEvent.java
+++ b/gnu/classpath/jdwp/event/ExceptionEvent.java
@@ -50,7 +50,7 @@ import java.io.IOException;
/**
* Notification from the VM that an exception has occurred along with where it
* occurred, and if and where it was caught.
- *
+ *
* @author Kyle Galloway (kgallowa@redhat.com)
*/
public class ExceptionEvent
@@ -58,7 +58,7 @@ public class ExceptionEvent
{
//object instance
private Object _instance;
-
+
// the exception thrown
private Throwable _exception;
@@ -67,17 +67,17 @@ public class ExceptionEvent
// the location where the exception was thrown
private Location _location;
-
+
//the location where the exception was caught
private Location _catchLocation;
-
+
//the class where the exeption was thrown
private Class _klass;
/**
* Constructs a new <code>ExceptionEvent</code> where the exception was
* caught.
- *
+ *
* @param exception the throwable object that generated the event
* @param thread the thread where the exception occurred
* @param location the location where the exception was thrown
@@ -99,7 +99,7 @@ public class ExceptionEvent
/**
* Returns a specific filtering parameter for this event. Valid types are
* thread, location, and catchLocation.
- *
+ *
* @param type the type of parameter desired
* @returns the desired parameter or null
*/
@@ -123,11 +123,11 @@ public class ExceptionEvent
return null;
}
-
+
/**
* Sets the catchLocation, used for exceptions that are caught in different
* stack frames from where they are thrown.
- *
+ *
* @param catchLoc the location of the catch
*/
public void setCatchLoc(Location catchLoc)
@@ -137,11 +137,11 @@ public class ExceptionEvent
/**
* Writes the event to the given stream
- *
+ *
* @param outStream the output stream to write the event to
* @throws IOException
*/
- protected void _writeData(DataOutputStream outStream)
+ protected void _writeData(DataOutputStream outStream)
throws IOException
{
VMIdManager idm = VMIdManager.getDefault();
diff --git a/gnu/classpath/jdwp/event/MethodEntryEvent.java b/gnu/classpath/jdwp/event/MethodEntryEvent.java
index 40c0516c7..1ec1a5d4b 100644
--- a/gnu/classpath/jdwp/event/MethodEntryEvent.java
+++ b/gnu/classpath/jdwp/event/MethodEntryEvent.java
@@ -48,7 +48,7 @@ import java.io.IOException;
/**
* Notification from the VM that that a method has been invoked
- *
+ *
* @author Kyle Galloway (kgallowa@redhat.com)
*/
public class MethodEntryEvent
@@ -65,7 +65,7 @@ public class MethodEntryEvent
/**
* Constructs a new <code>MethodEntryEvent</code>
- *
+ *
* @param thread the thread where the exception occurred
* @param location the location single stepped to
* @param instance instance from which the method was called
@@ -81,7 +81,7 @@ public class MethodEntryEvent
/**
* Returns a specific filtering parameter for this event. Valid types are
* thread and location
- *
+ *
* @param type the type of parameter desired
* @returns the desired parameter or null
*/
@@ -101,11 +101,11 @@ public class MethodEntryEvent
/**
* Writes the event to the given stream
- *
+ *
* @param outStream the output stream to write the event to
* @throws IOException
*/
- protected void _writeData(DataOutputStream outStream)
+ protected void _writeData(DataOutputStream outStream)
throws IOException
{
VMIdManager idm = VMIdManager.getDefault();
diff --git a/gnu/classpath/jdwp/event/MethodExitEvent.java b/gnu/classpath/jdwp/event/MethodExitEvent.java
index ce03dd264..84c909901 100644
--- a/gnu/classpath/jdwp/event/MethodExitEvent.java
+++ b/gnu/classpath/jdwp/event/MethodExitEvent.java
@@ -48,7 +48,7 @@ import java.io.IOException;
/**
* Notification from the VM that that a method has returned
- *
+ *
* @author Kyle Galloway (kgallowa@redhat.com)
*/
public class MethodExitEvent
@@ -65,7 +65,7 @@ public class MethodExitEvent
/**
* Constructs a new <code>MethodExitEvent</code>
- *
+ *
* @param thread the thread where the exception occurred
* @param location the location single stepped to
* @param instance the instance from which the method was called
@@ -81,7 +81,7 @@ public class MethodExitEvent
/**
* Returns a specific filtering parameter for this event. Valid types are
* thread and location
- *
+ *
* @param type the type of parameter desired
* @returns the desired parameter or null
*/
@@ -99,11 +99,11 @@ public class MethodExitEvent
/**
* Writes the event to the given stream
- *
+ *
* @param outStream the output stream to write the event to
* @throws IOException
*/
- protected void _writeData(DataOutputStream outStream)
+ protected void _writeData(DataOutputStream outStream)
throws IOException
{
VMIdManager idm = VMIdManager.getDefault();
diff --git a/gnu/classpath/jdwp/event/SingleStepEvent.java b/gnu/classpath/jdwp/event/SingleStepEvent.java
index cd69dd99d..40cf50c65 100644
--- a/gnu/classpath/jdwp/event/SingleStepEvent.java
+++ b/gnu/classpath/jdwp/event/SingleStepEvent.java
@@ -51,7 +51,7 @@ import java.io.IOException;
/**
* Notification from the VM that a single step has compleated including the
* thread and location stepped to
- *
+ *
* @author Kyle Galloway (kgallowa@redhat.com)
*/
public class SingleStepEvent
@@ -68,7 +68,7 @@ public class SingleStepEvent
/**
* Constructs a new <code>SingleStepEvent</code>
- *
+ *
* @param thread the thread where the exception occurred
* @param location the location single stepped to
* @param instance the instance in which the single step occurred
@@ -84,7 +84,7 @@ public class SingleStepEvent
/**
* Returns a specific filtering parameter for this event. Valid types are
* thread and location
- *
+ *
* @param type the type of parameter desired
* @returns the desired parameter or null
*/
@@ -104,11 +104,11 @@ public class SingleStepEvent
/**
* Writes the event to the given stream
- *
+ *
* @param outStream the output stream to write the event to
* @throws IOException
*/
- protected void _writeData(DataOutputStream outStream)
+ protected void _writeData(DataOutputStream outStream)
throws IOException
{
VMIdManager idm = VMIdManager.getDefault();
diff --git a/gnu/classpath/jdwp/event/ThreadEndEvent.java b/gnu/classpath/jdwp/event/ThreadEndEvent.java
index c665428fb..a36015a82 100644
--- a/gnu/classpath/jdwp/event/ThreadEndEvent.java
+++ b/gnu/classpath/jdwp/event/ThreadEndEvent.java
@@ -102,4 +102,3 @@ public class ThreadEndEvent
tid.write (outStream);
}
}
-
diff --git a/gnu/classpath/jdwp/event/VmDeathEvent.java b/gnu/classpath/jdwp/event/VmDeathEvent.java
index a729bd47e..c197ecef4 100644
--- a/gnu/classpath/jdwp/event/VmDeathEvent.java
+++ b/gnu/classpath/jdwp/event/VmDeathEvent.java
@@ -46,7 +46,7 @@ import java.io.IOException;
/**
* Event notifying the debugger that the virtual machine has terminated.
- *
+ *
* @author Keith Seitz (keiths@redhat.com)
*/
public class VmDeathEvent
diff --git a/gnu/classpath/jdwp/event/VmInitEvent.java b/gnu/classpath/jdwp/event/VmInitEvent.java
index 1ed63b247..8c1db4f33 100644
--- a/gnu/classpath/jdwp/event/VmInitEvent.java
+++ b/gnu/classpath/jdwp/event/VmInitEvent.java
@@ -50,7 +50,7 @@ import java.io.IOException;
* "Notification of initialization of a target VM. This event is
* received before the main thread is started and before any application
* code has been executed." -- JDWP 1.4.2
- *
+ *
* @author Keith Seitz (keiths@redhat.com)
*/
public class VmInitEvent
diff --git a/gnu/classpath/jdwp/event/filters/ClassExcludeFilter.java b/gnu/classpath/jdwp/event/filters/ClassExcludeFilter.java
index c8ec51c75..5514f1b72 100644
--- a/gnu/classpath/jdwp/event/filters/ClassExcludeFilter.java
+++ b/gnu/classpath/jdwp/event/filters/ClassExcludeFilter.java
@@ -43,7 +43,7 @@ import gnu.classpath.jdwp.event.Event;
import gnu.classpath.jdwp.exception.InvalidStringException;
/**
- * An event filter which excludes events matching a
+ * An event filter which excludes events matching a
* specified class pattern (exact match or start/end with "*").
*
* @author Keith Seitz (keiths@redhat.com)
diff --git a/gnu/classpath/jdwp/event/filters/ClassMatchFilter.java b/gnu/classpath/jdwp/event/filters/ClassMatchFilter.java
index a89843169..edb84d7ef 100644
--- a/gnu/classpath/jdwp/event/filters/ClassMatchFilter.java
+++ b/gnu/classpath/jdwp/event/filters/ClassMatchFilter.java
@@ -43,7 +43,7 @@ import gnu.classpath.jdwp.event.Event;
import gnu.classpath.jdwp.exception.InvalidStringException;
/**
- * An event filter which includes events matching a
+ * An event filter which includes events matching a
* specified class pattern (exact match or start/end with "*").
*
* @author Keith Seitz (keiths@redhat.com)
@@ -66,9 +66,9 @@ public class ClassMatchFilter
int index = pattern.indexOf ('*');
if (index != -1 && index != 0 && index != (pattern.length () - 1))
{
- // '*' must be first char or last char
- throw new InvalidStringException ("pattern may be an exact match or "
- + "start/end with \"*\"");
+ // '*' must be first char or last char
+ throw new InvalidStringException ("pattern may be an exact match or "
+ + "start/end with \"*\"");
}
_pattern = pattern;
}
@@ -93,18 +93,18 @@ public class ClassMatchFilter
Object type = event.getParameter (Event.EVENT_CLASS);
if (type != null)
{
- Class eventClass = (Class) type;
- String name = eventClass.getName ();
-
- if (_pattern.startsWith ("*"))
- return name.endsWith (_pattern.substring (1));
- else if (_pattern.endsWith ("*"))
- {
- int end = _pattern.length () - 1;
- return name.startsWith (_pattern.substring (0, end));
- }
- else
- return name.matches (_pattern);
+ Class eventClass = (Class) type;
+ String name = eventClass.getName ();
+
+ if (_pattern.startsWith ("*"))
+ return name.endsWith (_pattern.substring (1));
+ else if (_pattern.endsWith ("*"))
+ {
+ int end = _pattern.length () - 1;
+ return name.startsWith (_pattern.substring (0, end));
+ }
+ else
+ return name.matches (_pattern);
}
return false;
diff --git a/gnu/classpath/jdwp/event/filters/ClassOnlyFilter.java b/gnu/classpath/jdwp/event/filters/ClassOnlyFilter.java
index 455cac6c0..d912cb5ef 100644
--- a/gnu/classpath/jdwp/event/filters/ClassOnlyFilter.java
+++ b/gnu/classpath/jdwp/event/filters/ClassOnlyFilter.java
@@ -90,18 +90,18 @@ public class ClassOnlyFilter
Object type = event.getParameter (Event.EVENT_CLASS);
if (type != null)
{
- try
- {
- Class clazz = _id.getType ();
- Class eventClass = (Class) type;
- if (clazz.isAssignableFrom (eventClass))
- return true;
- }
- catch (InvalidClassException ice)
- {
- // class is no longer valid
- return false;
- }
+ try
+ {
+ Class clazz = _id.getType ();
+ Class eventClass = (Class) type;
+ if (clazz.isAssignableFrom (eventClass))
+ return true;
+ }
+ catch (InvalidClassException ice)
+ {
+ // class is no longer valid
+ return false;
+ }
}
return false;
diff --git a/gnu/classpath/jdwp/event/filters/ExceptionOnlyFilter.java b/gnu/classpath/jdwp/event/filters/ExceptionOnlyFilter.java
index 8bb56ed78..d4687fa4e 100644
--- a/gnu/classpath/jdwp/event/filters/ExceptionOnlyFilter.java
+++ b/gnu/classpath/jdwp/event/filters/ExceptionOnlyFilter.java
@@ -46,7 +46,7 @@ import gnu.classpath.jdwp.id.ReferenceTypeId;
/**
* Restricts reported exceptions by their class and whether they are caught
* or uncaught.
- *
+ *
* This modifier can be used with exception event kinds only.
*
* @author Keith Seitz (keiths@redhat.com)
@@ -67,7 +67,7 @@ public class ExceptionOnlyFilter
* @throws InvalidClassException if refid is invalid
*/
public ExceptionOnlyFilter (ReferenceTypeId refId, boolean caught,
- boolean uncaught)
+ boolean uncaught)
throws InvalidClassException
{
if (refId != null && refId.getReference().get() == null)
@@ -88,10 +88,10 @@ public class ExceptionOnlyFilter
return _refId;
}
-
+
/**
* Does the given event match the filter?
- *
+ *
* @param event the <code>Event</code> to scrutinize
*/
public boolean matches(Event event)
@@ -103,7 +103,7 @@ public class ExceptionOnlyFilter
{
try
{
- Class klass
+ Class klass
= (Class) event.getParameter(Event.EVENT_EXCEPTION_CLASS);
classMatch = klass == _refId.getType();
}
@@ -112,12 +112,12 @@ public class ExceptionOnlyFilter
classMatch = false;
}
}
-
+
// check against the caught and uncaught options
- Boolean caught
+ Boolean caught
= (Boolean) event.getParameter(Event.EVENT_EXCEPTION_CAUGHT);
return classMatch && ((caught.booleanValue()) ? _caught : _uncaught);
}
-
+
}
diff --git a/gnu/classpath/jdwp/event/filters/FieldOnlyFilter.java b/gnu/classpath/jdwp/event/filters/FieldOnlyFilter.java
index 20a9edf22..47a804101 100644
--- a/gnu/classpath/jdwp/event/filters/FieldOnlyFilter.java
+++ b/gnu/classpath/jdwp/event/filters/FieldOnlyFilter.java
@@ -46,7 +46,7 @@ import gnu.classpath.jdwp.id.ReferenceTypeId;
/**
* Restricts reported events to those that occur for a given field.
- *
+ *
* This modifier can be used with field access and field modification event
* kinds only.
*
@@ -80,7 +80,7 @@ public class FieldOnlyFilter
}
/**
- * Returns the class in which the field is declared
+ * Returns the class in which the field is declared
*
* @return the class's id
*/
diff --git a/gnu/classpath/jdwp/event/filters/InstanceOnlyFilter.java b/gnu/classpath/jdwp/event/filters/InstanceOnlyFilter.java
index bda5b27d6..45ab3c428 100644
--- a/gnu/classpath/jdwp/event/filters/InstanceOnlyFilter.java
+++ b/gnu/classpath/jdwp/event/filters/InstanceOnlyFilter.java
@@ -46,7 +46,7 @@ import gnu.classpath.jdwp.id.ObjectId;
/**
* Restricts reported events to those whose active 'this' object is the
* given object. Match value is the null object for static methods.
- *
+ *
* This modifier can be used with any event kind except class prepare,
* class unload, thread start, and thread end. Introduced in JDWP version 1.4.
*
@@ -92,8 +92,8 @@ public class InstanceOnlyFilter
Object eventInstance = event.getParameter (Event.EVENT_INSTANCE);
if (eventInstance != null)
{
- Object myInstance = _instance.getReference().get ();
- return ((myInstance != null) && (myInstance == eventInstance));
+ Object myInstance = _instance.getReference().get ();
+ return ((myInstance != null) && (myInstance == eventInstance));
}
return false;
diff --git a/gnu/classpath/jdwp/event/filters/StepFilter.java b/gnu/classpath/jdwp/event/filters/StepFilter.java
index fd412716c..b620b7953 100644
--- a/gnu/classpath/jdwp/event/filters/StepFilter.java
+++ b/gnu/classpath/jdwp/event/filters/StepFilter.java
@@ -51,9 +51,9 @@ import gnu.classpath.jdwp.id.ThreadId;
* This "filter" is not really a filter. It is simply a way to communicate
* stepping information in a convenient way between the JDWP backend and
* the virtual machine.
- *
+ *
* Consequently, this "filter" always matches.
- *
+ *
* @author Keith Seitz (keiths@redhat.com)
*/
public class StepFilter
diff --git a/gnu/classpath/jdwp/event/filters/ThreadOnlyFilter.java b/gnu/classpath/jdwp/event/filters/ThreadOnlyFilter.java
index bc1eab883..de9fb3ec6 100644
--- a/gnu/classpath/jdwp/event/filters/ThreadOnlyFilter.java
+++ b/gnu/classpath/jdwp/event/filters/ThreadOnlyFilter.java
@@ -91,9 +91,9 @@ public class ThreadOnlyFilter
Object thread = event.getParameter (Event.EVENT_THREAD);
if (thread != null)
{
- Thread eventThread = (Thread) thread;
- Thread myThread = (Thread) _tid.getReference().get ();
- return (eventThread == myThread);
+ Thread eventThread = (Thread) thread;
+ Thread myThread = (Thread) _tid.getReference().get ();
+ return (eventThread == myThread);
}
return false;
diff --git a/gnu/classpath/jdwp/exception/InvalidClassException.java b/gnu/classpath/jdwp/exception/InvalidClassException.java
index cd276be8c..de15000a4 100644
--- a/gnu/classpath/jdwp/exception/InvalidClassException.java
+++ b/gnu/classpath/jdwp/exception/InvalidClassException.java
@@ -53,7 +53,7 @@ public class InvalidClassException
public InvalidClassException (long id)
{
super (JdwpConstants.Error.INVALID_CLASS,
- "invalid class id (" + id + ")");
+ "invalid class id (" + id + ")");
}
public InvalidClassException (Throwable t)
diff --git a/gnu/classpath/jdwp/exception/InvalidClassLoaderException.java b/gnu/classpath/jdwp/exception/InvalidClassLoaderException.java
index 17bbfb34a..ca91e6eb6 100644
--- a/gnu/classpath/jdwp/exception/InvalidClassLoaderException.java
+++ b/gnu/classpath/jdwp/exception/InvalidClassLoaderException.java
@@ -52,7 +52,7 @@ public class InvalidClassLoaderException
public InvalidClassLoaderException (long id)
{
super (JdwpConstants.Error.INVALID_CLASS_LOADER,
- "invalid class loader (" + id + ")");
+ "invalid class loader (" + id + ")");
}
public InvalidClassLoaderException (Throwable t)
diff --git a/gnu/classpath/jdwp/exception/InvalidEventTypeException.java b/gnu/classpath/jdwp/exception/InvalidEventTypeException.java
index e0402283f..17341ce1d 100644
--- a/gnu/classpath/jdwp/exception/InvalidEventTypeException.java
+++ b/gnu/classpath/jdwp/exception/InvalidEventTypeException.java
@@ -53,7 +53,7 @@ public class InvalidEventTypeException
public InvalidEventTypeException (byte kind)
{
super (JdwpConstants.Error.INVALID_EVENT_TYPE,
- "invalid event type (" + kind + ")");
+ "invalid event type (" + kind + ")");
}
public InvalidEventTypeException (Throwable t)
diff --git a/gnu/classpath/jdwp/exception/InvalidFieldException.java b/gnu/classpath/jdwp/exception/InvalidFieldException.java
index f088c73db..47470ab8c 100644
--- a/gnu/classpath/jdwp/exception/InvalidFieldException.java
+++ b/gnu/classpath/jdwp/exception/InvalidFieldException.java
@@ -53,7 +53,7 @@ public class InvalidFieldException
public InvalidFieldException (long id)
{
super (JdwpConstants.Error.INVALID_FIELDID,
- "invalid field id (" + id + ")");
+ "invalid field id (" + id + ")");
}
public InvalidFieldException (Throwable t)
diff --git a/gnu/classpath/jdwp/exception/InvalidFrameException.java b/gnu/classpath/jdwp/exception/InvalidFrameException.java
index 6d622a5e6..876c0a88c 100644
--- a/gnu/classpath/jdwp/exception/InvalidFrameException.java
+++ b/gnu/classpath/jdwp/exception/InvalidFrameException.java
@@ -52,8 +52,8 @@ public class InvalidFrameException
{
public InvalidFrameException(long id)
{
- super(JdwpConstants.Error.INVALID_FRAMEID,
- "invalid frame id (" + id + ")");
+ super(JdwpConstants.Error.INVALID_FRAMEID,
+ "invalid frame id (" + id + ")");
}
public InvalidFrameException(String msg)
diff --git a/gnu/classpath/jdwp/exception/InvalidLocationException.java b/gnu/classpath/jdwp/exception/InvalidLocationException.java
index c67951fa2..e8cc78fac 100644
--- a/gnu/classpath/jdwp/exception/InvalidLocationException.java
+++ b/gnu/classpath/jdwp/exception/InvalidLocationException.java
@@ -52,7 +52,7 @@ public class InvalidLocationException
public InvalidLocationException (/*something*/)
{
super (JdwpConstants.Error.INVALID_LOCATION,
- "invalid location (" + "something" + ")");
+ "invalid location (" + "something" + ")");
}
public InvalidLocationException (Throwable t)
diff --git a/gnu/classpath/jdwp/exception/InvalidMethodException.java b/gnu/classpath/jdwp/exception/InvalidMethodException.java
index 3299915b8..83569f481 100644
--- a/gnu/classpath/jdwp/exception/InvalidMethodException.java
+++ b/gnu/classpath/jdwp/exception/InvalidMethodException.java
@@ -53,7 +53,7 @@ public class InvalidMethodException
public InvalidMethodException (long id)
{
super (JdwpConstants.Error.INVALID_METHODID,
- "invalid method id (" + id + ")");
+ "invalid method id (" + id + ")");
}
public InvalidMethodException (Throwable t)
diff --git a/gnu/classpath/jdwp/exception/InvalidObjectException.java b/gnu/classpath/jdwp/exception/InvalidObjectException.java
index 49e8ac1e5..8b1a2802d 100644
--- a/gnu/classpath/jdwp/exception/InvalidObjectException.java
+++ b/gnu/classpath/jdwp/exception/InvalidObjectException.java
@@ -53,7 +53,7 @@ public class InvalidObjectException
public InvalidObjectException (long id)
{
super (JdwpConstants.Error.INVALID_OBJECT,
- "invalid object id (" + id + ")");
+ "invalid object id (" + id + ")");
}
public InvalidObjectException (Throwable t)
diff --git a/gnu/classpath/jdwp/exception/InvalidSlotException.java b/gnu/classpath/jdwp/exception/InvalidSlotException.java
index 1827edab9..bf6bc904d 100644
--- a/gnu/classpath/jdwp/exception/InvalidSlotException.java
+++ b/gnu/classpath/jdwp/exception/InvalidSlotException.java
@@ -42,7 +42,7 @@ package gnu.classpath.jdwp.exception;
import gnu.classpath.jdwp.JdwpConstants;
/**
- * An exception thrown when an invalid Slot id is used by the debugger
+ * An exception thrown when an invalid Slot id is used by the debugger
* (i.e. when trying to access a variable slot which doesn't exist).
*
* @author Kyle Galloway (kgallowa@redhat.com)
diff --git a/gnu/classpath/jdwp/exception/InvalidStringException.java b/gnu/classpath/jdwp/exception/InvalidStringException.java
index c84a960f1..b9864a6e6 100644
--- a/gnu/classpath/jdwp/exception/InvalidStringException.java
+++ b/gnu/classpath/jdwp/exception/InvalidStringException.java
@@ -52,13 +52,13 @@ public class InvalidStringException
public InvalidStringException (String str)
{
super (JdwpConstants.Error.INVALID_STRING,
- "invalid string (" + str + ")");
+ "invalid string (" + str + ")");
}
public InvalidStringException (long id)
{
super (JdwpConstants.Error.INVALID_STRING,
- "invalid string id (" + id + ")");
+ "invalid string id (" + id + ")");
}
public InvalidStringException (Throwable t)
diff --git a/gnu/classpath/jdwp/exception/InvalidThreadException.java b/gnu/classpath/jdwp/exception/InvalidThreadException.java
index 985b1a791..9cebfba50 100644
--- a/gnu/classpath/jdwp/exception/InvalidThreadException.java
+++ b/gnu/classpath/jdwp/exception/InvalidThreadException.java
@@ -53,7 +53,7 @@ public class InvalidThreadException
public InvalidThreadException (long id)
{
super (JdwpConstants.Error.INVALID_THREAD,
- "invalid thread id (" + id + ")");
+ "invalid thread id (" + id + ")");
}
public InvalidThreadException (Throwable t)
diff --git a/gnu/classpath/jdwp/exception/InvalidThreadGroupException.java b/gnu/classpath/jdwp/exception/InvalidThreadGroupException.java
index 8b05e0446..7d9e62252 100644
--- a/gnu/classpath/jdwp/exception/InvalidThreadGroupException.java
+++ b/gnu/classpath/jdwp/exception/InvalidThreadGroupException.java
@@ -53,7 +53,7 @@ public class InvalidThreadGroupException
public InvalidThreadGroupException (long id)
{
super (JdwpConstants.Error.INVALID_THREAD_GROUP,
- "invalid thread group id (" + id + ")");
+ "invalid thread group id (" + id + ")");
}
public InvalidThreadGroupException (Throwable t)
diff --git a/gnu/classpath/jdwp/exception/NativeMethodException.java b/gnu/classpath/jdwp/exception/NativeMethodException.java
index ae1a696be..36c03c431 100644
--- a/gnu/classpath/jdwp/exception/NativeMethodException.java
+++ b/gnu/classpath/jdwp/exception/NativeMethodException.java
@@ -53,7 +53,7 @@ public class NativeMethodException
public NativeMethodException(long id)
{
super(JdwpConstants.Error.NATIVE_METHOD,
- "invalid method id (" + id + ")");
+ "invalid method id (" + id + ")");
}
public NativeMethodException(Throwable t)
diff --git a/gnu/classpath/jdwp/exception/NotImplementedException.java b/gnu/classpath/jdwp/exception/NotImplementedException.java
index fba627ea2..a4ec7b224 100644
--- a/gnu/classpath/jdwp/exception/NotImplementedException.java
+++ b/gnu/classpath/jdwp/exception/NotImplementedException.java
@@ -53,6 +53,6 @@ public class NotImplementedException
public NotImplementedException (String feature)
{
super (JdwpConstants.Error.NOT_IMPLEMENTED,
- feature + " is not yet implemented");
+ feature + " is not yet implemented");
}
}
diff --git a/gnu/classpath/jdwp/id/JdwpId.java b/gnu/classpath/jdwp/id/JdwpId.java
index 61cc15d2e..6caaa3a01 100644
--- a/gnu/classpath/jdwp/id/JdwpId.java
+++ b/gnu/classpath/jdwp/id/JdwpId.java
@@ -119,7 +119,7 @@ public abstract class JdwpId
/**
* Compares two object ids for equality. Two object ids
* are equal if they point to the same type and contain to
- * the same id number.
+ * the same id number.
*/
public boolean equals (JdwpId id)
{
diff --git a/gnu/classpath/jdwp/id/NullObjectId.java b/gnu/classpath/jdwp/id/NullObjectId.java
index 0e7b5e39c..5dc9753b7 100644
--- a/gnu/classpath/jdwp/id/NullObjectId.java
+++ b/gnu/classpath/jdwp/id/NullObjectId.java
@@ -57,7 +57,7 @@ public class NullObjectId
* The object class that this id represents
*/
public static final Class typeClass = NullObject.class;
-
+
/**
* Constructs a new <code>NullObjectId</code>
*/
diff --git a/gnu/classpath/jdwp/processor/ArrayReferenceCommandSet.java b/gnu/classpath/jdwp/processor/ArrayReferenceCommandSet.java
index 5f579050a..93c9d73e3 100644
--- a/gnu/classpath/jdwp/processor/ArrayReferenceCommandSet.java
+++ b/gnu/classpath/jdwp/processor/ArrayReferenceCommandSet.java
@@ -56,7 +56,7 @@ import java.nio.ByteBuffer;
/**
* A class representing the ArrayReference Command Set.
- *
+ *
* @author Aaron Luchko <aluchko@redhat.com>
*/
public class ArrayReferenceCommandSet
diff --git a/gnu/classpath/jdwp/processor/ArrayTypeCommandSet.java b/gnu/classpath/jdwp/processor/ArrayTypeCommandSet.java
index b77c3a833..899bf2997 100644
--- a/gnu/classpath/jdwp/processor/ArrayTypeCommandSet.java
+++ b/gnu/classpath/jdwp/processor/ArrayTypeCommandSet.java
@@ -1,6 +1,6 @@
/* ArrayTypeCommandSet.java -- class to implement the ArrayType Command Set
Copyright (C) 2005 Free Software Foundation
-
+
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
@@ -52,7 +52,7 @@ import java.nio.ByteBuffer;
/**
* A class representing the ArrayType Command Set.
- *
+ *
* @author Aaron Luchko <aluchko@redhat.com>
*/
public class ArrayTypeCommandSet
diff --git a/gnu/classpath/jdwp/processor/ClassLoaderReferenceCommandSet.java b/gnu/classpath/jdwp/processor/ClassLoaderReferenceCommandSet.java
index cc591b17d..295410f6c 100644
--- a/gnu/classpath/jdwp/processor/ClassLoaderReferenceCommandSet.java
+++ b/gnu/classpath/jdwp/processor/ClassLoaderReferenceCommandSet.java
@@ -1,4 +1,4 @@
-/* ClassLoaderReferenceCommandSet.java -- class to implement the
+/* ClassLoaderReferenceCommandSet.java -- class to implement the
ClassLoaderReference Command Set
Copyright (C) 2005 Free Software Foundation
@@ -56,7 +56,7 @@ import java.util.Iterator;
/**
* A class representing the ClassLoaderReference Command Set.
- *
+ *
* @author Aaron Luchko <aluchko@redhat.com>
*/
public class ClassLoaderReferenceCommandSet
diff --git a/gnu/classpath/jdwp/processor/ClassObjectReferenceCommandSet.java b/gnu/classpath/jdwp/processor/ClassObjectReferenceCommandSet.java
index cfec20bc7..b32dbc2e5 100644
--- a/gnu/classpath/jdwp/processor/ClassObjectReferenceCommandSet.java
+++ b/gnu/classpath/jdwp/processor/ClassObjectReferenceCommandSet.java
@@ -1,4 +1,4 @@
-/* ClassObjectReferenceCommandSet.java -- class to implement the
+/* ClassObjectReferenceCommandSet.java -- class to implement the
ClassObjectReference Command Set
Copyright (C) 2005 Free Software Foundation
@@ -52,7 +52,7 @@ import java.nio.ByteBuffer;
/**
* A class representing the ClassObjectReference Command Set.
- *
+ *
* @author Aaron Luchko <aluchko@redhat.com>
*/
public class ClassObjectReferenceCommandSet
diff --git a/gnu/classpath/jdwp/processor/ClassTypeCommandSet.java b/gnu/classpath/jdwp/processor/ClassTypeCommandSet.java
index 500152ea6..ec496bfe9 100644
--- a/gnu/classpath/jdwp/processor/ClassTypeCommandSet.java
+++ b/gnu/classpath/jdwp/processor/ClassTypeCommandSet.java
@@ -61,7 +61,7 @@ import java.nio.ByteBuffer;
/**
* A class representing the ClassType Command Set.
- *
+ *
* @author Aaron Luchko <aluchko@redhat.com>
*/
public class ClassTypeCommandSet
@@ -109,10 +109,10 @@ public class ClassTypeCommandSet
Class superClazz = clazz.getSuperclass();
if (superClazz == null) {
- os.writeLong(0L);
+ os.writeLong(0L);
} else {
- ReferenceTypeId clazzId = idMan.getReferenceTypeId(superClazz);
- clazzId.write(os);
+ ReferenceTypeId clazzId = idMan.getReferenceTypeId(superClazz);
+ clazzId.write(os);
}
}
@@ -198,8 +198,8 @@ public class ClassTypeCommandSet
int invokeOpts = bb.getInt();
MethodResult mr = VMVirtualMachine.executeMethod(null, thread,
- clazz, method,
- values, invokeOpts);
+ clazz, method,
+ values, invokeOpts);
return mr;
}
}
diff --git a/gnu/classpath/jdwp/processor/CommandSet.java b/gnu/classpath/jdwp/processor/CommandSet.java
index d3a27532b..e1b71c10d 100644
--- a/gnu/classpath/jdwp/processor/CommandSet.java
+++ b/gnu/classpath/jdwp/processor/CommandSet.java
@@ -61,7 +61,7 @@ public abstract class CommandSet
/**
* Runs the given command with the data in distr and writes the data for the
* reply packet to ostr.
- *
+ *
* @param bb holds the data portion of the Command Packet
* @param os data portion of the Reply Packet will be written here
* @param command the command field of the Command Packet
@@ -69,6 +69,6 @@ public abstract class CommandSet
* @throws JdwpException command wasn't carried out successfully
*/
public abstract boolean runCommand(ByteBuffer bb, DataOutputStream os,
- byte command)
+ byte command)
throws JdwpException;
}
diff --git a/gnu/classpath/jdwp/processor/EventRequestCommandSet.java b/gnu/classpath/jdwp/processor/EventRequestCommandSet.java
index d7ebbc3a3..477a79d83 100644
--- a/gnu/classpath/jdwp/processor/EventRequestCommandSet.java
+++ b/gnu/classpath/jdwp/processor/EventRequestCommandSet.java
@@ -1,7 +1,7 @@
/* EventRequestCommandSet.java -- class to implement the EventRequest Command
Set
Copyright (C) 2005, 2007 Free Software Foundation
-
+
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
@@ -70,7 +70,7 @@ import java.nio.ByteBuffer;
/**
* A class representing the EventRequest Command Set.
- *
+ *
* @author Aaron Luchko <aluchko@redhat.com>
*/
public class EventRequestCommandSet
@@ -93,7 +93,7 @@ public class EventRequestCommandSet
executeClearAllBreakpoints(bb, os);
break;
default:
- throw new NotImplementedException("Command " + command +
+ throw new NotImplementedException("Command " + command +
" not found in EventRequest Reference Command Set.");
}
}
@@ -116,24 +116,24 @@ public class EventRequestCommandSet
switch (eventKind)
{
- case JdwpConstants.EventKind.FIELD_ACCESS:
- if (!VMVirtualMachine.canWatchFieldAccess)
- {
- String msg = "watching field accesses is not supported";
- throw new NotImplementedException(msg);
- }
- break;
-
- case JdwpConstants.EventKind.FIELD_MODIFICATION:
- if (!VMVirtualMachine.canWatchFieldModification)
- {
- String msg = "watching field modifications is not supported";
- throw new NotImplementedException(msg);
- }
- break;
+ case JdwpConstants.EventKind.FIELD_ACCESS:
+ if (!VMVirtualMachine.canWatchFieldAccess)
+ {
+ String msg = "watching field accesses is not supported";
+ throw new NotImplementedException(msg);
+ }
+ break;
+
+ case JdwpConstants.EventKind.FIELD_MODIFICATION:
+ if (!VMVirtualMachine.canWatchFieldModification)
+ {
+ String msg = "watching field modifications is not supported";
+ throw new NotImplementedException(msg);
+ }
+ break;
default:
- // okay
+ // okay
}
EventRequest eventReq = new EventRequest(eventKind, suspendPolicy);
diff --git a/gnu/classpath/jdwp/processor/FieldCommandSet.java b/gnu/classpath/jdwp/processor/FieldCommandSet.java
index 090770038..d7bb64878 100644
--- a/gnu/classpath/jdwp/processor/FieldCommandSet.java
+++ b/gnu/classpath/jdwp/processor/FieldCommandSet.java
@@ -46,7 +46,7 @@ import java.nio.ByteBuffer;
/**
* A class representing the Field Command Set.
- *
+ *
* @author Aaron Luchko <aluchko@redhat.com>
*/
public class FieldCommandSet
@@ -55,7 +55,7 @@ public class FieldCommandSet
/**
* There are no commands for this CommandSet at this time so we just throw a
* NotImplementedException whenever it's called.
- *
+ *
* @throws JdwpException An exception will always be thrown
*/
public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command)
diff --git a/gnu/classpath/jdwp/processor/InterfaceTypeCommandSet.java b/gnu/classpath/jdwp/processor/InterfaceTypeCommandSet.java
index 5b29182ec..74e2f4c4d 100644
--- a/gnu/classpath/jdwp/processor/InterfaceTypeCommandSet.java
+++ b/gnu/classpath/jdwp/processor/InterfaceTypeCommandSet.java
@@ -47,7 +47,7 @@ import java.nio.ByteBuffer;
/**
* A class representing the InterfaceType Command Set.
- *
+ *
* @author Aaron Luchko <aluchko@redhat.com>
*/
public class InterfaceTypeCommandSet
@@ -56,7 +56,7 @@ public class InterfaceTypeCommandSet
/**
* There are no commands for this CommandSet at this time so we just throw a
* NotImplementedException whenever it's called.
- *
+ *
* @throws JdwpException An exception will always be thrown
*/
public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command)
diff --git a/gnu/classpath/jdwp/processor/MethodCommandSet.java b/gnu/classpath/jdwp/processor/MethodCommandSet.java
index 4d1bf7098..043be7cf0 100644
--- a/gnu/classpath/jdwp/processor/MethodCommandSet.java
+++ b/gnu/classpath/jdwp/processor/MethodCommandSet.java
@@ -54,7 +54,7 @@ import java.nio.ByteBuffer;
/**
* A class representing the Method Command Set.
- *
+ *
* @author Aaron Luchko <aluchko@redhat.com>
*/
public class MethodCommandSet
@@ -124,8 +124,8 @@ public class MethodCommandSet
{
if (!VMVirtualMachine.canGetBytecodes)
{
- String msg = "getting bytecodes is unsupported";
- throw new NotImplementedException(msg);
+ String msg = "getting bytecodes is unsupported";
+ throw new NotImplementedException(msg);
}
ReferenceTypeId id = idMan.readReferenceTypeId(bb);
diff --git a/gnu/classpath/jdwp/processor/ObjectReferenceCommandSet.java b/gnu/classpath/jdwp/processor/ObjectReferenceCommandSet.java
index 1a70b9c09..f6bf8a656 100644
--- a/gnu/classpath/jdwp/processor/ObjectReferenceCommandSet.java
+++ b/gnu/classpath/jdwp/processor/ObjectReferenceCommandSet.java
@@ -60,7 +60,7 @@ import java.nio.ByteBuffer;
/**
* A class representing the ObjectReference Command Set.
- *
+ *
* @author Aaron Luchko <aluchko@redhat.com>
*/
public class ObjectReferenceCommandSet
@@ -139,7 +139,7 @@ public class ObjectReferenceCommandSet
{
field.setAccessible(true); // Might be a private field
Object value = field.get(obj);
- Value val = ValueFactory.createFromObject(value,
+ Value val = ValueFactory.createFromObject(value,
field.getType());
val.writeTagged(os);
}
@@ -191,8 +191,8 @@ public class ObjectReferenceCommandSet
{
if (!VMVirtualMachine.canGetMonitorInfo)
{
- String msg = "getting monitor info not supported";
- throw new NotImplementedException(msg);
+ String msg = "getting monitor info not supported";
+ throw new NotImplementedException(msg);
}
ObjectId oid = idMan.readObjectId(bb);
@@ -223,8 +223,8 @@ public class ObjectReferenceCommandSet
int invokeOptions = bb.getInt();
MethodResult mr = VMVirtualMachine.executeMethod(obj, thread,
- clazz, method,
- values, invokeOptions);
+ clazz, method,
+ values, invokeOptions);
Throwable exception = mr.getThrownException();
ObjectId eId = idMan.getObjectId(exception);
mr.getReturnedValue().writeTagged(os);
diff --git a/gnu/classpath/jdwp/processor/PacketProcessor.java b/gnu/classpath/jdwp/processor/PacketProcessor.java
index 4df3f4728..c4818aed8 100644
--- a/gnu/classpath/jdwp/processor/PacketProcessor.java
+++ b/gnu/classpath/jdwp/processor/PacketProcessor.java
@@ -67,10 +67,10 @@ public class PacketProcessor
{
// The connection to the debugger
private JdwpConnection _connection;
-
+
// Shutdown this thread?
private boolean _shutdown;
-
+
// A Mapping of the command set (Byte) to the specific CommandSet
private CommandSet[] _sets;
@@ -79,7 +79,7 @@ public class PacketProcessor
// Output stream around _outputBytes
private DataOutputStream _os;
-
+
/**
* Constructs a new <code>PacketProcessor</code> object
* Connection must be validated before getting here!
@@ -90,8 +90,8 @@ public class PacketProcessor
{
_connection = con;
_shutdown = false;
-
- // MAXIMUM is the value of the largest command set we may receive
+
+ // MAXIMUM is the value of the largest command set we may receive
_sets = new CommandSet[JdwpConstants.CommandSet.MAXIMUM + 1];
_outputBytes = new ByteArrayOutputStream();
_os = new DataOutputStream (_outputBytes);
@@ -130,7 +130,7 @@ public class PacketProcessor
_sets[JdwpConstants.CommandSet.ClassObjectReference.CS_VALUE] =
new ClassObjectReferenceCommandSet();
}
-
+
/**
* Main run routine for this thread. Will loop getting packets
* from the connection and processing them.
@@ -140,7 +140,7 @@ public class PacketProcessor
// Notify initialization thread (gnu.classpath.jdwp.Jdwp) that
// the PacketProcessor thread is ready.
Jdwp.getDefault().subcomponentInitialized ();
-
+
try
{
while (!_shutdown)
@@ -156,7 +156,7 @@ public class PacketProcessor
Jdwp.getDefault().shutdown();
return null;
}
-
+
/**
* Shutdown the packet processor
*/
@@ -164,34 +164,34 @@ public class PacketProcessor
{
_shutdown = true;
}
-
+
// Helper function which actually does all the work of waiting
// for a packet and getting it processed.
private void _processOnePacket ()
throws IOException
{
JdwpPacket pkt = _connection.getPacket ();
-
+
if (!(pkt instanceof JdwpCommandPacket))
{
// We're not supposed to get these from the debugger!
// Drop it on the floor
return;
}
-
+
if (pkt != null)
{
JdwpCommandPacket commandPkt = (JdwpCommandPacket) pkt;
JdwpReplyPacket reply = new JdwpReplyPacket(commandPkt);
-
+
// Reset our output stream
_outputBytes.reset();
-
- // Create a ByteBuffer around the command packet
+
+ // Create a ByteBuffer around the command packet
ByteBuffer bb = ByteBuffer.wrap(commandPkt.getData());
byte command = commandPkt.getCommand();
byte commandSet = commandPkt.getCommandSet();
-
+
CommandSet set = null;
try
{
@@ -200,7 +200,7 @@ public class PacketProcessor
{
set = _sets[commandPkt.getCommandSet()];
}
- if (set != null)
+ if (set != null)
{
_shutdown = set.runCommand(bb, _os, command);
reply.setData(_outputBytes.toByteArray());
diff --git a/gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java b/gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java
index cde3fc24c..3489588df 100644
--- a/gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java
+++ b/gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java
@@ -60,7 +60,7 @@ import java.nio.ByteBuffer;
/**
* A class representing the ReferenceType Command Set.
- *
+ *
* @author Aaron Luchko <aluchko@redhat.com>
*/
public class ReferenceTypeCommandSet
@@ -219,7 +219,7 @@ public class ReferenceTypeCommandSet
{
field.setAccessible(true); // Might be a private field
Object value = field.get(null);
- Value val = ValueFactory.createFromObject(value,
+ Value val = ValueFactory.createFromObject(value,
field.getType());
val.writeTagged(os);
}
@@ -306,8 +306,8 @@ public class ReferenceTypeCommandSet
{
if (!VMVirtualMachine.canGetSourceDebugExtension)
{
- String msg = "source debug extension is not supported";
- throw new NotImplementedException(msg);
+ String msg = "source debug extension is not supported";
+ throw new NotImplementedException(msg);
}
ReferenceTypeId id = idMan.readReferenceTypeId(bb);
diff --git a/gnu/classpath/jdwp/processor/StackFrameCommandSet.java b/gnu/classpath/jdwp/processor/StackFrameCommandSet.java
index 2d90e8064..2b82e05ff 100644
--- a/gnu/classpath/jdwp/processor/StackFrameCommandSet.java
+++ b/gnu/classpath/jdwp/processor/StackFrameCommandSet.java
@@ -1,6 +1,6 @@
/* StackFrameCommandSet.java -- class to implement the StackFrame Command Set
Copyright (C) 2005, 2007 Free Software Foundation
-
+
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
@@ -56,7 +56,7 @@ import java.nio.ByteBuffer;
/**
* A class representing the StackFrame Command Set.
- *
+ *
* @author Aaron Luchko <aluchko@redhat.com>
*/
public class StackFrameCommandSet
@@ -83,7 +83,7 @@ public class StackFrameCommandSet
executePopFrames(bb, os);
break;
default:
- throw new NotImplementedException("Command " + command +
+ throw new NotImplementedException("Command " + command +
" not found in Stack Frame Command Set.");
}
}
@@ -158,8 +158,8 @@ public class StackFrameCommandSet
{
if (!VMVirtualMachine.canPopFrames)
{
- String msg = "popping frames is unsupported";
- throw new NotImplementedException(msg);
+ String msg = "popping frames is unsupported";
+ throw new NotImplementedException(msg);
}
ThreadId tid = (ThreadId) idMan.readObjectId(bb);
diff --git a/gnu/classpath/jdwp/processor/StringReferenceCommandSet.java b/gnu/classpath/jdwp/processor/StringReferenceCommandSet.java
index 13fde0ac7..6571bc8e2 100644
--- a/gnu/classpath/jdwp/processor/StringReferenceCommandSet.java
+++ b/gnu/classpath/jdwp/processor/StringReferenceCommandSet.java
@@ -1,7 +1,7 @@
/* StringReferenceCommandSet.java -- class to implement the StringReference
Command Set
Copyright (C) 2005 Free Software Foundation
-
+
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
@@ -53,7 +53,7 @@ import java.nio.ByteBuffer;
/**
* A class representing the StringReference Command Set.
- *
+ *
* @author Aaron Luchko <aluchko@redhat.com>
*/
public class StringReferenceCommandSet
diff --git a/gnu/classpath/jdwp/processor/ThreadGroupReferenceCommandSet.java b/gnu/classpath/jdwp/processor/ThreadGroupReferenceCommandSet.java
index 103199a2b..7682fa9bf 100644
--- a/gnu/classpath/jdwp/processor/ThreadGroupReferenceCommandSet.java
+++ b/gnu/classpath/jdwp/processor/ThreadGroupReferenceCommandSet.java
@@ -1,7 +1,7 @@
-/* ThreadGroupReferenceCommandSet.java -- class to implement the
+/* ThreadGroupReferenceCommandSet.java -- class to implement the
ThreadGroupReference Command Set
Copyright (C) 2005 Free Software Foundation
-
+
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
@@ -52,7 +52,7 @@ import java.nio.ByteBuffer;
/**
* A class representing the ThreadGroupReference Command Set.
- *
+ *
* @author Aaron Luchko <aluchko@redhat.com>
*/
public class ThreadGroupReferenceCommandSet
@@ -104,10 +104,10 @@ public class ThreadGroupReferenceCommandSet
ThreadGroup group = (ThreadGroup) oid.getObject();
ThreadGroup parent = group.getParent();
if (parent == null) {
- os.writeLong(0L);
+ os.writeLong(0L);
} else {
- ObjectId parentId = idMan.getObjectId(parent);
- parentId.write(os);
+ ObjectId parentId = idMan.getObjectId(parent);
+ parentId.write(os);
}
}
diff --git a/gnu/classpath/jdwp/processor/ThreadReferenceCommandSet.java b/gnu/classpath/jdwp/processor/ThreadReferenceCommandSet.java
index 6fbcf698f..2bbff44de 100644
--- a/gnu/classpath/jdwp/processor/ThreadReferenceCommandSet.java
+++ b/gnu/classpath/jdwp/processor/ThreadReferenceCommandSet.java
@@ -1,6 +1,6 @@
/* ThreadReferenceCommandSet.java -- class to implement the ThreadReference
Command Set Copyright (C) 2005, 2007 Free Software Foundation
-
+
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
@@ -57,7 +57,7 @@ import java.util.ArrayList;
/**
* A class representing the ThreadReference Command Set.
- *
+ *
* @author Aaron Luchko <aluchko@redhat.com>
*/
public class ThreadReferenceCommandSet
@@ -107,7 +107,7 @@ public class ThreadReferenceCommandSet
executeSuspendCount(bb, os);
break;
default:
- throw new NotImplementedException("Command " + command +
+ throw new NotImplementedException("Command " + command +
" not found in Thread Reference Command Set.");
}
}
@@ -202,8 +202,8 @@ public class ThreadReferenceCommandSet
{
if (!VMVirtualMachine.canGetOwnedMonitorInfo)
{
- String msg = "getting owned monitors is not supported";
- throw new NotImplementedException(msg);
+ String msg = "getting owned monitors is not supported";
+ throw new NotImplementedException(msg);
}
ThreadId tid = (ThreadId) idMan.readObjectId(bb);
@@ -213,8 +213,8 @@ public class ThreadReferenceCommandSet
os.write(monitors.length);
for (int i = 0; i < monitors.length; ++i)
{
- ObjectId id = idMan.getObjectId(monitors[i]);
- id.writeTagged(os);
+ ObjectId id = idMan.getObjectId(monitors[i]);
+ id.writeTagged(os);
}
}
@@ -224,8 +224,8 @@ public class ThreadReferenceCommandSet
{
if (!VMVirtualMachine.canGetCurrentContendedMonitor)
{
- String msg = "getting current contended monitor is not supported";
- throw new NotImplementedException(msg);
+ String msg = "getting current contended monitor is not supported";
+ throw new NotImplementedException(msg);
}
ThreadId tid = (ThreadId) idMan.readObjectId(bb);
diff --git a/gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java b/gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java
index b6e0cfeb8..c476a04e9 100644
--- a/gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java
+++ b/gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java
@@ -1,7 +1,7 @@
/* VirtualMachineCommandSet.java -- class to implement the VirtualMachine
Command Set
Copyright (C) 2005, 2006, 2007 Free Software Foundation
-
+
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
@@ -60,7 +60,7 @@ import java.util.Properties;
/**
* A class representing the VirtualMachine Command Set.
- *
+ *
* @author Aaron Luchko <aluchko@redhat.com>
*/
public class VirtualMachineCommandSet
@@ -103,7 +103,7 @@ public class VirtualMachineCommandSet
executeResume(bb, os);
break;
case JdwpConstants.CommandSet.VirtualMachine.EXIT:
- shutdown = true;
+ shutdown = true;
executeExit(bb, os);
break;
case JdwpConstants.CommandSet.VirtualMachine.CREATE_STRING:
@@ -321,7 +321,7 @@ public class VirtualMachineCommandSet
{
String string = JdwpString.readString(bb);
ObjectId stringId = idMan.getObjectId(string);
-
+
// Since this string isn't referenced anywhere we'll disable garbage
// collection on it so it's still around when the debugger gets back to it.
stringId.disableCollection();
@@ -404,8 +404,8 @@ public class VirtualMachineCommandSet
os.writeBoolean(VMVirtualMachine.canSetDefaultStratum);
for (int i = 15; i < CAPABILITIES_NEW_SIZE; i++)
{
- // Future capabilities (currently unused)
- os.writeBoolean(false);
+ // Future capabilities (currently unused)
+ os.writeBoolean(false);
}
}
@@ -414,8 +414,8 @@ public class VirtualMachineCommandSet
{
if (!VMVirtualMachine.canRedefineClasses)
{
- String msg = "redefinition of classes is not supported";
- throw new NotImplementedException(msg);
+ String msg = "redefinition of classes is not supported";
+ throw new NotImplementedException(msg);
}
int classes = bb.getInt();
@@ -423,12 +423,12 @@ public class VirtualMachineCommandSet
byte[][] bytecodes = new byte[classes][];
for (int i = 0; i < classes; ++i)
{
- ReferenceTypeId id = idMan.readReferenceTypeId(bb);
- int classfile = bb.getInt();
- byte[] bytecode = new byte[classfile];
- bb.get(bytecode);
- types[i] = id.getType();
- bytecodes[i] = bytecode;
+ ReferenceTypeId id = idMan.readReferenceTypeId(bb);
+ int classfile = bb.getInt();
+ byte[] bytecode = new byte[classfile];
+ bb.get(bytecode);
+ types[i] = id.getType();
+ bytecodes[i] = bytecode;
}
VMVirtualMachine.redefineClasses (types, bytecodes);
@@ -439,8 +439,8 @@ public class VirtualMachineCommandSet
{
if (!VMVirtualMachine.canSetDefaultStratum)
{
- String msg = "setting the default stratum is not supported";
- throw new NotImplementedException(msg);
+ String msg = "setting the default stratum is not supported";
+ throw new NotImplementedException(msg);
}
String stratum = JdwpString.readString(bb);
diff --git a/gnu/classpath/jdwp/transport/JdwpCommandPacket.java b/gnu/classpath/jdwp/transport/JdwpCommandPacket.java
index e99159aad..c565ee779 100644
--- a/gnu/classpath/jdwp/transport/JdwpCommandPacket.java
+++ b/gnu/classpath/jdwp/transport/JdwpCommandPacket.java
@@ -74,7 +74,7 @@ public class JdwpCommandPacket extends JdwpPacket
// Don't assign an id. This constructor is called by
// JdwpPacket.fromBytes, and that will assign a packet id.
}
-
+
/**
* Constructs a new <code>JdwpCommandPacket</code>
* with the given command set and command
@@ -109,7 +109,7 @@ public class JdwpCommandPacket extends JdwpPacket
* Sets the command set
*/
public void setCommandSet (byte cs)
- {
+ {
_commandSet = cs;
}
diff --git a/gnu/classpath/jdwp/transport/JdwpConnection.java b/gnu/classpath/jdwp/transport/JdwpConnection.java
index 44158aa26..3c91f048e 100644
--- a/gnu/classpath/jdwp/transport/JdwpConnection.java
+++ b/gnu/classpath/jdwp/transport/JdwpConnection.java
@@ -60,7 +60,7 @@ import java.util.Arrays;
* <p>This class is also a thread that is responsible for pulling
* packets off the wire and sticking them in a queue for packet
* processing threads.
- *
+ *
* @author Keith Seitz (keiths@redhat.com)
*/
public class JdwpConnection
@@ -68,7 +68,7 @@ public class JdwpConnection
{
// The JDWP handshake
private static final byte[] _HANDSHAKE = {'J', 'D', 'W', 'P', '-', 'H', 'a',
- 'n', 'd', 's', 'h', 'a', 'k', 'e'};
+ 'n', 'd', 's', 'h', 'a', 'k', 'e'};
// Transport method
private ITransport _transport;
@@ -121,13 +121,13 @@ public class JdwpConnection
// Do handshake
try
{
- _inStream = new DataInputStream (_transport.getInputStream ());
- _outStream = new DataOutputStream (_transport.getOutputStream ());
- _doHandshake ();
+ _inStream = new DataInputStream (_transport.getInputStream ());
+ _outStream = new DataOutputStream (_transport.getOutputStream ());
+ _doHandshake ();
}
catch (IOException ioe)
{
- throw new TransportException (ioe);
+ throw new TransportException (ioe);
}
}
@@ -147,13 +147,13 @@ public class JdwpConnection
if (Arrays.equals (hshake, _HANDSHAKE))
{
- // Send reply handshake
- _outStream.write (_HANDSHAKE, 0, _HANDSHAKE.length);
- return;
+ // Send reply handshake
+ _outStream.write (_HANDSHAKE, 0, _HANDSHAKE.length);
+ return;
}
else
{
- throw new IOException ("invalid JDWP handshake (\"" + hshake + "\")");
+ throw new IOException ("invalid JDWP handshake (\"" + hshake + "\")");
}
}
@@ -171,25 +171,25 @@ public class JdwpConnection
while (!_shutdown)
{
- try
- {
- _readOnePacket ();
- }
- catch (IOException ioe)
- {
- /* IOException can occur for two reasons:
- 1. Lost connection with the other side
- 2. Transport was shutdown
- In either case, we make sure that all of the
- back-end gets shutdown. */
- Jdwp.getDefault().shutdown ();
- }
- catch (Throwable t)
- {
- System.out.println ("JdwpConnection.run: caught an exception: "
- + t);
- // Just keep going
- }
+ try
+ {
+ _readOnePacket ();
+ }
+ catch (IOException ioe)
+ {
+ /* IOException can occur for two reasons:
+ 1. Lost connection with the other side
+ 2. Transport was shutdown
+ In either case, we make sure that all of the
+ back-end gets shutdown. */
+ Jdwp.getDefault().shutdown ();
+ }
+ catch (Throwable t)
+ {
+ System.out.println ("JdwpConnection.run: caught an exception: "
+ + t);
+ // Just keep going
+ }
}
}
@@ -204,8 +204,8 @@ public class JdwpConnection
int length = _inStream.readInt ();
if (length < 11)
{
- throw new IOException ("JDWP packet length < 11 ("
- + length + ")");
+ throw new IOException ("JDWP packet length < 11 ("
+ + length + ")");
}
data = new byte[length];
@@ -218,11 +218,11 @@ public class JdwpConnection
JdwpPacket packet = JdwpPacket.fromBytes (data);
if (packet != null)
{
- synchronized (_commandQueue)
- {
- _commandQueue.add (packet);
- _commandQueue.notifyAll ();
- }
+ synchronized (_commandQueue)
+ {
+ _commandQueue.add (packet);
+ _commandQueue.notifyAll ();
+ }
}
}
@@ -236,21 +236,21 @@ public class JdwpConnection
{
synchronized (_commandQueue)
{
- while (_commandQueue.isEmpty ())
- {
- try
- {
- _commandQueue.wait ();
- }
- catch (InterruptedException ie)
- {
- /* PacketProcessor is interrupted
- when shutting down */
- return null;
- }
- }
-
- return (JdwpPacket) _commandQueue.remove (0);
+ while (_commandQueue.isEmpty ())
+ {
+ try
+ {
+ _commandQueue.wait ();
+ }
+ catch (InterruptedException ie)
+ {
+ /* PacketProcessor is interrupted
+ when shutting down */
+ return null;
+ }
+ }
+
+ return (JdwpPacket) _commandQueue.remove (0);
}
}
@@ -277,16 +277,16 @@ public class JdwpConnection
* @throws IOException
*/
public void sendEvents(EventRequest[] requests, Event[] events,
- byte suspendPolicy)
+ byte suspendPolicy)
throws IOException
{
JdwpPacket pkt;
synchronized (_bytes)
{
- _bytes.reset ();
- pkt = Event.toPacket (_doStream, events, requests, suspendPolicy);
- pkt.setData (_bytes.toByteArray ());
+ _bytes.reset ();
+ pkt = Event.toPacket (_doStream, events, requests, suspendPolicy);
+ pkt.setData (_bytes.toByteArray ());
}
sendPacket (pkt);
@@ -299,9 +299,9 @@ public class JdwpConnection
{
if (!_shutdown)
{
- _transport.shutdown ();
- _shutdown = true;
- interrupt ();
+ _transport.shutdown ();
+ _shutdown = true;
+ interrupt ();
}
}
}
diff --git a/gnu/classpath/jdwp/transport/JdwpPacket.java b/gnu/classpath/jdwp/transport/JdwpPacket.java
index a3afe8421..b967d9bc5 100644
--- a/gnu/classpath/jdwp/transport/JdwpPacket.java
+++ b/gnu/classpath/jdwp/transport/JdwpPacket.java
@@ -113,7 +113,7 @@ public abstract class JdwpPacket
* Returns the packet id
*/
public int getId ()
- {
+ {
return _id;
}
@@ -121,7 +121,7 @@ public abstract class JdwpPacket
* Sets the packet id
*/
public void setId (int id)
- {
+ {
_id = id;
}
@@ -129,7 +129,7 @@ public abstract class JdwpPacket
* Returns the packet flags
*/
public byte getFlags ()
- {
+ {
return _flags;
}
@@ -137,7 +137,7 @@ public abstract class JdwpPacket
* Sets the packet flags
*/
public void setFlags (byte flags)
- {
+ {
_flags = flags;
}
@@ -145,7 +145,7 @@ public abstract class JdwpPacket
* Gets the command/reply-specific data in this packet
*/
public byte[] getData ()
- {
+ {
return _data;
}
@@ -153,7 +153,7 @@ public abstract class JdwpPacket
* Sets the command/reply-specific data in this packet
*/
public void setData (byte[] data)
- {
+ {
_data = data;
}
@@ -161,13 +161,13 @@ public abstract class JdwpPacket
* Returns the length of this entire packet
*/
public int getLength ()
- {
+ {
return MINIMUM_SIZE + (_data == null ? 0 : _data.length);
}
/**
* Allow subclasses to initialize from data
- *
+ *
* @param bytes packet data from the wire
* @param index index into <code>bytes</code> to start processing
* @return number of bytes in <code>bytes</code> processed
@@ -181,7 +181,7 @@ public abstract class JdwpPacket
*
* If the given data does not represent a valid JDWP packet, it returns
* <code>null</code>.
- *
+ *
* @param bytes packet data from the wire
* @return number of bytes in <code>bytes</code> processed
*/
@@ -195,48 +195,48 @@ public abstract class JdwpPacket
if (bytes.length == length)
{
- id = ((bytes[i++] & 0xff) << 24 | (bytes[i++] & 0xff) << 16
+ id = ((bytes[i++] & 0xff) << 24 | (bytes[i++] & 0xff) << 16
| (bytes[i++] & 0xff) << 8 | (bytes[i++] & 0xff));
- flags = bytes[i++];
-
- Class clazz = null;
- if (flags == 0)
- clazz = JdwpCommandPacket.class;
- else if ((flags & JDWP_FLAG_REPLY) != 0)
- clazz = JdwpReplyPacket.class;
- else
- {
- // Malformed packet. Discard it.
- return null;
- }
-
- JdwpPacket pkt = null;
- try
- {
- pkt = (JdwpPacket) clazz.newInstance ();
- }
- catch (InstantiationException ie)
- {
- // Discard packet
- return null;
- }
- catch (IllegalAccessException iae)
- {
- // Discard packet
- return null;
- }
-
- pkt.setId (id);
- pkt.setFlags (flags);
-
- i += pkt.myFromBytes (bytes, i);
- byte[] data = new byte[length - i];
- System.arraycopy (bytes, i, data, 0, data.length);
- pkt.setData (data);
-
- return pkt;
+ flags = bytes[i++];
+
+ Class clazz = null;
+ if (flags == 0)
+ clazz = JdwpCommandPacket.class;
+ else if ((flags & JDWP_FLAG_REPLY) != 0)
+ clazz = JdwpReplyPacket.class;
+ else
+ {
+ // Malformed packet. Discard it.
+ return null;
+ }
+
+ JdwpPacket pkt = null;
+ try
+ {
+ pkt = (JdwpPacket) clazz.newInstance ();
+ }
+ catch (InstantiationException ie)
+ {
+ // Discard packet
+ return null;
+ }
+ catch (IllegalAccessException iae)
+ {
+ // Discard packet
+ return null;
+ }
+
+ pkt.setId (id);
+ pkt.setFlags (flags);
+
+ i += pkt.myFromBytes (bytes, i);
+ byte[] data = new byte[length - i];
+ System.arraycopy (bytes, i, data, 0, data.length);
+ pkt.setData (data);
+
+ return pkt;
}
-
+
return null;
}
diff --git a/gnu/classpath/jdwp/transport/JdwpReplyPacket.java b/gnu/classpath/jdwp/transport/JdwpReplyPacket.java
index d060dec99..a8dc9978e 100644
--- a/gnu/classpath/jdwp/transport/JdwpReplyPacket.java
+++ b/gnu/classpath/jdwp/transport/JdwpReplyPacket.java
@@ -124,7 +124,7 @@ public class JdwpReplyPacket extends JdwpPacket
{
int i = 0;
setErrorCode ((short) ((bytes[index + i++] & 0xff) << 8
- | (bytes[index + i++] & 0xff)));
+ | (bytes[index + i++] & 0xff)));
return i;
}
diff --git a/gnu/classpath/jdwp/transport/SocketTransport.java b/gnu/classpath/jdwp/transport/SocketTransport.java
index 3b0a8e7fe..4872ba176 100644
--- a/gnu/classpath/jdwp/transport/SocketTransport.java
+++ b/gnu/classpath/jdwp/transport/SocketTransport.java
@@ -76,7 +76,7 @@ class SocketTransport
// Host name
private String _host;
-
+
// Are we acting as a server?
private boolean _server = false;
@@ -96,29 +96,29 @@ class SocketTransport
String p = (String) properties.get(_PROPERTY_SERVER);
if (p != null)
{
- if (p.toLowerCase().equals("y"))
- _server = true;
+ if (p.toLowerCase().equals("y"))
+ _server = true;
}
// Get address [form: "hostname:port"]
p = (String) properties.get(_PROPERTY_ADDRESS);
if (p != null)
{
- String[] s = p.split(":");
- if (s.length == 1)
- {
- // Port number only. Assume "localhost"
- _port = Integer.parseInt(s[0]);
- _host = "localhost";
- }
- else
- {
- if (s[0].length() == 0)
- _host = "localhost";
- else
- _host = s[0];
- _port = Integer.parseInt(s[1]);
- }
+ String[] s = p.split(":");
+ if (s.length == 1)
+ {
+ // Port number only. Assume "localhost"
+ _port = Integer.parseInt(s[0]);
+ _host = "localhost";
+ }
+ else
+ {
+ if (s[0].length() == 0)
+ _host = "localhost";
+ else
+ _host = s[0];
+ _port = Integer.parseInt(s[1]);
+ }
}
}
@@ -133,24 +133,24 @@ class SocketTransport
{
try
{
- if (_server)
- {
- // Get a server socket
- ServerSocketFactory ssf = ServerSocketFactory.getDefault ();
- ServerSocket ss = ssf.createServerSocket (_port, 1);
- _socket = ss.accept ();
- }
- else
- {
- // Get a client socket (the factory will connect it)
- SocketFactory sf = SocketFactory.getDefault ();
- _socket = sf.createSocket (_host, _port);
- }
+ if (_server)
+ {
+ // Get a server socket
+ ServerSocketFactory ssf = ServerSocketFactory.getDefault ();
+ ServerSocket ss = ssf.createServerSocket (_port, 1);
+ _socket = ss.accept ();
+ }
+ else
+ {
+ // Get a client socket (the factory will connect it)
+ SocketFactory sf = SocketFactory.getDefault ();
+ _socket = sf.createSocket (_host, _port);
+ }
}
catch (IOException ioe)
{
- // This will grab UnknownHostException, too.
- throw new TransportException (ioe);
+ // This will grab UnknownHostException, too.
+ throw new TransportException (ioe);
}
}
@@ -162,11 +162,11 @@ class SocketTransport
{
try
{
- _socket.close ();
+ _socket.close ();
}
catch (Throwable t)
{
- // We don't really care about errors at this point
+ // We don't really care about errors at this point
}
}
diff --git a/gnu/classpath/jdwp/transport/TransportFactory.java b/gnu/classpath/jdwp/transport/TransportFactory.java
index 480fb3629..681967b77 100644
--- a/gnu/classpath/jdwp/transport/TransportFactory.java
+++ b/gnu/classpath/jdwp/transport/TransportFactory.java
@@ -90,24 +90,24 @@ public class TransportFactory
for (int i = 0; i < _transportMethods.length; ++i)
{
- if (_transportMethods[i].name.equals (name))
- {
- try
- {
- ITransport t;
- t = (ITransport) _transportMethods[i].clazz.newInstance ();
- t.configure (properties);
- return t;
- }
- catch (TransportException te)
- {
- throw te;
- }
- catch (Exception e)
- {
- throw new TransportException (e);
- }
- }
+ if (_transportMethods[i].name.equals (name))
+ {
+ try
+ {
+ ITransport t;
+ t = (ITransport) _transportMethods[i].clazz.newInstance ();
+ t.configure (properties);
+ return t;
+ }
+ catch (TransportException te)
+ {
+ throw te;
+ }
+ catch (Exception e)
+ {
+ throw new TransportException (e);
+ }
+ }
}
throw new TransportException ("transport \"" + name + "\" not found");
diff --git a/gnu/classpath/jdwp/util/JdwpString.java b/gnu/classpath/jdwp/util/JdwpString.java
index e94700fe1..eca7060fd 100644
--- a/gnu/classpath/jdwp/util/JdwpString.java
+++ b/gnu/classpath/jdwp/util/JdwpString.java
@@ -1,13 +1,13 @@
/* JdwpString.java -- utility class to read and write jdwp strings
Copyright (C) 2005 Free Software Foundation
-
+
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
@@ -46,7 +46,7 @@ import java.nio.ByteBuffer;
/**
* A class to compute the JDWP representation of Strings.
- *
+ *
* @author Aaron Luchko <aluchko@redhat.com>
*/
public class JdwpString
@@ -54,7 +54,7 @@ public class JdwpString
/**
* Write this String to the outStream as a string understood by jdwp.
- *
+ *
* @param os write the String here
* @param string the String to write
* @throws IOException
@@ -70,7 +70,7 @@ public class JdwpString
/**
* Read a jdwp style string from the ByteBuffer.
- *
+ *
* @param bb contains the string
* @return the String that was read
* @throws JdwpInternalErrorException bb didn't contain a value UTF-8 string
diff --git a/gnu/classpath/jdwp/util/LineTable.java b/gnu/classpath/jdwp/util/LineTable.java
index 7078b17db..2307fa27e 100644
--- a/gnu/classpath/jdwp/util/LineTable.java
+++ b/gnu/classpath/jdwp/util/LineTable.java
@@ -44,7 +44,7 @@ import java.io.IOException;
/**
* A class representing a Line Table for a method.
- *
+ *
* @author Aaron Luchko <aluchko@redhat.com>
*/
public class LineTable
@@ -57,7 +57,7 @@ public class LineTable
/**
* Construct a line table with the given parameters.
- *
+ *
* @param start lowest code index for method, -1 if native
* @param end highest code index for method, -1 if native
* @param lineNum line numbers for in line tables
@@ -73,10 +73,10 @@ public class LineTable
this.lineNum = lineNum;
this.lineCI = lineCI;
}
-
+
/**
* Writes this line table to the given DataOutputStream.
- *
+ *
* @param os the stream to write it to
* @throws IOException
*/
diff --git a/gnu/classpath/jdwp/util/Location.java b/gnu/classpath/jdwp/util/Location.java
index ff045a5ec..6d8c2e7b9 100644
--- a/gnu/classpath/jdwp/util/Location.java
+++ b/gnu/classpath/jdwp/util/Location.java
@@ -49,7 +49,7 @@ import java.nio.ByteBuffer;
/**
* A class to read/write JDWP locations.
- *
+ *
* @author Aaron Luchko <aluchko@redhat.com>
*/
public class Location
@@ -59,7 +59,7 @@ public class Location
/**
* Create a location with the given parameters.
- *
+ *
* @param method the method
* @param index location in the method
*/
@@ -72,7 +72,7 @@ public class Location
/**
* Read a location from the given bytebuffer, consists of a TAG (byte),
* followed by a ReferenceTypeId, a MethodId and an index (long).
- *
+ *
* @param bb this holds the location
* @throws IOException when an error occurs reading from the buffer
* @throws JdwpException for invalid class or method IDs
@@ -81,7 +81,7 @@ public class Location
throws IOException, JdwpException
{
byte tag = bb.get();
- ClassReferenceTypeId classId =
+ ClassReferenceTypeId classId =
(ClassReferenceTypeId) VMIdManager.getDefault().readReferenceTypeId(bb);
Class klass = classId.getType();
method = VMMethod.readId(klass, bb);
@@ -90,19 +90,19 @@ public class Location
/**
* Write the given location to an output stream.
- *
+ *
* @param os stream to write to
* @throws IOException when an error occurs writing to the stream
*/
- public void write(DataOutputStream os)
+ public void write(DataOutputStream os)
throws IOException
{
// check if this is an empty location
if (method != null)
{
VMIdManager idm = VMIdManager.getDefault();
- ClassReferenceTypeId crti =
- (ClassReferenceTypeId)
+ ClassReferenceTypeId crti =
+ (ClassReferenceTypeId)
idm.getReferenceTypeId(method.getDeclaringClass());
crti.writeTagged(os);
@@ -117,20 +117,20 @@ public class Location
os.writeLong((long) 0);
}
}
-
+
/**
* Sets up an empty location
- *
+ *
* @return new Location (setup as empty)
*/
public static Location getEmptyLocation()
{
return new Location(null, 0);
}
-
+
/**
* Gets the method of this location
- *
+ *
* @return the method
*/
public VMMethod getMethod()
@@ -140,7 +140,7 @@ public class Location
/**
* Gets the code index of this location
- *
+ *
* @return the code index
*/
public long getIndex ()
@@ -158,9 +158,9 @@ public class Location
{
if (obj instanceof Location)
{
- Location l = (Location) obj;
- return (getMethod().equals(l.getMethod())
- && getIndex() == l.getIndex());
+ Location l = (Location) obj;
+ return (getMethod().equals(l.getMethod())
+ && getIndex() == l.getIndex());
}
return false;
diff --git a/gnu/classpath/jdwp/util/MethodResult.java b/gnu/classpath/jdwp/util/MethodResult.java
index bf3ee8ed5..76d8828f6 100644
--- a/gnu/classpath/jdwp/util/MethodResult.java
+++ b/gnu/classpath/jdwp/util/MethodResult.java
@@ -1,5 +1,5 @@
/* MethodResult.java -- class to wrap around values returned from a Method call
- in the VM
+ in the VM
Copyright (C) 2005, 2007 Free Software Foundation
This file is part of GNU Classpath.
@@ -44,17 +44,17 @@ import gnu.classpath.jdwp.value.Value;
/**
* A class to wrap around values returned from a Method call in the VM.
- *
+ *
* @author Aaron Luchko <aluchko@redhat.com>
*/
public class MethodResult
{
// The Object returned by the executing method
private Value returnedValue;
-
+
// Any Exception that was thrown by the executing method
private Throwable thrownException;
-
+
/**
* Constructs a new MethodResult object
*
diff --git a/gnu/classpath/jdwp/util/MonitorInfo.java b/gnu/classpath/jdwp/util/MonitorInfo.java
index f28eabf83..34c098da2 100644
--- a/gnu/classpath/jdwp/util/MonitorInfo.java
+++ b/gnu/classpath/jdwp/util/MonitorInfo.java
@@ -69,8 +69,8 @@ public class MonitorInfo
os.write(waiters.length);
for (int i = 0; i < waiters.length; ++i)
{
- id = idm.getObjectId(waiters[i]);
- id.write(os);
+ id = idm.getObjectId(waiters[i]);
+ id.write(os);
}
}
}
diff --git a/gnu/classpath/jdwp/util/Signature.java b/gnu/classpath/jdwp/util/Signature.java
index e7453bf01..3d192e897 100644
--- a/gnu/classpath/jdwp/util/Signature.java
+++ b/gnu/classpath/jdwp/util/Signature.java
@@ -89,17 +89,17 @@ public class Signature
public static String computeMethodSignature (Method method)
{
return _computeSignature (method.getReturnType (),
- method.getParameterTypes ());
+ method.getParameterTypes ());
}
private static String _computeSignature (Class returnType,
- Class[] paramTypes)
+ Class[] paramTypes)
{
CPStringBuilder sb = new CPStringBuilder ("(");
if (paramTypes != null)
{
- for (int i = 0; i < paramTypes.length; ++i)
- _addToSignature (sb, paramTypes[i]);
+ for (int i = 0; i < paramTypes.length; ++i)
+ _addToSignature (sb, paramTypes[i]);
}
sb.append (")");
_addToSignature (sb, returnType);
@@ -132,7 +132,7 @@ public class Signature
sb.append('J');
return;
}
-
+
String name = k.getName ();
int len = name.length ();
sb.ensureCapacity (len);
@@ -140,10 +140,10 @@ public class Signature
sb.append('L');
for (int i = 0; i < len; ++i)
{
- char c = name.charAt (i);
- if (c == '.')
- c = '/';
- sb.append (c);
+ char c = name.charAt (i);
+ if (c == '.')
+ c = '/';
+ sb.append (c);
}
if (! k.isArray ())
sb.append(';');
diff --git a/gnu/classpath/jdwp/util/VariableTable.java b/gnu/classpath/jdwp/util/VariableTable.java
index 9732422f5..8cbb299c2 100644
--- a/gnu/classpath/jdwp/util/VariableTable.java
+++ b/gnu/classpath/jdwp/util/VariableTable.java
@@ -44,7 +44,7 @@ import java.io.IOException;
/**
* A class representing a Variable Table for a method.
- *
+ *
* @author Aaron Luchko <aluchko@redhat.com>
*/
public class VariableTable
@@ -66,7 +66,7 @@ public class VariableTable
/**
* Make a new variable table with the given values.
- *
+ *
* @param argCnt number of words used by arguments in this frame
* @param slots number of variables
* @param lineCI first code index of given variable (size slots)
@@ -89,7 +89,7 @@ public class VariableTable
/**
* Writes this line table to the given DataOutputStream.
- *
+ *
* @param os the stream to write it to
* @throws IOException
*/
diff --git a/gnu/classpath/jdwp/value/ArrayValue.java b/gnu/classpath/jdwp/value/ArrayValue.java
index 66e7c4e32..69b1ebd2a 100644
--- a/gnu/classpath/jdwp/value/ArrayValue.java
+++ b/gnu/classpath/jdwp/value/ArrayValue.java
@@ -46,7 +46,7 @@ import java.io.IOException;
/**
* Wrapper for an Array value.
- *
+ *
* @author Kyle Galloway <kgallowa@redhat.com>
*/
public class ArrayValue
@@ -57,7 +57,7 @@ public class ArrayValue
/**
* Create a new ArrayValue from an Object
- *
+ *
* @param value the Object to wrap
*/
public ArrayValue(Object value)
@@ -65,10 +65,10 @@ public class ArrayValue
super(JdwpConstants.Tag.ARRAY);
_value = value;
}
-
+
/**
* Return an object representing this type
- *
+ *
* @return an Object represntation of this value
*/
@Override
@@ -79,7 +79,7 @@ public class ArrayValue
/**
* Write the wrapped object to the given DataOutputStream.
- *
+ *
* @param os the output stream to write to
*/
@Override
diff --git a/gnu/classpath/jdwp/value/BooleanValue.java b/gnu/classpath/jdwp/value/BooleanValue.java
index 42bb806fa..1ae5b4dee 100644
--- a/gnu/classpath/jdwp/value/BooleanValue.java
+++ b/gnu/classpath/jdwp/value/BooleanValue.java
@@ -44,7 +44,7 @@ import java.io.IOException;
/**
* Wrapper for an boolean value.
- *
+ *
* @author Kyle Galloway <kgallowa@redhat.com>
*/
public final class BooleanValue
@@ -55,7 +55,7 @@ public final class BooleanValue
/**
* Create a new BooleanValue from an boolean
- *
+ *
* @param value the boolean to wrap
*/
public BooleanValue(boolean value)
@@ -63,20 +63,20 @@ public final class BooleanValue
super(JdwpConstants.Tag.BOOLEAN);
_value = value;
}
-
+
/**
* Get the value held in this Value
- *
+ *
* @return the value represented by this Value object
*/
public boolean getValue()
{
return _value;
}
-
+
/**
* Return an object representing this type
- *
+ *
* @return an Object represntation of this value
*/
@Override
@@ -87,7 +87,7 @@ public final class BooleanValue
/**
* Write the wrapped boolean to the given DataOutputStream.
- *
+ *
* @param os the output stream to write to
*/
@Override
@@ -97,4 +97,3 @@ public final class BooleanValue
os.writeBoolean(_value);
}
}
-
diff --git a/gnu/classpath/jdwp/value/ByteValue.java b/gnu/classpath/jdwp/value/ByteValue.java
index 204fe86b0..64de0dc88 100644
--- a/gnu/classpath/jdwp/value/ByteValue.java
+++ b/gnu/classpath/jdwp/value/ByteValue.java
@@ -44,7 +44,7 @@ import java.io.IOException;
/**
* Wrapper for an byte value.
- *
+ *
* @author Kyle Galloway <kgallowa@redhat.com>
*/
public final class ByteValue
@@ -55,7 +55,7 @@ public final class ByteValue
/**
* Create a new ByteValue from an byte
- *
+ *
* @param value the byte to wrap
*/
public ByteValue(byte value)
@@ -63,20 +63,20 @@ public final class ByteValue
super(JdwpConstants.Tag.BYTE);
_value = value;
}
-
+
/**
* Get the value held in this Value
- *
+ *
* @return the value represented by this Value object
*/
public byte getValue()
{
return _value;
}
-
+
/**
* Return an object representing this type
- *
+ *
* @return an Object represntation of this value
*/
@Override
@@ -87,7 +87,7 @@ public final class ByteValue
/**
* Write the wrapped byte to the given DataOutputStream.
- *
+ *
* @param os the output stream to write to
*/
@Override
diff --git a/gnu/classpath/jdwp/value/CharValue.java b/gnu/classpath/jdwp/value/CharValue.java
index f68fc88d1..3781065a6 100644
--- a/gnu/classpath/jdwp/value/CharValue.java
+++ b/gnu/classpath/jdwp/value/CharValue.java
@@ -44,7 +44,7 @@ import java.io.IOException;
/**
* Wrapper for an char value.
- *
+ *
* @author Kyle Galloway <kgallowa@redhat.com>
*/
public final class CharValue
@@ -55,7 +55,7 @@ public final class CharValue
/**
* Create a new CharValue from an char
- *
+ *
* @param value the char to wrap
*/
public CharValue(char value)
@@ -63,20 +63,20 @@ public final class CharValue
super(JdwpConstants.Tag.CHAR);
_value = value;
}
-
+
/**
* Get the value held in this Value
- *
+ *
* @return the value represented by this Value object
*/
public char getValue()
{
return _value;
}
-
+
/**
* Return an object representing this type
- *
+ *
* @return an Object represntation of this value
*/
@Override
@@ -87,7 +87,7 @@ public final class CharValue
/**
* Write the wrapped char to the given DataOutputStream.
- *
+ *
* @param os the output stream to write to
*/
@Override
@@ -97,4 +97,3 @@ public final class CharValue
os.writeChar(_value);
}
}
-
diff --git a/gnu/classpath/jdwp/value/DoubleValue.java b/gnu/classpath/jdwp/value/DoubleValue.java
index 45923c4da..1c9a8714d 100644
--- a/gnu/classpath/jdwp/value/DoubleValue.java
+++ b/gnu/classpath/jdwp/value/DoubleValue.java
@@ -44,7 +44,7 @@ import java.io.IOException;
/**
* Wrapper for an double value.
- *
+ *
* @author Kyle Galloway <kgallowa@redhat.com>
*/
public final class DoubleValue
@@ -55,7 +55,7 @@ public final class DoubleValue
/**
* Create a new DoubleValue from an double
- *
+ *
* @param value the double to wrap
*/
public DoubleValue(double value)
@@ -63,20 +63,20 @@ public final class DoubleValue
super(JdwpConstants.Tag.DOUBLE);
_value = value;
}
-
+
/**
* Get the value held in this Value
- *
+ *
* @return the value represented by this Value object
*/
public double getValue()
{
return _value;
}
-
+
/**
* Return an object representing this type
- *
+ *
* @return an Object represntation of this value
*/
@Override
@@ -87,7 +87,7 @@ public final class DoubleValue
/**
* Write the wrapped double to the given DataOutputStream.
- *
+ *
* @param os the output stream to write to
*/
@Override
@@ -97,4 +97,3 @@ public final class DoubleValue
os.writeDouble(_value);
}
}
-
diff --git a/gnu/classpath/jdwp/value/FloatValue.java b/gnu/classpath/jdwp/value/FloatValue.java
index 970f77c07..ffd79f660 100644
--- a/gnu/classpath/jdwp/value/FloatValue.java
+++ b/gnu/classpath/jdwp/value/FloatValue.java
@@ -44,7 +44,7 @@ import java.io.IOException;
/**
* Wrapper for an float value.
- *
+ *
* @author Kyle Galloway <kgallowa@redhat.com>
*/
public final class FloatValue
@@ -55,7 +55,7 @@ public final class FloatValue
/**
* Create a new FloatValue from an float
- *
+ *
* @param value the float to wrap
*/
public FloatValue(float value)
@@ -63,20 +63,20 @@ public final class FloatValue
super(JdwpConstants.Tag.FLOAT);
_value = value;
}
-
+
/**
* Get the value held in this Value
- *
+ *
* @return the value represented by this Value object
*/
public float getValue()
{
return _value;
}
-
+
/**
* Return an object representing this type
- *
+ *
* @return an Object represntation of this value
*/
@Override
@@ -87,7 +87,7 @@ public final class FloatValue
/**
* Write the wrapped float to the given DataOutputStream.
- *
+ *
* @param os the output stream to write to
*/
@Override
@@ -97,4 +97,3 @@ public final class FloatValue
os.writeFloat(_value);
}
}
-
diff --git a/gnu/classpath/jdwp/value/IntValue.java b/gnu/classpath/jdwp/value/IntValue.java
index 27868754f..b1a07fd1e 100644
--- a/gnu/classpath/jdwp/value/IntValue.java
+++ b/gnu/classpath/jdwp/value/IntValue.java
@@ -44,7 +44,7 @@ import java.io.IOException;
/**
* Wrapper for an int value.
- *
+ *
* @author Kyle Galloway <kgallowa@redhat.com>
*/
public final class IntValue
@@ -55,7 +55,7 @@ public final class IntValue
/**
* Create a new IntValue from an int
- *
+ *
* @param value the int to wrap
*/
public IntValue(int value)
@@ -63,20 +63,20 @@ public final class IntValue
super(JdwpConstants.Tag.INT);
_value = value;
}
-
+
/**
* Get the value held in this Value
- *
+ *
* @return the value represented by this Value object
*/
public int getValue()
{
return _value;
}
-
+
/**
* Return an object representing this type
- *
+ *
* @return an Object represntation of this value
*/
@Override
@@ -87,7 +87,7 @@ public final class IntValue
/**
* Write the wrapped int to the given DataOutputStream.
- *
+ *
* @param os the output stream to write to
*/
@Override
@@ -97,4 +97,3 @@ public final class IntValue
os.writeInt(_value);
}
}
-
diff --git a/gnu/classpath/jdwp/value/LongValue.java b/gnu/classpath/jdwp/value/LongValue.java
index 0ebe0e9f9..748311708 100644
--- a/gnu/classpath/jdwp/value/LongValue.java
+++ b/gnu/classpath/jdwp/value/LongValue.java
@@ -44,7 +44,7 @@ import java.io.IOException;
/**
* Wrapper for an long value.
- *
+ *
* @author Kyle Galloway <kgallowa@redhat.com>
*/
public final class LongValue
@@ -55,7 +55,7 @@ public final class LongValue
/**
* Create a new LongValue from an long
- *
+ *
* @param value the long to wrap
*/
public LongValue(long value)
@@ -63,20 +63,20 @@ public final class LongValue
super(JdwpConstants.Tag.LONG);
_value = value;
}
-
+
/**
* Get the value held in this Value
- *
+ *
* @return the value represented by this Value object
*/
public long getValue()
{
return _value;
}
-
+
/**
* Return an object representing this type
- *
+ *
* @return an Object represntation of this value
*/
@Override
@@ -87,7 +87,7 @@ public final class LongValue
/**
* Write the wrapped long to the given DataOutputStream.
- *
+ *
* @param os the output stream to write to
*/
@Override
@@ -97,4 +97,3 @@ public final class LongValue
os.writeLong(_value);
}
}
-
diff --git a/gnu/classpath/jdwp/value/ObjectValue.java b/gnu/classpath/jdwp/value/ObjectValue.java
index b5cdb1f9e..d7dc7dae9 100644
--- a/gnu/classpath/jdwp/value/ObjectValue.java
+++ b/gnu/classpath/jdwp/value/ObjectValue.java
@@ -46,7 +46,7 @@ import java.io.IOException;
/**
* Wrapper for an Object value.
- *
+ *
* @author Kyle Galloway <kgallowa@redhat.com>
*/
public final class ObjectValue
@@ -57,7 +57,7 @@ public final class ObjectValue
/**
* Create a new ObjectValue from an Object
- *
+ *
* @param value the Object to wrap
*/
public ObjectValue(Object value)
@@ -65,10 +65,10 @@ public final class ObjectValue
super(JdwpConstants.Tag.OBJECT);
_value = value;
}
-
+
/**
* Get the value held in this Value
- *
+ *
* @return the value represented by this Value object
*/
public Object getValue()
@@ -78,7 +78,7 @@ public final class ObjectValue
/**
* Return an object representing this type
- *
+ *
* @return an Object represntation of this value
*/
@Override
@@ -89,7 +89,7 @@ public final class ObjectValue
/**
* Write the wrapped object to the given DataOutputStream.
- *
+ *
* @param os the output stream to write to
*/
@Override
diff --git a/gnu/classpath/jdwp/value/ShortValue.java b/gnu/classpath/jdwp/value/ShortValue.java
index cbde2269e..16fae4759 100644
--- a/gnu/classpath/jdwp/value/ShortValue.java
+++ b/gnu/classpath/jdwp/value/ShortValue.java
@@ -44,7 +44,7 @@ import java.io.IOException;
/**
* Wrapper for an short value.
- *
+ *
* @author Kyle Galloway <kgallowa@redhat.com>
*/
public final class ShortValue
@@ -55,7 +55,7 @@ public final class ShortValue
/**
* Create a new ShortValue from a short
- *
+ *
* @param value the short to wrap
*/
public ShortValue(short value)
@@ -63,20 +63,20 @@ public final class ShortValue
super(JdwpConstants.Tag.SHORT);
_value = value;
}
-
+
/**
* Get the value held in this Value
- *
+ *
* @return the value represented by this Value object
*/
public short getValue()
{
return _value;
}
-
+
/**
* Return an object representing this type
- *
+ *
* @return an Object represntation of this value
*/
@Override
@@ -87,7 +87,7 @@ public final class ShortValue
/**
* Write the wrapped short to the given DataOutputStream.
- *
+ *
* @param os the output stream to write to
*/
@Override
@@ -97,4 +97,3 @@ public final class ShortValue
os.writeShort(_value);
}
}
-
diff --git a/gnu/classpath/jdwp/value/StringValue.java b/gnu/classpath/jdwp/value/StringValue.java
index 1a7d0328d..f64661f9f 100644
--- a/gnu/classpath/jdwp/value/StringValue.java
+++ b/gnu/classpath/jdwp/value/StringValue.java
@@ -46,7 +46,7 @@ import java.io.IOException;
/**
* Wrapper for an String value.
- *
+ *
* @author Kyle Galloway <kgallowa@redhat.com>
*/
public final class StringValue
@@ -57,7 +57,7 @@ public final class StringValue
/**
* Create a new StringValue from an String
- *
+ *
* @param value the String to wrap
*/
public StringValue(String value)
@@ -65,20 +65,20 @@ public final class StringValue
super(JdwpConstants.Tag.STRING);
_value = value;
}
-
+
/**
* Get the value held in this Value
- *
+ *
* @return the value represented by this Value object
*/
public String getValue()
{
return _value;
}
-
+
/**
* Return an object representing this type
- *
+ *
* @return an Object represntation of this value
*/
@Override
@@ -89,7 +89,7 @@ public final class StringValue
/**
* Write the wrapped object to the given DataOutputStream.
- *
+ *
* @param os the output stream to write to
*/
@Override
diff --git a/gnu/classpath/jdwp/value/Value.java b/gnu/classpath/jdwp/value/Value.java
index 4ad8bec07..39f1c9cce 100644
--- a/gnu/classpath/jdwp/value/Value.java
+++ b/gnu/classpath/jdwp/value/Value.java
@@ -49,50 +49,50 @@ import java.nio.ByteBuffer;
/**
* Superclass for all JDWP Values.
- *
+ *
* @author Kyle Galloway <kgallowa@redhat.com>
*/
public abstract class Value
{
// A Tag representing the type of this value
private byte _tag;
-
+
/**
* Create a new value of type tag.
- *
+ *
* @param tag the type of the value
- */
+ */
protected Value(byte tag)
{
_tag = tag;
}
-
+
/**
* Get the tag for this Value
- *
+ *
* @return the byte tag of this Value
*/
public byte getTag()
{
return _tag;
}
-
+
/**
- * Calls the dervied classes writeValue method to write its value to the
+ * Calls the dervied classes writeValue method to write its value to the
* DataOutputStream.
- *
+ *
* @param os write the value here
* @throws IOException
- */
+ */
public void writeUntagged(DataOutputStream os)
throws IOException
{
write(os);
}
-
+
/**
* Will write the given object as a tagged value to the DataOutputStream.
- *
+ *
* @param os write the value here
* @param obj the Object to write
* @throws IOException
@@ -103,27 +103,27 @@ public abstract class Value
os.write (_tag);
write(os);
}
-
+
/**
* This method must write the value to the DataOutputStream in a manner
* appropriate for the type of the value.
- *
+ *
* @param os DataOutputStream to write to
* @throws IOException
*/
protected abstract void write(DataOutputStream os)
throws IOException;
-
+
/**
* Returns an object representing this type
- *
+ *
* @return an Object represntation of this value
*/
protected abstract Object getObject();
-
+
/**
* Get an untagged object from the ByteBuffer
- *
+ *
* @param bb the ByteBuffer to extract the value from
* @param type a Class representing the type
* @return an Object from the ByteBuffer of the type of the Class parameter
@@ -136,10 +136,10 @@ public abstract class Value
Value val = ValueFactory.createFromUntagged(bb, type);
return val.getObject();
}
-
+
/**
* Get an untagged object from the ByteBuffer
- *
+ *
* @param bb the ByteBuffer to extract the value from
* @param tag a byte tag representing the type
* @return an Object from the ByteBuffer of the type of the Class parameter
diff --git a/gnu/classpath/jdwp/value/ValueFactory.java b/gnu/classpath/jdwp/value/ValueFactory.java
index 8f1a8780e..ee7ddfae1 100644
--- a/gnu/classpath/jdwp/value/ValueFactory.java
+++ b/gnu/classpath/jdwp/value/ValueFactory.java
@@ -50,7 +50,7 @@ import java.nio.ByteBuffer;
/**
* A factory to create JDWP Values.
- *
+ *
* @author Kyle Galloway <kgallowa@redhat.com>
*/
public class ValueFactory
@@ -58,7 +58,7 @@ public class ValueFactory
/**
* Creates a new Value of appropriate type for the value in the ByteBuffer
* by reading the tag byte from the front of the buffer.
- *
+ *
* @param bb contains the Object
* @return A new Value of appropriate type
* @throws JdwpInternalErrorException
@@ -69,11 +69,11 @@ public class ValueFactory
{
return create(bb, bb.get());
}
-
+
/**
* Creates a new Value of appropriate type for the value in the ByteBuffer
* by checking the type of the Class passed in.
- *
+ *
* @param bb contains the Object
* @param type a Class representing the type of the value in the ByteBuffer
* @return A new Value of appropriate type
@@ -84,7 +84,7 @@ public class ValueFactory
throws JdwpInternalErrorException, InvalidObjectException, InvalidClassException
{
byte tag = getTagForClass(type);
-
+
try
{
return create(bb, tag);
@@ -94,10 +94,10 @@ public class ValueFactory
throw new InvalidClassException(ite);
}
}
-
+
/**
* Creates a new Value of appropriate type for the value in the ByteBuffer.
- *
+ *
* @param bb contains the Object
* @param tag a byte representing the type of the object
* @return A new Value of appropriate type
@@ -152,13 +152,13 @@ public class ValueFactory
default:
throw new InvalidTagException(tag);
}
-
+
return val;
}
-
+
/**
* Creates a tag for the type of the class.
- *
+ *
* @param klass the type to get a tag for
* @return a byte tag representing the class
* @throws JdwpInternalErrorException
@@ -168,7 +168,7 @@ public class ValueFactory
throws JdwpInternalErrorException
{
byte tag;
-
+
if (klass.isPrimitive())
{
if (klass == byte.class)
@@ -196,15 +196,15 @@ public class ValueFactory
{
tag = JdwpConstants.Tag.OBJECT;
}
-
+
return tag;
}
-
+
/**
* Create a value type for an Object of type determined by a Class. This is
* a special case where a value needs to be created, but the value to create
* it for is already in an object, not in a buffer.
- *
+ *
* @param value the Object to convert to a Value
* @param type the Class type of the object
* @return a new Value representing this object
@@ -212,7 +212,7 @@ public class ValueFactory
public static Value createFromObject(Object value, Class type)
{
Value val = null;
-
+
if (type.isPrimitive())
{
if (type == byte.class)
@@ -241,7 +241,7 @@ public class ValueFactory
else
val = new ObjectValue(value);
}
-
+
return val;
}
}
diff --git a/gnu/classpath/jdwp/value/VoidValue.java b/gnu/classpath/jdwp/value/VoidValue.java
index 82cded929..ae117347d 100644
--- a/gnu/classpath/jdwp/value/VoidValue.java
+++ b/gnu/classpath/jdwp/value/VoidValue.java
@@ -44,7 +44,7 @@ import java.io.IOException;
/**
* Wrapper for an void value.
- *
+ *
* @author Kyle Galloway <kgallowa@redhat.com>
*/
public class VoidValue
@@ -57,10 +57,10 @@ public class VoidValue
{
super(JdwpConstants.Tag.VOID);
}
-
+
/**
* Return an object representing this type
- *
+ *
* @return an Object represntation of this value
*/
@Override
@@ -71,11 +71,11 @@ public class VoidValue
/**
* Write the wrapped void to the given DataOutputStream.
- *
+ *
* @param os the output stream to write to
*/
@Override
- protected void write(DataOutputStream os)
+ protected void write(DataOutputStream os)
throws IOException
{
}
diff --git a/gnu/classpath/toolkit/DefaultDaemonThreadFactory.java b/gnu/classpath/toolkit/DefaultDaemonThreadFactory.java
index cb56c7641..29fc0ffd7 100644
--- a/gnu/classpath/toolkit/DefaultDaemonThreadFactory.java
+++ b/gnu/classpath/toolkit/DefaultDaemonThreadFactory.java
@@ -1,5 +1,5 @@
/* DefaultDaemonThreadFactory.java -- Factory for Deamon Threads.
-
+
Copyright (C) 2007 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -45,7 +45,7 @@ import java.util.concurrent.ThreadFactory;;
* Create a new thread using all the default settings as returned by
* <code>Executors.defaultThreadFactory()</code> plus calling
* <code>thread.setDaemon(true)</code> on the newly created thread.
- *
+ *
* @author Mario Torre <neugens@limasoftware.net>
*/
public class DefaultDaemonThreadFactory implements ThreadFactory
diff --git a/gnu/java/awt/AWTUtilities.java b/gnu/java/awt/AWTUtilities.java
index dcebc67fa..1b308cef4 100644
--- a/gnu/java/awt/AWTUtilities.java
+++ b/gnu/java/awt/AWTUtilities.java
@@ -57,7 +57,7 @@ import java.util.WeakHashMap;
import java.lang.reflect.InvocationTargetException;
/**
- * This class mirrors the javax.swing.SwingUtilities class. It
+ * This class mirrors the javax.swing.SwingUtilities class. It
* provides commonly needed functionalities for AWT classes without
* the need to reference classes in the javax.swing package.
*/
@@ -91,13 +91,13 @@ public class AWTUtilities
*/
VisibleComponentIterator(int listIndex)
{
- this.listIndex = listIndex;
- int visibleComponentsFound = 0;
- for (index = 0; visibleComponentsFound != listIndex; index++)
- {
- if (components[index].isVisible())
- visibleComponentsFound++;
- }
+ this.listIndex = listIndex;
+ int visibleComponentsFound = 0;
+ for (index = 0; visibleComponentsFound != listIndex; index++)
+ {
+ if (components[index].isVisible())
+ visibleComponentsFound++;
+ }
}
/**
@@ -109,16 +109,16 @@ public class AWTUtilities
*/
public boolean hasNext()
{
- boolean hasNext = false;
- for (int i = index; i < components.length; i++)
- {
- if (components[i].isVisible())
- {
- hasNext = true;
- break;
- }
- }
- return hasNext;
+ boolean hasNext = false;
+ for (int i = index; i < components.length; i++)
+ {
+ if (components[i].isVisible())
+ {
+ hasNext = true;
+ break;
+ }
+ }
+ return hasNext;
}
/**
@@ -130,23 +130,23 @@ public class AWTUtilities
*/
public Object next()
{
- Object o = null;
- for (; index < components.length; index++)
- {
- if (components[index].isVisible())
- {
- o = components[index];
- break;
- }
- }
- if (o != null)
- {
- index++;
- listIndex++;
- return o;
- }
- else
- throw new NoSuchElementException();
+ Object o = null;
+ for (; index < components.length; index++)
+ {
+ if (components[index].isVisible())
+ {
+ o = components[index];
+ break;
+ }
+ }
+ if (o != null)
+ {
+ index++;
+ listIndex++;
+ return o;
+ }
+ else
+ throw new NoSuchElementException();
}
/**
@@ -158,16 +158,16 @@ public class AWTUtilities
*/
public boolean hasPrevious()
{
- boolean hasPrevious = false;
- for (int i = index - 1; i >= 0; i--)
- {
- if (components[i].isVisible())
- {
- hasPrevious = true;
- break;
- }
- }
- return hasPrevious;
+ boolean hasPrevious = false;
+ for (int i = index - 1; i >= 0; i--)
+ {
+ if (components[i].isVisible())
+ {
+ hasPrevious = true;
+ break;
+ }
+ }
+ return hasPrevious;
}
/**
@@ -179,22 +179,22 @@ public class AWTUtilities
*/
public Object previous()
{
- Object o = null;
- for (index--; index >= 0; index--)
- {
- if (components[index].isVisible())
- {
- o = components[index];
- break;
- }
- }
- if (o != null)
- {
- listIndex--;
- return o;
- }
- else
- throw new NoSuchElementException();
+ Object o = null;
+ for (index--; index >= 0; index--)
+ {
+ if (components[index].isVisible())
+ {
+ o = components[index];
+ break;
+ }
+ }
+ if (o != null)
+ {
+ listIndex--;
+ return o;
+ }
+ else
+ throw new NoSuchElementException();
}
/**
@@ -204,7 +204,7 @@ public class AWTUtilities
*/
public int nextIndex()
{
- return listIndex + 1;
+ return listIndex + 1;
}
/**
@@ -214,7 +214,7 @@ public class AWTUtilities
*/
public int previousIndex()
{
- return listIndex - 1;
+ return listIndex - 1;
}
/**
@@ -224,8 +224,8 @@ public class AWTUtilities
*/
public void remove()
{
- throw new UnsupportedOperationException
- ("VisibleComponentList is immutable");
+ throw new UnsupportedOperationException
+ ("VisibleComponentList is immutable");
}
/**
@@ -237,8 +237,8 @@ public class AWTUtilities
*/
public void set(Object o)
{
- throw new UnsupportedOperationException
- ("VisibleComponentList is immutable");
+ throw new UnsupportedOperationException
+ ("VisibleComponentList is immutable");
}
/**
@@ -250,8 +250,8 @@ public class AWTUtilities
*/
public void add(Object o)
{
- throw new UnsupportedOperationException
- ("VisibleComponentList is immutable");
+ throw new UnsupportedOperationException
+ ("VisibleComponentList is immutable");
}
}
@@ -291,8 +291,8 @@ public class AWTUtilities
{
int visibleComponents = 0;
for (int i = 0; i < components.length; i++)
- if (components[i].isVisible())
- visibleComponents++;
+ if (components[i].isVisible())
+ visibleComponents++;
return visibleComponents;
}
}
@@ -322,8 +322,8 @@ public class AWTUtilities
VisibleComponentList visibleChildren = null;
if (o == null)
{
- visibleChildren = new VisibleComponentList(children);
- visibleChildrenCache.put(children, visibleChildren);
+ visibleChildren = new VisibleComponentList(children);
+ visibleChildrenCache.put(children, visibleChildren);
}
else
visibleChildren = (VisibleComponentList) o;
@@ -419,8 +419,8 @@ public class AWTUtilities
*
* @see #getAncestorOfClass
* @see #windowForComponent
- * @see
- *
+ * @see
+ *
*/
public static Container getAncestorOfClass(Class c, Component comp)
{
@@ -432,7 +432,7 @@ public class AWTUtilities
/**
* Equivalent to calling <code>getAncestorOfClass(Window, comp)</code>.
*
- * @param comp The component to search for an ancestor window
+ * @param comp The component to search for an ancestor window
*
* @return An ancestral window, or <code>null</code> if none exists
*/
@@ -500,7 +500,7 @@ public class AWTUtilities
* <code>(x,y)</code>. Returns <code>null</code> when either
* <code>(x,y)</code> is outside the bounds of parent, or parent is
* <code>null</code>.
- *
+ *
* @param parent The component to search the descendents of
* @param x Horizontal coordinate to search for
* @param y Vertical coordinate to search for
@@ -593,7 +593,7 @@ public class AWTUtilities
if (destination == null)
destination = getRoot(source);
-
+
if (source.isShowing() && destination.isShowing())
{
convertPointToScreen(pt, source);
@@ -603,7 +603,7 @@ public class AWTUtilities
return pt;
}
-
+
/**
* Converts a rectangle from the coordinate space of one component to
* another. This is equivalent to converting the rectangle from
@@ -668,18 +668,18 @@ public class AWTUtilities
}
- /**
+ /**
* Calls {@link java.awt.EventQueue.invokeLater} with the
- * specified {@link Runnable}.
+ * specified {@link Runnable}.
*/
public static void invokeLater(Runnable doRun)
{
java.awt.EventQueue.invokeLater(doRun);
}
- /**
+ /**
* Calls {@link java.awt.EventQueue.invokeAndWait} with the
- * specified {@link Runnable}.
+ * specified {@link Runnable}.
*/
public static void invokeAndWait(Runnable doRun)
throws InterruptedException,
@@ -688,7 +688,7 @@ public class AWTUtilities
java.awt.EventQueue.invokeAndWait(doRun);
}
- /**
+ /**
* Calls {@link java.awt.EventQueue.isEventDispatchThread}.
*/
public static boolean isEventDispatchThread()
diff --git a/gnu/java/awt/BitMaskExtent.java b/gnu/java/awt/BitMaskExtent.java
index 281349910..be66fccc6 100644
--- a/gnu/java/awt/BitMaskExtent.java
+++ b/gnu/java/awt/BitMaskExtent.java
@@ -36,7 +36,7 @@ exception statement from your version. */
package gnu.java.awt;
-/**
+/**
* Simple transparent utility class that can be used to perform bit
* mask extent calculations.
*/
@@ -47,7 +47,7 @@ public final class BitMaskExtent
/** The number of bits in the bit mask extent. */
public byte bitWidth;
-
+
/**
* Set the bit mask. This will calculate and set the leastSignificantBit
* and bitWidth fields.
@@ -63,17 +63,17 @@ public final class BitMaskExtent
long shiftMask = mask;
for (; (shiftMask&1) == 0; shiftMask >>>=1) leastSignificantBit++;
for (; (shiftMask&1) != 0; shiftMask >>>=1) bitWidth++;
-
+
if (shiftMask != 0)
throw new IllegalArgumentException("mask must be continuous");
}
-
- /**
+
+ /**
* Calculate the bit mask based on the values of the
* leastSignificantBit and bitWidth fields.
*/
public long toMask()
{
return ((1<<bitWidth)-1) << leastSignificantBit;
- }
+ }
}
diff --git a/gnu/java/awt/BitwiseXORComposite.java b/gnu/java/awt/BitwiseXORComposite.java
index 9205df1dd..e19b27fa9 100644
--- a/gnu/java/awt/BitwiseXORComposite.java
+++ b/gnu/java/awt/BitwiseXORComposite.java
@@ -63,7 +63,7 @@ import java.awt.image.WritableRaster;
* white, blue, black, orange, green, and brown, respectively. Each
* composite was used to paint a fully white rectangle on top of the
* blue bar in the background.
- *
+ *
* <p>The purpose of this composite is to support the {@link
* Graphics#setXORMode(Color)} method in composite-aware graphics
* implementations. Applications typically would use
@@ -96,7 +96,7 @@ public class BitwiseXORComposite
*/
protected Color xorColor;
-
+
/**
* Constructs a new composite for xor-ing the pixel value.
*
@@ -128,7 +128,7 @@ public class BitwiseXORComposite
return new GeneralContext(srcColorModel, dstColorModel, xorColor);
}
-
+
/**
* A fallback CompositeContext that performs bitwise XOR of pixel
* values with the pixel value of the specified <code>xorColor</code>.
@@ -164,7 +164,7 @@ public class BitwiseXORComposite
Rectangle srcRect = src.getBounds();
Rectangle dstInRect = dstIn.getBounds();
Rectangle dstOutRect = dstOut.getBounds();
-
+
int xp = xorColor.getRGB();
int w = Math.min(Math.min(srcRect.width, dstOutRect.width),
dstInRect.width);
@@ -186,7 +186,7 @@ public class BitwiseXORComposite
int sp = srcColorModel.getRGB(srcPix);
int dp = dstColorModel.getRGB(dstPix);
int rp = sp ^ xp ^ dp;
- dstOut.setDataElements(x + dstOutRect.x, y + dstOutRect.y,
+ dstOut.setDataElements(x + dstOutRect.x, y + dstOutRect.y,
dstColorModel.getDataElements(rp, rpPix));
}
}
@@ -249,7 +249,7 @@ public class BitwiseXORComposite
srcLine = new int[width];
dstLine = new int[width];
-
+
/* We need an int[] array with at least one element here;
* srcLine is as good as any other.
*/
@@ -268,7 +268,7 @@ public class BitwiseXORComposite
}
}
-
+
/**
* Determines whether an instance of this CompositeContext would
* be able to process the specified color models.
diff --git a/gnu/java/awt/Buffers.java b/gnu/java/awt/Buffers.java
index 2015634bb..0c8d438c7 100644
--- a/gnu/java/awt/Buffers.java
+++ b/gnu/java/awt/Buffers.java
@@ -46,7 +46,7 @@ import java.awt.image.DataBufferInt;
import java.awt.image.DataBufferShort;
import java.awt.image.DataBufferUShort;
-/**
+/**
* Utility class for creating and accessing data buffers of arbitrary
* data types.
*/
@@ -60,7 +60,7 @@ public final class Buffers
* @param size the size of the data buffer bank
*/
public static DataBuffer createBuffer(int dataType, Object data,
- int size)
+ int size)
{
if (data == null) return createBuffer(dataType, size, 1);
@@ -90,22 +90,22 @@ public final class Buffers
switch (dataType)
{
case DataBuffer.TYPE_BYTE:
- return new DataBufferByte(size, numBanks);
+ return new DataBufferByte(size, numBanks);
case DataBuffer.TYPE_SHORT:
- return new DataBufferShort(size, numBanks);
+ return new DataBufferShort(size, numBanks);
case DataBuffer.TYPE_USHORT:
- return new DataBufferUShort(size, numBanks);
+ return new DataBufferUShort(size, numBanks);
case DataBuffer.TYPE_INT:
- return new DataBufferInt(size, numBanks);
+ return new DataBufferInt(size, numBanks);
case DataBuffer.TYPE_FLOAT:
- return new DataBufferFloat(size, numBanks);
+ return new DataBufferFloat(size, numBanks);
case DataBuffer.TYPE_DOUBLE:
- return new DataBufferDouble(size, numBanks);
+ return new DataBufferDouble(size, numBanks);
default:
- throw new UnsupportedOperationException();
+ throw new UnsupportedOperationException();
}
}
-
+
/**
* Create a data buffer of a particular type.
*
@@ -114,28 +114,28 @@ public final class Buffers
* @param size the size of the data buffer bank
*/
public static DataBuffer createBufferFromData(int dataType, Object data,
- int size)
+ int size)
{
switch (dataType)
{
case DataBuffer.TYPE_BYTE:
- return new DataBufferByte((byte[]) data, size);
+ return new DataBufferByte((byte[]) data, size);
case DataBuffer.TYPE_SHORT:
- return new DataBufferShort((short[]) data, size);
+ return new DataBufferShort((short[]) data, size);
case DataBuffer.TYPE_USHORT:
- return new DataBufferUShort((short[]) data, size);
+ return new DataBufferUShort((short[]) data, size);
case DataBuffer.TYPE_INT:
- return new DataBufferInt((int[]) data, size);
+ return new DataBufferInt((int[]) data, size);
case DataBuffer.TYPE_FLOAT:
- return new DataBufferFloat((float[]) data, size);
+ return new DataBufferFloat((float[]) data, size);
case DataBuffer.TYPE_DOUBLE:
- return new DataBufferDouble((double[]) data, size);
+ return new DataBufferDouble((double[]) data, size);
default:
- throw new UnsupportedOperationException();
+ throw new UnsupportedOperationException();
}
}
- /**
+ /**
* Return the data array of a data buffer, regardless of the data
* type.
*
@@ -147,56 +147,56 @@ public final class Buffers
return getData(buffer, 0, null, 0, buffer.getSize());
}
-
+
/**
* Copy data from array contained in data buffer, much like
* System.arraycopy. Create a suitable destination array if the
* given destination array is null.
*/
public static Object getData(DataBuffer src, int srcOffset,
- Object dest, int dstOffset,
- int length)
+ Object dest, int dstOffset,
+ int length)
{
Object from;
switch(src.getDataType())
{
case DataBuffer.TYPE_BYTE:
- if (dest == null) dest = new byte[length+dstOffset];
- for(int i = 0; i < length; i++)
- ((byte[])dest)[i + dstOffset] = (byte)src.getElem(i + srcOffset);
- break;
+ if (dest == null) dest = new byte[length+dstOffset];
+ for(int i = 0; i < length; i++)
+ ((byte[])dest)[i + dstOffset] = (byte)src.getElem(i + srcOffset);
+ break;
case DataBuffer.TYPE_DOUBLE:
- if (dest == null) dest = new double[length+dstOffset];
- for(int i = 0; i < length; i++)
- ((double[])dest)[i + dstOffset] = src.getElemDouble(i + srcOffset);
- break;
+ if (dest == null) dest = new double[length+dstOffset];
+ for(int i = 0; i < length; i++)
+ ((double[])dest)[i + dstOffset] = src.getElemDouble(i + srcOffset);
+ break;
case DataBuffer.TYPE_FLOAT:
- if (dest == null) dest = new float[length+dstOffset];
- for(int i = 0; i < length; i++)
- ((float[])dest)[i + dstOffset] = src.getElemFloat(i + srcOffset);
- break;
+ if (dest == null) dest = new float[length+dstOffset];
+ for(int i = 0; i < length; i++)
+ ((float[])dest)[i + dstOffset] = src.getElemFloat(i + srcOffset);
+ break;
case DataBuffer.TYPE_INT:
- if (dest == null) dest = new int[length+dstOffset];
- for(int i = 0; i < length; i++)
- ((int[])dest)[i + dstOffset] = src.getElem(i + srcOffset);
- break;
+ if (dest == null) dest = new int[length+dstOffset];
+ for(int i = 0; i < length; i++)
+ ((int[])dest)[i + dstOffset] = src.getElem(i + srcOffset);
+ break;
case DataBuffer.TYPE_SHORT:
case DataBuffer.TYPE_USHORT:
- if (dest == null) dest = new short[length+dstOffset];
- for(int i = 0; i < length; i++)
- ((short[])dest)[i + dstOffset] = (short)src.getElem(i + srcOffset);
- break;
+ if (dest == null) dest = new short[length+dstOffset];
+ for(int i = 0; i < length; i++)
+ ((short[])dest)[i + dstOffset] = (short)src.getElem(i + srcOffset);
+ break;
case DataBuffer.TYPE_UNDEFINED:
- throw new ClassCastException("Unknown data buffer type");
+ throw new ClassCastException("Unknown data buffer type");
}
return dest;
}
-
+
/**
* @param bits the width of a data element measured in bits
*
@@ -207,19 +207,19 @@ public final class Buffers
{
if (bits <= 8)
{
- return DataBuffer.TYPE_BYTE;
+ return DataBuffer.TYPE_BYTE;
}
else if (bits <= 16)
{
- return DataBuffer.TYPE_USHORT;
- }
+ return DataBuffer.TYPE_USHORT;
+ }
else if (bits <= 32)
{
- return DataBuffer.TYPE_INT;
+ return DataBuffer.TYPE_INT;
}
else
{
- return DataBuffer.TYPE_UNDEFINED;
+ return DataBuffer.TYPE_UNDEFINED;
}
}
}
diff --git a/gnu/java/awt/ClasspathGraphicsEnvironment.java b/gnu/java/awt/ClasspathGraphicsEnvironment.java
index 865da1d95..fecefa03e 100644
--- a/gnu/java/awt/ClasspathGraphicsEnvironment.java
+++ b/gnu/java/awt/ClasspathGraphicsEnvironment.java
@@ -45,7 +45,7 @@ import java.awt.image.WritableRaster;
/**
* This class extends the GraphicsEnvironment API with some Classpath-specific
* methods, in order to provide optimized graphics handling.
- *
+ *
* @author Francis Kung <fkung@redhat.com>
*/
public abstract class ClasspathGraphicsEnvironment
@@ -54,7 +54,7 @@ public abstract class ClasspathGraphicsEnvironment
/**
* Returns an appropriate Raster that can efficiently back a
* BufferedImage with the given ColorModel and SampleModel.
- *
+ *
* @param cm The color model.
* @param sm The samepl model.
* @return An appropriate WritableRaster, or null if acceleration/optimization
diff --git a/gnu/java/awt/ClasspathToolkit.java b/gnu/java/awt/ClasspathToolkit.java
index 7bbc70ccb..99c186aaa 100644
--- a/gnu/java/awt/ClasspathToolkit.java
+++ b/gnu/java/awt/ClasspathToolkit.java
@@ -102,7 +102,7 @@ public abstract class ClasspathToolkit
*
* @param name The logical name of the font. This may be either a face
* name or a logical font name, or may even be null. A default
- * implementation of name decoding is provided in
+ * implementation of name decoding is provided in
* {@link ClasspathFontPeer}, but may be overridden in other toolkits.
*
* @param attrs Any extra {@link java.awt.font.TextAttribute} attributes
@@ -110,17 +110,17 @@ public abstract class ClasspathToolkit
* transformation.
*/
public abstract ClasspathFontPeer getClasspathFontPeer (String name,
- Map<?,?> attrs);
+ Map<?,?> attrs);
- /**
+ /**
* Creates a {@link Font}, in a platform-specific manner.
- *
+ *
* The default implementation simply constructs a {@link Font}, but some
- * toolkits may wish to override this, to return {@link Font} subclasses
+ * toolkits may wish to override this, to return {@link Font} subclasses
* which implement {@link java.awt.font.OpenType} or
* {@link java.awt.font.MultipleMaster}.
*/
- public Font getFont (String name, Map attrs)
+ public Font getFont (String name, Map attrs)
{
Font f = null;
@@ -170,7 +170,7 @@ public abstract class ClasspathToolkit
*
* @throws IllegalArgumentException if <code>format</code> is
* not supported.
- *
+ *
* @throws FontFormatException if <code>stream</code> does not
* contain data in the expected format, or if required tables are
* missing from a font.
@@ -211,11 +211,11 @@ public abstract class ClasspathToolkit
* toolkit implementors should overload this method if possible.
* @since 1.5
*/
- public int getMouseNumberOfButtons()
+ public int getMouseNumberOfButtons()
{
return -1;
}
-
+
/* (non-Javadoc)
* @see java.awt.Toolkit#createDesktopPeer(java.awt.Desktop)
*/
@@ -224,9 +224,8 @@ public abstract class ClasspathToolkit
{
if (GraphicsEnvironment.isHeadless())
throw new HeadlessException();
-
+
return ClasspathDesktopPeer.getDesktop();
}
}
-
diff --git a/gnu/java/awt/ComponentDataBlitOp.java b/gnu/java/awt/ComponentDataBlitOp.java
index 545427ea7..becf54167 100644
--- a/gnu/java/awt/ComponentDataBlitOp.java
+++ b/gnu/java/awt/ComponentDataBlitOp.java
@@ -52,7 +52,7 @@ import java.awt.image.WritableRaster;
*
* @throws java.lang.ClassCastException if the sample models of the
* rasters are not of type ComponentSampleModel.
- *
+ *
* @author Rolf W. Rasmussen (rolfwr@ii.uib.no)
*/
public class ComponentDataBlitOp implements RasterOp
@@ -63,14 +63,14 @@ public class ComponentDataBlitOp implements RasterOp
{
if (dest == null)
dest = createCompatibleDestRaster(src);
-
+
DataBuffer srcDB = src.getDataBuffer();
DataBuffer destDB = dest.getDataBuffer();
-
+
ComponentSampleModel srcSM = (ComponentSampleModel) src.getSampleModel();
ComponentSampleModel destSM = (ComponentSampleModel) dest.getSampleModel();
-
+
// Calculate offset to data in the underlying arrays:
int srcScanlineStride = srcSM.getScanlineStride();
@@ -84,8 +84,8 @@ public class ComponentDataBlitOp implements RasterOp
/* We can't use getOffset(x, y) from the sample model since we
don't want the band offset added in. */
-
- int srcOffset =
+
+ int srcOffset =
numBands*srcX + srcScanlineStride*srcY + // from sample model
srcDB.getOffset(); // from data buffer
@@ -94,44 +94,44 @@ public class ComponentDataBlitOp implements RasterOp
destDB.getOffset(); // from data buffer
// Determine how much, and how many times to blit.
-
+
int rowSize = src.getWidth()*numBands;
int h = src.getHeight();
-
+
if ((rowSize == srcScanlineStride) &&
- (rowSize == destScanlineStride))
+ (rowSize == destScanlineStride))
{
- // collapse scan line blits to one large blit.
- rowSize *= h;
- h = 1;
+ // collapse scan line blits to one large blit.
+ rowSize *= h;
+ h = 1;
}
-
+
// Do blitting
-
+
Object srcArray = Buffers.getData(srcDB);
Object destArray = Buffers.getData(destDB);
-
+
for (int yd = 0; yd<h; yd++)
{
- System.arraycopy(srcArray, srcOffset,
- destArray, destOffset,
- rowSize);
- srcOffset += srcScanlineStride;
- destOffset += destScanlineStride;
+ System.arraycopy(srcArray, srcOffset,
+ destArray, destOffset,
+ rowSize);
+ srcOffset += srcScanlineStride;
+ destOffset += destScanlineStride;
}
-
+
return dest;
}
- public Rectangle2D getBounds2D(Raster src)
+ public Rectangle2D getBounds2D(Raster src)
{
return src.getBounds();
}
public WritableRaster createCompatibleDestRaster(Raster src) {
-
+
/* FIXME: Maybe we should explicitly create a raster with a
tightly pixel packed sample model, rather than assuming
that the createCompatibleWritableRaster() method in Raster
@@ -140,7 +140,7 @@ public class ComponentDataBlitOp implements RasterOp
return src.createCompatibleWritableRaster();
}
- public Point2D getPoint2D(Point2D srcPoint, Point2D destPoint)
+ public Point2D getPoint2D(Point2D srcPoint, Point2D destPoint)
{
if (destPoint == null)
return (Point2D) srcPoint.clone();
@@ -149,7 +149,7 @@ public class ComponentDataBlitOp implements RasterOp
return destPoint;
}
- public RenderingHints getRenderingHints()
+ public RenderingHints getRenderingHints()
{
throw new UnsupportedOperationException("not implemented");
}
diff --git a/gnu/java/awt/EmbeddedWindow.java b/gnu/java/awt/EmbeddedWindow.java
index 7c04e7daf..6734a7b1b 100644
--- a/gnu/java/awt/EmbeddedWindow.java
+++ b/gnu/java/awt/EmbeddedWindow.java
@@ -49,13 +49,13 @@ import java.security.AccessController;
/**
* Represents an AWT window that can be embedded into another
* application.
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public class EmbeddedWindow extends Frame
{
private long handle;
-
+
/**
* Creates a window to be embedded into another application. The
* window will only be embedded after its setHandle method has been
@@ -66,7 +66,7 @@ public class EmbeddedWindow extends Frame
super();
this.handle = 0;
}
-
+
/**
* Creates a window to be embedded into another application.
*
@@ -78,7 +78,7 @@ public class EmbeddedWindow extends Frame
super();
this.handle = handle;
}
-
+
/**
* Creates the native peer for this embedded window.
*/
@@ -91,9 +91,9 @@ public class EmbeddedWindow extends Frame
// java.awt.Component.peer member variable.
try
{
- Field peerField = Component.class.getDeclaredField("peer");
- AccessController.doPrivileged(new SetAccessibleAction(peerField));
- peerField.set(this, tk.createEmbeddedWindow (this));
+ Field peerField = Component.class.getDeclaredField("peer");
+ AccessController.doPrivileged(new SetAccessibleAction(peerField));
+ peerField.set(this, tk.createEmbeddedWindow (this));
}
catch (IllegalAccessException e)
{
diff --git a/gnu/java/awt/GradientPaintContext.java b/gnu/java/awt/GradientPaintContext.java
index 5e1d62dd9..f33926c12 100644
--- a/gnu/java/awt/GradientPaintContext.java
+++ b/gnu/java/awt/GradientPaintContext.java
@@ -1,4 +1,4 @@
-/* GradientPaintContext.java --
+/* GradientPaintContext.java --
Copyright (C) 2005, Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -47,39 +47,39 @@ import java.awt.Color;
/**
* A {@link PaintContext} used by the {@link GradientPaint} class.
*/
-public class GradientPaintContext implements PaintContext
+public class GradientPaintContext implements PaintContext
{
- // This implementation follows the technique described in
+ // This implementation follows the technique described in
// "Java(tm) 2D Graphics" by Jonathan Knudsen (O'Reilly 1999).
-
+
/** The x-coordinate of the anchor point for color 1. */
private final float x1;
-
+
/** The y-coordinate of the anchor point for color 1. */
private final float y1;
-
+
/** Color 1. */
private final Color c1;
-
+
/** The x-coordinate of the anchor point for color 2. */
private final float x2;
-
+
/** The y-coordinate of the anchor point for color 2. */
private final float y2;
-
+
/** Color 2. */
private final Color c2;
-
+
/** A flag indicating whether the gradient is cyclic or acyclic. */
private final boolean cyclic;
-
+
/** The length of the gradient line - computed from the two anchor points. */
- private final double length;
+ private final double length;
/**
* Creates a new instance.
- *
+ *
* @param x1 the x-coordinate for the anchor point for color 1.
* @param y1 the y-coordinate for the anchor point for color 1.
* @param c1 color 1.
@@ -89,9 +89,9 @@ public class GradientPaintContext implements PaintContext
* @param cyclic a flag that determines whether the gradient is cyclic
* or acyclic.
*/
- public GradientPaintContext(float x1, float y1, Color c1,
- float x2, float y2, Color c2, boolean cyclic)
- {
+ public GradientPaintContext(float x1, float y1, Color c1,
+ float x2, float y2, Color c2, boolean cyclic)
+ {
this.x1 = x1;
this.y1 = y1;
this.c1 = c1;
@@ -101,7 +101,7 @@ public class GradientPaintContext implements PaintContext
this.cyclic = cyclic;
length = Point2D.distance(x1, y1, x2, y2);
}
-
+
/**
* Return the color model of this context. It may be different from the
* hint specified during createContext, as not all contexts can generate
@@ -109,9 +109,9 @@ public class GradientPaintContext implements PaintContext
*
* @return the context color model
*/
- public ColorModel getColorModel()
+ public ColorModel getColorModel()
{
- return ColorModel.getRGBdefault();
+ return ColorModel.getRGBdefault();
}
/**
@@ -131,21 +131,21 @@ public class GradientPaintContext implements PaintContext
for (int r = 0; r < h; r++) {
for (int c = 0; c < w; c++) {
double u = 0.0;
- if (pd2 != 0)
- u = (((x + c) - x1) * (x2 - x1) + ((y + r) - y1) * (y2 - y1))
+ if (pd2 != 0)
+ u = (((x + c) - x1) * (x2 - x1) + ((y + r) - y1) * (y2 - y1))
/ Math.sqrt(pd2);
double ratio = u / length;
if (cyclic)
ratio = Math.abs(ratio - Math.floor((ratio + 1.0) / 2.0) * 2.0);
- else
+ else
ratio = Math.max(0.0, Math.min(1.0, ratio));
int base = (r * w + c) * 4;
data[base] = (int) (c1.getRed() + ratio * (c2.getRed() - c1.getRed()));
- data[base + 1]
+ data[base + 1]
= (int) (c1.getGreen() + ratio * (c2.getGreen() - c1.getGreen()));
- data[base + 2]
+ data[base + 2]
= (int) (c1.getBlue() + ratio * (c2.getBlue() - c1.getBlue()));
- data[base + 3]
+ data[base + 3]
= (int) (c1.getAlpha() + ratio * (c2.getAlpha() - c1.getAlpha()));
}
}
@@ -154,11 +154,11 @@ public class GradientPaintContext implements PaintContext
}
/**
- * Release the resources allocated for the paint (none in this
+ * Release the resources allocated for the paint (none in this
* implementation).
*/
public void dispose() {
- // nothing to do
+ // nothing to do
}
-
+
}
diff --git a/gnu/java/awt/color/CieXyzConverter.java b/gnu/java/awt/color/CieXyzConverter.java
index 174280585..e1b548e98 100644
--- a/gnu/java/awt/color/CieXyzConverter.java
+++ b/gnu/java/awt/color/CieXyzConverter.java
@@ -40,7 +40,7 @@ package gnu.java.awt.color;
/**
* CieXyzConverter - converts to/from a D50-relative CIE XYZ color space.
- *
+ *
* The sRGB<->CIE XYZ conversions in SrgbConverter are used.
*
* @author Sven de Marothy
diff --git a/gnu/java/awt/color/ClutProfileConverter.java b/gnu/java/awt/color/ClutProfileConverter.java
index bff97cc9b..5229ce804 100644
--- a/gnu/java/awt/color/ClutProfileConverter.java
+++ b/gnu/java/awt/color/ClutProfileConverter.java
@@ -56,24 +56,24 @@ public class ClutProfileConverter implements ColorSpaceConverter
nChannels = profile.getNumComponents();
// Sun does not specifiy which rendering intent should be used,
- // neither does the ICC v2 spec really.
+ // neither does the ICC v2 spec really.
// Try intent 0
try
{
- toPCS = new ColorLookUpTable(profile, ICC_Profile.icSigAToB0Tag);
+ toPCS = new ColorLookUpTable(profile, ICC_Profile.icSigAToB0Tag);
}
catch (Exception e)
{
- toPCS = null;
+ toPCS = null;
}
try
{
- fromPCS = new ColorLookUpTable(profile, ICC_Profile.icSigBToA0Tag);
+ fromPCS = new ColorLookUpTable(profile, ICC_Profile.icSigBToA0Tag);
}
catch (Exception e)
{
- fromPCS = null;
+ fromPCS = null;
}
if (toPCS != null || fromPCS != null)
@@ -82,20 +82,20 @@ public class ClutProfileConverter implements ColorSpaceConverter
// If no intent 0 clut is available, look for a intent 1 clut.
try
{
- toPCS = new ColorLookUpTable(profile, ICC_Profile.icSigAToB1Tag);
+ toPCS = new ColorLookUpTable(profile, ICC_Profile.icSigAToB1Tag);
}
catch (Exception e)
{
- toPCS = null;
+ toPCS = null;
}
try
{
- fromPCS = new ColorLookUpTable(profile, ICC_Profile.icSigBToA1Tag);
+ fromPCS = new ColorLookUpTable(profile, ICC_Profile.icSigBToA1Tag);
}
catch (Exception e)
{
- fromPCS = null;
+ fromPCS = null;
}
if (toPCS != null || fromPCS != null)
@@ -104,20 +104,20 @@ public class ClutProfileConverter implements ColorSpaceConverter
// Last shot.. intent 2 CLUT.
try
{
- toPCS = new ColorLookUpTable(profile, ICC_Profile.icSigAToB2Tag);
+ toPCS = new ColorLookUpTable(profile, ICC_Profile.icSigAToB2Tag);
}
catch (Exception e)
{
- toPCS = null;
+ toPCS = null;
}
try
{
- fromPCS = new ColorLookUpTable(profile, ICC_Profile.icSigBToA2Tag);
+ fromPCS = new ColorLookUpTable(profile, ICC_Profile.icSigBToA2Tag);
}
catch (Exception e)
{
- fromPCS = null;
+ fromPCS = null;
}
if (toPCS == null && fromPCS == null)
diff --git a/gnu/java/awt/color/ColorLookUpTable.java b/gnu/java/awt/color/ColorLookUpTable.java
index 6b6418bc2..581320c3e 100644
--- a/gnu/java/awt/color/ColorLookUpTable.java
+++ b/gnu/java/awt/color/ColorLookUpTable.java
@@ -77,7 +77,7 @@ public class ColorLookUpTable
float[][] inMatrix; // input matrix (XYZ only)
boolean useMatrix; // Whether to use the matrix or not.
int[] multiplier;
- int[] offsets; // Hypercube offsets
+ int[] offsets; // Hypercube offsets
boolean inputLab; // Set if the CLUT input CS is Lab
boolean outputLab; // Set if the CLUT output CS is Lab
@@ -95,21 +95,21 @@ public class ColorLookUpTable
case ICC_Profile.icSigAToB0Tag:
case ICC_Profile.icSigAToB1Tag:
case ICC_Profile.icSigAToB2Tag:
- if (profile.getColorSpaceType() == ColorSpace.TYPE_XYZ)
- useMatrix = true;
- inputLab = false;
- outputLab = (profile.getPCSType() == ColorSpace.TYPE_Lab);
- break;
+ if (profile.getColorSpaceType() == ColorSpace.TYPE_XYZ)
+ useMatrix = true;
+ inputLab = false;
+ outputLab = (profile.getPCSType() == ColorSpace.TYPE_Lab);
+ break;
case ICC_Profile.icSigBToA0Tag:
case ICC_Profile.icSigBToA1Tag:
case ICC_Profile.icSigBToA2Tag:
- if (profile.getPCSType() == ColorSpace.TYPE_XYZ)
- useMatrix = true;
- inputLab = (profile.getPCSType() == ColorSpace.TYPE_Lab);
- outputLab = false;
- break;
+ if (profile.getPCSType() == ColorSpace.TYPE_XYZ)
+ useMatrix = true;
+ inputLab = (profile.getPCSType() == ColorSpace.TYPE_Lab);
+ outputLab = false;
+ break;
default:
- throw new IllegalArgumentException("Not a clut-type tag.");
+ throw new IllegalArgumentException("Not a clut-type tag.");
}
byte[] data = profile.getData(tag);
@@ -144,24 +144,24 @@ public class ColorLookUpTable
inMatrix = new float[3][3];
for (int i = 0; i < 3; i++)
for (int j = 0; j < 3; j++)
- inMatrix[i][j] = ((float) (buf.getInt(12 + (i * 3 + j) * 4))) / 65536.0f;
+ inMatrix[i][j] = ((float) (buf.getInt(12 + (i * 3 + j) * 4))) / 65536.0f;
inTable = new double[nIn][nInTableEntries];
for (int channel = 0; channel < nIn; channel++)
for (int i = 0; i < nInTableEntries; i++)
- inTable[channel][i] = (double) ((int) buf.getShort(52
- + (channel * nInTableEntries
- + i) * 2)
- & (0xFFFF)) / 65536.0;
+ inTable[channel][i] = (double) ((int) buf.getShort(52
+ + (channel * nInTableEntries
+ + i) * 2)
+ & (0xFFFF)) / 65536.0;
nClut = nOut;
multiplier = new int[nIn];
multiplier[nIn - 1] = nOut;
for (int i = 0; i < nIn; i++)
{
- nClut *= gridpoints;
- if (i > 0)
- multiplier[nIn - i - 1] = multiplier[nIn - i] * gridpoints;
+ nClut *= gridpoints;
+ if (i > 0)
+ multiplier[nIn - i - 1] = multiplier[nIn - i] * gridpoints;
}
int clutOffset = 52 + nIn * nInTableEntries * 2;
@@ -172,18 +172,18 @@ public class ColorLookUpTable
outTable = new short[nOut][nOutTableEntries];
for (int channel = 0; channel < nOut; channel++)
for (int i = 0; i < nOutTableEntries; i++)
- outTable[channel][i] = buf.getShort(clutOffset
- + (nClut
- + channel * nOutTableEntries + i) * 2);
+ outTable[channel][i] = buf.getShort(clutOffset
+ + (nClut
+ + channel * nOutTableEntries + i) * 2);
// calculate the hypercube corner offsets
offsets = new int[(1 << nIn)];
offsets[0] = 0;
for (int j = 0; j < nIn; j++)
{
- int factor = 1 << j;
- for (int i = 0; i < factor; i++)
- offsets[factor + i] = offsets[i] + multiplier[j];
+ int factor = 1 << j;
+ for (int i = 0; i < factor; i++)
+ offsets[factor + i] = offsets[i] + multiplier[j];
}
}
@@ -203,23 +203,23 @@ public class ColorLookUpTable
inMatrix = new float[3][3];
for (int i = 0; i < 3; i++)
for (int j = 0; j < 3; j++)
- inMatrix[i][j] = ((float) (buf.getInt(12 + (i * 3 + j) * 4))) / 65536.0f;
+ inMatrix[i][j] = ((float) (buf.getInt(12 + (i * 3 + j) * 4))) / 65536.0f;
inTable = new double[nIn][nInTableEntries];
for (int channel = 0; channel < nIn; channel++)
for (int i = 0; i < nInTableEntries; i++)
- inTable[channel][i] = (double) ((int) buf.get(48
- + (channel * nInTableEntries
- + i)) & (0xFF)) / 255.0;
+ inTable[channel][i] = (double) ((int) buf.get(48
+ + (channel * nInTableEntries
+ + i)) & (0xFF)) / 255.0;
nClut = nOut;
multiplier = new int[nIn];
multiplier[nIn - 1] = nOut;
for (int i = 0; i < nIn; i++)
{
- nClut *= gridpoints;
- if (i > 0)
- multiplier[nIn - i - 1] = multiplier[nIn - i] * gridpoints;
+ nClut *= gridpoints;
+ if (i > 0)
+ multiplier[nIn - i - 1] = multiplier[nIn - i] * gridpoints;
}
int clutOffset = 48 + nIn * nInTableEntries;
@@ -230,18 +230,18 @@ public class ColorLookUpTable
outTable = new short[nOut][nOutTableEntries];
for (int channel = 0; channel < nOut; channel++)
for (int i = 0; i < nOutTableEntries; i++)
- outTable[channel][i] = (short) (buf.get(clutOffset + nClut
- + channel * nOutTableEntries
- + i) * 257);
+ outTable[channel][i] = (short) (buf.get(clutOffset + nClut
+ + channel * nOutTableEntries
+ + i) * 257);
// calculate the hypercube corner offsets
offsets = new int[(1 << nIn)];
offsets[0] = 0;
for (int j = 0; j < nIn; j++)
{
- int factor = 1 << j;
- for (int i = 0; i < factor; i++)
- offsets[factor + i] = offsets[i] + multiplier[j];
+ int factor = 1 << j;
+ for (int i = 0; i < factor; i++)
+ offsets[factor + i] = offsets[i] + multiplier[j];
}
}
@@ -260,32 +260,32 @@ public class ColorLookUpTable
float[] in2 = new float[in.length];
if (useMatrix)
{
- for (int i = 0; i < 3; i++)
- in2[i] = in[0] * inMatrix[i][0] + in[1] * inMatrix[i][1]
- + in[2] * inMatrix[i][2];
+ for (int i = 0; i < 3; i++)
+ in2[i] = in[0] * inMatrix[i][0] + in[1] * inMatrix[i][1]
+ + in[2] * inMatrix[i][2];
}
else if (inputLab)
in2 = XYZtoLab(in);
else
System.arraycopy(in, 0, in2, 0, in.length);
- // input table
+ // input table
for (int i = 0; i < nIn; i++)
{
- int index = (int) Math.floor(in2[i] * (double) (nInTableEntries - 1)); // floor in
-
- // clip values.
- if (index >= nInTableEntries - 1)
- in2[i] = (float) inTable[i][nInTableEntries - 1];
- else if (index < 0)
- in2[i] = (float) inTable[i][0];
- else
- {
- // linear interpolation
- double alpha = in2[i] * ((double) nInTableEntries - 1.0) - index;
- in2[i] = (float) (inTable[i][index] * (1 - alpha)
- + inTable[i][index + 1] * alpha);
- }
+ int index = (int) Math.floor(in2[i] * (double) (nInTableEntries - 1)); // floor in
+
+ // clip values.
+ if (index >= nInTableEntries - 1)
+ in2[i] = (float) inTable[i][nInTableEntries - 1];
+ else if (index < 0)
+ in2[i] = (float) inTable[i][0];
+ else
+ {
+ // linear interpolation
+ double alpha = in2[i] * ((double) nInTableEntries - 1.0) - index;
+ in2[i] = (float) (inTable[i][index] * (1 - alpha)
+ + inTable[i][index + 1] * alpha);
+ }
}
// CLUT lookup
@@ -295,31 +295,31 @@ public class ColorLookUpTable
int offset = 0; // = gp
for (int i = 0; i < nIn; i++)
{
- int index = (int) Math.floor(in2[i] * ((double) gridpoints - 1.0));
- double alpha = in2[i] * ((double) gridpoints - 1.0) - (double) index;
-
- // clip values.
- if (index >= gridpoints - 1)
- {
- index = gridpoints - 1;
- alpha = 1.0;
- }
- else if (index < 0)
- index = 0;
- clutalpha[i] = alpha;
- offset += index * multiplier[i];
+ int index = (int) Math.floor(in2[i] * ((double) gridpoints - 1.0));
+ double alpha = in2[i] * ((double) gridpoints - 1.0) - (double) index;
+
+ // clip values.
+ if (index >= gridpoints - 1)
+ {
+ index = gridpoints - 1;
+ alpha = 1.0;
+ }
+ else if (index < 0)
+ index = 0;
+ clutalpha[i] = alpha;
+ offset += index * multiplier[i];
}
// Calculate interpolation weights
weights[0] = 1.0;
for (int j = 0; j < nIn; j++)
{
- int factor = 1 << j;
- for (int i = 0; i < factor; i++)
- {
- weights[factor + i] = weights[i] * clutalpha[j];
- weights[i] *= (1.0 - clutalpha[j]);
- }
+ int factor = 1 << j;
+ for (int i = 0; i < factor; i++)
+ {
+ weights[factor + i] = weights[i] * clutalpha[j];
+ weights[i] *= (1.0 - clutalpha[j]);
+ }
}
for (int i = 0; i < nOut; i++)
@@ -327,32 +327,32 @@ public class ColorLookUpTable
for (int i = 1; i < (1 << nIn); i++)
{
- int offset2 = offset + offsets[i];
- for (int f = 0; f < nOut; f++)
- output2[f] += weights[i] * clut[offset2 + f];
+ int offset2 = offset + offsets[i];
+ for (int f = 0; f < nOut; f++)
+ output2[f] += weights[i] * clut[offset2 + f];
}
- // output table
+ // output table
float[] output = new float[nOut];
for (int i = 0; i < nOut; i++)
{
- int index = (int) Math.floor(output2[i] * ((double) nOutTableEntries
- - 1.0));
-
- // clip values.
- if (index >= nOutTableEntries - 1)
- output[i] = outTable[i][nOutTableEntries - 1];
- else if (index < 0)
- output[i] = outTable[i][0];
- else
- {
- // linear interpolation
- double a = output2[i] * ((double) nOutTableEntries - 1.0)
- - (double) index;
- output[i] = (float) ((double) ((int) outTable[i][index] & (0xFFFF)) * (1
- - a)
- + (double) ((int) outTable[i][index + 1] & (0xFFFF)) * a) / 65536f;
- }
+ int index = (int) Math.floor(output2[i] * ((double) nOutTableEntries
+ - 1.0));
+
+ // clip values.
+ if (index >= nOutTableEntries - 1)
+ output[i] = outTable[i][nOutTableEntries - 1];
+ else if (index < 0)
+ output[i] = outTable[i][0];
+ else
+ {
+ // linear interpolation
+ double a = output2[i] * ((double) nOutTableEntries - 1.0)
+ - (double) index;
+ output[i] = (float) ((double) ((int) outTable[i][index] & (0xFFFF)) * (1
+ - a)
+ + (double) ((int) outTable[i][index + 1] & (0xFFFF)) * a) / 65536f;
+ }
}
if (outputLab)
@@ -365,7 +365,7 @@ public class ColorLookUpTable
*/
private float[] LabtoXYZ(float[] in)
{
- // Convert from byte-packed format to a
+ // Convert from byte-packed format to a
// more convenient one (actual Lab values)
// (See ICC spec for details)
// factor is 100 * 65536 / 65280
@@ -381,12 +381,12 @@ public class ColorLookUpTable
for (int i = 0; i < 3; i++)
{
- double exp = out[i] * out[i] * out[i];
- if (exp <= 0.008856)
- out[i] = (out[i] - 16.0f / 116.0f) / 7.787f;
- else
- out[i] = (float) exp;
- out[i] = D50[i] * out[i];
+ double exp = out[i] * out[i] * out[i];
+ if (exp <= 0.008856)
+ out[i] = (out[i] - 16.0f / 116.0f) / 7.787f;
+ else
+ out[i] = (float) exp;
+ out[i] = D50[i] * out[i];
}
return out;
}
@@ -400,12 +400,12 @@ public class ColorLookUpTable
for (int i = 0; i < 3; i++)
{
- temp[i] = in[i] / D50[i];
+ temp[i] = in[i] / D50[i];
- if (temp[i] <= 0.008856f)
- temp[i] = (7.7870689f * temp[i]) + (16f / 116.0f);
- else
- temp[i] = (float) Math.exp((1.0 / 3.0) * Math.log(temp[i]));
+ if (temp[i] <= 0.008856f)
+ temp[i] = (7.7870689f * temp[i]) + (16f / 116.0f);
+ else
+ temp[i] = (float) Math.exp((1.0 / 3.0) * Math.log(temp[i]));
}
float[] out = new float[3];
@@ -419,10 +419,10 @@ public class ColorLookUpTable
out[2] = (out[2] + 128f) / 256f;
for (int i = 0; i < 3; i++)
{
- if (out[i] < 0f)
- out[i] = 0f;
- if (out[i] > 1f)
- out[i] = 1f;
+ if (out[i] < 0f)
+ out[i] = 0f;
+ if (out[i] > 1f)
+ out[i] = 1f;
}
return out;
}
diff --git a/gnu/java/awt/color/GrayProfileConverter.java b/gnu/java/awt/color/GrayProfileConverter.java
index 3c725138a..3f95b07d7 100644
--- a/gnu/java/awt/color/GrayProfileConverter.java
+++ b/gnu/java/awt/color/GrayProfileConverter.java
@@ -67,11 +67,11 @@ public class GrayProfileConverter implements ColorSpaceConverter
{
try
{
- trc = new ToneReproductionCurve(profile.getGamma());
+ trc = new ToneReproductionCurve(profile.getGamma());
}
catch (ProfileDataException e)
{
- trc = new ToneReproductionCurve(profile.getTRC());
+ trc = new ToneReproductionCurve(profile.getTRC());
}
// linear grayscale converter
@@ -84,20 +84,20 @@ public class GrayProfileConverter implements ColorSpaceConverter
// unpredictable results. This is in line with the Java specification,
try
{
- toPCS = new ColorLookUpTable(profile, ICC_Profile.icSigAToB0Tag);
+ toPCS = new ColorLookUpTable(profile, ICC_Profile.icSigAToB0Tag);
}
catch (Exception e)
{
- toPCS = null;
+ toPCS = null;
}
try
{
- fromPCS = new ColorLookUpTable(profile, ICC_Profile.icSigBToA0Tag);
+ fromPCS = new ColorLookUpTable(profile, ICC_Profile.icSigBToA0Tag);
}
catch (Exception e)
{
- fromPCS = null;
+ fromPCS = null;
}
}
diff --git a/gnu/java/awt/color/GrayScaleConverter.java b/gnu/java/awt/color/GrayScaleConverter.java
index 7a27ddba8..beea9d287 100644
--- a/gnu/java/awt/color/GrayScaleConverter.java
+++ b/gnu/java/awt/color/GrayScaleConverter.java
@@ -95,15 +95,15 @@ public class GrayScaleConverter implements ColorSpaceConverter
out[0] = 0;
for (int i = 0; i < 3; i++)
{
- float n = in[i];
- if (n < 0)
- n = 0f;
- if (n > 1)
- n = 1f;
- if (n <= 0.03928f)
- out[0] += (float) (coeff[i] * n / 12.92);
- else
- out[0] += (float) (coeff[i] * Math.exp(2.4 * Math.log((n + 0.055) / 1.055)));
+ float n = in[i];
+ if (n < 0)
+ n = 0f;
+ if (n > 1)
+ n = 1f;
+ if (n <= 0.03928f)
+ out[0] += (float) (coeff[i] * n / 12.92);
+ else
+ out[0] += (float) (coeff[i] * Math.exp(2.4 * Math.log((n + 0.055) / 1.055)));
}
return out;
}
diff --git a/gnu/java/awt/color/LinearRGBConverter.java b/gnu/java/awt/color/LinearRGBConverter.java
index 13a4e2c04..1eaf6479e 100644
--- a/gnu/java/awt/color/LinearRGBConverter.java
+++ b/gnu/java/awt/color/LinearRGBConverter.java
@@ -58,16 +58,16 @@ public class LinearRGBConverter implements ColorSpaceConverter
float[] out = new float[3];
for (int i = 0; i < 3; i++)
{
- float n = in[i];
- if (n < 0)
- n = 0f;
- if (n > 1)
- n = 1f;
- if (n <= 0.00304f)
- out[i] = in[0] * 12.92f;
- else
- out[i] = 1.055f * ((float) Math.exp((1 / 2.4) * Math.log(n)))
- - 0.055f;
+ float n = in[i];
+ if (n < 0)
+ n = 0f;
+ if (n > 1)
+ n = 1f;
+ if (n <= 0.00304f)
+ out[i] = in[0] * 12.92f;
+ else
+ out[i] = 1.055f * ((float) Math.exp((1 / 2.4) * Math.log(n)))
+ - 0.055f;
}
return out;
}
@@ -84,15 +84,15 @@ public class LinearRGBConverter implements ColorSpaceConverter
// numbers from the w3 spec.
for (int i = 0; i < 3; i++)
{
- float n = in[i];
- if (n < 0)
- n = 0f;
- if (n > 1)
- n = 1f;
- if (n <= 0.03928f)
- out[i] = (float) (n / 12.92);
- else
- out[i] = (float) (Math.exp(2.4 * Math.log((n + 0.055) / 1.055)));
+ float n = in[i];
+ if (n < 0)
+ n = 0f;
+ if (n > 1)
+ n = 1f;
+ if (n <= 0.03928f)
+ out[i] = (float) (n / 12.92);
+ else
+ out[i] = (float) (Math.exp(2.4 * Math.log((n + 0.055) / 1.055)));
}
return out;
}
diff --git a/gnu/java/awt/color/ProfileHeader.java b/gnu/java/awt/color/ProfileHeader.java
index 4fdef560a..2a6402dbc 100644
--- a/gnu/java/awt/color/ProfileHeader.java
+++ b/gnu/java/awt/color/ProfileHeader.java
@@ -57,7 +57,7 @@ public class ProfileHeader
/**
* Mapping from ICC Profile signatures to ColorSpace types
*/
- private static final int[] csTypeMap =
+ private static final int[] csTypeMap =
{
ICC_Profile.icSigXYZData,
ColorSpace.TYPE_XYZ,
@@ -119,7 +119,7 @@ public class ProfileHeader
/**
* Mapping of ICC class signatures to profile class constants
*/
- private static final int[] classMap =
+ private static final int[] classMap =
{
ICC_Profile.icSigInputClass,
ICC_Profile.CLASS_INPUT,
@@ -194,7 +194,7 @@ public class ProfileHeader
{
ByteBuffer buf = ByteBuffer.wrap(data);
- // Get size (the sign bit shouldn't matter.
+ // Get size (the sign bit shouldn't matter.
// A valid profile can never be +2Gb)
size = buf.getInt(ICC_Profile.icHdrSize);
@@ -211,8 +211,8 @@ public class ProfileHeader
for (int i = 0; i < classMap.length; i += 2)
if (classMap[i] == classSig)
{
- profileClass = classMap[i + 1];
- break;
+ profileClass = classMap[i + 1];
+ break;
}
// get the data color space
@@ -221,8 +221,8 @@ public class ProfileHeader
for (int i = 0; i < csTypeMap.length; i += 2)
if (csTypeMap[i] == csSig)
{
- colorSpace = csTypeMap[i + 1];
- break;
+ colorSpace = csTypeMap[i + 1];
+ break;
}
// get the profile color space (PCS), must be xyz or lab except
@@ -231,19 +231,19 @@ public class ProfileHeader
profileColorSpace = -1;
if (profileClass != ICC_Profile.CLASS_DEVICELINK)
{
- if (pcsSig == ICC_Profile.icSigXYZData)
- profileColorSpace = ColorSpace.TYPE_XYZ;
- if (pcsSig == ICC_Profile.icSigLabData)
- profileColorSpace = ColorSpace.TYPE_Lab;
+ if (pcsSig == ICC_Profile.icSigXYZData)
+ profileColorSpace = ColorSpace.TYPE_XYZ;
+ if (pcsSig == ICC_Profile.icSigLabData)
+ profileColorSpace = ColorSpace.TYPE_Lab;
}
else
{
- for (int i = 0; i < csTypeMap.length; i += 2)
- if (csTypeMap[i] == pcsSig)
- {
- profileColorSpace = csTypeMap[i + 1];
- break;
- }
+ for (int i = 0; i < csTypeMap.length; i += 2)
+ if (csTypeMap[i] == pcsSig)
+ {
+ profileColorSpace = csTypeMap[i + 1];
+ break;
+ }
}
// creation timestamp
@@ -266,7 +266,7 @@ public class ProfileHeader
System.arraycopy(data, ICC_Profile.icHdrAttributes, attributes, 0, 8);
// rendering intent
intent = buf.getInt(ICC_Profile.icHdrRenderingIntent);
- // illuminant info
+ // illuminant info
illuminant = new byte[12];
System.arraycopy(data, ICC_Profile.icHdrIlluminant, illuminant, 0, 12);
// Creator signature
@@ -321,13 +321,13 @@ public class ProfileHeader
(short) (majorVersion << 8 | minorVersion));
for (int i = 1; i < classMap.length; i += 2)
if (profileClass == classMap[i])
- buf.putInt(ICC_Profile.icHdrDeviceClass, classMap[i - 1]);
+ buf.putInt(ICC_Profile.icHdrDeviceClass, classMap[i - 1]);
for (int i = 1; i < csTypeMap.length; i += 2)
if (csTypeMap[i] == colorSpace)
- buf.putInt(ICC_Profile.icHdrColorSpace, csTypeMap[i - 1]);
+ buf.putInt(ICC_Profile.icHdrColorSpace, csTypeMap[i - 1]);
for (int i = 1; i < csTypeMap.length; i += 2)
if (csTypeMap[i] == profileColorSpace)
- buf.putInt(ICC_Profile.icHdrPcs, csTypeMap[i - 1]);
+ buf.putInt(ICC_Profile.icHdrPcs, csTypeMap[i - 1]);
System.arraycopy(timestamp, 0, data, ICC_Profile.icHdrDate,
timestamp.length);
diff --git a/gnu/java/awt/color/RgbProfileConverter.java b/gnu/java/awt/color/RgbProfileConverter.java
index 0cbd28f6c..7623890a4 100644
--- a/gnu/java/awt/color/RgbProfileConverter.java
+++ b/gnu/java/awt/color/RgbProfileConverter.java
@@ -82,27 +82,27 @@ public class RgbProfileConverter implements ColorSpaceConverter
// get TRCs
try
{
- rTRC = new ToneReproductionCurve(profile.getGamma(ICC_ProfileRGB.REDCOMPONENT));
+ rTRC = new ToneReproductionCurve(profile.getGamma(ICC_ProfileRGB.REDCOMPONENT));
}
catch (ProfileDataException e)
{
- rTRC = new ToneReproductionCurve(profile.getTRC(ICC_ProfileRGB.REDCOMPONENT));
+ rTRC = new ToneReproductionCurve(profile.getTRC(ICC_ProfileRGB.REDCOMPONENT));
}
try
{
- gTRC = new ToneReproductionCurve(profile.getGamma(ICC_ProfileRGB.GREENCOMPONENT));
+ gTRC = new ToneReproductionCurve(profile.getGamma(ICC_ProfileRGB.GREENCOMPONENT));
}
catch (ProfileDataException e)
{
- gTRC = new ToneReproductionCurve(profile.getTRC(ICC_ProfileRGB.GREENCOMPONENT));
+ gTRC = new ToneReproductionCurve(profile.getTRC(ICC_ProfileRGB.GREENCOMPONENT));
}
try
{
- bTRC = new ToneReproductionCurve(profile.getGamma(ICC_ProfileRGB.BLUECOMPONENT));
+ bTRC = new ToneReproductionCurve(profile.getGamma(ICC_ProfileRGB.BLUECOMPONENT));
}
catch (ProfileDataException e)
{
- bTRC = new ToneReproductionCurve(profile.getTRC(ICC_ProfileRGB.BLUECOMPONENT));
+ bTRC = new ToneReproductionCurve(profile.getTRC(ICC_ProfileRGB.BLUECOMPONENT));
}
// If a CLUT is available, it should be used, and the TRCs ignored.
@@ -112,30 +112,30 @@ public class RgbProfileConverter implements ColorSpaceConverter
// unpredictable results. This is in line with the Java specification,
try
{
- toPCS = new ColorLookUpTable(profile, ICC_Profile.icSigAToB0Tag);
+ toPCS = new ColorLookUpTable(profile, ICC_Profile.icSigAToB0Tag);
}
catch (Exception e)
{
- toPCS = null;
+ toPCS = null;
}
try
{
- fromPCS = new ColorLookUpTable(profile, ICC_Profile.icSigBToA0Tag);
+ fromPCS = new ColorLookUpTable(profile, ICC_Profile.icSigBToA0Tag);
}
catch (Exception e)
{
- fromPCS = null;
+ fromPCS = null;
}
// Calculate the inverse matrix if no reverse CLUT is available
if(fromPCS == null)
- inv_matrix = invertMatrix(matrix);
- else
+ inv_matrix = invertMatrix(matrix);
+ else
{
// otherwise just set it to an identity matrix
- inv_matrix = new float[3][3];
- inv_matrix[0][0] = inv_matrix[1][1] = inv_matrix[2][2] = 1.0f;
+ inv_matrix = new float[3][3];
+ inv_matrix[0][0] = inv_matrix[1][1] = inv_matrix[2][2] = 1.0f;
}
}
@@ -191,7 +191,7 @@ public class RgbProfileConverter implements ColorSpaceConverter
out[2] = bTRC.reverseLookup(temp[2]);
// FIXME: Sun appears to clip the return values to [0,1]
- // I don't believe that is a Good Thing,
+ // I don't believe that is a Good Thing,
// (some colorspaces may allow values outside that range.)
// So we return the actual values here.
return out;
diff --git a/gnu/java/awt/color/SrgbConverter.java b/gnu/java/awt/color/SrgbConverter.java
index a30a0db90..76831c0ea 100644
--- a/gnu/java/awt/color/SrgbConverter.java
+++ b/gnu/java/awt/color/SrgbConverter.java
@@ -107,15 +107,15 @@ public class SrgbConverter implements ColorSpaceConverter
float[] out = new float[3];
for (int i = 0; i < 3; i++)
{
- if (temp[i] < 0)
- temp[i] = 0.0f;
- if (temp[i] > 1)
- temp[i] = 1.0f;
- if (temp[i] <= 0.00304f)
- out[i] = temp[i] * 12.92f;
- else
- out[i] = 1.055f * ((float) Math.exp((1 / 2.4) * Math.log(temp[i])))
- - 0.055f;
+ if (temp[i] < 0)
+ temp[i] = 0.0f;
+ if (temp[i] > 1)
+ temp[i] = 1.0f;
+ if (temp[i] <= 0.00304f)
+ out[i] = temp[i] * 12.92f;
+ else
+ out[i] = 1.055f * ((float) Math.exp((1 / 2.4) * Math.log(temp[i])))
+ - 0.055f;
}
return out;
}
@@ -132,9 +132,9 @@ public class SrgbConverter implements ColorSpaceConverter
float[] out = new float[3];
for (int i = 0; i < 3; i++)
if (in[i] <= 0.03928f)
- temp[i] = in[i] / 12.92f;
+ temp[i] = in[i] / 12.92f;
else
- temp[i] = (float) Math.exp(2.4 * Math.log((in[i] + 0.055) / 1.055));
+ temp[i] = (float) Math.exp(2.4 * Math.log((in[i] + 0.055) / 1.055));
/*
* Note: The numbers which were used to calculate this only had four
diff --git a/gnu/java/awt/color/ToneReproductionCurve.java b/gnu/java/awt/color/ToneReproductionCurve.java
index a1bccbd40..208e16883 100644
--- a/gnu/java/awt/color/ToneReproductionCurve.java
+++ b/gnu/java/awt/color/ToneReproductionCurve.java
@@ -103,20 +103,20 @@ public class ToneReproductionCurve
if (trc == null)
{
- if (in == 0f)
- return 0.0f;
- return (float) Math.exp(gamma * Math.log(in));
+ if (in == 0f)
+ return 0.0f;
+ return (float) Math.exp(gamma * Math.log(in));
}
else
{
- double alpha = in * (trc.length - 1);
- int index = (int) Math.floor(alpha);
- alpha = alpha - (double) index;
- if (index >= trc.length - 1)
- return trc[trc.length - 1];
- if (index <= 0)
- return trc[0];
- out = (float) (trc[index] * (1.0 - alpha) + trc[index + 1] * alpha);
+ double alpha = in * (trc.length - 1);
+ int index = (int) Math.floor(alpha);
+ alpha = alpha - (double) index;
+ if (index >= trc.length - 1)
+ return trc[trc.length - 1];
+ if (index <= 0)
+ return trc[0];
+ out = (float) (trc[index] * (1.0 - alpha) + trc[index + 1] * alpha);
}
return out;
}
@@ -130,21 +130,21 @@ public class ToneReproductionCurve
if (trc == null)
{
- if (in == 0f)
- return 0.0f;
- return (float) Math.exp((1.0 / gamma) * Math.log(in));
+ if (in == 0f)
+ return 0.0f;
+ return (float) Math.exp((1.0 / gamma) * Math.log(in));
}
else
{
- double alpha = in * (reverseTrc.length - 1);
- int index = (int) Math.floor(alpha);
- alpha = alpha - (double) index;
- if (index >= reverseTrc.length - 1)
- return reverseTrc[reverseTrc.length - 1];
- if (index <= 0)
- return reverseTrc[0];
- out = (float) (reverseTrc[index] * (1.0 - alpha)
- + reverseTrc[index + 1] * alpha);
+ double alpha = in * (reverseTrc.length - 1);
+ int index = (int) Math.floor(alpha);
+ alpha = alpha - (double) index;
+ if (index >= reverseTrc.length - 1)
+ return reverseTrc[reverseTrc.length - 1];
+ if (index <= 0)
+ return reverseTrc[0];
+ out = (float) (reverseTrc[index] * (1.0 - alpha)
+ + reverseTrc[index + 1] * alpha);
}
return out;
}
@@ -164,14 +164,14 @@ public class ToneReproductionCurve
int j = 0;
for (int i = 0; i < 10000; i++)
{
- float n = ((float) i) / 10000f;
- while (trc[j + 1] < n && j < trc.length - 2)
- j++;
-
- if (j == trc.length - 2)
- reverseTrc[i] = trc[trc.length - 1];
- else
- reverseTrc[i] = (j + (n - trc[j]) / (trc[j + 1] - trc[j])) / ((float) trc.length);
+ float n = ((float) i) / 10000f;
+ while (trc[j + 1] < n && j < trc.length - 2)
+ j++;
+
+ if (j == trc.length - 2)
+ reverseTrc[i] = trc[trc.length - 1];
+ else
+ reverseTrc[i] = (j + (n - trc[j]) / (trc[j + 1] - trc[j])) / ((float) trc.length);
}
}
}
diff --git a/gnu/java/awt/dnd/GtkMouseDragGestureRecognizer.java b/gnu/java/awt/dnd/GtkMouseDragGestureRecognizer.java
index 1f0c3ad2d..4ef8c2918 100644
--- a/gnu/java/awt/dnd/GtkMouseDragGestureRecognizer.java
+++ b/gnu/java/awt/dnd/GtkMouseDragGestureRecognizer.java
@@ -59,28 +59,28 @@ public class GtkMouseDragGestureRecognizer
{
this (ds, c, 0, null);
}
-
+
public GtkMouseDragGestureRecognizer (DragSource ds, Component c, int act)
{
this(ds, c, act, null);
}
-
+
public GtkMouseDragGestureRecognizer (DragSource ds, Component c, int act,
DragGestureListener dgl)
{
super(ds, c, act, dgl);
}
-
+
public void registerListeners ()
{
super.registerListeners();
}
-
+
public void unregisterListeners ()
{
super.unregisterListeners();
}
-
+
public void mouseClicked (MouseEvent e)
{
// Nothing to do here.
@@ -115,7 +115,7 @@ public class GtkMouseDragGestureRecognizer
if (!events.isEmpty())
{
int act = getDropActionFromEvent(e);
-
+
if (act == DnDConstants.ACTION_NONE)
return;
@@ -124,14 +124,14 @@ public class GtkMouseDragGestureRecognizer
int dx = Math.abs(origin.x - current.x);
int dy = Math.abs(origin.y - current.y);
int threshold = DragSource.getDragThreshold();
-
+
if (dx > threshold || dy > threshold)
fireDragGestureRecognized(act, origin);
else
appendEvent(e);
}
}
-
+
public void mouseMoved (MouseEvent e)
{
// Nothing to do here.
@@ -142,10 +142,10 @@ public class GtkMouseDragGestureRecognizer
int modEx = e.getModifiersEx();
int buttons = modEx & (MouseEvent.BUTTON1_DOWN_MASK
| MouseEvent.BUTTON2_DOWN_MASK | MouseEvent.BUTTON3_DOWN_MASK);
- if (!(buttons == MouseEvent.BUTTON1_DOWN_MASK ||
+ if (!(buttons == MouseEvent.BUTTON1_DOWN_MASK ||
buttons == MouseEvent.BUTTON2_DOWN_MASK))
return DnDConstants.ACTION_NONE;
-
+
// Convert modifier to a drop action
int sourceActions = getSourceActions();
int mod = modEx
diff --git a/gnu/java/awt/dnd/peer/gtk/GtkDragSourceContextPeer.java b/gnu/java/awt/dnd/peer/gtk/GtkDragSourceContextPeer.java
index b68fa1058..4d1097626 100644
--- a/gnu/java/awt/dnd/peer/gtk/GtkDragSourceContextPeer.java
+++ b/gnu/java/awt/dnd/peer/gtk/GtkDragSourceContextPeer.java
@@ -62,54 +62,54 @@ public class GtkDragSourceContextPeer
private Cursor cursor;
private DragSourceContext context;
public static Component target;
-
+
native void nativeStartDrag(Image i, int x, int y, int action, String target);
native void connectSignals(ComponentPeer comp);
native void create(ComponentPeer comp);
native void nativeSetCursor(int cursor);
native void setTarget(GtkDropTargetContextPeer target);
-
+
public GtkDragSourceContextPeer(DragGestureEvent e)
{
super(e.getComponent());
Component comp = e.getComponent();
peer = getComponentPeer(comp);
-
+
create(peer);
connectSignals(peer);
cursor = comp.getCursor();
-
+
// FIXME: Where do we set the target?
-
+
if ((target != null))
setTarget(new GtkDropTargetContextPeer(target));
}
-
+
ComponentPeer getComponentPeer(Component c)
{
if (c == null)
return null;
-
+
Component curr = c;
while (curr.getPeer() instanceof LightweightPeer)
curr = curr.getParent();
-
+
if (curr != null)
return curr.getPeer();
return null;
}
-
+
public void startDrag(DragSourceContext context, Cursor c, Image i, Point p)
throws InvalidDnDOperationException
- {
+ {
this.context = context;
if (p == null)
p = new Point();
-
+
// FIXME: use proper DataFlavor, not "text/plain".
// Also, add check to determine if dragging.
-
+
setCursor(c);
nativeStartDrag(i, p.x, p.y, context.getTrigger().getDragAction(),
"text/plain");
@@ -133,7 +133,7 @@ public class GtkDragSourceContextPeer
{
// Nothing to do here.
}
-
+
/**
* Called from native code.
*/
diff --git a/gnu/java/awt/dnd/peer/gtk/GtkDropTargetContextPeer.java b/gnu/java/awt/dnd/peer/gtk/GtkDropTargetContextPeer.java
index f24b3f39b..315a2bdf1 100644
--- a/gnu/java/awt/dnd/peer/gtk/GtkDropTargetContextPeer.java
+++ b/gnu/java/awt/dnd/peer/gtk/GtkDropTargetContextPeer.java
@@ -50,12 +50,12 @@ public class GtkDropTargetContextPeer
extends GtkGenericPeer
implements DropTargetContextPeer
{
-
+
public GtkDropTargetContextPeer(Object obj)
{
super(obj);
}
-
+
public void setTargetActions(int actions)
{
// FIXME: Not Implemented
diff --git a/gnu/java/awt/dnd/peer/gtk/GtkDropTargetPeer.java b/gnu/java/awt/dnd/peer/gtk/GtkDropTargetPeer.java
index 88b75ad96..0799df5ba 100644
--- a/gnu/java/awt/dnd/peer/gtk/GtkDropTargetPeer.java
+++ b/gnu/java/awt/dnd/peer/gtk/GtkDropTargetPeer.java
@@ -52,7 +52,7 @@ public class GtkDropTargetPeer
{
super(null);
}
-
+
public void addDropTarget(DropTarget target)
{
// FIXME: Not Implemented
diff --git a/gnu/java/awt/font/FontDelegate.java b/gnu/java/awt/font/FontDelegate.java
index a77873309..e5c03a10f 100644
--- a/gnu/java/awt/font/FontDelegate.java
+++ b/gnu/java/awt/font/FontDelegate.java
@@ -77,8 +77,8 @@ public interface FontDelegate
* @return the face name.
*/
public String getFullName(Locale locale);
-
-
+
+
/**
* Returns the name of the family to which this font face belongs,
* for example <i>&#x201c;Univers&#x201d;</i>.
@@ -99,8 +99,8 @@ public interface FontDelegate
* @return the name of the face inside its family.
*/
public String getSubFamilyName(Locale locale);
-
-
+
+
/**
* Returns the PostScript name of this font face, for example
* <i>&#x201c;Helvetica-Bold&#x201d;</i>.
@@ -131,7 +131,7 @@ public interface FontDelegate
* glyph as an empty box.
*/
public int getMissingGlyphCode();
-
+
/**
* Creates a GlyphVector by mapping each character in a
@@ -205,7 +205,7 @@ public interface FontDelegate
boolean fractionalMetrics,
boolean horizontal,
Point2D advance);
-
+
/**
* Returns the shape of a glyph.
diff --git a/gnu/java/awt/font/FontFactory.java b/gnu/java/awt/font/FontFactory.java
index 6c1084eef..53eb5df5f 100644
--- a/gnu/java/awt/font/FontFactory.java
+++ b/gnu/java/awt/font/FontFactory.java
@@ -58,7 +58,7 @@ public final class FontFactory
{
}
-
+
/**
* Creates FontDelegate objects for the fonts in the specified buffer.
* The following font formats are currently recognized:
diff --git a/gnu/java/awt/font/GNUGlyphVector.java b/gnu/java/awt/font/GNUGlyphVector.java
index 22f331e15..9fd80e79e 100644
--- a/gnu/java/awt/font/GNUGlyphVector.java
+++ b/gnu/java/awt/font/GNUGlyphVector.java
@@ -113,7 +113,7 @@ public class GNUGlyphVector
this.font = font;
this.renderContext = renderContext;
this.glyphs = glyphs;
-
+
fontSize = font.getSize2D();
transform = font.getTransform(); // returns a modifiable copy
//transform.concatenate(renderContext.getTransform());
@@ -156,7 +156,7 @@ public class GNUGlyphVector
for (i = p = 0; i < glyphs.length; i++)
{
p += 2;
-
+
if ((transforms == null) || (tx = transforms[i]) == null)
tx = this.transform;
else
@@ -164,7 +164,7 @@ public class GNUGlyphVector
tx = new AffineTransform(tx);
tx.concatenate(this.transform);
}
-
+
fontDelegate.getAdvance(glyphs[i], fontSize, tx,
renderContext.isAntiAliased(),
renderContext.usesFractionalMetrics(),
@@ -502,11 +502,11 @@ public class GNUGlyphVector
{
return layoutFlags;
}
-
-
+
+
/**
* Returns the positions of a range of glyphs in this vector.
- *
+ *
* @param firstGlyphIndex the index of the first glyph whose
* position is retrieved.
*
@@ -546,7 +546,7 @@ public class GNUGlyphVector
return outPositions;
}
-
+
private float getAscent()
{
return fontDelegate.getAscent(fontSize, transform,
@@ -561,7 +561,7 @@ public class GNUGlyphVector
return fontDelegate.getDescent(fontSize, transform,
renderContext.isAntiAliased(),
renderContext.usesFractionalMetrics(),
- /* horizontal */ true);
+ /* horizontal */ true);
}
diff --git a/gnu/java/awt/font/OpenTypeFontPeer.java b/gnu/java/awt/font/OpenTypeFontPeer.java
index e8124528e..d8bff1199 100644
--- a/gnu/java/awt/font/OpenTypeFontPeer.java
+++ b/gnu/java/awt/font/OpenTypeFontPeer.java
@@ -180,7 +180,7 @@ public class OpenTypeFontPeer
{
return 0.F;
}
-
+
}
private class XFontMetrics
@@ -207,7 +207,7 @@ public class OpenTypeFontPeer
return (int) fontDelegate.getDescent(getFont().getSize(), IDENDITY,
false, false, false);
}
-
+
public int getHeight()
{
GlyphVector gv = fontDelegate.createGlyphVector(getFont(),
@@ -441,7 +441,7 @@ public class OpenTypeFontPeer
case Font.PLAIN:
default:
key.append("p");
-
+
}
return key.toString();
diff --git a/gnu/java/awt/font/autofit/GlyphHints.java b/gnu/java/awt/font/autofit/GlyphHints.java
index 72f07ed81..033d63fa4 100644
--- a/gnu/java/awt/font/autofit/GlyphHints.java
+++ b/gnu/java/awt/font/autofit/GlyphHints.java
@@ -84,7 +84,7 @@ class GlyphHints
metrics = m;
// TODO: Copy scalerFlags.
}
-
+
void reload(Zone outline)
{
numPoints = 0;
diff --git a/gnu/java/awt/font/autofit/Latin.java b/gnu/java/awt/font/autofit/Latin.java
index 8951e8b19..c132c2cdc 100644
--- a/gnu/java/awt/font/autofit/Latin.java
+++ b/gnu/java/awt/font/autofit/Latin.java
@@ -103,7 +103,7 @@ class Latin
hints.alignStrongPoints(dim);
if (hints.doAlignWeakPoints())
hints.alignWeakPoints(dim);
-
+
}
}
// FreeType does a save call here. I guess that's not needed as we operate
@@ -407,7 +407,7 @@ class Latin
dist += 54;
else
dist += delta;
-
+
}
else
{
@@ -969,7 +969,7 @@ class Latin
blue.flags = 0;
if (isTopBlue(bb))
blue.flags |= LatinBlue.FLAG_TOP;
- // The following flag is used later to adjust y and x scales in
+ // The following flag is used later to adjust y and x scales in
// order to optimize the pixel grid alignment of the top small
// letters.
if (bb == SMALL_TOP)
@@ -1043,7 +1043,7 @@ class Latin
last = point;
boolean passed = false;
boolean onEdge = false;
- while (true)
+ while (true)
{
int u, v;
if (onEdge)
@@ -1099,7 +1099,7 @@ class Latin
point = point.getNext();
}
}
-
+
}
private boolean isTopBlue(int b)
@@ -1276,7 +1276,7 @@ class Latin
// Debug: Print out all edges.
// System.err.println("edge# " + e + ": " + edge);
- }
+ }
}
private void computeBlueEdges(GlyphHints hints, LatinMetrics metrics)
@@ -1297,7 +1297,7 @@ class Latin
// System.err.println("checking edge: " + edge);
Width bestBlue = null;
int bestDist = Fixed.mul16(metrics.unitsPerEm / 40, scale);
-
+
if (bestDist > 64 / 2)
bestDist = 64 / 2;
for (int bb = 0; bb < BLUE_MAX; bb++)
diff --git a/gnu/java/awt/font/autofit/Utils.java b/gnu/java/awt/font/autofit/Utils.java
index 4df4705a8..ca45bb2e4 100644
--- a/gnu/java/awt/font/autofit/Utils.java
+++ b/gnu/java/awt/font/autofit/Utils.java
@@ -158,7 +158,7 @@ class Utils
return angle;
}
-
+
angle = 0;
if (dx < 0)
{
diff --git a/gnu/java/awt/font/opentype/CharGlyphMap.java b/gnu/java/awt/font/opentype/CharGlyphMap.java
index 184075094..8529f7e47 100644
--- a/gnu/java/awt/font/opentype/CharGlyphMap.java
+++ b/gnu/java/awt/font/opentype/CharGlyphMap.java
@@ -89,7 +89,7 @@ public abstract class CharGlyphMap
/**
* Reads a CharGlyphMap from an OpenType or TrueType <code>cmap</code>
* table. The current implementation works as follows:
- *
+ *
* <p><ol><li>If the font has a type 4 cmap for the Unicode platform
* (encoding 0, 1, 2, 3 or 4), or a type 4 cmap for the Microsoft
* platform (encodings 1 or 10), that table is used to map Unicode
@@ -132,7 +132,7 @@ public abstract class CharGlyphMap
version = buf.getChar();
if (version != 0)
return null;
-
+
numTables = buf.getChar();
for (int i = 0; i < numTables; i++)
{
@@ -229,8 +229,8 @@ public abstract class CharGlyphMap
return 0;
}
}
-
-
+
+
/**
* A mapping from Unicode code points to glyph IDs through CMAP Type
* 0 tables. These tables have serious limitations: Only the first
@@ -255,8 +255,8 @@ public abstract class CharGlyphMap
* Unicode code point of glyph <code>i</code> in the font.
*/
private char[] glyphToUCS2 = new char[256];
-
-
+
+
/**
* A String whose <code>charAt(i)</code> is the Unicode character
* that corresponds to the codepoint <code>i + 127</code> in the
@@ -562,7 +562,7 @@ public abstract class CharGlyphMap
/* The CMAP version must be 0. */
if (buf.getChar() != 0)
throw new IllegalStateException();
-
+
numTables = buf.getChar();
for (int i = 0; i < numTables; i++)
{
@@ -705,7 +705,7 @@ public abstract class CharGlyphMap
return null;
}
}
-
+
/**
* A mapping from Unicode code points to glyph IDs through CMAP Type
@@ -805,7 +805,7 @@ public abstract class CharGlyphMap
buf.position(pos);
idRangeOffset_glyphID = buf.asCharBuffer();
-
+
endCode.limit(segCount);
startCode.limit(segCount);
idDelta.limit(segCount);
@@ -856,7 +856,7 @@ public abstract class CharGlyphMap
segStart = firstChar.get(segment);
if ((c < segStart) || (c > lastChar.get(segment)))
return 0;
-
+
/*
* System.out.println("seg " + segment
* + ", range=" + (int) rangeID[segment]
@@ -912,8 +912,8 @@ public abstract class CharGlyphMap
{
int numGroups;
IntBuffer data;
-
-
+
+
/**
* Determines whether this implementation supports a combination
* of platform and encoding for a type 12 <code>cmap</code> table.
@@ -964,8 +964,8 @@ public abstract class CharGlyphMap
numGroups = buf.getInt();
data = buf.asIntBuffer();
}
-
-
+
+
/**
* Determines the glyph index for a given Unicode codepoint. Users
* should be aware that the character-to-glyph mapping not not
@@ -993,7 +993,7 @@ public abstract class CharGlyphMap
startCharCode = data.get(3 * mid);
endCharCode = data.get(3 * mid + 1);
-
+
/*
System.out.println("group " + mid + " (U+"
+ Integer.toHexString(startCharCode)
@@ -1005,7 +1005,7 @@ public abstract class CharGlyphMap
return ucs4
- startCharCode
+ /* startGlyphID */ data.get(mid * 3 + 2);
-
+
if (endCharCode < ucs4)
min = mid + 1;
else
diff --git a/gnu/java/awt/font/opentype/GlyphNamer.java b/gnu/java/awt/font/opentype/GlyphNamer.java
index c2b009de3..72cecb542 100644
--- a/gnu/java/awt/font/opentype/GlyphNamer.java
+++ b/gnu/java/awt/font/opentype/GlyphNamer.java
@@ -411,7 +411,7 @@ final class GlyphNamer
readPost();
}
-
+
/**
* Sets up the information which allows to retrieve the information
@@ -625,7 +625,7 @@ final class GlyphNamer
* print " private static final String %s" % name
* for i in range(0, len(s), 60):
* print ' + "%s"' % s[i:i+60]
- *
+ *
* glyphs = {}
* for line in open('aglfn13.txt', 'r').readlines():
* if line[0] == '#': continue
@@ -1009,7 +1009,7 @@ final class GlyphNamer
*/
min = 0;
max = AGLFN_GLYPHS.length() - 1;
- mid = max >> 1;
+ mid = max >> 1;
midChar = AGLFN_GLYPHS.charAt(mid);
do
{
@@ -1023,7 +1023,7 @@ final class GlyphNamer
midChar = AGLFN_GLYPHS.charAt(mid);
}
while (min < max);
-
+
if (midChar != c)
return null;
@@ -1078,7 +1078,7 @@ final class GlyphNamer
if (name != null)
return name;
}
-
+
CPStringBuilder buf = new CPStringBuilder(numChars * 8);
for (int i = 0; i < numChars; i++)
{
diff --git a/gnu/java/awt/font/opentype/MacResourceFork.java b/gnu/java/awt/font/opentype/MacResourceFork.java
index 8115e0403..c0f3de80e 100644
--- a/gnu/java/awt/font/opentype/MacResourceFork.java
+++ b/gnu/java/awt/font/opentype/MacResourceFork.java
@@ -123,7 +123,7 @@ final class MacResourceFork
}
}
}
-
+
public Resource[] getResources(int type)
{
@@ -137,7 +137,7 @@ final class MacResourceFork
}
return null;
}
-
+
public Resource getResource(int type, short id)
{
@@ -149,7 +149,7 @@ final class MacResourceFork
{
if (types[i] != type)
continue;
-
+
res = resources[i];
for (int j = 0; j < res.length; j++)
if (res[j].getID() == id)
diff --git a/gnu/java/awt/font/opentype/NameDecoder.java b/gnu/java/awt/font/opentype/NameDecoder.java
index e4ea202bb..1f1d50ac1 100644
--- a/gnu/java/awt/font/opentype/NameDecoder.java
+++ b/gnu/java/awt/font/opentype/NameDecoder.java
@@ -139,20 +139,20 @@ public class NameDecoder
nameLen = nameTable.getShort();
nameStart = offset + nameTable.getShort();
-
+
if (nameID != name)
continue;
// Handle PS seperately as it can be only ASCII, although
// possibly encoded as UTF-16BE
if ( name == NAME_POSTSCRIPT )
- {
- if( nameTable.get(nameStart) == 0 ) // Peek at top byte
- result = decodeName("UTF-16BE", nameTable, nameStart, nameLen);
- else
- result = decodeName("ASCII", nameTable, nameStart, nameLen);
- return result;
- }
+ {
+ if( nameTable.get(nameStart) == 0 ) // Peek at top byte
+ result = decodeName("UTF-16BE", nameTable, nameStart, nameLen);
+ else
+ result = decodeName("ASCII", nameTable, nameStart, nameLen);
+ return result;
+ }
match = false;
switch (namePlatform)
@@ -186,7 +186,7 @@ public class NameDecoder
break;
}
-
+
if (match)
{
result = decodeName(namePlatform, nameEncoding, nameLanguage,
@@ -316,7 +316,7 @@ public class NameDecoder
if (loc == null)
return -1;
-
+
code = findLanguageCode(loc.getLanguage(), macLanguageCodes);
switch (code)
{
@@ -333,10 +333,10 @@ public class NameDecoder
// know what do do about them. See the method documentation for
// details.
}
-
+
return code;
}
-
+
/**
* Maps a Java Locale into a Microsoft language code.
@@ -348,7 +348,7 @@ public class NameDecoder
if (locale == null)
return -1;
-
+
isoCode = locale.getLanguage();
code = findLanguageCode(isoCode, microsoftLanguageCodes);
if (code == -1)
@@ -572,7 +572,7 @@ public class NameDecoder
}
}
-
+
/**
* Maps a Microsoft locale ID (LCID) to the name of the
* corresponding Java Charset.
@@ -664,7 +664,7 @@ public class NameDecoder
case 3: /* Microsoft Windows */
return getWindowsLocale(language);
-
+
default:
return null;
}
diff --git a/gnu/java/awt/font/opentype/OpenTypeFont.java b/gnu/java/awt/font/opentype/OpenTypeFont.java
index 6c2193b94..f46addc3c 100644
--- a/gnu/java/awt/font/opentype/OpenTypeFont.java
+++ b/gnu/java/awt/font/opentype/OpenTypeFont.java
@@ -83,7 +83,7 @@ public final class OpenTypeFont
static final int TAG_TRUE = 0x74727565; // 'true'
static final int TAG_TTCF = 0x74746366; // 'ttcf'
static final int TAG_ZAPF = 0x5a617066; // 'Zapf'
-
+
/**
* A buffer containing the font data. Note that this may well be an
@@ -112,7 +112,7 @@ public final class OpenTypeFont
*/
private int version;
-
+
/**
* The number of font units per em. For fonts with TrueType
* outlines, this is usually a power of two (such as 2048). For
@@ -133,7 +133,7 @@ public final class OpenTypeFont
* The scaler to which the actual scaling work is delegated.
*/
private Scaler scaler;
-
+
/**
* A delegate object for mapping Unicode UCS-4 codepoints to glyph
@@ -277,8 +277,8 @@ public final class OpenTypeFont
return i;
return -1;
}
-
-
+
+
/**
* Returns the name of the family to which this font face belongs,
@@ -352,8 +352,8 @@ public final class OpenTypeFont
return name;
}
-
-
+
+
/**
* Returns the full name of this font face, for example
@@ -404,7 +404,7 @@ public final class OpenTypeFont
*/
return numGlyphs;
}
-
+
/**
* Returns the index of the glyph which gets displayed if the font
@@ -489,7 +489,7 @@ public final class OpenTypeFont
result.limit(len);
return result;
}
-
+
/**
* Returns the size of one of the tables in the font,
@@ -508,7 +508,7 @@ public final class OpenTypeFont
{
if (cmap != null)
return cmap;
-
+
synchronized (this)
{
if (cmap == null)
@@ -545,7 +545,7 @@ public final class OpenTypeFont
return getCharGlyphMap().getGlyph(ucs4);
}
-
+
/**
* Creates a GlyphVector by mapping each character in a
* CharacterIterator to the corresponding glyph.
@@ -584,7 +584,7 @@ public final class OpenTypeFont
// Initialize hinter if necessary.
checkHinter(FontDelegate.FLAG_FITTED);
- CharGlyphMap cmap;
+ CharGlyphMap cmap;
int numGlyphs;
int[] glyphs;
int glyph;
diff --git a/gnu/java/awt/font/opentype/OpenTypeFontFactory.java b/gnu/java/awt/font/opentype/OpenTypeFontFactory.java
index 3a00dfba2..32c4828c9 100644
--- a/gnu/java/awt/font/opentype/OpenTypeFontFactory.java
+++ b/gnu/java/awt/font/opentype/OpenTypeFontFactory.java
@@ -126,7 +126,7 @@ public final class OpenTypeFontFactory
rsrc = fork.getResources(OpenTypeFont.TAG_SFNT);
fonts = new OpenTypeFont[rsrc.length];
- for (int i = 0; i < fonts.length; i++)
+ for (int i = 0; i < fonts.length; i++)
fonts[i] = new OpenTypeFont(rsrc[i].getContent(), 0);
return fonts;
diff --git a/gnu/java/awt/font/opentype/truetype/GlyphLoader.java b/gnu/java/awt/font/opentype/truetype/GlyphLoader.java
index 249a87dd4..8a3c56665 100644
--- a/gnu/java/awt/font/opentype/truetype/GlyphLoader.java
+++ b/gnu/java/awt/font/opentype/truetype/GlyphLoader.java
@@ -71,8 +71,8 @@ final class GlyphLoader
* glyph.
*/
private final GlyphMeasurer glyphMeasurer;
-
-
+
+
/**
* The virtual machine for executing TrueType bytecodes.
*/
@@ -157,7 +157,7 @@ final class GlyphLoader
yMin = glyph.getChar();
xMax = glyph.getChar();
yMax = glyph.getChar();
-
+
if (numContours >= 0)
loadSimpleGlyph(glyphIndex, pointSize, transform, antialias,
@@ -272,13 +272,13 @@ final class GlyphLoader
if ((flags & WE_HAVE_A_SCALE) != 0)
{
a = d = getDouble214(glyph);
- b = c = 0.0;
+ b = c = 0.0;
}
else if ((flags & WE_HAVE_AN_X_AND_Y_SCALE) != 0)
{
a = getDouble214(glyph);
d = getDouble214(glyph);
- b = c = 0.0;
+ b = c = 0.0;
}
else if ((flags & WE_HAVE_A_TWO_BY_TWO) != 0)
{
@@ -310,7 +310,7 @@ final class GlyphLoader
if (Math.abs(Math.abs(c) - Math.abs(d)) <= 33.0/65536.0)
n = n * 2;
-
+
if ((flags & ARGS_ARE_XY_VALUES) != 0)
{
e = m * arg1;
@@ -320,14 +320,14 @@ final class GlyphLoader
e = f = 0.0;
componentTransform.setTransform(a, b, c, d, 0.0, 0.0);
-
+
// System.out.println("componentTransform = " + componentTransform
// + ", e=" + e + ", f=" + f);
componentTransform.concatenate(transform);
int pos = glyph.position();
int lim = glyph.limit();
-
+
loadSubGlyph(subGlyphIndex, pointSize, componentTransform,
antialias, subGlyphZone,
Math.round((float) e + preTranslateX),
@@ -431,7 +431,7 @@ final class GlyphLoader
glyphMeasurer.getAdvanceWidth(glyphIndex, true));
glyphZone.setOriginalY(numPoints + 1,
glyphMeasurer.getAdvanceHeight(glyphIndex, true));
-
+
/* Phantom point 2: Vertical origin. */
int vertX = glyphMeasurer.getAscent(/* vertical */ false);
int vertY = glyphMeasurer.getAscent(/* horizontal */ true);
diff --git a/gnu/java/awt/font/opentype/truetype/GlyphLocator.java b/gnu/java/awt/font/opentype/truetype/GlyphLocator.java
index a2db8aca7..fc2256b15 100644
--- a/gnu/java/awt/font/opentype/truetype/GlyphLocator.java
+++ b/gnu/java/awt/font/opentype/truetype/GlyphLocator.java
@@ -94,7 +94,7 @@ abstract class GlyphLocator
case 1:
return new GlyphLocator.FourByte(loca, glyf);
-
+
default:
throw new FontFormatException("unsupported loca format");
}
diff --git a/gnu/java/awt/font/opentype/truetype/GlyphMeasurer.java b/gnu/java/awt/font/opentype/truetype/GlyphMeasurer.java
index bbd0b9bff..452456d13 100644
--- a/gnu/java/awt/font/opentype/truetype/GlyphMeasurer.java
+++ b/gnu/java/awt/font/opentype/truetype/GlyphMeasurer.java
@@ -69,7 +69,7 @@ final class GlyphMeasurer
* font&#x2019;s <code>vmtx</code> table as shorts.
*/
private final ShortBuffer verticalGlyphMetrics;
-
+
private final int numLongHorizontalMetricsEntries;
private final int numLongVerticalMetricsEntries;
@@ -82,7 +82,7 @@ final class GlyphMeasurer
private final int horizontalLineGap;
-
+
/**
* Constructs a GlyphMeasurer from TrueType/OpenType font tables.
*
@@ -145,7 +145,7 @@ final class GlyphMeasurer
{
return horizontal ? horizontalAscent : verticalAscent;
}
-
+
/**
* Returns the distance from the baseline to the lowest descender.
@@ -156,7 +156,7 @@ final class GlyphMeasurer
* @return the maximal descent, in font units.
*/
public int getDescent(boolean horizontal)
- {
+ {
return horizontal ? horizontalDescent : verticalDescent;
}
@@ -188,7 +188,7 @@ final class GlyphMeasurer
* @return the advance width, in font units.
*/
public int getAdvanceWidth(int glyphIndex, boolean horizontal)
- {
+ {
if (!horizontal)
return 0;
diff --git a/gnu/java/awt/font/opentype/truetype/Point.java b/gnu/java/awt/font/opentype/truetype/Point.java
index 31c12037c..438eb6558 100644
--- a/gnu/java/awt/font/opentype/truetype/Point.java
+++ b/gnu/java/awt/font/opentype/truetype/Point.java
@@ -53,7 +53,7 @@ public class Point
public static final short FLAG_INFLECTION = 32;
public static final short FLAG_DONE_X = 64;
public static final short FLAG_DONE_Y = 128;
-
+
/**
* Right direction.
*/
diff --git a/gnu/java/awt/font/opentype/truetype/TrueTypeScaler.java b/gnu/java/awt/font/opentype/truetype/TrueTypeScaler.java
index 5f5cc0001..1d5c53f9d 100644
--- a/gnu/java/awt/font/opentype/truetype/TrueTypeScaler.java
+++ b/gnu/java/awt/font/opentype/truetype/TrueTypeScaler.java
@@ -137,7 +137,7 @@ public final class TrueTypeScaler
ByteBuffer htmx,
ByteBuffer vhea,
ByteBuffer vtmx,
- ByteBuffer maxp,
+ ByteBuffer maxp,
ByteBuffer controlValueTable,
ByteBuffer fpgm,
int locaFormat, ByteBuffer loca,
@@ -254,7 +254,7 @@ public final class TrueTypeScaler
advance.setLocation(
scaleFactor * glyphMeasurer.getAdvanceWidth(glyphIndex, horizontal),
scaleFactor * glyphMeasurer.getAdvanceHeight(glyphIndex, horizontal));
-
+
transform.transform(advance, advance);
}
diff --git a/gnu/java/awt/font/opentype/truetype/VirtualMachine.java b/gnu/java/awt/font/opentype/truetype/VirtualMachine.java
index c88d4c649..512c39ffd 100644
--- a/gnu/java/awt/font/opentype/truetype/VirtualMachine.java
+++ b/gnu/java/awt/font/opentype/truetype/VirtualMachine.java
@@ -70,7 +70,7 @@ import java.nio.ShortBuffer;
* obtained from Apple Computer to use the patented technology inside
* the United States. For other countries, different dates might
* apply, or no license might be needed.
- *
+ *
* <p>The default build of this class does not use the patented
* algorithms. If you have obtained a license from Apple, or if the
* patent protection has expired, or if no license is required for
@@ -348,7 +348,7 @@ class VirtualMachine
/* Read the contents of the Control Value Table. */
if (controlValueTable != null)
this.controlValueTable = controlValueTable.asShortBuffer();
-
+
maxInstructionDefs = maxp.getChar(22);
maxStackElements = maxp.getChar(24);
storage = new int[maxStorage];
@@ -356,7 +356,7 @@ class VirtualMachine
this.preProgram = preProgram;
numTwilightPoints = maxp.getChar(16);
}
-
+
/**
* Sets the graphics state to default values.
@@ -462,7 +462,7 @@ class VirtualMachine
changeCTM = ((pointSize_Fixed != this.pointSize)
|| !deviceTransform.equals(this.deviceTransform)
|| (antialiased != this.antialiased));
-
+
if (changeCTM)
{
this.pointSize = pointSize_Fixed;
@@ -489,7 +489,7 @@ class VirtualMachine
return executeGlyphInstructions;
}
-
+
/**
* Executes a stream of TrueType instructions.
@@ -577,7 +577,7 @@ class VirtualMachine
sbuf.append(getHex(inst.get(pc + 1 + i)));
}
}
-
+
while (sbuf.length() < 30)
sbuf.append(' ');
sbuf.append('|');
@@ -814,7 +814,7 @@ class VirtualMachine
case 0x16: // SZPS, Set Zone PointerS
zp0 = zp1 = zp2 = getZone(stack[sp--]);
break;
-
+
case 0x17: // SLOOP, Set LOOP variable
loop = stack[sp--];
break;
@@ -837,7 +837,7 @@ class VirtualMachine
/* illegal: --, -- */ -1, -1,
/* handle nested if clauses */ true);
break;
-
+
case 0x1C: // JMPR, JuMP Relative
inst.position(inst.position() - 1 + stack[sp--]);
break;
@@ -905,7 +905,7 @@ class VirtualMachine
execute(fdefBuffer[i], fdefEntryPoint[i]);
inst.position(e1);
break;
-
+
case 0x2C: // FDEF, Function DEFinition
i = stack[sp--];
fdefBuffer[i] = inst;
@@ -1170,7 +1170,7 @@ class VirtualMachine
sp -= 2 * count;
deltaC(stack, sp + 1, count, 32);
break;
-
+
case 0x76: // SROUND, Super ROUND
setRoundingMode(Fixed.ONE, stack[sp--]);
break;
@@ -1198,7 +1198,7 @@ class VirtualMachine
break;
case 0x7c: // RUTG, Round Up To Grid
- setRoundingMode(Fixed.ONE, 0x40);
+ setRoundingMode(Fixed.ONE, 0x40);
break;
case 0x7d: // RDTG, Round Down To Grid
@@ -1279,7 +1279,7 @@ class VirtualMachine
break;
}
break;
-
+
case 0xb0: // PUSHB[0]
case 0xb1: // PUSHB[1]
case 0xb2: // PUSHB[2]
@@ -1424,7 +1424,7 @@ class VirtualMachine
delta = (arg & 15) - 8;
if (delta >= 0)
++delta;
-
+
rightShift = deltaShift - 6;
if (rightShift > 0)
delta = delta >> rightShift;
@@ -1570,7 +1570,7 @@ class VirtualMachine
org_a = getOriginalProjection(zp0, rp1);
cur_a = getProjection(zp0, rp1);
- org_b = getOriginalProjection(zp1, rp2);
+ org_b = getOriginalProjection(zp1, rp2);
cur_b = getProjection(zp1, rp2);
while (--loop >= 0)
@@ -1643,7 +1643,7 @@ class VirtualMachine
{
result = compensation - roundPhase + roundThreshold - distance;
result &= -roundPeriod;
- return Math.max(-result, 0) - roundPhase;
+ return Math.max(-result, 0) - roundPhase;
}
}
@@ -1694,7 +1694,7 @@ class VirtualMachine
{
cachedPixelsPerEM = Fixed.intValue(Fixed.vectorLength(
applyCTM_x(projX >> 8, projY >> 8),
- applyCTM_y(projX >> 8, projY >> 8)));
+ applyCTM_y(projX >> 8, projY >> 8)));
}
return cachedPixelsPerEM;
diff --git a/gnu/java/awt/font/opentype/truetype/Zone.java b/gnu/java/awt/font/opentype/truetype/Zone.java
index 7c25a0a6a..b0559e0e3 100644
--- a/gnu/java/awt/font/opentype/truetype/Zone.java
+++ b/gnu/java/awt/font/opentype/truetype/Zone.java
@@ -229,7 +229,7 @@ public final class Zone
System.out.print('.');
else
System.out.print('c');
- if (isContourEnd(i))
+ if (isContourEnd(i))
System.out.print('E');
System.out.println();
if (isContourEnd(i))
diff --git a/gnu/java/awt/font/opentype/truetype/ZonePathIterator.java b/gnu/java/awt/font/opentype/truetype/ZonePathIterator.java
index 0f60828b8..f4534f36f 100644
--- a/gnu/java/awt/font/opentype/truetype/ZonePathIterator.java
+++ b/gnu/java/awt/font/opentype/truetype/ZonePathIterator.java
@@ -70,7 +70,7 @@ final class ZonePathIterator
*/
private static final int EMIT_CLOSE = 1;
-
+
/**
* If <code>state</code> has this value, <code>currentSegment</code>
* will emit a <code>SEG_MOVETO</code> segment to the first point in
@@ -115,7 +115,7 @@ final class ZonePathIterator
*/
private int contourStart;
-
+
private int type;
/**
@@ -152,7 +152,7 @@ final class ZonePathIterator
return (state != EMIT_CLOSE) && (curPoint >= numPoints);
}
-
+
public void next()
{
boolean onCurve;
@@ -231,7 +231,7 @@ final class ZonePathIterator
else
return p + 1;
}
-
+
/**
@@ -244,7 +244,7 @@ final class ZonePathIterator
{
case EMIT_CLOSE:
return PathIterator.SEG_CLOSE;
-
+
case EMIT_MOVETO:
return getStartSegment(curPoint, coords);
@@ -270,7 +270,7 @@ final class ZonePathIterator
if (floats == null)
floats = new float[6];
int result;
-
+
result = currentSegment(floats);
for (int i = 0; i < 6; i++)
coords[i] = floats[i];
@@ -362,7 +362,7 @@ final class ZonePathIterator
if (zone.isOnCurve(contourStart))
{
x = zone.getX(contourStart, type);
- y = zone.getY(contourStart, type);
+ y = zone.getY(contourStart, type);
}
else
{
diff --git a/gnu/java/awt/image/AsyncImage.java b/gnu/java/awt/image/AsyncImage.java
index 935601a88..4fa33740e 100644
--- a/gnu/java/awt/image/AsyncImage.java
+++ b/gnu/java/awt/image/AsyncImage.java
@@ -159,9 +159,9 @@ public class AsyncImage
g = r.getGraphics(); // Should we return some dummy graphics instead?
return g;
}
-
+
public boolean isComplete() {
- return complete;
+ return complete;
}
public int getHeight(ImageObserver observer)
diff --git a/gnu/java/awt/image/ImageConverter.java b/gnu/java/awt/image/ImageConverter.java
index f607b3496..f9c6268c3 100644
--- a/gnu/java/awt/image/ImageConverter.java
+++ b/gnu/java/awt/image/ImageConverter.java
@@ -55,7 +55,7 @@ import java.util.Hashtable;
/**
* Convert an Image to a BufferedImage.
- *
+ *
* @author Roman Kennke (kennke@aicas.com)
*/
public class ImageConverter implements ImageConsumer
@@ -121,7 +121,7 @@ public class ImageConverter implements ImageConsumer
scansize, transparency);
}
else if (model instanceof IndexColorModel
- && targetColorModel.equals(ColorModel.getRGBdefault()))
+ && targetColorModel.equals(ColorModel.getRGBdefault()))
{
transparency = convertIndexColorModelToSRGB(x, y, w, h,
(IndexColorModel) model,
@@ -246,7 +246,7 @@ public class ImageConverter implements ImageConsumer
* @param offset the offset in the pixel array
* @param scansize the scanline size
* @param transparency the assumed transparency
- *
+ *
* @return the determined transparency
*/
private int transferPixels(int x, int y, int w, int h, ColorModel model,
@@ -281,7 +281,7 @@ public class ImageConverter implements ImageConsumer
* @param offset the offset in the pixel array
* @param scansize the scanline size
* @param transparency the assumed transparency
- *
+ *
* @return the determined transparency
*/
private int transferPixels(int x, int y, int w, int h, ColorModel model,
@@ -317,7 +317,7 @@ public class ImageConverter implements ImageConsumer
* @param offset the offset in the pixel array
* @param scansize the scanline size
* @param transparency the assumed transparency
- *
+ *
* @return the determined transparency
*/
private int convertPixels(int x, int y, int w, int h, ColorModel model,
@@ -356,7 +356,7 @@ public class ImageConverter implements ImageConsumer
* @param offset the offset in the pixel array
* @param scansize the scanline size
* @param transparency the assumed transparency
- *
+ *
* @return the determined transparency
*/
private int convertPixels(int x, int y, int w, int h, ColorModel model,
@@ -394,7 +394,7 @@ public class ImageConverter implements ImageConsumer
* @param offset the offset in the pixel array
* @param scansize the scanline size
* @param transparency the assumed transparency
- *
+ *
* @return the determined transparency
*/
private int convertIndexColorModelToSRGB(int x, int y, int w, int h,
@@ -447,7 +447,7 @@ public class ImageConverter implements ImageConsumer
* @param offset the offset in the pixel array
* @param scansize the scanline size
* @param transparency the assumed transparency
- *
+ *
* @return the determined transparency
*/
private int convertIndexColorModelToSRGB(int x, int y, int w, int h,
diff --git a/gnu/java/awt/image/ImageDecoder.java b/gnu/java/awt/image/ImageDecoder.java
index 8e8eecb25..a572ea33b 100644
--- a/gnu/java/awt/image/ImageDecoder.java
+++ b/gnu/java/awt/image/ImageDecoder.java
@@ -48,7 +48,7 @@ import java.io.InputStream;
import java.net.URL;
import java.util.Vector;
-public abstract class ImageDecoder implements ImageProducer
+public abstract class ImageDecoder implements ImageProducer
{
Vector consumers = new Vector ();
String filename;
@@ -94,7 +94,7 @@ public abstract class ImageDecoder implements ImageProducer
length = imagelength;
}
- public void addConsumer (ImageConsumer ic)
+ public void addConsumer (ImageConsumer ic)
{
consumers.addElement (ic);
}
@@ -103,7 +103,7 @@ public abstract class ImageDecoder implements ImageProducer
{
return consumers.contains (ic);
}
-
+
public void removeConsumer (ImageConsumer ic)
{
consumers.removeElement (ic);
@@ -115,20 +115,20 @@ public abstract class ImageDecoder implements ImageProducer
addConsumer(ic);
Vector list = (Vector) consumers.clone ();
- try
+ try
{
- // Create the input stream here rather than in the
- // ImageDecoder constructors so that exceptions cause
- // imageComplete to be called with an appropriate error
- // status.
+ // Create the input stream here rather than in the
+ // ImageDecoder constructors so that exceptions cause
+ // imageComplete to be called with an appropriate error
+ // status.
if (input == null)
{
- try
+ try
{
if (url != null)
input = url.openStream();
- else if (datainput != null)
- input = new DataInputStreamWrapper(datainput);
+ else if (datainput != null)
+ input = new DataInputStreamWrapper(datainput);
else
{
if (filename != null)
@@ -137,8 +137,8 @@ public abstract class ImageDecoder implements ImageProducer
input = new ByteArrayInputStream (data, offset, length);
}
produce (list, input);
- }
- finally
+ }
+ finally
{
input = null;
}
@@ -150,16 +150,16 @@ public abstract class ImageDecoder implements ImageProducer
}
catch (Exception e)
{
- for (int i = 0; i < list.size (); i++)
- {
- ImageConsumer ic2 = (ImageConsumer) list.elementAt (i);
- ic2.imageComplete (ImageConsumer.IMAGEERROR);
- }
+ for (int i = 0; i < list.size (); i++)
+ {
+ ImageConsumer ic2 = (ImageConsumer) list.elementAt (i);
+ ic2.imageComplete (ImageConsumer.IMAGEERROR);
+ }
}
}
- public void requestTopDownLeftRightResend (ImageConsumer ic)
- {
+ public void requestTopDownLeftRightResend (ImageConsumer ic)
+ {
}
public abstract void produce (Vector v, InputStream is) throws IOException;
@@ -176,13 +176,13 @@ public abstract class ImageDecoder implements ImageProducer
public int read() throws IOException
{
try
- {
- return datainput.readByte() & 0xFF;
- }
+ {
+ return datainput.readByte() & 0xFF;
+ }
catch (EOFException eofe)
- {
- return -1;
- }
+ {
+ return -1;
+ }
}
}
}
diff --git a/gnu/java/awt/image/XBMDecoder.java b/gnu/java/awt/image/XBMDecoder.java
index 0793d8ee7..35a3568b8 100644
--- a/gnu/java/awt/image/XBMDecoder.java
+++ b/gnu/java/awt/image/XBMDecoder.java
@@ -55,8 +55,8 @@ public class XBMDecoder extends ImageDecoder
static final ColorModel cm = ColorModel.getRGBdefault ();
static final int black = 0xff000000;
static final int transparent = 0x00000000;
- static final int masktable[] = { 0x01, 0x02, 0x04, 0x08,
- 0x10, 0x20, 0x40, 0x80 };
+ static final int masktable[] = { 0x01, 0x02, 0x04, 0x08,
+ 0x10, 0x20, 0x40, 0x80 };
public XBMDecoder (String filename)
{
@@ -75,27 +75,27 @@ public class XBMDecoder extends ImageDecoder
for (int i = 0; i < 2; i++)
{
- String line = reader.readLine ();
- StringTokenizer st = new StringTokenizer (line);
-
- st.nextToken (); // #define
- st.nextToken (); // name_[width|height]
- if (i == 0)
- width = Integer.parseInt (st.nextToken (), 10);
- else
- height = Integer.parseInt (st.nextToken (), 10);
+ String line = reader.readLine ();
+ StringTokenizer st = new StringTokenizer (line);
+
+ st.nextToken (); // #define
+ st.nextToken (); // name_[width|height]
+ if (i == 0)
+ width = Integer.parseInt (st.nextToken (), 10);
+ else
+ height = Integer.parseInt (st.nextToken (), 10);
}
for (int i = 0; i < v.size (); i++)
{
- ImageConsumer ic = (ImageConsumer) v.elementAt (i);
-
- ic.setDimensions (width, height);
- ic.setColorModel (cm);
- ic.setHints (ImageConsumer.COMPLETESCANLINES
- | ImageConsumer.SINGLEFRAME
- | ImageConsumer.SINGLEPASS
- | ImageConsumer.TOPDOWNLEFTRIGHT);
+ ImageConsumer ic = (ImageConsumer) v.elementAt (i);
+
+ ic.setDimensions (width, height);
+ ic.setColorModel (cm);
+ ic.setHints (ImageConsumer.COMPLETESCANLINES
+ | ImageConsumer.SINGLEFRAME
+ | ImageConsumer.SINGLEPASS
+ | ImageConsumer.TOPDOWNLEFTRIGHT);
}
/* skip to the byte array */
@@ -104,22 +104,22 @@ public class XBMDecoder extends ImageDecoder
/* loop through each scanline */
for (int line = 0; line < height; line++)
{
- int scanline[] = getScanline (reader, width);
+ int scanline[] = getScanline (reader, width);
- for (int i = 0; i < v.size (); i++)
- {
- ImageConsumer ic = (ImageConsumer) v.elementAt (i);
- ic.setPixels (0, 0 + line, width, 1, cm, scanline, 0, width);
- }
+ for (int i = 0; i < v.size (); i++)
+ {
+ ImageConsumer ic = (ImageConsumer) v.elementAt (i);
+ ic.setPixels (0, 0 + line, width, 1, cm, scanline, 0, width);
+ }
}
/* tell each ImageConsumer that we're finished */
for (int i = 0; i < v.size (); i++)
{
- ImageConsumer ic = (ImageConsumer) v.elementAt (i);
- ic.imageComplete (ImageConsumer.STATICIMAGEDONE);
+ ImageConsumer ic = (ImageConsumer) v.elementAt (i);
+ ic.imageComplete (ImageConsumer.STATICIMAGEDONE);
}
- }
+ }
public static int[] getScanline (Reader in, int len) throws IOException
{
@@ -129,25 +129,25 @@ public class XBMDecoder extends ImageDecoder
while (x < len)
{
- int ch = in.read ();
- if (ch == '0')
- {
- in.read (); // 'x'
-
- byteStr[0] = (char) in.read ();
- byteStr[1] = (char) in.read ();
-
- int byteVal = Integer.parseInt (new String (byteStr), 16);
-
- for (int i = 0; i < 8; i++, x++)
- {
- if (x == len) // condition occurs if bitmap is padded
- return scanline;
-
- scanline[x] = ((byteVal & masktable[i]) != 0) ?
- black : transparent;
- }
- }
+ int ch = in.read ();
+ if (ch == '0')
+ {
+ in.read (); // 'x'
+
+ byteStr[0] = (char) in.read ();
+ byteStr[1] = (char) in.read ();
+
+ int byteVal = Integer.parseInt (new String (byteStr), 16);
+
+ for (int i = 0; i < 8; i++, x++)
+ {
+ if (x == len) // condition occurs if bitmap is padded
+ return scanline;
+
+ scanline[x] = ((byteVal & masktable[i]) != 0) ?
+ black : transparent;
+ }
+ }
}
return scanline;
diff --git a/gnu/java/awt/java2d/AbstractGraphics2D.java b/gnu/java/awt/java2d/AbstractGraphics2D.java
index 850465938..1334866f2 100644
--- a/gnu/java/awt/java2d/AbstractGraphics2D.java
+++ b/gnu/java/awt/java2d/AbstractGraphics2D.java
@@ -166,7 +166,7 @@ public abstract class AbstractGraphics2D
*/
protected static final WeakHashMap<Image, HashMap<Dimension,Image>> imageCache =
new WeakHashMap<Image, HashMap<Dimension, Image>>();
-
+
/**
* Wether we use anti aliasing for rendering text by default or not.
*/
@@ -234,7 +234,7 @@ public abstract class AbstractGraphics2D
*/
private Color foreground = Color.BLACK;
private boolean isForegroundColorNull = true;
-
+
/**
* The current font.
*/
@@ -287,16 +287,16 @@ public abstract class AbstractGraphics2D
private static final HashMap<Key, Object> STANDARD_HINTS;
static
{
-
+
HashMap<Key, Object> hints = new HashMap<Key, Object>();
hints.put(RenderingHints.KEY_TEXT_ANTIALIASING,
RenderingHints.VALUE_TEXT_ANTIALIAS_DEFAULT);
hints.put(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_DEFAULT);
-
+
STANDARD_HINTS = hints;
}
-
+
/**
* Creates a new AbstractGraphics2D instance.
*/
@@ -398,8 +398,8 @@ public abstract class AbstractGraphics2D
*
* @param image the source buffered image
* @param op the filter to apply to the buffered image before rendering
- * @param x the x coordinate to render the image to
- * @param y the y coordinate to render the image to
+ * @param x the x coordinate to render the image to
+ * @param y the y coordinate to render the image to
*/
public void drawImage(BufferedImage image, BufferedImageOp op, int x, int y)
{
@@ -415,7 +415,7 @@ public abstract class AbstractGraphics2D
* transform is used to convert the image into user space. The transform
* of this AbstractGraphics2D object is used to transform from user space
* to device space.
- *
+ *
* The rendering is performed using the scanline algorithm that performs the
* rendering of other shapes and a custom Paint implementation, that supplies
* the pixel values of the rendered image.
@@ -438,7 +438,7 @@ public abstract class AbstractGraphics2D
* of this AbstractGraphics2D object is used to transform from user space
* to device space. Only the area specified by <code>areaOfInterest</code>
* is finally rendered to the target.
- *
+ *
* The rendering is performed using the scanline algorithm that performs the
* rendering of other shapes and a custom Paint implementation, that supplies
* the pixel values of the rendered image.
@@ -504,7 +504,7 @@ public abstract class AbstractGraphics2D
(int) image.getWidth(),
(int) image.getHeight());
drawRenderableImageImpl(image, xform, areaOfInterest);
-
+
}
/**
@@ -648,7 +648,7 @@ public abstract class AbstractGraphics2D
if (p != null)
{
paint = p;
-
+
if (! (paint instanceof Color))
{
isOptimized = false;
@@ -665,11 +665,11 @@ public abstract class AbstractGraphics2D
this.foreground = Color.BLACK;
isForegroundColorNull = true;
}
-
+
// free resources if needed, then put the paint context to null
if (this.paintContext != null)
this.paintContext.dispose();
-
+
this.paintContext = null;
}
@@ -745,7 +745,7 @@ public abstract class AbstractGraphics2D
* Translates the coordinate system by (x, y).
*
* @param x the translation X coordinate
- * @param y the translation Y coordinate
+ * @param y the translation Y coordinate
*/
public void translate(int x, int y)
{
@@ -775,7 +775,7 @@ public abstract class AbstractGraphics2D
* Translates the coordinate system by (tx, ty).
*
* @param tx the translation X coordinate
- * @param ty the translation Y coordinate
+ * @param ty the translation Y coordinate
*/
public void translate(double tx, double ty)
{
@@ -992,7 +992,7 @@ public abstract class AbstractGraphics2D
if (clip == null)
setClip(s);
- // This is so common, let's optimize this.
+ // This is so common, let's optimize this.
else if (clip instanceof Rectangle && s instanceof Rectangle)
{
Rectangle clipRect = (Rectangle) clip;
@@ -1076,8 +1076,8 @@ public abstract class AbstractGraphics2D
else
copy.clip = null;
- copy.renderingHints = new RenderingHints(null);
- copy.renderingHints.putAll(renderingHints);
+ copy.renderingHints = new RenderingHints(null);
+ copy.renderingHints.putAll(renderingHints);
copy.transform = new AffineTransform(transform);
// The remaining state is inmmutable and doesn't need to be copied.
return copy;
@@ -1097,7 +1097,7 @@ public abstract class AbstractGraphics2D
{
if (isForegroundColorNull)
return null;
-
+
return this.foreground;
}
@@ -1107,7 +1107,7 @@ public abstract class AbstractGraphics2D
* @param color the foreground to set
*/
public void setColor(Color color)
- {
+ {
this.setPaint(color);
}
@@ -1298,7 +1298,7 @@ public abstract class AbstractGraphics2D
/**
* Fills a rectangle with the current background color.
*
- * This implementation temporarily sets the foreground color to the
+ * This implementation temporarily sets the foreground color to the
* background and forwards the call to {@link #fillRect(int, int, int, int)}.
*
* @param x the upper left corner, X coordinate
@@ -1590,7 +1590,7 @@ public abstract class AbstractGraphics2D
int dy = Math.min(dy1, dy2);
int dw = Math.abs(dx1 - dx2);
int dh = Math.abs(dy1 - dy2);
-
+
AffineTransform t = new AffineTransform();
t.translate(sx - dx, sy - dy);
double scaleX = (double) sw / (double) dw;
@@ -1693,7 +1693,7 @@ public abstract class AbstractGraphics2D
*
* @param x0 the starting point, X coordinate
* @param y0 the starting point, Y coordinate
- * @param x1 the end point, X coordinate
+ * @param x1 the end point, X coordinate
* @param y1 the end point, Y coordinate
*/
protected void rawDrawLine(int x0, int y0, int x1, int y1)
@@ -1806,7 +1806,7 @@ public abstract class AbstractGraphics2D
public void renderScanline(int y, ScanlineCoverage c)
{
PaintContext pCtx = getPaintContext();
-
+
int x0 = c.getMinX();
int x1 = c.getMaxX();
Raster paintRaster = pCtx.getRaster(x0, y, x1 - x0, 1);
@@ -1842,7 +1842,7 @@ public abstract class AbstractGraphics2D
renderingHints);
WritableRaster raster = getDestinationRaster();
WritableRaster targetChild = raster.createWritableTranslatedChild(-x0, -y);
-
+
cCtx.compose(paintRaster, targetChild, targetChild);
updateRaster(raster, x0, y, x1 - x0, 1);
cCtx.dispose();
@@ -2042,7 +2042,7 @@ public abstract class AbstractGraphics2D
getTransform(),
getRenderingHints());
}
-
+
return this.paintContext;
}
diff --git a/gnu/java/awt/java2d/AlphaCompositeContext.java b/gnu/java/awt/java2d/AlphaCompositeContext.java
index 2e3690d83..f1f082abe 100644
--- a/gnu/java/awt/java2d/AlphaCompositeContext.java
+++ b/gnu/java/awt/java2d/AlphaCompositeContext.java
@@ -82,7 +82,7 @@ public class AlphaCompositeContext
/**
* Creates a new AlphaCompositeContext.
*
- * @param aComp the AlphaComposite object
+ * @param aComp the AlphaComposite object
* @param srcCM the source color model
* @param dstCM the destination color model
*/
@@ -93,7 +93,7 @@ public class AlphaCompositeContext
srcColorModel = srcCM;
dstColorModel = dstCM;
-
+
// Determine the blending factors according to the rule in the
// AlphaComposite. For some rules the factors must be determined
// dynamically because they depend on the actual pixel value.
@@ -301,7 +301,7 @@ public class AlphaCompositeContext
{
for (int i = 0; i < dstComponentsLength - 1; i++)
{
- dstComponents[i] = dstComponents[i] / dstAlpha;
+ dstComponents[i] = dstComponents[i] / dstAlpha;
}
}
diff --git a/gnu/java/awt/java2d/CubicSegment.java b/gnu/java/awt/java2d/CubicSegment.java
index bf66be870..8197c94c5 100644
--- a/gnu/java/awt/java2d/CubicSegment.java
+++ b/gnu/java/awt/java2d/CubicSegment.java
@@ -80,11 +80,11 @@ public class CubicSegment extends Segment
public Object clone()
{
CubicSegment segment = null;
-
+
try
{
segment = (CubicSegment) super.clone();
-
+
segment.P1 = (Point2D) P1.clone();
segment.P2 = (Point2D) P2.clone();
segment.cp1 = (Point2D) cp1.clone();
@@ -96,7 +96,7 @@ public class CubicSegment extends Segment
ie.initCause(cnse);
throw ie;
}
-
+
return segment;
}
@@ -161,7 +161,7 @@ public class CubicSegment extends Segment
return new Segment[] { segmentTop, segmentBottom };
}
-
+
public void reverse()
{
Point2D temp = P1;
@@ -174,11 +174,11 @@ public class CubicSegment extends Segment
public double[] cp1()
{
- return new double[]{cp1.getX(), cp1.getY()};
+ return new double[]{cp1.getX(), cp1.getY()};
}
public double[] cp2()
{
- return new double[]{cp2.getX(), cp2.getY()};
+ return new double[]{cp2.getX(), cp2.getY()};
}
} // class CubicSegment
diff --git a/gnu/java/awt/java2d/LineSegment.java b/gnu/java/awt/java2d/LineSegment.java
index 0395fd0af..904037989 100644
--- a/gnu/java/awt/java2d/LineSegment.java
+++ b/gnu/java/awt/java2d/LineSegment.java
@@ -63,7 +63,7 @@ public class LineSegment extends Segment
public Object clone()
{
LineSegment segment = null;
-
+
try
{
segment = (LineSegment) super.clone();
@@ -76,7 +76,7 @@ public class LineSegment extends Segment
ie.initCause(cnse);
throw ie;
}
-
+
return segment;
}
@@ -108,11 +108,11 @@ public class LineSegment extends Segment
public double[] cp1()
{
- return new double[]{P2.getX(), P2.getY()};
+ return new double[]{P2.getX(), P2.getY()};
}
public double[] cp2()
{
- return new double[]{P1.getX(), P1.getY()};
+ return new double[]{P1.getX(), P1.getY()};
}
} // class LineSegment
diff --git a/gnu/java/awt/java2d/PixelCoverage.java b/gnu/java/awt/java2d/PixelCoverage.java
index c83ad1fff..356021b3d 100644
--- a/gnu/java/awt/java2d/PixelCoverage.java
+++ b/gnu/java/awt/java2d/PixelCoverage.java
@@ -124,7 +124,7 @@ final class PixelCoverage
Bucket match = current;
while (match != null && match.xPos != x)
{
-
+
}
return match;
diff --git a/gnu/java/awt/java2d/QuadSegment.java b/gnu/java/awt/java2d/QuadSegment.java
index 97a5372f6..b8d0ff52e 100644
--- a/gnu/java/awt/java2d/QuadSegment.java
+++ b/gnu/java/awt/java2d/QuadSegment.java
@@ -89,7 +89,7 @@ public class QuadSegment extends Segment
public Object clone()
{
QuadSegment segment = null;
-
+
try
{
segment = (QuadSegment) super.clone();
@@ -104,7 +104,7 @@ public class QuadSegment extends Segment
ie.initCause(cnse);
throw ie;
}
-
+
return segment;
}
@@ -135,10 +135,10 @@ public class QuadSegment extends Segment
return new Segment[]{s1, s2};
}
-
+
private QuadSegment offsetSubdivided(QuadCurve2D curve, boolean plus)
{
- double[] n1 = normal(curve.getX1(), curve.getY1(),
+ double[] n1 = normal(curve.getX1(), curve.getY1(),
curve.getCtrlX(), curve.getCtrlY());
double[] n2 = normal(curve.getCtrlX(), curve.getCtrlY(),
curve.getX2(), curve.getY2());
@@ -152,7 +152,7 @@ public class QuadSegment extends Segment
n2[0] = -n2[0];
n2[1] = -n2[1];
}
-
+
// Handle special cases where the control point is equal to an end point
// or end points are equal (ie, straight lines)
if (curve.getP1().equals(curve.getCtrlPt()))
@@ -179,7 +179,7 @@ public class QuadSegment extends Segment
double ratio = radius / length;
deltaX *= ratio;
deltaY *= ratio;
-
+
if (plus)
cp.setLocation(cp.getX() + deltaX, cp.getY() + deltaY);
else
@@ -192,16 +192,16 @@ public class QuadSegment extends Segment
}
else
{
- cp = lineIntersection(curve.getX1() + n1[0],
+ cp = lineIntersection(curve.getX1() + n1[0],
curve.getY1() + n1[1],
curve.getCtrlX() + n1[0],
curve.getCtrlY() + n1[1],
curve.getCtrlX() + n2[0],
curve.getCtrlY() + n2[1],
- curve.getX2() + n2[0],
+ curve.getX2() + n2[0],
curve.getY2() + n2[1], true);
}
-
+
s = new QuadSegment(curve.getX1() + n1[0], curve.getY1() + n1[1],
cp.getX(), cp.getY(),
curve.getX2() + n2[0], curve.getY2() + n2[1]);
@@ -209,9 +209,9 @@ public class QuadSegment extends Segment
return s;
}
- private Point2D lineIntersection(double X1, double Y1,
- double X2, double Y2,
- double X3, double Y3,
+ private Point2D lineIntersection(double X1, double Y1,
+ double X2, double Y2,
+ double X3, double Y3,
double X4, double Y4,
boolean infinite)
{
@@ -250,11 +250,11 @@ public class QuadSegment extends Segment
public double[] cp1()
{
- return new double[]{cp.getX(), cp.getY()};
+ return new double[]{cp.getX(), cp.getY()};
}
public double[] cp2()
{
- return new double[]{cp.getX(), cp.getY()};
+ return new double[]{cp.getX(), cp.getY()};
}
}
diff --git a/gnu/java/awt/java2d/RasterGraphics.java b/gnu/java/awt/java2d/RasterGraphics.java
index 04eb55eb8..193ea4c7c 100644
--- a/gnu/java/awt/java2d/RasterGraphics.java
+++ b/gnu/java/awt/java2d/RasterGraphics.java
@@ -77,10 +77,10 @@ public class RasterGraphics
{
if (y >= getDeviceBounds().width)
return;
-
+
super.renderScanline(y, c);
}
-
+
/**
* Returns the color model of this Graphics object.
*
diff --git a/gnu/java/awt/java2d/ScanlineConverter.java b/gnu/java/awt/java2d/ScanlineConverter.java
index b00a15c16..2c3481b6c 100644
--- a/gnu/java/awt/java2d/ScanlineConverter.java
+++ b/gnu/java/awt/java2d/ScanlineConverter.java
@@ -206,7 +206,7 @@ public final class ScanlineConverter
// Ok, now we can perform the actual scanlining.
int realY = Fixed.intValue(FIXED_DIGITS, y + resolution);
boolean push = lastRealY != realY;
-
+
doScanline(p, y, push, haveClip);
// Remove obsolete active edges.
@@ -299,7 +299,7 @@ public final class ScanlineConverter
p.renderScanline(Fixed.intValue(FIXED_DIGITS, y), scanlineCoverage);
scanlineCoverage.clear();
}
- }
+ }
/**
diff --git a/gnu/java/awt/java2d/ScanlineCoverage.java b/gnu/java/awt/java2d/ScanlineCoverage.java
index deb603bcb..9ffb63e1d 100644
--- a/gnu/java/awt/java2d/ScanlineCoverage.java
+++ b/gnu/java/awt/java2d/ScanlineCoverage.java
@@ -199,7 +199,7 @@ public final class ScanlineCoverage
/**
* Returns the X start position (left) on the scanline. This value
* is considered to be in pixels and device space.
- *
+ *
* @return the X position on the scanline
*/
public int getXPos()
@@ -445,7 +445,7 @@ public final class ScanlineCoverage
* Returns the maximum coverage value for the scanline.
*
* @return the maximum coverage value for the scanline
- */
+ */
public int getMaxCoverage()
{
return maxCoverage;
@@ -574,7 +574,7 @@ public final class ScanlineCoverage
// Testpoint 6.
cov = new Coverage();
}
-
+
cov.xPos = x;
cov.covDelta = 0;
cov.pixelCoverage = 0;
diff --git a/gnu/java/awt/java2d/Segment.java b/gnu/java/awt/java2d/Segment.java
index df1f67605..1d9a57001 100644
--- a/gnu/java/awt/java2d/Segment.java
+++ b/gnu/java/awt/java2d/Segment.java
@@ -45,12 +45,12 @@ public abstract class Segment implements Cloneable
// Start and end points of THIS segment
public Point2D P1;
public Point2D P2;
-
+
// Segments can be linked together internally as a linked list
public Segment first;
public Segment next;
public Segment last;
-
+
// Half the stroke width
protected double radius;
@@ -116,7 +116,7 @@ public abstract class Segment implements Cloneable
{
dy = radius * ((dx > 0)?1:-1);
dx = 0;
- }
+ }
else if( dx == 0 )
{
dx = radius * ((dy > 0)?-1:1);
@@ -148,7 +148,7 @@ public abstract class Segment implements Cloneable
* for a line segment.
*/
public abstract double[] cp1();
-
+
/**
* Returns the coordinates of the second control point, or the end point
* for a line segment.
diff --git a/gnu/java/awt/java2d/TexturePaintContext.java b/gnu/java/awt/java2d/TexturePaintContext.java
index db0a2e658..2523d2311 100644
--- a/gnu/java/awt/java2d/TexturePaintContext.java
+++ b/gnu/java/awt/java2d/TexturePaintContext.java
@@ -148,7 +148,7 @@ public class TexturePaintContext
* @param h the height
*
* @return the Raster that is used for painting
- *
+ *
*/
public Raster getRaster(int x1, int y1, int w, int h)
{
@@ -175,9 +175,9 @@ public class TexturePaintContext
int dy = (int) dest[1];
// The modulo operation gives us the replication effect.
- dx = ((dx - minX) % width) + minX;
+ dx = ((dx - minX) % width) + minX;
dy = ((dy - minY) % height) + minY;
-
+
// Handle possible negative values (replicating above the top-left)
if (dx < 0)
dx += width;
diff --git a/gnu/java/awt/peer/ClasspathDesktopPeer.java b/gnu/java/awt/peer/ClasspathDesktopPeer.java
index bef42dcea..fd4f498aa 100644
--- a/gnu/java/awt/peer/ClasspathDesktopPeer.java
+++ b/gnu/java/awt/peer/ClasspathDesktopPeer.java
@@ -51,7 +51,7 @@ import java.util.prefs.Preferences;
/**
* Offers a common implementation for the Desktop peers, that enables
* access to default system application within java processes.
- *
+ *
* @author Mario Torre <neugens@limasoftware.net>
*/
public class ClasspathDesktopPeer
@@ -59,39 +59,39 @@ public class ClasspathDesktopPeer
{
/** This is the fallback browser, if no desktop was detected. */
protected static final String _DEFAULT_BROWSER = "firefox";
-
+
/** gnu.java.awt.peer.Desktop.html.command */
protected static final String _BROWSE = "html";
-
+
/** gnu.java.awt.peer.Desktop.mail.command */
protected static final String _MAIL = "mail";
-
+
/** gnu.java.awt.peer.Desktop.edit.command */
protected static final String _EDIT = "edit";
-
+
/** gnu.java.awt.peer.Desktop.print.command */
protected static final String _PRINT = "print";
-
+
/** gnu.java.awt.peer.Desktop.open.command */
protected static final String _OPEN = "open";
-
+
/** */
protected static final KDEDesktopPeer kde = new KDEDesktopPeer();
-
+
/** */
protected static final GnomeDesktopPeer gnome = new GnomeDesktopPeer();
-
+
/** */
protected static final ClasspathDesktopPeer classpath =
- new ClasspathDesktopPeer();
-
+ new ClasspathDesktopPeer();
+
/**
* Preference subsystem. Packagers and users can override the default
* behaviour of this class via preferences and system properties.
*/
protected Preferences prefs =
Preferences.userNodeForPackage(ClasspathDesktopPeer.class).node("Desktop");
-
+
/**
* @param target
*/
@@ -103,131 +103,131 @@ public class ClasspathDesktopPeer
public boolean isSupported(Action action)
{
String check = null;
-
+
switch(action)
{
case BROWSE:
check = _BROWSE;
break;
-
+
case MAIL:
check = _MAIL;
break;
-
+
case EDIT:
check = _EDIT;
break;
-
+
case PRINT:
check = _PRINT;
break;
-
+
case OPEN: default:
check = _OPEN;
break;
}
-
+
return this.supportCommand(check);
}
public void browse(URI url) throws IOException
{
checkPermissions();
-
+
String browser = getCommand(_BROWSE);
-
+
if (browser == null)
throw new UnsupportedOperationException();
-
+
browser = browser + " " + url.toString();
-
+
Runtime.getRuntime().exec(browser);
}
public void edit(File file) throws IOException
{
checkPermissions(file, false);
-
+
String edit = getCommand(_EDIT);
-
+
if (edit == null)
throw new UnsupportedOperationException();
-
- edit = edit + " " + file.getAbsolutePath();
+
+ edit = edit + " " + file.getAbsolutePath();
Runtime.getRuntime().exec(edit);
}
public void mail(URI mailtoURL) throws IOException
{
checkPermissions();
-
+
String scheme = mailtoURL.getScheme();
if (scheme == null || !scheme.equalsIgnoreCase("mailto"))
throw new IllegalArgumentException("URI Scheme not of type mailto");
-
+
String mail = getCommand(_MAIL);
-
+
if (mail == null)
throw new UnsupportedOperationException();
-
+
mail = mail + " " + mailtoURL.toString();
-
+
Runtime.getRuntime().exec(mail);
}
public void mail() throws IOException
{
checkPermissions();
-
+
String mail = getCommand(_MAIL);
-
+
if (mail == null)
throw new UnsupportedOperationException();
-
+
Runtime.getRuntime().exec(mail);
}
-
+
public void open(File file) throws IOException
{
checkPermissions(file, true);
-
+
String open = getCommand(_OPEN);
-
+
if (open == null)
throw new UnsupportedOperationException();
-
- open = open + " " + file.getAbsolutePath();
+
+ open = open + " " + file.getAbsolutePath();
Runtime.getRuntime().exec(open);
}
public void print(File file) throws IOException
{
checkPrintPermissions(file);
-
+
String print = getCommand(_PRINT);
-
+
if (print == null)
throw new UnsupportedOperationException();
-
- print = print + " " + file.getAbsolutePath();
+
+ print = print + " " + file.getAbsolutePath();
Runtime.getRuntime().exec(print);
}
-
+
protected String getCommand(String action)
{
// check if a system property exist
String command =
System.getProperty("gnu.java.awt.peer.Desktop." + action + ".command");
-
+
// otherwise, get it from preferences, if any
if (command == null)
{
command = prefs.node(action).get("command", null);
}
-
+
return command;
}
-
+
/**
* Note: Checks for AWTPermission("showWindowWithoutWarningBanner") only.
*/
@@ -238,22 +238,22 @@ public class ClasspathDesktopPeer
sm.checkPermission(new AWTPermission("showWindowWithoutWarningBanner"));
}
}
-
+
/**
- * Calls checkPermissions() and checks for SecurityManager.checkRead()
- * and, if readOnly is false, for SecurityManager.checkWrite()
+ * Calls checkPermissions() and checks for SecurityManager.checkRead()
+ * and, if readOnly is false, for SecurityManager.checkWrite()
*/
protected void checkPermissions(File file, boolean readOnly)
{
checkPermissions();
-
+
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
sm.checkRead(file.toString());
if (!readOnly) sm.checkWrite(file.toString());
}
}
-
+
/**
* Calls checkPermissions(file, true) and checks for
* SecurityManager.checkPrintJobAccess()
@@ -261,13 +261,13 @@ public class ClasspathDesktopPeer
protected void checkPrintPermissions(File file)
{
checkPermissions(file, true);
-
+
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
sm.checkPrintJobAccess();
- }
+ }
}
-
+
/**
* @param check
* @return
@@ -276,7 +276,7 @@ public class ClasspathDesktopPeer
{
return ((this.getCommand(check) != null) ? true : false);
}
-
+
/**
* @return
*/
@@ -285,7 +285,7 @@ public class ClasspathDesktopPeer
// check if we are under Gnome or KDE or anything else
String desktopSession = System.getenv("GNOME_DESKTOP_SESSION_ID");
if (desktopSession == null)
- {
+ {
desktopSession = System.getenv("KDE_FULL_SESSION");
if (desktopSession != null)
return kde;
@@ -294,7 +294,7 @@ public class ClasspathDesktopPeer
{
return gnome;
}
-
+
// revert to this class for default values
return classpath;
}
diff --git a/gnu/java/awt/peer/ClasspathFontPeer.java b/gnu/java/awt/peer/ClasspathFontPeer.java
index e43e5f284..96677a4af 100644
--- a/gnu/java/awt/peer/ClasspathFontPeer.java
+++ b/gnu/java/awt/peer/ClasspathFontPeer.java
@@ -68,7 +68,7 @@ import java.util.Map;
* object in the default implementation. If you wish to share peers between
* fonts, you will need to subclass both ClasspathFontPeer and
* {@link ClasspathToolKit}.</p>
- *
+ *
* <p><b>Thread Safety:</b> Methods of this interface may be called
* from arbitrary threads at any time. Implementations of the
* <code>ClasspathFontPeer</code> interface are required to perform
@@ -85,11 +85,11 @@ public abstract class ClasspathFontPeer
{
/*************************************************************************/
-
+
/*
* Instance Variables
*/
-
+
/**
* The 3 names of this font. all fonts have 3 names, some of which
* may be equal:
@@ -98,19 +98,19 @@ public abstract class ClasspathFontPeer
* family -- a designer or brand name (Helvetica)
* face -- specific instance of a design (Helvetica Regular)
*
- * @see isLogicalFontName
+ * @see isLogicalFontName
*/
-
+
protected String logicalName;
protected String familyName;
protected String faceName;
-
+
/**
* The font style, which is a combination (by OR-ing) of the font style
* constants PLAIN, BOLD and ITALIC, in this class.
*/
protected int style;
-
+
/**
* The font point size. A point is 1/72 of an inch.
*/
@@ -143,13 +143,13 @@ public abstract class ClasspathFontPeer
return (ClasspathToolkit)(Toolkit.getDefaultToolkit ());
}
- /*
+ /*
* Confusingly, a Logical Font is a concept unrelated to
- * a Font's Logical Name.
+ * a Font's Logical Name.
*
* A Logical Font is one of 6 built-in, abstract font types
* which must be supported by any java environment: SansSerif,
- * Serif, Monospaced, Dialog, and DialogInput.
+ * Serif, Monospaced, Dialog, and DialogInput.
*
* A Font's Logical Name is the name the font was constructed
* from. This might be the name of a Logical Font, or it might
@@ -209,32 +209,32 @@ public abstract class ClasspathFontPeer
if (fam != null)
attrs.put (TextAttribute.FAMILY, fam);
}
-
+
public static void copySizeToAttrs (float size, Map attrs)
{
attrs.put (TextAttribute.SIZE, new Float (size));
}
-
+
protected static void copyTransformToAttrs (AffineTransform trans, Map attrs)
{
if (trans != null)
{
- TransformAttribute ta;
+ TransformAttribute ta;
synchronized(transCache)
{
- ta = transCache.get(trans);
- if (ta == null)
- {
- ta = new TransformAttribute(trans);
- transCache.put(trans, ta);
- }
- }
- attrs.put(TextAttribute.TRANSFORM, ta);
+ ta = transCache.get(trans);
+ if (ta == null)
+ {
+ ta = new TransformAttribute(trans);
+ transCache.put(trans, ta);
+ }
+ }
+ attrs.put(TextAttribute.TRANSFORM, ta);
}
}
- protected void setStandardAttributes (String name, String family, int style,
+ protected void setStandardAttributes (String name, String family, int style,
float size, AffineTransform trans)
{
this.logicalName = name;
@@ -248,7 +248,7 @@ public abstract class ClasspathFontPeer
this.familyName = family;
else
this.familyName = faceNameToFamilyName (faceName);
-
+
this.style = style;
this.size = size;
this.transform = trans;
@@ -296,16 +296,16 @@ public abstract class ClasspathFontPeer
if (attribs.containsKey (TextAttribute.TRANSFORM))
{
- TransformAttribute ta = (TransformAttribute)
+ TransformAttribute ta = (TransformAttribute)
attribs.get(TextAttribute.TRANSFORM);
- trans = ta.getTransform ();
+ trans = ta.getTransform ();
}
setStandardAttributes (name, family, style, size, trans);
}
protected void getStandardAttributes (Map attrs)
- {
+ {
copyFamilyToAttrs (this.familyName, attrs);
copySizeToAttrs (this.size, attrs);
copyStyleToAttrs (this.style, attrs);
@@ -322,11 +322,11 @@ public abstract class ClasspathFontPeer
public ClasspathFontPeer (String name, int style, int size)
{
- setStandardAttributes (name, (String)null, style,
+ setStandardAttributes (name, (String)null, style,
(float)size, (AffineTransform)null);
}
- /**
+ /**
* Implementation of {@link Font#getName}
*
* @param font the font this peer is being called from. This may be
@@ -334,12 +334,12 @@ public abstract class ClasspathFontPeer
* be ignored.
*/
- public String getName (Font font)
- {
- return logicalName;
+ public String getName (Font font)
+ {
+ return logicalName;
}
- /**
+ /**
* Implementation of {@link Font#getFamily()}
*
* @param font the font this peer is being called from. This may be
@@ -347,12 +347,12 @@ public abstract class ClasspathFontPeer
* be ignored.
*/
- public String getFamily (Font font)
- {
- return familyName;
+ public String getFamily (Font font)
+ {
+ return familyName;
}
- /**
+ /**
* Implementation of {@link Font#getFamily(Locale)}
*
* @param font the font this peer is being called from. This may be
@@ -360,12 +360,12 @@ public abstract class ClasspathFontPeer
* be ignored.
*/
- public String getFamily (Font font, Locale lc)
- {
- return familyName;
+ public String getFamily (Font font, Locale lc)
+ {
+ return familyName;
}
- /**
+ /**
* Implementation of {@link Font#getFontName()}
*
* @param font the font this peer is being called from. This may be
@@ -373,12 +373,12 @@ public abstract class ClasspathFontPeer
* be ignored.
*/
- public String getFontName (Font font)
- {
- return faceName;
+ public String getFontName (Font font)
+ {
+ return faceName;
}
- /**
+ /**
* Implementation of {@link Font#getFontName(Locale)}
*
* @param font the font this peer is being called from. This may be
@@ -386,12 +386,12 @@ public abstract class ClasspathFontPeer
* be ignored.
*/
- public String getFontName (Font font, Locale lc)
- {
- return faceName;
+ public String getFontName (Font font, Locale lc)
+ {
+ return faceName;
}
- /**
+ /**
* Implementation of {@link Font#getSize}
*
* @param font the font this peer is being called from. This may be
@@ -399,38 +399,38 @@ public abstract class ClasspathFontPeer
* be ignored.
*/
- public float getSize (Font font)
- {
- return size;
+ public float getSize (Font font)
+ {
+ return size;
}
- /**
+ /**
* Implementation of {@link Font#isPlain}
*
* @param font the font this peer is being called from. This may be
* useful if you are sharing peers between Font objects. Otherwise it may
* be ignored.
*/
-
- public boolean isPlain (Font font)
- {
- return style == Font.PLAIN;
+
+ public boolean isPlain (Font font)
+ {
+ return style == Font.PLAIN;
}
- /**
+ /**
* Implementation of {@link Font#isBold}
*
* @param font the font this peer is being called from. This may be
* useful if you are sharing peers between Font objects. Otherwise it may
* be ignored.
*/
-
- public boolean isBold (Font font)
- {
- return ((style & Font.BOLD) == Font.BOLD);
+
+ public boolean isBold (Font font)
+ {
+ return ((style & Font.BOLD) == Font.BOLD);
}
- /**
+ /**
* Implementation of {@link Font#isItalic}
*
* @param font the font this peer is being called from. This may be
@@ -438,12 +438,12 @@ public abstract class ClasspathFontPeer
* be ignored.
*/
- public boolean isItalic (Font font)
- {
- return ((style & Font.ITALIC) == Font.ITALIC);
+ public boolean isItalic (Font font)
+ {
+ return ((style & Font.ITALIC) == Font.ITALIC);
}
- /**
+ /**
* Implementation of {@link Font#deriveFont(int, float)}
*
* @param font the font this peer is being called from. This may be
@@ -460,7 +460,7 @@ public abstract class ClasspathFontPeer
return tk().getFont (logicalName, attrs);
}
- /**
+ /**
* Implementation of {@link Font#deriveFont(float)}
*
* @param font the font this peer is being called from. This may be
@@ -476,7 +476,7 @@ public abstract class ClasspathFontPeer
return tk().getFont (logicalName, attrs);
}
- /**
+ /**
* Implementation of {@link Font#deriveFont(int)}
*
* @param font the font this peer is being called from. This may be
@@ -492,7 +492,7 @@ public abstract class ClasspathFontPeer
return tk().getFont (logicalName, attrs);
}
- /**
+ /**
* Implementation of {@link Font#deriveFont(int, AffineTransform)}
*
* @param font the font this peer is being called from. This may be
@@ -509,7 +509,7 @@ public abstract class ClasspathFontPeer
return tk().getFont (logicalName, attrs);
}
- /**
+ /**
* Implementation of {@link Font#deriveFont(AffineTransform)}
*
* @param font the font this peer is being called from. This may be
@@ -525,7 +525,7 @@ public abstract class ClasspathFontPeer
return tk().getFont (logicalName, attrs);
}
- /**
+ /**
* Implementation of {@link Font#deriveFont(Map)}
*
* @param font the font this peer is being called from. This may be
@@ -538,7 +538,7 @@ public abstract class ClasspathFontPeer
return tk().getFont (logicalName, attrs);
}
- /**
+ /**
* Implementation of {@link Font#getAttributes()}
*
* @param font the font this peer is being called from. This may be
@@ -553,7 +553,7 @@ public abstract class ClasspathFontPeer
return h;
}
- /**
+ /**
* Implementation of {@link Font#getAvailableAttributes()}
*
* @param font the font this peer is being called from. This may be
@@ -563,7 +563,7 @@ public abstract class ClasspathFontPeer
public AttributedCharacterIterator.Attribute[] getAvailableAttributes(Font font)
{
- AttributedCharacterIterator.Attribute a[] =
+ AttributedCharacterIterator.Attribute a[] =
new AttributedCharacterIterator.Attribute[5];
a[0] = TextAttribute.FAMILY;
a[1] = TextAttribute.SIZE;
@@ -573,7 +573,7 @@ public abstract class ClasspathFontPeer
return a;
}
- /**
+ /**
* Implementation of {@link Font#getTransform()}
*
* @param font the font this peer is being called from. This may be
@@ -588,7 +588,7 @@ public abstract class ClasspathFontPeer
return transform;
}
- /**
+ /**
* Implementation of {@link Font#isTransformed()}
*
* @param font the font this peer is being called from. This may be
@@ -601,7 +601,7 @@ public abstract class ClasspathFontPeer
return ! transform.isIdentity ();
}
- /**
+ /**
* Implementation of {@link Font#getItalicAngle()}
*
* @param font the font this peer is being called from. This may be
@@ -618,7 +618,7 @@ public abstract class ClasspathFontPeer
}
- /**
+ /**
* Implementation of {@link Font#getStyle()}
*
* @param font the font this peer is being called from. This may be
@@ -626,9 +626,9 @@ public abstract class ClasspathFontPeer
* be ignored.
*/
- public int getStyle (Font font)
- {
- return style;
+ public int getStyle (Font font)
+ {
+ return style;
}
@@ -636,7 +636,7 @@ public abstract class ClasspathFontPeer
/* Remaining methods are abstract */
- /**
+ /**
* Implementation of {@link Font#canDisplay(char)}
*
* @param font the font this peer is being called from. This may be
@@ -646,7 +646,7 @@ public abstract class ClasspathFontPeer
public abstract boolean canDisplay (Font font, int c);
- /**
+ /**
* Implementation of {@link Font#canDisplay(String)},
* {@link Font#canDisplay(char [], int, int)}, and
* {@link Font#canDisplay(CharacterIterator, int, int)}.
@@ -678,9 +678,9 @@ public abstract class ClasspathFontPeer
*/
public abstract String getSubFamilyName (Font font, Locale locale);
-
- /**
+
+ /**
* Implementation of {@link Font#getPSName()}
*
* @param font the font this peer is being called from. This may be
@@ -691,7 +691,7 @@ public abstract class ClasspathFontPeer
public abstract String getPostScriptName (Font font);
- /**
+ /**
* Implementation of {@link Font#getNumGlyphs()}
*
* @param font the font this peer is being called from. This may be
@@ -702,7 +702,7 @@ public abstract class ClasspathFontPeer
public abstract int getNumGlyphs (Font font);
- /**
+ /**
* Implementation of {@link Font#getMissingGlyphCode()}
*
* @param font the font this peer is being called from. This may be
@@ -713,7 +713,7 @@ public abstract class ClasspathFontPeer
public abstract int getMissingGlyphCode (Font font);
- /**
+ /**
* Implementation of {@link Font#getBaselineFor(char)}
*
* @param font the font this peer is being called from. This may be
@@ -767,7 +767,7 @@ public abstract class ClasspathFontPeer
public abstract String getGlyphName (Font font, int glyphIndex);
- /**
+ /**
* Implementation of {@link
* Font#createGlyphVector(FontRenderContext, String)}, {@link
* Font#createGlyphVector(FontRenderContext, char[])}, and {@link
@@ -782,9 +782,9 @@ public abstract class ClasspathFontPeer
public abstract GlyphVector createGlyphVector (Font font,
FontRenderContext frc,
CharacterIterator ci);
-
- /**
+
+ /**
* Implementation of {@link Font#createGlyphVector(FontRenderContext,
* int[])}.
*
@@ -794,12 +794,12 @@ public abstract class ClasspathFontPeer
* not with font peers.
*/
- public abstract GlyphVector createGlyphVector (Font font,
- FontRenderContext ctx,
+ public abstract GlyphVector createGlyphVector (Font font,
+ FontRenderContext ctx,
int[] glyphCodes);
- /**
+ /**
* Implementation of {@link Font#layoutGlyphVector(FontRenderContext,
* char[], int, int, int)}.
*
@@ -809,13 +809,13 @@ public abstract class ClasspathFontPeer
* not with font peers.
*/
- public abstract GlyphVector layoutGlyphVector (Font font,
- FontRenderContext frc,
- char[] chars, int start,
+ public abstract GlyphVector layoutGlyphVector (Font font,
+ FontRenderContext frc,
+ char[] chars, int start,
int limit, int flags);
- /**
+ /**
* Implementation of {@link Font#getFontMetrics()}
*
* @param font the font this peer is being called from. This may be
@@ -826,7 +826,7 @@ public abstract class ClasspathFontPeer
public abstract FontMetrics getFontMetrics (Font font);
- /**
+ /**
* Implementation of {@link Font#hasUniformLineMetrics()}
*
* @param font the font this peer is being called from. This may be
@@ -837,7 +837,7 @@ public abstract class ClasspathFontPeer
public abstract boolean hasUniformLineMetrics (Font font);
- /**
+ /**
* Implementation of {@link Font#getLineMetrics(CharacterIterator, int,
* int, FontRenderContext)}
*
@@ -846,12 +846,12 @@ public abstract class ClasspathFontPeer
* be ignored.
*/
- public abstract LineMetrics getLineMetrics (Font font,
- CharacterIterator ci,
- int begin, int limit,
+ public abstract LineMetrics getLineMetrics (Font font,
+ CharacterIterator ci,
+ int begin, int limit,
FontRenderContext rc);
- /**
+ /**
* Implementation of {@link Font#getMaxCharBounds(FontRenderContext)}
*
* @param font the font this peer is being called from. This may be
@@ -859,7 +859,7 @@ public abstract class ClasspathFontPeer
* be ignored.
*/
- public abstract Rectangle2D getMaxCharBounds (Font font,
+ public abstract Rectangle2D getMaxCharBounds (Font font,
FontRenderContext rc);
}
diff --git a/gnu/java/awt/peer/GLightweightPeer.java b/gnu/java/awt/peer/GLightweightPeer.java
index bf40bf379..fe128c26c 100644
--- a/gnu/java/awt/peer/GLightweightPeer.java
+++ b/gnu/java/awt/peer/GLightweightPeer.java
@@ -71,7 +71,7 @@ import java.awt.peer.LightweightPeer;
* Lightweight components are painted directly onto their parent
* containers through an Image object provided by the toolkit.
*/
-public class GLightweightPeer
+public class GLightweightPeer
implements LightweightPeer, ContainerPeer
{
public GLightweightPeer()
@@ -80,39 +80,39 @@ public class GLightweightPeer
}
// -------- java.awt.peer.ContainerPeer implementation:
-
+
public Insets insets()
{
// Nothing to do here for lightweights.
return null;
}
-
+
public Insets getInsets()
{
// Nothing to do here for lightweights.
return null;
}
-
+
public void beginValidate()
{
// Nothing to do here for lightweights.
}
-
+
public void endValidate()
{
// Nothing to do here for lightweights.
}
-
+
public void beginLayout()
{
// Nothing to do here for lightweights.
}
-
+
public void endLayout()
{
// Nothing to do here for lightweights.
}
-
+
public boolean isPaintPending()
{
// Nothing to do here for lightweights.
@@ -235,7 +235,7 @@ public class GLightweightPeer
// Nothing to do here for lightweights.
}
- public boolean isFocusable()
+ public boolean isFocusable()
{
// Nothing to do here for lightweights.
return false;
@@ -263,7 +263,7 @@ public class GLightweightPeer
}
public boolean prepareImage(Image img, int width, int height,
- ImageObserver o)
+ ImageObserver o)
{
// Nothing to do here for lightweights.
return false;
@@ -373,10 +373,10 @@ public class GLightweightPeer
// Nothing to do here for lightweights.
}
- public VolatileImage createVolatileImage(int width, int height)
- {
+ public VolatileImage createVolatileImage(int width, int height)
+ {
// Nothing to do here for lightweights.
- return null;
+ return null;
}
public boolean handlesWheelScrolling()
@@ -385,7 +385,7 @@ public class GLightweightPeer
return false;
}
- public void createBuffers(int x, BufferCapabilities capabilities)
+ public void createBuffers(int x, BufferCapabilities capabilities)
throws AWTException
{
// Nothing to do here for lightweights.
diff --git a/gnu/java/awt/peer/GnomeDesktopPeer.java b/gnu/java/awt/peer/GnomeDesktopPeer.java
index cc41f749d..2347371ad 100644
--- a/gnu/java/awt/peer/GnomeDesktopPeer.java
+++ b/gnu/java/awt/peer/GnomeDesktopPeer.java
@@ -60,13 +60,13 @@ public class GnomeDesktopPeer
{
// check if a command already exists
String command = super.getCommand(action);
-
+
if (command == null)
{
try
{
if (action == _BROWSE)
- {
+ {
command = execQuery(BROWSER_QUERY_GNOME);
}
else if (action == _PRINT)
@@ -83,46 +83,46 @@ public class GnomeDesktopPeer
command = null;
}
}
-
+
return command;
}
-
+
public void browse(URI url) throws IOException
{
checkPermissions();
-
+
String browser = getCommand(_BROWSE);
-
+
if (browser == null)
throw new UnsupportedOperationException();
-
+
browser = browser + " " + url.toString();
-
+
Runtime.getRuntime().exec(browser);
}
protected boolean supportCommand(String check)
{
if (check == _PRINT)
- {
+ {
return super.supportCommand(check);
}
-
+
return true;
}
public void mail() throws IOException
{
checkPermissions();
-
+
String mail = getCommand(_MAIL);
-
+
if (mail == null)
throw new UnsupportedOperationException();
-
+
Runtime.getRuntime().exec(mail + " mailto:");
}
-
+
protected String execQuery(String command) throws IOException
{
InputStream in = null;
@@ -149,7 +149,7 @@ public class GnomeDesktopPeer
// remove %s from the string, leave only the command line
int index = output.indexOf("%s");
output.delete(index, index + 1);
-
+
return output.toString().trim();
}
}
diff --git a/gnu/java/awt/peer/KDEDesktopPeer.java b/gnu/java/awt/peer/KDEDesktopPeer.java
index 8bc3e65b2..44a508435 100644
--- a/gnu/java/awt/peer/KDEDesktopPeer.java
+++ b/gnu/java/awt/peer/KDEDesktopPeer.java
@@ -56,16 +56,16 @@ public class KDEDesktopPeer
"gconftool-2 -g /desktop/gnome/url-handlers/http/command";
protected String getCommand(String action)
- {
+ {
// check if a command already exists
String command = super.getCommand(action);
-
+
if (command == null)
{
try
{
if (action == _MAIL)
- {
+ {
command = "kfmclient exec";
}
else if (action == _PRINT)
@@ -82,27 +82,27 @@ public class KDEDesktopPeer
command = null;
}
}
-
+
return command;
}
-
+
protected boolean supportCommand(String check)
{
return true;
}
-
+
public void mail() throws IOException
{
checkPermissions();
-
+
String mail = getCommand(_MAIL);
-
+
if (mail == null)
throw new UnsupportedOperationException();
-
+
Runtime.getRuntime().exec(mail + " 'mailto: '");
}
-
+
protected String execQuery(String command) throws IOException
{
InputStream in = null;
@@ -129,7 +129,7 @@ public class KDEDesktopPeer
// remove %s from the string, leave only the command line
int index = output.indexOf("%s");
output.delete(index, index + 1);
-
+
return output.toString().trim();
}
}
diff --git a/gnu/java/awt/peer/gtk/AsyncImage.java b/gnu/java/awt/peer/gtk/AsyncImage.java
index dad537aa7..786dcf26b 100644
--- a/gnu/java/awt/peer/gtk/AsyncImage.java
+++ b/gnu/java/awt/peer/gtk/AsyncImage.java
@@ -98,7 +98,7 @@ public class AsyncImage
ic.imageComplete(ImageConsumer.SINGLEFRAMEDONE);
}
}
-
+
}
/**
diff --git a/gnu/java/awt/peer/gtk/BufferedImageGraphics.java b/gnu/java/awt/peer/gtk/BufferedImageGraphics.java
index 31c5e641e..f9609bff6 100644
--- a/gnu/java/awt/peer/gtk/BufferedImageGraphics.java
+++ b/gnu/java/awt/peer/gtk/BufferedImageGraphics.java
@@ -64,7 +64,7 @@ import java.util.WeakHashMap;
/**
* Implementation of Graphics2D on a Cairo surface.
*
- * Simutanously maintains a CairoSurface and updates the
+ * Simutanously maintains a CairoSurface and updates the
* BufferedImage from that after each drawing operation.
*/
public class BufferedImageGraphics extends CairoGraphics2D
@@ -73,7 +73,7 @@ public class BufferedImageGraphics extends CairoGraphics2D
* the buffered Image.
*/
private BufferedImage image, buffer;
-
+
/**
* Image size.
*/
@@ -104,7 +104,7 @@ public class BufferedImageGraphics extends CairoGraphics2D
this.image = bi;
imageWidth = bi.getWidth();
imageHeight = bi.getHeight();
-
+
if (!(image.getSampleModel() instanceof SinglePixelPackedSampleModel))
hasFastCM = false;
else if(bi.getColorModel().equals(CairoSurface.cairoCM_opaque))
@@ -151,11 +151,11 @@ public class BufferedImageGraphics extends CairoGraphics2D
{
int[] pixels2 = new int[imageWidth * imageHeight];
int scanline = sm.getScanlineStride();
-
+
for (int i = 0; i < imageHeight; i++)
System.arraycopy(pixels, (i - minY) * scanline - minX, pixels2,
i * imageWidth, imageWidth);
-
+
pixels = pixels2;
}
@@ -172,11 +172,11 @@ public class BufferedImageGraphics extends CairoGraphics2D
System.arraycopy(pixels, 0, surface.getData(),
0, pixels.length);
}
-
+
setup( cairo_t );
setClip(0, 0, imageWidth, imageHeight);
}
-
+
BufferedImageGraphics(BufferedImageGraphics copyFrom)
{
image = copyFrom.image;
@@ -184,7 +184,7 @@ public class BufferedImageGraphics extends CairoGraphics2D
cairo_t = surface.newCairoContext();
imageWidth = copyFrom.imageWidth;
imageHeight = copyFrom.imageHeight;
-
+
hasFastCM = copyFrom.hasFastCM;
hasAlpha = copyFrom.hasAlpha;
@@ -195,7 +195,7 @@ public class BufferedImageGraphics extends CairoGraphics2D
* Update a rectangle of the bufferedImage. This can be improved upon a lot.
*/
private void updateBufferedImage(int x, int y, int width, int height)
- {
+ {
Rectangle bounds = new Rectangle(x, y, width, height);
bounds = getTransformedBounds(bounds, transform).getBounds();
x = bounds.x;
@@ -207,7 +207,7 @@ public class BufferedImageGraphics extends CairoGraphics2D
if( x > imageWidth || y > imageHeight )
return;
-
+
// Deal with negative width/height.
if (height < 0)
{
@@ -219,44 +219,44 @@ public class BufferedImageGraphics extends CairoGraphics2D
x += width;
width = -width;
}
-
+
// Clip edges.
if( x < 0 )
x = 0;
if( y < 0 )
y = 0;
-
- if( x + width > imageWidth )
+
+ if( x + width > imageWidth )
width = imageWidth - x;
- if( y + height > imageHeight )
+ if( y + height > imageHeight )
height = imageHeight - y;
-
+
if(!hasFastCM)
{
- image.setRGB(x, y, width, height, pixels,
+ image.setRGB(x, y, width, height, pixels,
x + y * imageWidth, imageWidth);
// The setRGB method assumes (or should assume) that pixels are NOT
// alpha-premultiplied, but Cairo stores data with premultiplication
// (thus the pixels returned in getPixels are premultiplied).
// This is ignored for consistency, however, since in
// CairoGrahpics2D.drawImage we also use non-premultiplied data
-
+
}
else
{
int[] db = ((DataBufferInt)image.getRaster().getDataBuffer()).
getData();
-
+
// This should not fail, as we check the image sample model when we
// set the hasFastCM flag
SinglePixelPackedSampleModel sm = (SinglePixelPackedSampleModel)image.getSampleModel() ;
-
+
int minX = image.getRaster().getSampleModelTranslateX();
int minY = image.getRaster().getSampleModelTranslateY();
-
- if (sm.getScanlineStride() == imageWidth && minX == 0)
+
+ if (sm.getScanlineStride() == imageWidth && minX == 0)
{
- System.arraycopy(pixels, y * imageWidth,
+ System.arraycopy(pixels, y * imageWidth,
db, (y - minY) * imageWidth,
height * imageWidth);
}
@@ -266,19 +266,19 @@ public class BufferedImageGraphics extends CairoGraphics2D
for (int i = y; i < (height + y); i++)
System.arraycopy(pixels, i * imageWidth + x, db,
(i - minY) * scanline + x - minX, width);
-
+
}
}
}
/**
* Abstract methods.
- */
+ */
public Graphics create()
{
return new BufferedImageGraphics(this);
}
-
+
public GraphicsConfiguration getDeviceConfiguration()
{
return null;
@@ -288,7 +288,7 @@ public class BufferedImageGraphics extends CairoGraphics2D
{
return new Rectangle2D.Double(0.0, 0.0, imageWidth, imageHeight);
}
-
+
public void copyAreaImpl(int x, int y, int width, int height, int dx, int dy)
{
surface.copyAreaNative(x, y, width, height, dx, dy, surface.width);
@@ -296,7 +296,7 @@ public class BufferedImageGraphics extends CairoGraphics2D
}
/**
- * Overloaded methods that do actual drawing need to enter the gdk threads
+ * Overloaded methods that do actual drawing need to enter the gdk threads
* and also do certain things before and after.
*/
public void draw(Shape s)
@@ -308,7 +308,7 @@ public class BufferedImageGraphics extends CairoGraphics2D
r.width++;
r.height++;
}
-
+
// Do the drawing
if (comp == null || comp instanceof AlphaComposite)
{
@@ -318,13 +318,13 @@ public class BufferedImageGraphics extends CairoGraphics2D
else
{
createBuffer();
-
+
Graphics2D g2d = (Graphics2D)buffer.getGraphics();
g2d.setStroke(this.getStroke());
g2d.setColor(this.getColor());
g2d.setTransform(transform);
g2d.draw(s);
-
+
drawComposite(r.getBounds2D(), null);
}
}
@@ -340,13 +340,13 @@ public class BufferedImageGraphics extends CairoGraphics2D
else
{
createBuffer();
-
+
Graphics2D g2d = (Graphics2D)buffer.getGraphics();
g2d.setPaint(this.getPaint());
g2d.setColor(this.getColor());
g2d.setTransform(transform);
g2d.fill(s);
-
+
drawComposite(s.getBounds2D(), null);
}
}
@@ -366,14 +366,14 @@ public class BufferedImageGraphics extends CairoGraphics2D
g2d.setRenderingHints(this.getRenderingHints());
g2d.setTransform(transform);
g2d.drawRenderedImage(image, xform);
-
+
drawComposite(buffer.getRaster().getBounds(), null);
}
}
protected boolean drawImage(Image img, AffineTransform xform,
- Color bgcolor, ImageObserver obs)
+ Color bgcolor, ImageObserver obs)
{
if (comp == null || comp instanceof AlphaComposite)
{
@@ -392,16 +392,16 @@ public class BufferedImageGraphics extends CairoGraphics2D
img = Toolkit.getDefaultToolkit().createImage(source);
}
BufferedImage bImg = (BufferedImage) img;
-
+
// Find translated bounds
Rectangle2D bounds = new Rectangle(bImg.getMinX(), bImg.getMinY(),
bImg.getWidth(), bImg.getHeight());
if (xform != null)
bounds = getTransformedBounds(bounds, xform);
-
+
// Create buffer and draw image
createBuffer();
-
+
Graphics2D g2d = (Graphics2D)buffer.getGraphics();
g2d.setRenderingHints(this.getRenderingHints());
g2d.drawImage(img, xform, obs);
@@ -413,20 +413,20 @@ public class BufferedImageGraphics extends CairoGraphics2D
public void drawGlyphVector(GlyphVector gv, float x, float y)
{
- // Find absolute bounds, in user-space, of this glyph vector
+ // Find absolute bounds, in user-space, of this glyph vector
Rectangle2D bounds = gv.getLogicalBounds();
bounds = new Rectangle2D.Double(x + bounds.getX(), y + bounds.getY(),
bounds.getWidth(), bounds.getHeight());
-
+
// Perform draw operation
if (comp == null || comp instanceof AlphaComposite)
{
super.drawGlyphVector(gv, x, y);
-
+
// this returns an integer-based Rectangle (rather than a
// Rectangle2D), which takes care of any necessary rounding for us.
bounds = bounds.getBounds();
-
+
updateBufferedImage((int)bounds.getX(), (int)bounds.getY(),
(int)bounds.getWidth(), (int)bounds.getHeight());
}
@@ -439,17 +439,17 @@ public class BufferedImageGraphics extends CairoGraphics2D
g2d.setStroke(this.getStroke());
g2d.setTransform(transform);
g2d.drawGlyphVector(gv, x, y);
-
+
drawComposite(bounds, null);
}
}
-
+
/**
* Perform composite drawing from the buffer onto the main image.
- *
+ *
* The image to be composited should already be drawn into the buffer, in the
* proper place, after all necessary transforms have been applied.
- *
+ *
* @param bounds The bounds to draw, in user-space.
* @param observer The image observer, if any (may be null).
* @return True on success, false on failure.
@@ -465,7 +465,7 @@ public class BufferedImageGraphics extends CairoGraphics2D
devClip = new Rectangle(buffer.getMinX(), buffer.getMinY(),
buffer.getWidth(), buffer.getHeight());
Rectangle2D.intersect(bounds, devClip, bounds);
-
+
// Round bounds as needed, but be careful in our rounding
// (otherwise it may leave unpainted stripes)
double x = bounds.getX();
@@ -475,7 +475,7 @@ public class BufferedImageGraphics extends CairoGraphics2D
x = Math.round(x);
y = Math.round(y);
bounds.setRect(x, y, Math.round(maxX - x), Math.round(maxY - y));
-
+
// Find subimage of internal buffer for updating
BufferedImage buffer2 = buffer;
if (!bounds.equals(buffer2.getRaster().getBounds()))
@@ -492,12 +492,12 @@ public class BufferedImageGraphics extends CairoGraphics2D
// Perform actual composite operation
compCtx.compose(buffer2.getRaster(), current.getRaster(),
current.getRaster());
-
+
// Set cairo's composite to direct SRC, since we've already done our own
- // compositing
+ // compositing
Composite oldcomp = comp;
setComposite(AlphaComposite.Src);
-
+
// This MUST call directly into the "action" method in CairoGraphics2D,
// not one of the wrappers, to ensure that the composite isn't processed
// more than once!
@@ -509,7 +509,7 @@ public class BufferedImageGraphics extends CairoGraphics2D
updateColor();
return rv;
}
-
+
private void createBuffer()
{
if (buffer == null)
@@ -520,20 +520,19 @@ public class BufferedImageGraphics extends CairoGraphics2D
else
{
Graphics2D g2d = ((Graphics2D)buffer.getGraphics());
-
+
g2d.setBackground(new Color(0,0,0,0));
g2d.clearRect(0, 0, buffer.getWidth(), buffer.getHeight());
}
}
-
+
protected ColorModel getNativeCM()
{
return image.getColorModel();
}
-
+
protected ColorModel getBufferCM()
{
return ColorModel.getRGBdefault();
}
}
-
diff --git a/gnu/java/awt/peer/gtk/CairoGraphics2D.java b/gnu/java/awt/peer/gtk/CairoGraphics2D.java
index d1ad2d38c..3507e5b14 100644
--- a/gnu/java/awt/peer/gtk/CairoGraphics2D.java
+++ b/gnu/java/awt/peer/gtk/CairoGraphics2D.java
@@ -101,7 +101,7 @@ import java.util.HashMap;
import java.util.Map;
/**
- * This is an abstract implementation of Graphics2D on Cairo.
+ * This is an abstract implementation of Graphics2D on Cairo.
*
* It should be subclassed for different Cairo contexts.
*
@@ -112,7 +112,7 @@ import java.util.Map;
* GraphicsConfiguration getDeviceConfiguration()
* copyArea(int x, int y, int width, int height, int dx, int dy)
*
- * Also, dispose() must be overloaded to free any native datastructures
+ * Also, dispose() must be overloaded to free any native datastructures
* used by subclass and in addition call super.dispose() to free the
* native cairographics2d structure and cairo_t.
*
@@ -120,7 +120,7 @@ import java.util.Map;
*/
public abstract class CairoGraphics2D extends Graphics2D
{
- static
+ static
{
if (Configuration.INIT_LOAD_LIBRARY)
{
@@ -177,7 +177,7 @@ public abstract class CairoGraphics2D extends Graphics2D
* Rendering hint map.
*/
private RenderingHints hints;
-
+
/**
* Status of the anti-alias flag in cairo.
*/
@@ -187,7 +187,7 @@ public abstract class CairoGraphics2D extends Graphics2D
/**
* Some operations (drawing rather than filling) require that their
* coords be shifted to land on 0.5-pixel boundaries, in order to land on
- * "middle of pixel" coordinates and light up complete pixels.
+ * "middle of pixel" coordinates and light up complete pixels.
*/
protected boolean shiftDrawCalls = false;
@@ -203,8 +203,8 @@ public abstract class CairoGraphics2D extends Graphics2D
private static BasicStroke draw3DRectStroke = new BasicStroke();
static ColorModel rgb32 = new DirectColorModel(32, 0xFF0000, 0xFF00, 0xFF);
- static ColorModel argb32 = new DirectColorModel(32, 0xFF0000, 0xFF00, 0xFF,
- 0xFF000000);
+ static ColorModel argb32 = new DirectColorModel(32, 0xFF0000, 0xFF00, 0xFF,
+ 0xFF000000);
/**
* Native constants for interpolation methods.
@@ -217,7 +217,7 @@ public abstract class CairoGraphics2D extends Graphics2D
ALPHA_INTERPOLATION_QUALITY = 3,
ALPHA_INTERPOLATION_DEFAULT = 4;
// TODO: Does ALPHA_INTERPOLATION really correspond to CAIRO_FILTER_FAST/BEST/GOOD?
-
+
/**
* Constructor does nothing.
*/
@@ -230,7 +230,7 @@ public abstract class CairoGraphics2D extends Graphics2D
* @param cairo_t_pointer a native pointer to a cairo_t of the context.
*/
public void setup(long cairo_t_pointer)
- {
+ {
nativePointer = init(cairo_t_pointer);
setRenderingHints(new RenderingHints(getDefaultHints()));
setFont(new Font("SansSerif", Font.PLAIN, 12));
@@ -251,7 +251,7 @@ public abstract class CairoGraphics2D extends Graphics2D
paint = g.paint;
stroke = g.stroke;
setRenderingHints(g.hints);
-
+
Color foreground;
if (g.fg.getAlpha() != -1)
@@ -286,7 +286,7 @@ public abstract class CairoGraphics2D extends Graphics2D
setTransformImpl(transform);
setClip(clip);
setComposite(comp);
-
+
antialias = !g.antialias;
setAntialias(g.antialias);
}
@@ -300,9 +300,9 @@ public abstract class CairoGraphics2D extends Graphics2D
}
/**
- * Disposes the native cairographics2d structure, including the
- * cairo_t and any gradient stuff, if allocated.
- * Subclasses should of course overload and call this if
+ * Disposes the native cairographics2d structure, including the
+ * cairo_t and any gradient stuff, if allocated.
+ * Subclasses should of course overload and call this if
* they have additional native structures.
*/
public void dispose()
@@ -332,7 +332,7 @@ public abstract class CairoGraphics2D extends Graphics2D
/**
* Find the bounds of this graphics context, in device space.
- *
+ *
* @return the bounds in device-space
*/
protected abstract Rectangle2D getRealBounds();
@@ -359,7 +359,7 @@ public abstract class CairoGraphics2D extends Graphics2D
double x2, double y2,
int r1, int g1, int b1, int a1, int r2,
int g2, int b2, int a2, boolean cyclic);
-
+
protected native void setPaintPixels(long pointer, int[] pixels, int w,
int h, int stride, boolean repeat,
int x, int y);
@@ -368,7 +368,7 @@ public abstract class CairoGraphics2D extends Graphics2D
* Set the current transform matrix
*/
protected native void cairoSetMatrix(long pointer, double[] m);
-
+
/**
* Scaling method
*/
@@ -406,8 +406,8 @@ public abstract class CairoGraphics2D extends Graphics2D
/*
* Draws a Glyph Vector
*/
- protected native void cairoDrawGlyphVector(long pointer, GdkFontPeer font,
- float x, float y, int n,
+ protected native void cairoDrawGlyphVector(long pointer, GdkFontPeer font,
+ float x, float y, int n,
int[] codes, float[] positions, long[] fontset);
/**
@@ -420,7 +420,7 @@ public abstract class CairoGraphics2D extends Graphics2D
*/
protected native void cairoRectangle(long pointer, double x, double y,
double width, double height);
-
+
/**
* Appends an arc to the current path
*/
@@ -438,7 +438,7 @@ public abstract class CairoGraphics2D extends Graphics2D
*/
protected native void cairoNewPath(long pointer);
- /**
+ /**
* Close current path
*/
protected native void cairoClosePath(long pointer);
@@ -464,16 +464,16 @@ public abstract class CairoGraphics2D extends Graphics2D
*/
protected native void cairoFill(long pointer, double alpha);
- /**
+ /**
* Clip current path
*/
protected native void cairoClip(long pointer);
- /**
+ /**
* Clear clip
*/
protected native void cairoResetClip(long pointer);
-
+
/**
* Set antialias.
*/
@@ -483,7 +483,7 @@ public abstract class CairoGraphics2D extends Graphics2D
///////////////////////// TRANSFORMS ///////////////////////////////////
/**
* Set the current transform
- */
+ */
public void setTransform(AffineTransform tx)
{
// Transform clip into target space using the old transform.
@@ -588,7 +588,7 @@ public abstract class CairoGraphics2D extends Graphics2D
setTransformImpl(transform);
}
-
+
public void translate(int x, int y)
{
translate((double) x, (double) y);
@@ -670,13 +670,13 @@ public abstract class CairoGraphics2D extends Graphics2D
setColor((Color) paint);
customPaint = false;
}
-
+
else if (paint instanceof TexturePaint)
{
TexturePaint tp = (TexturePaint) paint;
BufferedImage img = tp.getImage();
- // map the image to the anchor rectangle
+ // map the image to the anchor rectangle
int width = (int) tp.getAnchorRect().getWidth();
int height = (int) tp.getAnchorRect().getHeight();
@@ -690,7 +690,7 @@ public abstract class CairoGraphics2D extends Graphics2D
setPaintPixels(nativePointer, pixels, width, height, width, true, 0, 0);
customPaint = false;
}
-
+
else if (paint instanceof GradientPaint)
{
GradientPaint gp = (GradientPaint) paint;
@@ -707,12 +707,12 @@ public abstract class CairoGraphics2D extends Graphics2D
else
{
customPaint = true;
- }
+ }
}
-
+
/**
* Sets a custom paint
- *
+ *
* @param bounds the bounding box, in user space
*/
protected void setCustomPaint(Rectangle bounds)
@@ -720,12 +720,12 @@ public abstract class CairoGraphics2D extends Graphics2D
if (paint instanceof Color || paint instanceof TexturePaint
|| paint instanceof GradientPaint)
return;
-
+
int userX = bounds.x;
int userY = bounds.y;
int userWidth = bounds.width;
int userHeight = bounds.height;
-
+
// Find bounds in device space
Rectangle2D bounds2D = getTransformedBounds(bounds, transform);
int deviceX = (int)bounds2D.getX();
@@ -740,14 +740,14 @@ public abstract class CairoGraphics2D extends Graphics2D
deviceHeight),
bounds,
transform, hints);
-
+
Raster raster = pc.getRaster(deviceX, deviceY, deviceWidth,
deviceHeight);
-
+
// Clear the transform matrix in Cairo, since the raster returned by the
// PaintContext is already in device-space
AffineTransform oldTx = new AffineTransform(transform);
- setTransformImpl(new AffineTransform());
+ setTransformImpl(new AffineTransform());
// Set pixels in cairo, aligning the top-left of the background image
// to the top-left corner in device space
@@ -762,7 +762,7 @@ public abstract class CairoGraphics2D extends Graphics2D
deviceWidth, deviceHeight, deviceWidth, false,
deviceX, deviceY);
}
-
+
else if (pc.getColorModel().equals(CairoSurface.cairoCM_opaque)
&& raster.getSampleModel().getTransferType() == DataBuffer.TYPE_INT)
{
@@ -770,36 +770,36 @@ public abstract class CairoGraphics2D extends Graphics2D
// but without an alpha channel; we just add the alpha
int[] pixels = (int[])raster.getDataElements(0, 0, deviceWidth,
deviceHeight, null);
-
+
for (int i = 0; i < pixels.length; i++)
pixels[i] = 0xff000000 | (pixels[i] & 0x00ffffff);
-
+
setPaintPixels(nativePointer, pixels, deviceWidth, deviceHeight,
deviceWidth, false, deviceX, deviceY);
}
-
+
else
{
- // Fall back on wrapping the raster in a BufferedImage, and
- // use BufferedImage.getRGB() to do color-model conversion
+ // Fall back on wrapping the raster in a BufferedImage, and
+ // use BufferedImage.getRGB() to do color-model conversion
WritableRaster wr = Raster.createWritableRaster(raster.getSampleModel(),
new Point(raster.getMinX(),
raster.getMinY()));
wr.setRect(raster);
-
+
BufferedImage img2 = new BufferedImage(pc.getColorModel(), wr,
pc.getColorModel().isAlphaPremultiplied(),
null);
-
+
setPaintPixels(nativePointer,
img2.getRGB(0, 0, deviceWidth, deviceHeight, null, 0,
deviceWidth),
deviceWidth, deviceHeight, deviceWidth, false,
deviceX, deviceY);
}
-
+
// Restore transform
- setTransformImpl(oldTx);
+ setTransformImpl(oldTx);
}
public Stroke getStroke()
@@ -813,7 +813,7 @@ public abstract class CairoGraphics2D extends Graphics2D
if (stroke instanceof BasicStroke)
{
BasicStroke bs = (BasicStroke) stroke;
- cairoSetLine(nativePointer, bs.getLineWidth(), bs.getEndCap(),
+ cairoSetLine(nativePointer, bs.getLineWidth(), bs.getEndCap(),
bs.getLineJoin(), bs.getMiterLimit());
float[] dashes = bs.getDashArray();
@@ -822,7 +822,7 @@ public abstract class CairoGraphics2D extends Graphics2D
double[] double_dashes = new double[dashes.length];
for (int i = 0; i < dashes.length; i++)
double_dashes[i] = dashes[i];
-
+
cairoSetDash(nativePointer, double_dashes, double_dashes.length,
(double) bs.getDashPhase());
}
@@ -833,14 +833,14 @@ public abstract class CairoGraphics2D extends Graphics2D
/**
* Utility method to find the bounds of a shape, including the stroke width.
- *
+ *
* @param s the shape
* @return the bounds of the shape, including stroke width
*/
protected Rectangle findStrokedBounds(Shape s)
{
Rectangle r = s.getBounds();
-
+
if (stroke instanceof BasicStroke)
{
int strokeWidth = (int)Math.ceil(((BasicStroke)stroke).getLineWidth());
@@ -854,7 +854,7 @@ public abstract class CairoGraphics2D extends Graphics2D
Shape s2 = stroke.createStrokedShape(s);
r = s2.getBounds();
}
-
+
return r;
}
@@ -877,7 +877,7 @@ public abstract class CairoGraphics2D extends Graphics2D
paint = c;
updateColor();
}
-
+
/**
* Set the current fg value as the cairo color.
*/
@@ -885,7 +885,7 @@ public abstract class CairoGraphics2D extends Graphics2D
{
if (fg == null)
fg = Color.BLACK;
-
+
cairoSetRGBAColor(nativePointer, fg.getRed() / 255.0,
fg.getGreen() / 255.0,fg.getBlue() / 255.0,
fg.getAlpha() / 255.0);
@@ -951,9 +951,9 @@ public abstract class CairoGraphics2D extends Graphics2D
public void setClip(Shape s)
{
- // The first time the clip is set, save it as the original clip
- // to reset to on s == null. We can rely on this being non-null
- // because the constructor in subclasses is expected to set the
+ // The first time the clip is set, save it as the original clip
+ // to reset to on s == null. We can rely on this being non-null
+ // because the constructor in subclasses is expected to set the
// initial clip properly.
if( firstClip )
{
@@ -975,7 +975,7 @@ public abstract class CairoGraphics2D extends Graphics2D
}
else
walkPath(clip.getPathIterator(null), false);
-
+
cairoClip(nativePointer);
}
}
@@ -1010,7 +1010,7 @@ public abstract class CairoGraphics2D extends Graphics2D
{
if (this.comp == comp)
return;
-
+
this.comp = comp;
if (compCtx != null)
compCtx.dispose();
@@ -1021,11 +1021,11 @@ public abstract class CairoGraphics2D extends Graphics2D
AlphaComposite a = (AlphaComposite) comp;
cairoSetOperator(nativePointer, a.getRule());
}
-
+
else
{
cairoSetOperator(nativePointer, AlphaComposite.SRC_OVER);
-
+
if (comp != null)
{
// FIXME: this check is only required "if this Graphics2D
@@ -1033,24 +1033,24 @@ public abstract class CairoGraphics2D extends Graphics2D
SecurityManager sm = System.getSecurityManager();
if (sm != null)
sm.checkPermission(new AWTPermission("readDisplayPixels"));
-
+
compCtx = comp.createContext(getBufferCM(), getNativeCM(), hints);
}
}
}
-
+
/**
* Returns the Colour Model describing the native, raw image data for this
* specific peer.
- *
+ *
* @return ColorModel the ColorModel of native data in this peer
*/
protected abstract ColorModel getNativeCM();
-
+
/**
* Returns the Color Model describing the buffer that this peer uses
* for custom composites.
- *
+ *
* @return ColorModel the ColorModel of the composite buffer in this peer.
*/
protected ColorModel getBufferCM()
@@ -1107,7 +1107,7 @@ public abstract class CairoGraphics2D extends Graphics2D
if (s instanceof Rectangle2D)
{
Rectangle2D r = (Rectangle2D) s;
-
+
// Pixels need to be shifted in draw operations to ensure that they
// light up entire pixels, but we also need to make sure the rectangle
// does not get distorted by this shifting operation
@@ -1117,7 +1117,7 @@ public abstract class CairoGraphics2D extends Graphics2D
double h = Math.round(r.getHeight());
cairoRectangle(nativePointer, x, y, w, h);
}
-
+
// Lines are easy too
else if (s instanceof Line2D)
{
@@ -1170,7 +1170,7 @@ public abstract class CairoGraphics2D extends Graphics2D
/**
* Note that the rest of the drawing methods go via fill() or draw() for the drawing,
- * although subclasses may with to overload these methods where context-specific
+ * although subclasses may with to overload these methods where context-specific
* optimizations are possible (e.g. bitmaps and fillRect(int, int, int, int)
*/
@@ -1274,17 +1274,17 @@ public abstract class CairoGraphics2D extends Graphics2D
}
/**
- * CopyArea - performs clipping to the native surface as a convenience
+ * CopyArea - performs clipping to the native surface as a convenience
* (requires getRealBounds). Then calls copyAreaImpl.
*/
- public void copyArea(int ox, int oy, int owidth, int oheight,
- int odx, int ody)
+ public void copyArea(int ox, int oy, int owidth, int oheight,
+ int odx, int ody)
{
// FIXME: does this handle a rotation transform properly?
// (the width/height might not be correct)
Point2D pos = transform.transform(new Point2D.Double(ox, oy),
(Point2D) null);
- Point2D dim = transform.transform(new Point2D.Double(ox + owidth,
+ Point2D dim = transform.transform(new Point2D.Double(ox + owidth,
oy + oheight),
(Point2D) null);
Point2D p2 = transform.transform(new Point2D.Double(ox + odx, oy + ody),
@@ -1307,7 +1307,7 @@ public abstract class CairoGraphics2D extends Graphics2D
if( x + dx + width < r.getX() || y + dy + height < r.getY() )
return;
- // Clip edges if necessary
+ // Clip edges if necessary
if( x + dx < r.getX() ) // left
{
width = x + dx + width;
@@ -1348,10 +1348,10 @@ public abstract class CairoGraphics2D extends Graphics2D
{
this.hints = new RenderingHints(getDefaultHints());
this.hints.putAll(hints);
-
+
shiftDrawCalls = hints.containsValue(RenderingHints.VALUE_STROKE_NORMALIZE)
|| hints.containsValue(RenderingHints.VALUE_STROKE_DEFAULT);
-
+
if (compCtx != null)
{
compCtx.dispose();
@@ -1368,7 +1368,7 @@ public abstract class CairoGraphics2D extends Graphics2D
{
return hints;
}
-
+
private int getInterpolation()
{
if (this.hints.containsValue(RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR))
@@ -1392,18 +1392,18 @@ public abstract class CairoGraphics2D extends Graphics2D
// Do bilinear interpolation as default
return INTERPOLATION_BILINEAR;
}
-
+
/**
* Set antialias if needed. If the ignoreAA flag is set, this method will
* return without doing anything.
- *
+ *
* @param needAA RenderingHints.VALUE_ANTIALIAS_ON or RenderingHints.VALUE_ANTIALIAS_OFF
*/
private void setAntialias(boolean needAA)
{
if (ignoreAA)
return;
-
+
if (needAA != antialias)
{
antialias = !antialias;
@@ -1425,8 +1425,8 @@ public abstract class CairoGraphics2D extends Graphics2D
// In this case, xform is an AffineTransform that transforms bounding
// box of the specified image from image space to user space. However
// when we pass this transform to cairo, cairo will use this transform
- // to map "user coordinates" to "pixel" coordinates, which is the
- // other way around. Therefore to get the "user -> pixel" transform
+ // to map "user coordinates" to "pixel" coordinates, which is the
+ // other way around. Therefore to get the "user -> pixel" transform
// that cairo wants from "image -> user" transform that we currently
// have, we will need to invert the transformation matrix.
AffineTransform invertedXform;
@@ -1459,10 +1459,10 @@ public abstract class CairoGraphics2D extends Graphics2D
double[] i2u = new double[6];
int width = b.getWidth();
int height = b.getHeight();
-
- // If this BufferedImage has a BufferedImageGraphics object,
+
+ // If this BufferedImage has a BufferedImageGraphics object,
// use the cached CairoSurface that BIG is drawing onto
-
+
if( BufferedImageGraphics.bufferedImages.get( b ) != null )
raster = BufferedImageGraphics.bufferedImages.get( b );
else
@@ -1481,18 +1481,18 @@ public abstract class CairoGraphics2D extends Graphics2D
updateColor();
return true;
}
-
+
if( bgcolor != null )
{
Color oldColor = bg;
setBackground(bgcolor);
-
+
Rectangle2D bounds = new Rectangle2D.Double(0, 0, width, height);
bounds = getTransformedBounds(bounds, xform);
-
+
clearRect((int)bounds.getX(), (int)bounds.getY(),
(int)bounds.getWidth(), (int)bounds.getHeight());
-
+
setBackground(oldColor);
}
@@ -1500,7 +1500,7 @@ public abstract class CairoGraphics2D extends Graphics2D
// FIXME: The above method returns data in the standard ARGB colorspace,
// meaning data should NOT be alpha pre-multiplied; however Cairo expects
// data to be premultiplied.
-
+
cairoSave(nativePointer);
Rectangle2D bounds = new Rectangle2D.Double(0, 0, width, height);
bounds = getTransformedBounds(bounds, xform);
@@ -1510,7 +1510,7 @@ public abstract class CairoGraphics2D extends Graphics2D
drawPixels(nativePointer, pixels, width, height, width, i2u, alpha,
getInterpolation());
-
+
cairoRestore(nativePointer);
// Cairo seems to lose the current color which must be restored.
@@ -1585,7 +1585,7 @@ public abstract class CairoGraphics2D extends Graphics2D
int destWidth = dx2 - dx1;
int destHeight = dy2 - dy1;
- if(destWidth == 0 || destHeight == 0 || sourceWidth == 0 ||
+ if(destWidth == 0 || destHeight == 0 || sourceWidth == 0 ||
sourceHeight == 0)
return true;
@@ -1593,18 +1593,18 @@ public abstract class CairoGraphics2D extends Graphics2D
double scaleY = destHeight / (double) sourceHeight;
// FIXME: Avoid using an AT if possible here - it's at least twice as slow.
-
+
Shape oldClip = getClip();
int cx, cy, cw, ch;
- if( dx1 < dx2 )
+ if( dx1 < dx2 )
{ cx = dx1; cw = dx2 - dx1; }
else
{ cx = dx2; cw = dx1 - dx2; }
- if( dy1 < dy2 )
+ if( dy1 < dy2 )
{ cy = dy1; ch = dy2 - dy1; }
else
{ cy = dy2; ch = dy1 - dy2; }
-
+
clipRect( cx, cy, cw, ch );
AffineTransform tx = new AffineTransform();
@@ -1622,10 +1622,10 @@ public abstract class CairoGraphics2D extends Graphics2D
{
return drawImage(img, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2, null, observer);
}
-
+
/**
* Optimized method for drawing a CairoSurface onto this graphics context.
- *
+ *
* @param surface The surface to draw.
* @param tx The transformation matrix (cannot be null).
* @param alpha The alpha value to paint with ( 0 <= alpha <= 1).
@@ -1642,19 +1642,19 @@ public abstract class CairoGraphics2D extends Graphics2D
Point2D origin = new Point2D.Double(0, 0);
Point2D offset = new Point2D.Double(surface.getSampleModelTranslateX(),
surface.getSampleModelTranslateY());
-
+
tx.transform(origin, origin);
tx.transform(offset, offset);
-
+
tx.translate(offset.getX() - origin.getX(),
offset.getY() - origin.getY());
}
-
+
// Find dimensions of this surface relative to the root parent surface
Rectangle bounds = new Rectangle(-surface.getSampleModelTranslateX(),
-surface.getSampleModelTranslateY(),
surface.width, surface.height);
-
+
// Clip to the translated image
// We use direct cairo methods to avoid the overhead of maintaining a
// java copy of the clip, since we will be reverting it immediately
@@ -1663,7 +1663,7 @@ public abstract class CairoGraphics2D extends Graphics2D
cairoSave(nativePointer);
walkPath(newBounds.getPathIterator(null), false);
cairoClip(nativePointer);
-
+
// Draw the surface
try
{
@@ -1677,7 +1677,7 @@ public abstract class CairoGraphics2D extends Graphics2D
// This should never happen(?), so we don't need to do anything here.
;
}
-
+
// Restore clip
cairoRestore(nativePointer);
}
@@ -1696,13 +1696,13 @@ public abstract class CairoGraphics2D extends Graphics2D
tl = new TextLayout( str, getFont(), getFontRenderContext() );
fontPeer.textLayoutCache.put(str, tl);
}
-
+
// Set antialias to text_antialiasing, and set the ignoreAA flag so that
// the setting doesn't get overridden in a draw() or fill() call.
setAntialias(!hints.get(RenderingHints.KEY_TEXT_ANTIALIASING)
.equals(RenderingHints.VALUE_TEXT_ANTIALIAS_OFF));
ignoreAA = true;
-
+
tl.draw(this, x, y);
ignoreAA = false;
}
@@ -1726,14 +1726,14 @@ public abstract class CairoGraphics2D extends Graphics2D
if (customPaint)
setCustomPaint(gv.getOutline().getBounds());
-
+
if (comp instanceof AlphaComposite)
alpha = ((AlphaComposite) comp).getAlpha();
-
+
setAntialias(!hints.get(RenderingHints.KEY_TEXT_ANTIALIASING)
.equals(RenderingHints.VALUE_TEXT_ANTIALIAS_OFF));
ignoreAA = true;
-
+
if (gv instanceof FreetypeGlyphVector && alpha == 1.0
&& !((FreetypeGlyphVector)gv).hasTransforms())
{
@@ -1744,8 +1744,8 @@ public abstract class CairoGraphics2D extends Graphics2D
setFont (gv.getFont ());
GdkFontPeer fontPeer = (GdkFontPeer) font.getPeer();
- synchronized (fontPeer)
- {
+ synchronized (fontPeer)
+ {
cairoDrawGlyphVector(nativePointer, fontPeer,
x, y, n, codes, positions, fontset);
}
@@ -1756,7 +1756,7 @@ public abstract class CairoGraphics2D extends Graphics2D
fill(gv.getOutline());
translate(-x, -y);
}
-
+
ignoreAA = false;
}
@@ -1767,7 +1767,7 @@ public abstract class CairoGraphics2D extends Graphics2D
}
/**
- * Should perhaps be contexct dependent, but this is left for now as an
+ * Should perhaps be contexct dependent, but this is left for now as an
* overloadable default implementation.
*/
public FontRenderContext getFontRenderContext()
@@ -1799,10 +1799,10 @@ public abstract class CairoGraphics2D extends Graphics2D
if (f.getPeer() instanceof GdkFontPeer)
font = f;
else
- font =
+ font =
((ClasspathToolkit)(Toolkit.getDefaultToolkit()))
- .getFont(f.getName(), f.getAttributes());
-
+ .getFont(f.getName(), f.getAttributes());
+
GdkFontPeer fontpeer = (GdkFontPeer) getFont().getPeer();
synchronized (fontpeer)
{
@@ -1824,11 +1824,11 @@ public abstract class CairoGraphics2D extends Graphics2D
if( onStroke )
{
Shape stroked = stroke.createStrokedShape( s );
- return stroked.intersects( (double)rect.x, (double)rect.y,
+ return stroked.intersects( (double)rect.x, (double)rect.y,
(double)rect.width, (double)rect.height );
}
- return s.intersects( (double)rect.x, (double)rect.y,
- (double)rect.width, (double)rect.height );
+ return s.intersects( (double)rect.x, (double)rect.y,
+ (double)rect.width, (double)rect.height );
}
public String toString()
@@ -1836,7 +1836,7 @@ public abstract class CairoGraphics2D extends Graphics2D
return (getClass().getName()
+ "[font=" + getFont().toString()
+ ",color=" + fg.toString()
- + "]");
+ + "]");
}
///////////////////////// PRIVATE METHODS ///////////////////////////////////
@@ -1845,7 +1845,7 @@ public abstract class CairoGraphics2D extends Graphics2D
* All the drawImage() methods eventually get delegated here if the image
* is not a Cairo surface.
*
- * @param bgcolor - if non-null draws the background color before
+ * @param bgcolor - if non-null draws the background color before
* drawing the image.
*/
private boolean drawRaster(ColorModel cm, Raster r,
@@ -1881,7 +1881,7 @@ public abstract class CairoGraphics2D extends Graphics2D
if (pixels == null)
{
// FIXME: I don't think this code will work correctly with a non-RGB
- // MultiPixelPackedSampleModel. Although this entire method should
+ // MultiPixelPackedSampleModel. Although this entire method should
// probably be rewritten to better utilize Cairo's different supported
// data formats.
if (sm instanceof MultiPixelPackedSampleModel)
@@ -1917,13 +1917,13 @@ public abstract class CairoGraphics2D extends Graphics2D
double alpha = 1.0;
if (comp instanceof AlphaComposite)
alpha = ((AlphaComposite) comp).getAlpha();
-
+
drawPixels(nativePointer, pixels, r.getWidth(), r.getHeight(),
r.getWidth(), i2u, alpha, getInterpolation());
// Cairo seems to lose the current color which must be restored.
updateColor();
-
+
return true;
}
@@ -2112,7 +2112,7 @@ public abstract class CairoGraphics2D extends Graphics2D
{
if (! (clip instanceof GeneralPath))
clip = new GeneralPath(clip);
-
+
GeneralPath p = (GeneralPath) clip;
p.transform(t);
}
@@ -2138,7 +2138,7 @@ public abstract class CairoGraphics2D extends Graphics2D
return rect;
}
-
+
static Rectangle2D getTransformedBounds(Rectangle2D bounds, AffineTransform tx)
{
double x1 = bounds.getX();
@@ -2149,10 +2149,10 @@ public abstract class CairoGraphics2D extends Graphics2D
double y2 = y1;
double y3 = bounds.getY() + bounds.getHeight();
double y4 = y3;
-
+
double[] points = new double[] {x1, y1, x2, y2, x3, y3, x4, y4};
tx.transform(points, 0, points, 0, 4);
-
+
double minX = points[0];
double maxX = minX;
double minY = points[1];
@@ -2164,13 +2164,13 @@ public abstract class CairoGraphics2D extends Graphics2D
if (points[i] > maxX)
maxX = points[i];
i++;
-
+
if (points[i] < minY)
minY = points[i];
if (points[i] > maxY)
maxY = points[i];
}
-
+
return new Rectangle2D.Double(minX, minY, (maxX - minX), (maxY - minY));
}
}
diff --git a/gnu/java/awt/peer/gtk/CairoSurface.java b/gnu/java/awt/peer/gtk/CairoSurface.java
index 6c8a30d11..71f6638e4 100644
--- a/gnu/java/awt/peer/gtk/CairoSurface.java
+++ b/gnu/java/awt/peer/gtk/CairoSurface.java
@@ -68,7 +68,7 @@ public class CairoSurface extends WritableRaster
int width = -1, height = -1;
/**
- * The native pointer to the Cairo surface.
+ * The native pointer to the Cairo surface.
*/
long surfacePointer;
@@ -93,8 +93,8 @@ public class CairoSurface extends WritableRaster
0xFF000000,
true,
Buffers.smallestAppropriateTransferType(32));
-
- // This CM corresponds to the CAIRO_FORMAT_RGB24 type in Cairo
+
+ // This CM corresponds to the CAIRO_FORMAT_RGB24 type in Cairo
static ColorModel cairoCM_opaque = new DirectColorModel(24, 0x00FF0000,
0x0000FF00,
0x000000FF);
@@ -112,7 +112,7 @@ public class CairoSurface extends WritableRaster
private native void destroy(long surfacePointer, int[] buf);
/**
- * Draws this image to a given CairoGraphics context,
+ * Draws this image to a given CairoGraphics context,
* with an affine transform given by i2u.
*/
public native void nativeDrawSurface(long surfacePointer, long contextPointer,
@@ -122,23 +122,23 @@ public class CairoSurface extends WritableRaster
/**
* Synchronizes the image's data buffers, copying any changes made in the
* Java array into the native array.
- *
+ *
* This method should only be called if (sharedBuffers == false).
*/
native void syncNativeToJava(long surfacePointer, int[] buffer);
-
+
/**
* Synchronizes the image's data buffers, copying any changes made in the
* native array into the Java array.
- *
+ *
* This method should only be called if (sharedBuffers == false).
*/
native void syncJavaToNative(long surfacePointer, int[] buffer);
-
+
/**
* Return the buffer, with the sample values of each pixel reversed
- * (ie, in ABGR instead of ARGB).
- *
+ * (ie, in ABGR instead of ARGB).
+ *
* @return A pointer to a flipped buffer. The memory is allocated in native
* code, and must be explicitly freed when it is no longer needed.
*/
@@ -146,21 +146,21 @@ public class CairoSurface extends WritableRaster
/**
* Create a cairo_surface_t with specified width and height.
- * The format will be ARGB32 with premultiplied alpha and native bit
+ * The format will be ARGB32 with premultiplied alpha and native bit
* and word ordering.
*/
public CairoSurface(int width, int height)
{
this(0, 0, width, height);
}
-
+
public CairoSurface(int x, int y, int width, int height)
{
super(createCairoSampleModel(width, height), null, new Point(x, y));
if(width <= 0 || height <= 0)
throw new IllegalArgumentException("Image must be at least 1x1 pixels.");
-
+
this.width = width;
this.height = height;
dataBuffer = new DataBufferInt(width * height);
@@ -169,7 +169,7 @@ public class CairoSurface extends WritableRaster
if(surfacePointer == 0)
throw new Error("Could not allocate bitmap.");
}
-
+
/**
* Create a Cairo Surface that is a subimage of another Cairo Surface
*/
@@ -177,7 +177,7 @@ public class CairoSurface extends WritableRaster
Point origin)
{
super(sm, parent.dataBuffer, bounds, origin, parent);
-
+
this.width = super.width;
this.height = super.height;
this.surfacePointer = parent.surfacePointer;
@@ -258,10 +258,10 @@ public class CairoSurface extends WritableRaster
{
return new GtkImage(width, height, getFlippedBuffer(surfacePointer));
}
-
+
/**
* Convenience method to quickly grab the data array backing this Raster.
- *
+ *
* @return The array behind the databuffer.
*/
public int[] getData()
@@ -271,16 +271,16 @@ public class CairoSurface extends WritableRaster
/**
* Returns a BufferedImage backed by a Cairo surface.
- */
+ */
public static BufferedImage getBufferedImage(int width, int height)
{
return getBufferedImage(new CairoSurface(width, height));
}
/**
- * Returns a BufferedImage backed by a Cairo surface,
+ * Returns a BufferedImage backed by a Cairo surface,
* created from a GtkImage.
- */
+ */
public static BufferedImage getBufferedImage(GtkImage image)
{
return getBufferedImage(new CairoSurface(image));
@@ -288,7 +288,7 @@ public class CairoSurface extends WritableRaster
/**
* Returns a BufferedImage backed by a Cairo surface.
- */
+ */
public static BufferedImage getBufferedImage(CairoSurface surface)
{
return new BufferedImage(cairoColorModel, surface,
@@ -302,7 +302,7 @@ public class CairoSurface extends WritableRaster
public Graphics2D getGraphics()
{
return new CairoSurfaceGraphics(this);
- }
+ }
///// Methods used by CairoSurfaceGraphics /////
/**
@@ -319,7 +319,7 @@ public class CairoSurface extends WritableRaster
/**
* Copy a portion of this surface to another area on the surface. The given
* parameters must be within bounds - count on a segfault otherwise.
- *
+ *
* @param x The x coordinate of the area to be copied from.
* @param y The y coordinate of the area to be copied from.
* @param width The width of the area to be copied.
@@ -336,7 +336,7 @@ public class CairoSurface extends WritableRaster
native void copyAreaNative2(long surfacePointer,
int x, int y, int width, int height,
int dx, int dy, int stride);
-
+
/**
* Creates a SampleModel that matches Cairo's native format
*/
@@ -344,12 +344,12 @@ public class CairoSurface extends WritableRaster
{
return new SinglePixelPackedSampleModel(DataBuffer.TYPE_INT, w, h,
new int[]{0x00FF0000, 0x0000FF00,
- 0x000000FF, 0xFF000000});
+ 0x000000FF, 0xFF000000});
}
-
+
/**
* Returns whether this ColorModel is compatible with Cairo's native types.
- *
+ *
* @param cm The color model to check.
* @return Whether it is compatible.
*/
@@ -358,10 +358,10 @@ public class CairoSurface extends WritableRaster
return (cm.equals(cairoCM_pre) || cm.equals(cairoCM_opaque) ||
cm.equals(cairoColorModel));
}
-
+
/**
* Returns whether this SampleModel is compatible with Cairo's native types.
- *
+ *
* @param sm The sample model to check.
* @return Whether it is compatible.
*/
@@ -381,23 +381,23 @@ public class CairoSurface extends WritableRaster
return createWritableChild(parentX, parentY, width, height,
childMinX, childMinY, bandList);
}
-
+
public WritableRaster createCompatibleWritableRaster()
{
return new CairoSurface(width, height);
}
-
+
public WritableRaster createCompatibleWritableRaster (int x, int y,
int w, int h)
{
return new CairoSurface(x, y, w, h);
}
-
+
public Raster createTranslatedChild(int childMinX, int childMinY)
{
return createWritableTranslatedChild(childMinX, childMinY);
}
-
+
public WritableRaster createWritableChild(int parentX, int parentY,
int w, int h, int childMinX,
int childMinY, int[] bandList)
@@ -405,7 +405,7 @@ public class CairoSurface extends WritableRaster
if (parentX < minX || parentX + w > minX + width
|| parentY < minY || parentY + h > minY + height)
throw new RasterFormatException("Child raster extends beyond parent");
-
+
SampleModel sm = (bandList == null) ?
sampleModel :
sampleModel.createSubsetSampleModel(bandList);
@@ -415,12 +415,12 @@ public class CairoSurface extends WritableRaster
new Point(sampleModelTranslateX + childMinX - parentX,
sampleModelTranslateY + childMinY - parentY));
}
-
+
public WritableRaster createWritableTranslatedChild(int x, int y)
{
int tcx = sampleModelTranslateX - minX + x;
int tcy = sampleModelTranslateY - minY + y;
-
+
return new CairoSurface(sampleModel, this,
new Rectangle(x, y, width, height),
new Point(tcx, tcy));
diff --git a/gnu/java/awt/peer/gtk/CairoSurfaceGraphics.java b/gnu/java/awt/peer/gtk/CairoSurfaceGraphics.java
index 35b015f32..a0c6caa9a 100644
--- a/gnu/java/awt/peer/gtk/CairoSurfaceGraphics.java
+++ b/gnu/java/awt/peer/gtk/CairoSurfaceGraphics.java
@@ -67,7 +67,7 @@ public class CairoSurfaceGraphics extends CairoGraphics2D
protected CairoSurface surface;
private BufferedImage buffer;
private long cairo_t;
-
+
/**
* Create a graphics context from a cairo surface
*/
@@ -82,24 +82,24 @@ public class CairoSurfaceGraphics extends CairoGraphics2D
/**
* Creates another context from a surface.
* Used by create().
- */
+ */
private CairoSurfaceGraphics(CairoSurfaceGraphics copyFrom)
{
surface = copyFrom.surface;
cairo_t = surface.newCairoContext();
copy( copyFrom, cairo_t );
}
-
+
public Graphics create()
{
return new CairoSurfaceGraphics(this);
}
-
+
public GraphicsConfiguration getDeviceConfiguration()
{
return GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration();
}
-
+
protected Rectangle2D getRealBounds()
{
return new Rectangle2D.Double(0.0, 0.0, surface.width, surface.height);
@@ -109,7 +109,7 @@ public class CairoSurfaceGraphics extends CairoGraphics2D
{
surface.copyAreaNative(x, y, width, height, dx, dy, surface.width);
}
-
+
/**
* Overloaded methods that do actual drawing need to account for custom
* composites
@@ -118,7 +118,7 @@ public class CairoSurfaceGraphics extends CairoGraphics2D
{
if (!surface.sharedBuffer)
surface.syncJavaToNative(surface.surfacePointer, surface.getData());
-
+
// Find total bounds of shape
Rectangle r = findStrokedBounds(s);
if (shiftDrawCalls)
@@ -126,24 +126,24 @@ public class CairoSurfaceGraphics extends CairoGraphics2D
r.width++;
r.height++;
}
-
+
// Do the drawing
if (comp == null || comp instanceof AlphaComposite)
super.draw(s);
-
+
else
{
createBuffer();
-
+
Graphics2D g2d = (Graphics2D)buffer.getGraphics();
g2d.setStroke(this.getStroke());
g2d.setColor(this.getColor());
g2d.setTransform(transform);
g2d.draw(s);
-
+
drawComposite(r.getBounds2D(), null);
}
-
+
if (!surface.sharedBuffer)
surface.syncNativeToJava(surface.surfacePointer, surface.getData());
}
@@ -152,23 +152,23 @@ public class CairoSurfaceGraphics extends CairoGraphics2D
{
if (!surface.sharedBuffer)
surface.syncJavaToNative(surface.surfacePointer, surface.getData());
-
+
if (comp == null || comp instanceof AlphaComposite)
super.fill(s);
-
+
else
{
createBuffer();
-
+
Graphics2D g2d = (Graphics2D)buffer.getGraphics();
g2d.setPaint(this.getPaint());
g2d.setColor(this.getColor());
g2d.setTransform(transform);
g2d.fill(s);
-
+
drawComposite(s.getBounds2D(), null);
}
-
+
if (!surface.sharedBuffer)
surface.syncNativeToJava(surface.surfacePointer, surface.getData());
}
@@ -177,10 +177,10 @@ public class CairoSurfaceGraphics extends CairoGraphics2D
{
if (!surface.sharedBuffer)
surface.syncJavaToNative(surface.surfacePointer, surface.getData());
-
+
if (comp == null || comp instanceof AlphaComposite)
super.drawRenderedImage(image, xform);
-
+
else
{
createBuffer();
@@ -189,10 +189,10 @@ public class CairoSurfaceGraphics extends CairoGraphics2D
g2d.setRenderingHints(this.getRenderingHints());
g2d.setTransform(transform);
g2d.drawRenderedImage(image, xform);
-
+
drawComposite(buffer.getRaster().getBounds(), null);
}
-
+
if (!surface.sharedBuffer)
surface.syncNativeToJava(surface.surfacePointer, surface.getData());
}
@@ -206,7 +206,7 @@ public class CairoSurfaceGraphics extends CairoGraphics2D
boolean ret;
if (comp == null || comp instanceof AlphaComposite)
ret = super.drawImage(img, xform, bgcolor, obs);
-
+
else
{
// Get buffered image of source
@@ -218,16 +218,16 @@ public class CairoSurfaceGraphics extends CairoGraphics2D
img = Toolkit.getDefaultToolkit().createImage(source);
}
BufferedImage bImg = (BufferedImage) img;
-
+
// Find translated bounds
Rectangle2D bounds = new Rectangle(bImg.getMinX(), bImg.getMinY(),
bImg.getWidth(), bImg.getHeight());
if (xform != null)
bounds = getTransformedBounds(bounds, xform);
-
+
// Create buffer and draw image
createBuffer();
-
+
Graphics2D g2d = (Graphics2D)buffer.getGraphics();
g2d.setRenderingHints(this.getRenderingHints());
g2d.drawImage(img, xform, obs);
@@ -235,10 +235,10 @@ public class CairoSurfaceGraphics extends CairoGraphics2D
// Perform compositing
ret = drawComposite(bounds, obs);
}
-
+
if (!surface.sharedBuffer)
surface.syncNativeToJava(surface.surfacePointer, surface.getData());
-
+
return ret;
}
@@ -246,10 +246,10 @@ public class CairoSurfaceGraphics extends CairoGraphics2D
{
if (!surface.sharedBuffer)
surface.syncJavaToNative(surface.surfacePointer, surface.getData());
-
+
if (comp == null || comp instanceof AlphaComposite)
super.drawGlyphVector(gv, x, y);
-
+
else
{
createBuffer();
@@ -258,17 +258,17 @@ public class CairoSurfaceGraphics extends CairoGraphics2D
g2d.setPaint(this.getPaint());
g2d.setStroke(this.getStroke());
g2d.drawGlyphVector(gv, x, y);
-
+
Rectangle2D bounds = gv.getLogicalBounds();
bounds = new Rectangle2D.Double(x + bounds.getX(), y + bounds.getY(),
bounds.getWidth(), bounds.getHeight());
drawComposite(bounds, null);
}
-
+
if (!surface.sharedBuffer)
surface.syncNativeToJava(surface.surfacePointer, surface.getData());
}
-
+
private boolean drawComposite(Rectangle2D bounds, ImageObserver observer)
{
// Find bounds in device space
@@ -280,7 +280,7 @@ public class CairoSurfaceGraphics extends CairoGraphics2D
devClip = new Rectangle(buffer.getMinX(), buffer.getMinY(),
buffer.getWidth(), buffer.getHeight());
Rectangle2D.intersect(bounds, devClip, bounds);
-
+
// Round bounds as needed, but be careful in our rounding
// (otherwise it may leave unpainted stripes)
double x = bounds.getX();
@@ -290,7 +290,7 @@ public class CairoSurfaceGraphics extends CairoGraphics2D
x = Math.round(x);
y = Math.round(y);
bounds.setRect(x, y, Math.round(maxX - x), Math.round(maxY - y));
-
+
// Find subimage of internal buffer for updating
BufferedImage buffer2 = buffer;
if (!bounds.equals(buffer2.getRaster().getBounds()))
@@ -307,12 +307,12 @@ public class CairoSurfaceGraphics extends CairoGraphics2D
// Perform actual composite operation
compCtx.compose(buffer2.getRaster(), current.getRaster(),
buffer2.getRaster());
-
+
// Set cairo's composite to direct SRC, since we've already done our own
- // compositing
+ // compositing
Composite oldcomp = comp;
setComposite(AlphaComposite.Src);
-
+
// This MUST call directly into the "action" method in CairoGraphics2D,
// not one of the wrappers, to ensure that the composite isn't processed
// more than once!
@@ -324,7 +324,7 @@ public class CairoSurfaceGraphics extends CairoGraphics2D
updateColor();
return rv;
}
-
+
private void createBuffer()
{
if (buffer == null)
@@ -337,17 +337,17 @@ public class CairoSurfaceGraphics extends CairoGraphics2D
else
{
Graphics2D g2d = ((Graphics2D)buffer.getGraphics());
-
+
g2d.setBackground(new Color(0,0,0,0));
g2d.clearRect(0, 0, buffer.getWidth(), buffer.getHeight());
}
}
-
+
protected ColorModel getNativeCM()
{
return CairoSurface.cairoCM_pre;
}
-
+
protected ColorModel getBufferCM()
{
return CairoSurface.cairoColorModel;
diff --git a/gnu/java/awt/peer/gtk/ComponentGraphics.java b/gnu/java/awt/peer/gtk/ComponentGraphics.java
index bfa3bc96a..50161b2b7 100644
--- a/gnu/java/awt/peer/gtk/ComponentGraphics.java
+++ b/gnu/java/awt/peer/gtk/ComponentGraphics.java
@@ -83,7 +83,7 @@ public class ComponentGraphics extends CairoGraphics2D
ComponentGraphics()
{
}
-
+
private ComponentGraphics(GtkComponentPeer component)
{
this.component = component;
@@ -114,7 +114,7 @@ public class ComponentGraphics extends CairoGraphics2D
/**
* Obtain and hold a GDK lock, which is required for all drawing operations
* in this graphics context (since it is backed by an X surface).
- *
+ *
* This method causes the GDK locking behaviour to be re-entrant. No race
* conditions are caused since a ThreadLocal is used and each thread has its
* own lock counter.
@@ -176,11 +176,11 @@ public class ComponentGraphics extends CairoGraphics2D
*/
private static native Pointer nativeGrab(GtkComponentPeer component);
- private native void copyAreaNative(GtkComponentPeer component, int x, int y,
+ private native void copyAreaNative(GtkComponentPeer component, int x, int y,
int width, int height, int dx, int dy);
private native void drawVolatile(GtkComponentPeer component,
- long vimg, int x, int y,
+ long vimg, int x, int y,
int width, int height, int cx, int cy,
int cw, int ch);
@@ -193,7 +193,7 @@ public class ComponentGraphics extends CairoGraphics2D
}
/**
- * Returns a Graphics2D object for a component, either an instance of this
+ * Returns a Graphics2D object for a component, either an instance of this
* class (if xrender is supported), or a context which copies.
*/
public static Graphics2D getComponentGraphics(GtkComponentPeer component)
@@ -214,7 +214,7 @@ public class ComponentGraphics extends CairoGraphics2D
{
return new ComponentGraphics(this);
}
-
+
protected Rectangle2D getRealBounds()
{
return component.awtComponent.getBounds();
@@ -226,23 +226,23 @@ public class ComponentGraphics extends CairoGraphics2D
}
/**
- * Overloaded methods that do actual drawing need to enter the gdk threads
+ * Overloaded methods that do actual drawing need to enter the gdk threads
* and also do certain things before and after.
*/
public void draw(Shape s)
{
if (comp == null || comp instanceof AlphaComposite)
super.draw(s);
-
+
else
{
createBuffer();
-
+
Graphics2D g2d = (Graphics2D)buffer.getGraphics();
g2d.setStroke(this.getStroke());
g2d.setColor(this.getColor());
g2d.draw(s);
-
+
drawComposite(s.getBounds2D(), null);
}
}
@@ -251,16 +251,16 @@ public class ComponentGraphics extends CairoGraphics2D
{
if (comp == null || comp instanceof AlphaComposite)
super.fill(s);
-
+
else
{
createBuffer();
-
+
Graphics2D g2d = (Graphics2D)buffer.getGraphics();
g2d.setPaint(this.getPaint());
g2d.setColor(this.getColor());
g2d.fill(s);
-
+
drawComposite(s.getBounds2D(), null);
}
}
@@ -269,7 +269,7 @@ public class ComponentGraphics extends CairoGraphics2D
{
if (comp == null || comp instanceof AlphaComposite)
super.drawRenderedImage(image, xform);
-
+
else
{
createBuffer();
@@ -277,18 +277,18 @@ public class ComponentGraphics extends CairoGraphics2D
Graphics2D g2d = (Graphics2D)buffer.getGraphics();
g2d.setRenderingHints(this.getRenderingHints());
g2d.drawRenderedImage(image, xform);
-
+
drawComposite(buffer.getRaster().getBounds(), null);
}
}
protected boolean drawImage(Image img, AffineTransform xform,
- Color bgcolor, ImageObserver obs)
+ Color bgcolor, ImageObserver obs)
{
boolean rv;
if (comp == null || comp instanceof AlphaComposite)
rv = super.drawImage(img, xform, bgcolor, obs);
-
+
else
{
// Get buffered image of source
@@ -300,7 +300,7 @@ public class ComponentGraphics extends CairoGraphics2D
img = Toolkit.getDefaultToolkit().createImage(source);
}
BufferedImage bImg = (BufferedImage) img;
-
+
// Find translated bounds
Point2D origin = new Point2D.Double(bImg.getMinX(), bImg.getMinY());
Point2D pt = new Point2D.Double(bImg.getWidth() + bImg.getMinX(),
@@ -310,10 +310,10 @@ public class ComponentGraphics extends CairoGraphics2D
origin = xform.transform(origin, origin);
pt = xform.transform(pt, pt);
}
-
+
// Create buffer and draw image
createBuffer();
-
+
Graphics2D g2d = (Graphics2D)buffer.getGraphics();
g2d.setRenderingHints(this.getRenderingHints());
g2d.drawImage(img, xform, obs);
@@ -331,7 +331,7 @@ public class ComponentGraphics extends CairoGraphics2D
{
if (comp == null || comp instanceof AlphaComposite)
super.drawGlyphVector(gv, x, y);
-
+
else
{
createBuffer();
@@ -340,14 +340,14 @@ public class ComponentGraphics extends CairoGraphics2D
g2d.setPaint(this.getPaint());
g2d.setStroke(this.getStroke());
g2d.drawGlyphVector(gv, x, y);
-
+
Rectangle2D bounds = gv.getLogicalBounds();
bounds = new Rectangle2D.Double(x + bounds.getX(), y + bounds.getY(),
bounds.getWidth(), bounds.getHeight());
drawComposite(bounds, null);
}
}
-
+
public boolean drawImage(Image img, int x, int y, ImageObserver observer)
{
// If it is a GtkVolatileImage with an "easy" transform then
@@ -390,7 +390,7 @@ public class ComponentGraphics extends CairoGraphics2D
}
return super.drawImage(bimg, x, y, observer);
}
-
+
public boolean drawImage(Image img, int x, int y, int width, int height,
ImageObserver observer)
{
@@ -446,41 +446,41 @@ public class ComponentGraphics extends CairoGraphics2D
clip = new Rectangle(buffer.getMinX(), buffer.getMinY(),
buffer.getWidth(), buffer.getHeight());
Rectangle2D.intersect(bounds, clip, bounds);
-
+
BufferedImage buffer2 = buffer;
if (!bounds.equals(buffer2.getRaster().getBounds()))
buffer2 = buffer2.getSubimage((int)bounds.getX(), (int)bounds.getY(),
(int)bounds.getWidth(),
(int)bounds.getHeight());
-
+
// Get destination clip to bounds
double[] points = new double[] {bounds.getX(), bounds.getY(),
bounds.getMaxX(), bounds.getMaxY()};
transform.transform(points, 0, points, 0, 2);
-
+
Rectangle2D deviceBounds = new Rectangle2D.Double(points[0], points[1],
points[2] - points[0],
points[3] - points[1]);
-
+
Rectangle2D.intersect(deviceBounds, this.getClipInDevSpace(), deviceBounds);
-
+
// Get current image on the component
GtkImage img = grab(component);
Graphics gr = componentBuffer.createGraphics();
gr.drawImage(img, 0, 0, null);
gr.dispose();
-
+
BufferedImage cBuffer = componentBuffer;
if (!deviceBounds.equals(cBuffer.getRaster().getBounds()))
cBuffer = cBuffer.getSubimage((int)deviceBounds.getX(),
(int)deviceBounds.getY(),
(int)deviceBounds.getWidth(),
(int)deviceBounds.getHeight());
-
+
// Perform actual composite operation
compCtx.compose(buffer2.getRaster(), cBuffer.getRaster(),
cBuffer.getRaster());
-
+
// This MUST call directly into the "action" method in CairoGraphics2D,
// not one of the wrappers, to ensure that the composite isn't processed
// more than once!
@@ -490,7 +490,7 @@ public class ComponentGraphics extends CairoGraphics2D
null, null);
return rv;
}
-
+
private void createBuffer()
{
if (buffer == null)
@@ -499,7 +499,7 @@ public class ComponentGraphics extends CairoGraphics2D
rst = Raster.createWritableRaster(GtkVolatileImage.createGdkSampleModel(component.awtComponent.getWidth(),
component.awtComponent.getHeight()),
new Point(0,0));
-
+
buffer = new BufferedImage(GtkVolatileImage.gdkColorModel, rst,
GtkVolatileImage.gdkColorModel.isAlphaPremultiplied(),
new Hashtable());
@@ -507,60 +507,60 @@ public class ComponentGraphics extends CairoGraphics2D
else
{
Graphics2D g2d = ((Graphics2D)buffer.getGraphics());
-
+
g2d.setBackground(new Color(0,0,0,0));
g2d.clearRect(0, 0, buffer.getWidth(), buffer.getHeight());
}
-
+
if (componentBuffer == null)
{
WritableRaster rst;
rst = Raster.createWritableRaster(GtkVolatileImage.createGdkSampleModel(component.awtComponent.getWidth(),
component.awtComponent.getHeight()),
new Point(0,0));
-
+
componentBuffer = new BufferedImage(GtkVolatileImage.gdkColorModel, rst,
GtkVolatileImage.gdkColorModel.isAlphaPremultiplied(),
new Hashtable());
}
}
-
+
protected ColorModel getNativeCM()
{
return GtkVolatileImage.gdkColorModel;
}
-
+
/* --- START OVERRIDDEN NATIVE METHODS ----
* All native methods in CairoGraphics2D should be overridden here and
* enclosed in locks, since the cairo surface is backed by an X surface
* in this graphics context and the X surface requires external locking.
- *
+ *
* We lock everything "just in case", since it's difficult to know which
* calls are and aren't thread-safe. Overriding and locking the native
- * methods allows superclass code in CairoGraphics2D to execute properly,
+ * methods allows superclass code in CairoGraphics2D to execute properly,
* without the need to override every single method.
- *
+ *
* CAVEAT: if native code obtains a lock (using gdk_threads_enter(), not the
* lock() method provided here) and then calls back into Java and one of these
* methods ends up being called, we will deadlock. The lock is only reentrant
- * when called via our lock() method.
+ * when called via our lock() method.
*/
-
+
/* These methods are already locked in the superclass CairoGraphics2D
* so they do not need to be overridden:
- *
+ *
* public void disposeNative
*
* protected void cairoDrawGlyphVector
- *
+ *
* protected void cairoSetFont
*/
-
+
@Override
protected long init(long pointer)
{
long ret;
-
+
try
{
lock();
@@ -570,10 +570,10 @@ public class ComponentGraphics extends CairoGraphics2D
{
unlock();
}
-
+
return ret;
}
-
+
@Override
protected void drawPixels(long pointer, int[] pixels, int w, int h,
int stride, double[] i2u, double alpha,
@@ -590,10 +590,10 @@ public class ComponentGraphics extends CairoGraphics2D
unlock();
}
}
-
+
@Override
- protected void setGradient(long pointer, double x1, double y1,
- double x2, double y2,
+ protected void setGradient(long pointer, double x1, double y1,
+ double x2, double y2,
int r1, int g1, int b1, int a1,
int r2, int g2, int b2, int a2, boolean cyclic)
{
@@ -608,7 +608,7 @@ public class ComponentGraphics extends CairoGraphics2D
unlock();
}
}
-
+
@Override
protected void setPaintPixels(long pointer, int[] pixels, int w, int h,
int stride, boolean repeat, int x, int y)
@@ -623,7 +623,7 @@ public class ComponentGraphics extends CairoGraphics2D
unlock();
}
}
-
+
@Override
protected void cairoSetMatrix(long pointer, double[] m)
{
@@ -637,7 +637,7 @@ public class ComponentGraphics extends CairoGraphics2D
unlock();
}
}
-
+
@Override
protected void cairoScale(long pointer, double x, double y)
{
@@ -651,7 +651,7 @@ public class ComponentGraphics extends CairoGraphics2D
unlock();
}
}
-
+
@Override
protected void cairoSetOperator(long pointer, int cairoOperator)
{
@@ -665,7 +665,7 @@ public class ComponentGraphics extends CairoGraphics2D
unlock();
}
}
-
+
@Override
protected void cairoSetRGBAColor(long pointer, double red, double green,
double blue, double alpha)
@@ -680,7 +680,7 @@ public class ComponentGraphics extends CairoGraphics2D
unlock();
}
}
-
+
@Override
protected void cairoSetFillRule(long pointer, int cairoFillRule)
{
@@ -694,7 +694,7 @@ public class ComponentGraphics extends CairoGraphics2D
unlock();
}
}
-
+
@Override
protected void cairoSetLine(long pointer, double width, int cap, int join,
double miterLimit)
@@ -709,9 +709,9 @@ public class ComponentGraphics extends CairoGraphics2D
unlock();
}
}
-
+
@Override
- protected void cairoSetDash(long pointer, double[] dashes, int ndash,
+ protected void cairoSetDash(long pointer, double[] dashes, int ndash,
double offset)
{
try
@@ -739,9 +739,9 @@ public class ComponentGraphics extends CairoGraphics2D
unlock();
}
}
-
+
@Override
- protected void cairoArc(long pointer, double x, double y,
+ protected void cairoArc(long pointer, double x, double y,
double radius, double angle1, double angle2)
{
try
@@ -754,7 +754,7 @@ public class ComponentGraphics extends CairoGraphics2D
unlock();
}
}
-
+
@Override
protected void cairoSave(long pointer)
{
@@ -768,7 +768,7 @@ public class ComponentGraphics extends CairoGraphics2D
unlock();
}
}
-
+
@Override
protected void cairoRestore(long pointer)
{
@@ -782,7 +782,7 @@ public class ComponentGraphics extends CairoGraphics2D
unlock();
}
}
-
+
@Override
protected void cairoNewPath(long pointer)
{
@@ -796,7 +796,7 @@ public class ComponentGraphics extends CairoGraphics2D
unlock();
}
}
-
+
@Override
protected void cairoClosePath(long pointer)
{
@@ -810,7 +810,7 @@ public class ComponentGraphics extends CairoGraphics2D
unlock();
}
}
-
+
@Override
protected void cairoMoveTo(long pointer, double x, double y)
{
@@ -824,7 +824,7 @@ public class ComponentGraphics extends CairoGraphics2D
unlock();
}
}
-
+
@Override
protected void cairoLineTo(long pointer, double x, double y)
{
@@ -838,7 +838,7 @@ public class ComponentGraphics extends CairoGraphics2D
unlock();
}
}
-
+
@Override
protected void cairoCurveTo(long pointer, double x1, double y1, double x2,
double y2, double x3, double y3)
@@ -853,7 +853,7 @@ public class ComponentGraphics extends CairoGraphics2D
unlock();
}
}
-
+
@Override
protected void cairoStroke(long pointer)
{
@@ -867,7 +867,7 @@ public class ComponentGraphics extends CairoGraphics2D
unlock();
}
}
-
+
@Override
protected void cairoFill(long pointer, double alpha)
{
@@ -881,7 +881,7 @@ public class ComponentGraphics extends CairoGraphics2D
unlock();
}
}
-
+
@Override
protected void cairoClip(long pointer)
{
@@ -895,7 +895,7 @@ public class ComponentGraphics extends CairoGraphics2D
unlock();
}
}
-
+
@Override
protected void cairoResetClip(long pointer)
{
@@ -909,7 +909,7 @@ public class ComponentGraphics extends CairoGraphics2D
unlock();
}
}
-
+
@Override
protected void cairoSetAntialias(long pointer, boolean aa)
{
@@ -923,7 +923,7 @@ public class ComponentGraphics extends CairoGraphics2D
unlock();
}
}
-
+
@Override
protected void drawCairoSurface(CairoSurface surface, AffineTransform tx,
double alpha, int interpolation)
diff --git a/gnu/java/awt/peer/gtk/ComponentGraphicsCopy.java b/gnu/java/awt/peer/gtk/ComponentGraphicsCopy.java
index 2216d459a..a73012d9f 100644
--- a/gnu/java/awt/peer/gtk/ComponentGraphicsCopy.java
+++ b/gnu/java/awt/peer/gtk/ComponentGraphicsCopy.java
@@ -48,7 +48,7 @@ import java.awt.image.RenderedImage;
import java.awt.image.ImageObserver;
/**
- * Implementation of Graphics2D for Components for servers which
+ * Implementation of Graphics2D for Components for servers which
* do not have xrender.
*
* A mirrored GtkImage of the component is stored in memory
@@ -62,17 +62,17 @@ public class ComponentGraphicsCopy extends CairoSurfaceGraphics
* GtkImage sharing its data buffer with this Cairo surface.
*/
private GtkImage gtkimage;
-
+
private int width, height;
native void getPixbuf( GtkComponentPeer component, GtkImage image );
- native void copyPixbuf( GtkComponentPeer component, GtkImage image,
- int x, int y, int w, int h );
+ native void copyPixbuf( GtkComponentPeer component, GtkImage image,
+ int x, int y, int w, int h );
- public ComponentGraphicsCopy(int width, int height,
- GtkComponentPeer component)
- {
+ public ComponentGraphicsCopy(int width, int height,
+ GtkComponentPeer component)
+ {
super( new CairoSurface( width, height ) );
this.component = component;
this.width = width;
@@ -82,7 +82,7 @@ public class ComponentGraphicsCopy extends CairoSurfaceGraphics
}
/**
- * Overloaded methods that do actual drawing need to enter the gdk threads
+ * Overloaded methods that do actual drawing need to enter the gdk threads
* and also do certain things before and after.
*/
public void draw(Shape s)
@@ -106,7 +106,7 @@ public class ComponentGraphicsCopy extends CairoSurfaceGraphics
}
protected boolean drawImage(Image img, AffineTransform xform,
- Color bgcolor, ImageObserver obs)
+ Color bgcolor, ImageObserver obs)
{
boolean rv = super.drawImage(img, xform, bgcolor, obs);
copyPixbuf(component, gtkimage, 0, 0, width, height);
@@ -120,4 +120,3 @@ public class ComponentGraphicsCopy extends CairoSurfaceGraphics
copyPixbuf(component, gtkimage, r.x, r.y, r.width, r.height);
}
}
-
diff --git a/gnu/java/awt/peer/gtk/FreetypeGlyphVector.java b/gnu/java/awt/peer/gtk/FreetypeGlyphVector.java
index af975f394..8fd734799 100644
--- a/gnu/java/awt/peer/gtk/FreetypeGlyphVector.java
+++ b/gnu/java/awt/peer/gtk/FreetypeGlyphVector.java
@@ -81,7 +81,7 @@ public class FreetypeGlyphVector extends GlyphVector
* The glyph codes
*/
private int[] glyphCodes;
-
+
/**
* The set of fonts used in this glyph vector.
*/
@@ -89,22 +89,22 @@ public class FreetypeGlyphVector extends GlyphVector
/**
* Glyph transforms. Supports all transform operations.
- *
+ *
* The identity transform should not be stored in this array; use a null
* instead (will result in performance improvements).
*/
private AffineTransform[] glyphTransforms;
private GlyphMetrics[] metricsCache;
-
+
private native void dispose(long[] fonts);
-
+
/**
* Returns a pointer to the native PangoFcFont object.
- *
+ *
* The object will be referenced with g_object_ref n times before being
* returned, and must be unreferenced a corresponding number of times.
- *
+ *
* @param n Number of times to reference the object.
* @return Pointer to the native default font.
*/
@@ -158,19 +158,19 @@ public class FreetypeGlyphVector extends GlyphVector
glyphCodes = new int[ codes.length ];
System.arraycopy(codes, 0, glyphCodes, 0, codes.length);
nGlyphs = glyphCodes.length;
-
+
if (fontSet == null)
{
fontSet = new long[nGlyphs];
Arrays.fill(fontSet, getNativeFontPointer(nGlyphs));
}
-
+
performDefaultLayout();
}
/**
* Cloning constructor
- */
+ */
private FreetypeGlyphVector( FreetypeGlyphVector gv )
{
font = gv.font;
@@ -191,7 +191,7 @@ public class FreetypeGlyphVector extends GlyphVector
glyphPositions = new float[(nGlyphs + 1) * 2];
glyphTransforms = new AffineTransform[ nGlyphs ];
Arrays.fill(glyphTransforms, null);
-
+
for(int i = 0; i < nGlyphs; i++ )
{
if (gv.glyphTransforms[i] != null)
@@ -203,7 +203,7 @@ public class FreetypeGlyphVector extends GlyphVector
System.arraycopy(gv.glyphCodes, 0, glyphCodes, 0, nGlyphs);
System.arraycopy(gv.fontSet, 0, fontSet, 0, nGlyphs);
}
-
+
public void finalize()
{
dispose(fontSet);
@@ -247,8 +247,8 @@ public class FreetypeGlyphVector extends GlyphVector
/**
* Returns the kerning of a glyph pair
*/
- private native void getKerning(int leftGlyph, int rightGlyph, long font,
- float[] p);
+ private native void getKerning(int leftGlyph, int rightGlyph, long font,
+ float[] p);
private native double[] getMetricsNative(int glyphCode, long font);
@@ -268,9 +268,9 @@ public class FreetypeGlyphVector extends GlyphVector
if( ! (gv instanceof FreetypeGlyphVector) )
return false;
- return (((FreetypeGlyphVector)gv).font.equals(font) &&
- ((FreetypeGlyphVector)gv).frc.equals(frc)
- && ((FreetypeGlyphVector)gv).s.equals(s));
+ return (((FreetypeGlyphVector)gv).font.equals(font) &&
+ ((FreetypeGlyphVector)gv).frc.equals(frc)
+ && ((FreetypeGlyphVector)gv).s.equals(s));
}
/**
@@ -323,19 +323,19 @@ public class FreetypeGlyphVector extends GlyphVector
}
glyphPositions[nGlyphs * 2] = x;
glyphPositions[nGlyphs * 2 + 1] = y;
-
+
// Apply any transform that may be in the font's attributes
TransformAttribute ta;
ta = (TransformAttribute)font.getAttributes().get(TextAttribute.TRANSFORM);
if (ta != null)
{
AffineTransform tx = ta.getTransform();
-
+
// Transform glyph positions
tx.transform(glyphPositions, 0, glyphPositions, 0,
glyphPositions.length / 2);
-
- // Also store per-glyph scale/shear/rotate (but not translation)
+
+ // Also store per-glyph scale/shear/rotate (but not translation)
double[] matrix = new double[4];
tx.getMatrix(matrix);
AffineTransform deltaTx = new AffineTransform(matrix);
@@ -355,7 +355,7 @@ public class FreetypeGlyphVector extends GlyphVector
/**
* Returns multiple glyphcodes.
*/
- public int[] getGlyphCodes(int beginGlyphIndex, int numEntries,
+ public int[] getGlyphCodes(int beginGlyphIndex, int numEntries,
int[] codeReturn)
{
int[] rval;
@@ -364,7 +364,7 @@ public class FreetypeGlyphVector extends GlyphVector
rval = new int[ numEntries ];
else
rval = codeReturn;
-
+
System.arraycopy(glyphCodes, beginGlyphIndex, rval, 0, numEntries);
return rval;
@@ -372,10 +372,10 @@ public class FreetypeGlyphVector extends GlyphVector
/**
* Returns pointers to the fonts used in this glyph vector.
- *
+ *
* The array index matches that of the glyph vector itself.
*/
- protected long[] getGlyphFonts(int beginGlyphIndex, int numEntries,
+ protected long[] getGlyphFonts(int beginGlyphIndex, int numEntries,
long[] codeReturn)
{
long[] rval;
@@ -384,7 +384,7 @@ public class FreetypeGlyphVector extends GlyphVector
rval = new long[ numEntries ];
else
rval = codeReturn;
-
+
System.arraycopy(fontSet, beginGlyphIndex, rval, 0, numEntries);
return rval;
@@ -394,18 +394,18 @@ public class FreetypeGlyphVector extends GlyphVector
{
GlyphMetrics gm = getGlyphMetrics( glyphIndex );
if( gm == null )
- return null;
+ return null;
Rectangle2D r = gm.getBounds2D();
Point2D p = getGlyphPosition( glyphIndex );
-
+
double[] bounds = new double[] {p.getX() + r.getX() - gm.getLSB(),
p.getY() + r.getY(),
p.getX() + r.getX() - gm.getLSB() + gm.getAdvanceX(),
p.getY() + r.getY() + r.getHeight()};
-
+
if (glyphTransforms[glyphIndex] != null)
glyphTransforms[glyphIndex].transform(bounds, 0, bounds, 0, 2);
-
+
return new Rectangle2D.Double(bounds[0], bounds[1], bounds[2] - bounds[0],
bounds[3] - bounds[1]);
}
@@ -428,10 +428,10 @@ public class FreetypeGlyphVector extends GlyphVector
gm = null;
else
{
- gm = new GlyphMetrics(true,
- (float)val[1],
- (float)val[2],
- new Rectangle2D.Double(val[3], val[4],
+ gm = new GlyphMetrics(true,
+ (float)val[1],
+ (float)val[2],
+ new Rectangle2D.Double(val[3], val[4],
val[5], val[6] ),
GlyphMetrics.STANDARD );
peer.putGlyphMetrics( glyphCodes[ i ], gm );
@@ -454,7 +454,7 @@ public class FreetypeGlyphVector extends GlyphVector
/**
* Returns the outline of a single glyph.
- *
+ *
* Despite what the Sun API says, this method returns the glyph relative to
* the origin of the *entire string*, not each individual glyph.
*/
@@ -462,7 +462,7 @@ public class FreetypeGlyphVector extends GlyphVector
{
GeneralPath gp = getGlyphOutlineNative(glyphCodes[glyphIndex],
fontSet[glyphIndex]);
-
+
AffineTransform tx = AffineTransform.getTranslateInstance(glyphPositions[glyphIndex*2],
glyphPositions[glyphIndex*2+1]);
if (glyphTransforms[glyphIndex] != null)
@@ -484,12 +484,12 @@ public class FreetypeGlyphVector extends GlyphVector
/**
* Returns the positions of multiple glyphs.
*/
- public float[] getGlyphPositions(int beginGlyphIndex, int numEntries,
- float[] positionReturn)
+ public float[] getGlyphPositions(int beginGlyphIndex, int numEntries,
+ float[] positionReturn)
{
if (positionReturn == null || positionReturn.length < (numEntries * 2))
positionReturn = new float[numEntries*2];
-
+
System.arraycopy(glyphPositions, beginGlyphIndex*2, positionReturn, 0,
numEntries*2);
return positionReturn;
@@ -502,7 +502,7 @@ public class FreetypeGlyphVector extends GlyphVector
{
return glyphTransforms[glyphIndex];
}
-
+
/**
* Checks whether any transform has been set on any glyphs.
*/
@@ -511,10 +511,10 @@ public class FreetypeGlyphVector extends GlyphVector
for (int i = 0; i < glyphTransforms.length; i++)
if (glyphTransforms[i] != null)
return true;
-
+
return false;
}
-
+
/**
* Returns the visual bounds of a glyph
* May be off by a pixel or two due to hinting/rasterization.
@@ -538,7 +538,7 @@ public class FreetypeGlyphVector extends GlyphVector
for( int i = 1; i < nGlyphs; i++ )
{
Rectangle2D r2 = (Rectangle2D)getGlyphLogicalBounds( i );
-
+
rect = rect.createUnion( r2 );
}
@@ -566,9 +566,9 @@ public class FreetypeGlyphVector extends GlyphVector
}
/**
- * TODO:
- * FreeType does not currently have an API for the JSTF table. We should
- * probably get the table ourselves from FT and pass it to some parser
+ * TODO:
+ * FreeType does not currently have an API for the JSTF table. We should
+ * probably get the table ourselves from FT and pass it to some parser
* which the native font peers will need.
*/
public GlyphJustificationInfo getGlyphJustificationInfo(int glyphIndex)
@@ -615,14 +615,14 @@ public class FreetypeGlyphVector extends GlyphVector
// using and checking for nulls can be much faster.
if (newTX != null && newTX.isIdentity())
newTX = null;
-
+
// If the old and new transforms are identical, bail
if (glyphTransforms[glyphIndex] == null && newTX == null)
return;
-
+
if (newTX != null && newTX.equals(glyphTransforms[glyphIndex]))
return;
-
+
// Invalidate bounds cache and set new transform
logicalBounds = null;
glyphTransforms[glyphIndex] = newTX;
diff --git a/gnu/java/awt/peer/gtk/GdkFontPeer.java b/gnu/java/awt/peer/gtk/GdkFontPeer.java
index 078255e68..0041cd265 100644
--- a/gnu/java/awt/peer/gtk/GdkFontPeer.java
+++ b/gnu/java/awt/peer/gtk/GdkFontPeer.java
@@ -78,7 +78,7 @@ public class GdkFontPeer extends ClasspathFontPeer
{
public GdkFontMetrics (Font font)
- {
+ {
super(initFont(font));
}
@@ -167,7 +167,7 @@ public class GdkFontPeer extends ClasspathFontPeer
GdkFontMetrics metrics;
- static
+ static
{
if (Configuration.INIT_LOAD_LIBRARY)
{
@@ -204,7 +204,7 @@ public class GdkFontPeer extends ClasspathFontPeer
dispose ();
}
- /*
+ /*
* Helpers for the 3-way overloading that this class seems to suffer
* from. Remove them if you feel like they're a performance bottleneck,
* for the time being I prefer my code not be written and debugged in
@@ -214,7 +214,7 @@ public class GdkFontPeer extends ClasspathFontPeer
private String buildString(CharacterIterator iter)
{
CPStringBuilder sb = new CPStringBuilder();
- for(char c = iter.first(); c != CharacterIterator.DONE; c = iter.next())
+ for(char c = iter.first(); c != CharacterIterator.DONE; c = iter.next())
sb.append(c);
return sb.toString();
}
@@ -223,7 +223,7 @@ public class GdkFontPeer extends ClasspathFontPeer
{
CPStringBuilder sb = new CPStringBuilder();
int i = 0;
- for(char c = iter.first(); c != CharacterIterator.DONE; c = iter.next(), i++)
+ for(char c = iter.first(); c != CharacterIterator.DONE; c = iter.next(), i++)
{
if (begin <= i)
sb.append(c);
@@ -232,7 +232,7 @@ public class GdkFontPeer extends ClasspathFontPeer
}
return sb.toString();
}
-
+
private String buildString(char[] chars, int begin, int limit)
{
return new String(chars, begin, limit - begin);
@@ -247,8 +247,8 @@ public class GdkFontPeer extends ClasspathFontPeer
}
public GdkFontPeer (String name, int style, int size)
- {
- super(name, style, size);
+ {
+ super(name, style, size);
initState ();
setFont (this.familyName, this.style, (int)this.size);
metricsCache = new HashMap<Integer,GlyphMetrics>();
@@ -299,14 +299,14 @@ public class GdkFontPeer extends ClasspathFontPeer
/**
* Unneeded, but implemented anyway.
- */
+ */
public String getSubFamilyName(Font font, Locale locale)
{
String name;
-
+
if (locale == null)
locale = Locale.getDefault();
-
+
name = getName(NameDecoder.NAME_SUBFAMILY, locale);
if (name == null)
{
@@ -322,20 +322,20 @@ public class GdkFontPeer extends ClasspathFontPeer
* Returns the bytes belonging to a TrueType/OpenType table,
* Parameters n,a,m,e identify the 4-byte ASCII tag of the table.
*
- * Returns null if the font is not TT, the table is nonexistant,
+ * Returns null if the font is not TT, the table is nonexistant,
* or if some other unexpected error occured.
*
*/
private native byte[] getTrueTypeTable(byte n, byte a, byte m, byte e);
/**
- * Returns the PostScript name of the font, defaults to the familyName if
+ * Returns the PostScript name of the font, defaults to the familyName if
* a PS name could not be retrieved.
*/
public String getPostScriptName(Font font)
{
- String name = getName(NameDecoder.NAME_POSTSCRIPT,
- /* any language */ null);
+ String name = getName(NameDecoder.NAME_POSTSCRIPT,
+ /* any language */ null);
if( name == null )
return this.familyName;
@@ -356,7 +356,7 @@ public class GdkFontPeer extends ClasspathFontPeer
{
if (nameTable == null)
{
- byte[] data = getTrueTypeTable((byte)'n', (byte) 'a',
+ byte[] data = getTrueTypeTable((byte)'n', (byte) 'a',
(byte) 'm', (byte) 'e');
if( data == null )
return null;
@@ -378,16 +378,16 @@ public class GdkFontPeer extends ClasspathFontPeer
// FIXME: inquire with pango
return -1;
}
-
- public GlyphVector createGlyphVector (Font font,
- FontRenderContext ctx,
+
+ public GlyphVector createGlyphVector (Font font,
+ FontRenderContext ctx,
CharacterIterator i)
{
return new FreetypeGlyphVector(font, buildString (i), ctx);
}
- public GlyphVector createGlyphVector (Font font,
- FontRenderContext ctx,
+ public GlyphVector createGlyphVector (Font font,
+ FontRenderContext ctx,
int[] glyphCodes)
{
return new FreetypeGlyphVector(font, glyphCodes, ctx);
@@ -411,32 +411,32 @@ public class GdkFontPeer extends ClasspathFontPeer
{
return ascent;
}
-
+
public int getBaselineIndex()
- {
+ {
// FIXME
return Font.ROMAN_BASELINE;
}
-
+
public float[] getBaselineOffsets()
{
return new float[3];
}
-
+
public float getDescent()
{
return descent;
}
-
+
public float getHeight()
{
return height;
}
-
+
public float getLeading()
{
return height - (ascent + descent);
- }
+ }
public int getNumChars()
{
@@ -447,13 +447,13 @@ public class GdkFontPeer extends ClasspathFontPeer
{
// FreeType doesn't seem to provide a value here.
return ascent / 2;
- }
+ }
public float getStrikethroughThickness()
{
// FreeType doesn't seem to provide a value here.
return 1.f;
- }
+ }
public float getUnderlineOffset()
{
@@ -467,7 +467,7 @@ public class GdkFontPeer extends ClasspathFontPeer
}
- public LineMetrics getLineMetrics (Font font, CharacterIterator ci,
+ public LineMetrics getLineMetrics (Font font, CharacterIterator ci,
int begin, int limit, FontRenderContext rc)
{
return new GdkFontLineMetrics (this, limit - begin);
@@ -490,12 +490,12 @@ public class GdkFontPeer extends ClasspathFontPeer
public int getNumGlyphs (Font font)
{
- byte[] data = getTrueTypeTable((byte)'m', (byte) 'a',
- (byte)'x', (byte) 'p');
+ byte[] data = getTrueTypeTable((byte)'m', (byte) 'a',
+ (byte)'x', (byte) 'p');
if( data == null )
return -1;
- ByteBuffer buf = ByteBuffer.wrap( data );
+ ByteBuffer buf = ByteBuffer.wrap( data );
return buf.getShort(4);
}
@@ -504,15 +504,15 @@ public class GdkFontPeer extends ClasspathFontPeer
return true;
}
- public GlyphVector layoutGlyphVector (Font font, FontRenderContext frc,
- char[] chars, int start, int limit,
+ public GlyphVector layoutGlyphVector (Font font, FontRenderContext frc,
+ char[] chars, int start, int limit,
int flags)
{
return new FreetypeGlyphVector(font, chars, start, limit - start,
frc, flags);
}
- public LineMetrics getLineMetrics (Font font, String str,
+ public LineMetrics getLineMetrics (Font font, String str,
FontRenderContext frc)
{
return new GdkFontLineMetrics (this, str.length ());
@@ -536,7 +536,7 @@ public class GdkFontPeer extends ClasspathFontPeer
/**
* Put a GlyphMetrics object in the cache.
- */
+ */
void putGlyphMetrics( int glyphCode, GlyphMetrics metrics )
{
metricsCache.put( new Integer( glyphCode ), metrics );
diff --git a/gnu/java/awt/peer/gtk/GdkGraphicsConfiguration.java b/gnu/java/awt/peer/gtk/GdkGraphicsConfiguration.java
index 147f8f3e6..40474ff3b 100644
--- a/gnu/java/awt/peer/gtk/GdkGraphicsConfiguration.java
+++ b/gnu/java/awt/peer/gtk/GdkGraphicsConfiguration.java
@@ -51,21 +51,21 @@ import java.awt.image.ColorModel;
import java.awt.image.DirectColorModel;
import java.awt.image.VolatileImage;
-public class GdkGraphicsConfiguration
+public class GdkGraphicsConfiguration
extends GraphicsConfiguration
{
GdkScreenGraphicsDevice gdkScreenGraphicsDevice;
-
+
ColorModel opaqueColorModel;
ColorModel bitmaskColorModel;
ColorModel translucentColorModel;
-
+
public GdkGraphicsConfiguration(GdkScreenGraphicsDevice dev)
{
gdkScreenGraphicsDevice = dev;
-
+
opaqueColorModel = new DirectColorModel(32, 0xFF0000, 0xFF00, 0xFF, 0);
bitmaskColorModel = new DirectColorModel(32, 0xFF0000, 0xFF00, 0xFF, 0x1000000);
translucentColorModel = new DirectColorModel(32, 0xFF0000, 0xFF00, 0xFF, 0xFF000000);
@@ -81,7 +81,7 @@ public class GdkGraphicsConfiguration
return new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);
}
- public BufferedImage createCompatibleImage(int w, int h,
+ public BufferedImage createCompatibleImage(int w, int h,
int transparency)
{
return createCompatibleImage(w, h);
@@ -137,7 +137,7 @@ public class GdkGraphicsConfiguration
public BufferCapabilities getBufferCapabilities()
{
- return new BufferCapabilities(getImageCapabilities(),
+ return new BufferCapabilities(getImageCapabilities(),
getImageCapabilities(),
BufferCapabilities.FlipContents.UNDEFINED);
}
diff --git a/gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java b/gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java
index 980866c4b..f9695e43d 100644
--- a/gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java
+++ b/gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java
@@ -58,9 +58,9 @@ import gnu.classpath.Pointer;
public class GdkGraphicsEnvironment extends ClasspathGraphicsEnvironment
{
private final int native_state = GtkGenericPeer.getUniqueInteger ();
-
+
private GdkScreenGraphicsDevice defaultDevice;
-
+
private GdkScreenGraphicsDevice[] devices;
/**
@@ -81,14 +81,14 @@ public class GdkGraphicsEnvironment extends ClasspathGraphicsEnvironment
GtkToolkit.initializeGlobalIDs();
initIDs();
}
-
+
private static native void initIDs();
-
+
public GdkGraphicsEnvironment ()
{
nativeInitState();
}
-
+
native void nativeInitState();
public GraphicsDevice[] getScreenDevices ()
@@ -97,17 +97,17 @@ public class GdkGraphicsEnvironment extends ClasspathGraphicsEnvironment
{
devices = nativeGetScreenDevices();
}
-
+
return (GraphicsDevice[]) devices.clone();
}
-
+
private native GdkScreenGraphicsDevice[] nativeGetScreenDevices();
public GraphicsDevice getDefaultScreenDevice ()
{
if (GraphicsEnvironment.isHeadless ())
throw new HeadlessException ();
-
+
synchronized (GdkGraphicsEnvironment.class)
{
if (defaultDevice == null)
@@ -115,10 +115,10 @@ public class GdkGraphicsEnvironment extends ClasspathGraphicsEnvironment
defaultDevice = nativeGetDefaultScreenDevice();
}
}
-
+
return defaultDevice;
}
-
+
private native GdkScreenGraphicsDevice nativeGetDefaultScreenDevice();
public Graphics2D createGraphics (BufferedImage image)
@@ -129,7 +129,7 @@ public class GdkGraphicsEnvironment extends ClasspathGraphicsEnvironment
return new BufferedImageGraphics( image );
}
-
+
private native int nativeGetNumFontFamilies();
private native void nativeGetFontFamilies(String[] family_names);
@@ -157,10 +157,10 @@ public class GdkGraphicsEnvironment extends ClasspathGraphicsEnvironment
/**
* Used by GtkMouseInfoPeer.
- */
+ */
native int[] getMouseCoordinates();
native boolean isWindowUnderMouse(GtkWindowPeer windowPeer);
-
+
public WritableRaster createRaster(ColorModel cm, SampleModel sm)
{
if (CairoSurface.isCompatibleSampleModel(sm)
diff --git a/gnu/java/awt/peer/gtk/GdkPixbufDecoder.java b/gnu/java/awt/peer/gtk/GdkPixbufDecoder.java
index dbf4a2018..3dd597bca 100644
--- a/gnu/java/awt/peer/gtk/GdkPixbufDecoder.java
+++ b/gnu/java/awt/peer/gtk/GdkPixbufDecoder.java
@@ -73,7 +73,7 @@ import gnu.classpath.Pointer;
public class GdkPixbufDecoder extends gnu.java.awt.image.ImageDecoder
{
- static
+ static
{
if (Configuration.INIT_LOAD_LIBRARY)
{
@@ -82,7 +82,7 @@ public class GdkPixbufDecoder extends gnu.java.awt.image.ImageDecoder
initStaticState ();
}
-
+
/**
* Lock that should be held for all gdkpixbuf operations. We don't use
* the global gdk_threads_enter/leave functions since gdkpixbuf
@@ -124,9 +124,9 @@ public class GdkPixbufDecoder extends gnu.java.awt.image.ImageDecoder
boolean hasAlpha, GdkPixbufWriter writer);
// gdk-pixbuf provids data in RGBA format
- static final ColorModel cm = new DirectColorModel (32, 0xff000000,
- 0x00ff0000,
- 0x0000ff00,
+ static final ColorModel cm = new DirectColorModel (32, 0xff000000,
+ 0x00ff0000,
+ 0x0000ff00,
0x000000ff);
public GdkPixbufDecoder (DataInput datainput)
{
@@ -142,7 +142,7 @@ public class GdkPixbufDecoder extends gnu.java.awt.image.ImageDecoder
{
super (filename);
}
-
+
public GdkPixbufDecoder (URL url)
{
super (url);
@@ -168,21 +168,21 @@ public class GdkPixbufDecoder extends gnu.java.awt.image.ImageDecoder
ic.setHints (ImageConsumer.RANDOMPIXELORDER);
}
}
-
+
// called back by native side: area_updated_cb
- void areaUpdated (int x, int y, int width, int height,
+ void areaUpdated (int x, int y, int width, int height,
int pixels[], int scansize)
{
if (curr == null)
return;
-
+
for (int i = 0; i < curr.size (); i++)
{
ImageConsumer ic = (ImageConsumer) curr.elementAt (i);
ic.setPixels (x, y, width, height, cm, pixels, 0, scansize);
}
}
-
+
// called from an async image loader of one sort or another, this method
// repeatedly reads bytes from the input stream and passes them through a
// GdkPixbufLoader using the native method pumpBytes. pumpBytes in turn
@@ -217,7 +217,7 @@ public class GdkPixbufDecoder extends gnu.java.awt.image.ImageDecoder
}
needsClose = false;
-
+
for (int i = 0; i < curr.size (); i++)
{
ImageConsumer ic = (ImageConsumer) curr.elementAt (i);
@@ -239,7 +239,7 @@ public class GdkPixbufDecoder extends gnu.java.awt.image.ImageDecoder
public static class ImageFormatSpec
{
public String name;
- public boolean writable = false;
+ public boolean writable = false;
public ArrayList<String> mimeTypes = new ArrayList<String>();
public ArrayList<String> extensions = new ArrayList<String>();
@@ -257,12 +257,12 @@ public class GdkPixbufDecoder extends gnu.java.awt.image.ImageDecoder
public synchronized void addExtension(String e)
{
extensions.add(e);
- }
+ }
}
static ArrayList<ImageFormatSpec> imageFormatSpecs;
- public static ImageFormatSpec registerFormat(String name, boolean writable)
+ public static ImageFormatSpec registerFormat(String name, boolean writable)
{
ImageFormatSpec ifs = new ImageFormatSpec(name, writable);
synchronized(GdkPixbufDecoder.class)
@@ -277,7 +277,7 @@ public class GdkPixbufDecoder extends gnu.java.awt.image.ImageDecoder
static String[] getFormatNames(boolean writable)
{
ArrayList<String> names = new ArrayList<String>();
- synchronized (imageFormatSpecs)
+ synchronized (imageFormatSpecs)
{
Iterator<ImageFormatSpec> i = imageFormatSpecs.iterator();
while (i.hasNext())
@@ -287,10 +287,10 @@ public class GdkPixbufDecoder extends gnu.java.awt.image.ImageDecoder
continue;
names.add(ifs.name);
- /*
+ /*
* In order to make the filtering code work, we need to register
* this type under every "format name" likely to be used as a synonym.
- * This generally means "all the extensions people might use".
+ * This generally means "all the extensions people might use".
*/
Iterator<String> j = ifs.extensions.iterator();
@@ -304,7 +304,7 @@ public class GdkPixbufDecoder extends gnu.java.awt.image.ImageDecoder
static String[] getFormatExtensions(boolean writable)
{
ArrayList<String> extensions = new ArrayList<String>();
- synchronized (imageFormatSpecs)
+ synchronized (imageFormatSpecs)
{
Iterator<ImageFormatSpec> i = imageFormatSpecs.iterator();
while (i.hasNext())
@@ -323,7 +323,7 @@ public class GdkPixbufDecoder extends gnu.java.awt.image.ImageDecoder
static String[] getFormatMimeTypes(boolean writable)
{
ArrayList<String> mimeTypes = new ArrayList<String>();
- synchronized (imageFormatSpecs)
+ synchronized (imageFormatSpecs)
{
Iterator<ImageFormatSpec> i = imageFormatSpecs.iterator();
while (i.hasNext())
@@ -339,7 +339,7 @@ public class GdkPixbufDecoder extends gnu.java.awt.image.ImageDecoder
return mimeTypes.toArray(new String[mimeTypes.size()]);
}
-
+
static String findFormatName(Object ext, boolean needWritable)
{
if (ext == null)
@@ -361,7 +361,7 @@ public class GdkPixbufDecoder extends gnu.java.awt.image.ImageDecoder
if (ifs.name.equals(str))
return str;
- Iterator<String> j = ifs.extensions.iterator();
+ Iterator<String> j = ifs.extensions.iterator();
while (j.hasNext())
{
String extension = j.next();
@@ -369,14 +369,14 @@ public class GdkPixbufDecoder extends gnu.java.awt.image.ImageDecoder
return ifs.name;
}
- j = ifs.mimeTypes.iterator();
+ j = ifs.mimeTypes.iterator();
while (j.hasNext())
{
String mimeType = j.next();
if (mimeType.equals(str))
return ifs.name;
}
- }
+ }
throw new IllegalArgumentException("unknown extension '" + str + "'");
}
@@ -397,7 +397,7 @@ public class GdkPixbufDecoder extends gnu.java.awt.image.ImageDecoder
return writerSpi;
}
- public static void registerSpis(IIORegistry reg)
+ public static void registerSpis(IIORegistry reg)
{
reg.registerServiceProvider(getReaderSpi(), ImageReaderSpi.class);
reg.registerServiceProvider(getWriterSpi(), ImageWriterSpi.class);
@@ -405,11 +405,11 @@ public class GdkPixbufDecoder extends gnu.java.awt.image.ImageDecoder
public static class GdkPixbufWriterSpi extends ImageWriterSpi
{
- public GdkPixbufWriterSpi()
- {
+ public GdkPixbufWriterSpi()
+ {
super("GdkPixbuf", "2.x",
- GdkPixbufDecoder.getFormatNames(true),
- GdkPixbufDecoder.getFormatExtensions(true),
+ GdkPixbufDecoder.getFormatNames(true),
+ GdkPixbufDecoder.getFormatExtensions(true),
GdkPixbufDecoder.getFormatMimeTypes(true),
"gnu.java.awt.peer.gtk.GdkPixbufDecoder$GdkPixbufWriter",
new Class[] { ImageOutputStream.class },
@@ -437,11 +437,11 @@ public class GdkPixbufDecoder extends gnu.java.awt.image.ImageDecoder
public static class GdkPixbufReaderSpi extends ImageReaderSpi
{
- public GdkPixbufReaderSpi()
- {
+ public GdkPixbufReaderSpi()
+ {
super("GdkPixbuf", "2.x",
- GdkPixbufDecoder.getFormatNames(false),
- GdkPixbufDecoder.getFormatExtensions(false),
+ GdkPixbufDecoder.getFormatNames(false),
+ GdkPixbufDecoder.getFormatExtensions(false),
GdkPixbufDecoder.getFormatMimeTypes(false),
"gnu.java.awt.peer.gtk.GdkPixbufDecoder$GdkPixbufReader",
new Class[] { ImageInputStream.class },
@@ -450,9 +450,9 @@ public class GdkPixbufDecoder extends gnu.java.awt.image.ImageDecoder
false, null, null, null, null);
}
- public boolean canDecodeInput(Object obj)
- {
- return true;
+ public boolean canDecodeInput(Object obj)
+ {
+ return true;
}
public ImageReader createReaderInstance(Object ext)
@@ -489,7 +489,7 @@ public class GdkPixbufDecoder extends gnu.java.awt.image.ImageDecoder
return null;
}
- public IIOMetadata getDefaultImageMetadata (ImageTypeSpecifier imageType,
+ public IIOMetadata getDefaultImageMetadata (ImageTypeSpecifier imageType,
ImageWriteParam param)
{
return null;
@@ -509,7 +509,7 @@ public class GdkPixbufDecoder extends gnu.java.awt.image.ImageDecoder
int height = ras.getHeight();
ColorModel model = image.getColorModel();
int[] pixels = CairoGraphics2D.findSimpleIntegerArray (image.getColorModel(), ras);
-
+
if (pixels == null)
{
BufferedImage img;
@@ -520,7 +520,7 @@ public class GdkPixbufDecoder extends gnu.java.awt.image.ImageDecoder
for (int y = 0; y < height; ++y)
for (int x = 0; x < width; ++x)
img.setRGB(x, y, model.getRGB(ras.getPixel(x, y, pix)));
- pixels = CairoGraphics2D.findSimpleIntegerArray (img.getColorModel(),
+ pixels = CairoGraphics2D.findSimpleIntegerArray (img.getColorModel(),
img.getRaster());
model = img.getColorModel();
}
@@ -530,7 +530,7 @@ public class GdkPixbufDecoder extends gnu.java.awt.image.ImageDecoder
processImageStarted(1);
synchronized(pixbufLock)
{
- streamImage(pixels, this.ext, width, height, model.hasAlpha(),
+ streamImage(pixels, this.ext, width, height, model.hasAlpha(),
this);
}
synchronized(data)
@@ -555,7 +555,7 @@ public class GdkPixbufDecoder extends gnu.java.awt.image.ImageDecoder
throw exception;
processImageComplete();
- }
+ }
/**
* Object marking end of data from native streamImage code.
@@ -627,7 +627,7 @@ public class GdkPixbufDecoder extends gnu.java.awt.image.ImageDecoder
}
}
- private static class GdkPixbufReader
+ private static class GdkPixbufReader
extends ImageReader
implements ImageConsumer
{
@@ -638,7 +638,7 @@ public class GdkPixbufDecoder extends gnu.java.awt.image.ImageDecoder
int width;
int height;
String ext;
-
+
public GdkPixbufReader(GdkPixbufReaderSpi ownerSpi, Object ext)
{
super(ownerSpi);
@@ -658,29 +658,29 @@ public class GdkPixbufDecoder extends gnu.java.awt.image.ImageDecoder
width = w;
height = h;
}
-
+
public void setProperties(Hashtable props) {}
- public void setColorModel(ColorModel model)
+ public void setColorModel(ColorModel model)
{
defaultModel = model;
}
public void setHints(int flags) {}
- public void setPixels(int x, int y, int w, int h,
- ColorModel model, byte[] pixels,
+ public void setPixels(int x, int y, int w, int h,
+ ColorModel model, byte[] pixels,
int offset, int scansize)
{
- }
+ }
- public void setPixels(int x, int y, int w, int h,
- ColorModel model, int[] pixels,
+ public void setPixels(int x, int y, int w, int h,
+ ColorModel model, int[] pixels,
int offset, int scansize)
{
if (model == null)
model = defaultModel;
-
+
if (bufferedImage == null)
{
if(model != null && model.hasAlpha())
@@ -709,7 +709,7 @@ public class GdkPixbufDecoder extends gnu.java.awt.image.ImageDecoder
processImageProgress(y / (height == 0 ? 1 : height));
}
- public void imageComplete(int status)
+ public void imageComplete(int status)
{
processImageComplete();
}
@@ -729,7 +729,7 @@ public class GdkPixbufDecoder extends gnu.java.awt.image.ImageDecoder
return 1;
}
- public IIOMetadata getImageMetadata(int i)
+ public IIOMetadata getImageMetadata(int i)
{
return null;
}
@@ -748,7 +748,7 @@ public class GdkPixbufDecoder extends gnu.java.awt.image.ImageDecoder
vec.add(new ImageTypeSpecifier(img));
return vec.iterator();
}
-
+
public int getHeight(int imageIndex)
throws IOException
{
diff --git a/gnu/java/awt/peer/gtk/GdkRobotPeer.java b/gnu/java/awt/peer/gtk/GdkRobotPeer.java
index d3e9774da..2609bad09 100644
--- a/gnu/java/awt/peer/gtk/GdkRobotPeer.java
+++ b/gnu/java/awt/peer/gtk/GdkRobotPeer.java
@@ -53,9 +53,9 @@ public class GdkRobotPeer implements RobotPeer
{
// gdk-pixbuf provides data in RGBA format
static final ColorModel cm = new DirectColorModel (32, 0xff000000,
- 0x00ff0000,
- 0x0000ff00,
- 0x000000ff);
+ 0x00ff0000,
+ 0x0000ff00,
+ 0x000000ff);
public GdkRobotPeer (GraphicsDevice screen) throws AWTException
{
diff --git a/gnu/java/awt/peer/gtk/GdkScreenGraphicsDevice.java b/gnu/java/awt/peer/gtk/GdkScreenGraphicsDevice.java
index 9ce0b96da..b8bce4247 100644
--- a/gnu/java/awt/peer/gtk/GdkScreenGraphicsDevice.java
+++ b/gnu/java/awt/peer/gtk/GdkScreenGraphicsDevice.java
@@ -52,28 +52,28 @@ import gnu.classpath.Pointer;
class GdkScreenGraphicsDevice extends GraphicsDevice
{
private final int native_state = GtkGenericPeer.getUniqueInteger ();
-
+
private Window fullscreenWindow;
-
+
private boolean oldWindowDecorationState;
-
+
private Rectangle oldWindowBounds;
-
+
private Rectangle bounds;
-
+
private GdkGraphicsConfiguration[] configurations;
-
+
/** The <code>GdkGraphicsEnvironment</code> instance that created this
* <code>GdkScreenGraphicsDevice</code>. This is only needed for native
* methods which need to access the 'native_state' field storing a pointer
* to a GdkDisplay object.
- */
+ */
GdkGraphicsEnvironment env;
-
+
/** An identifier that is created by Gdk
*/
String idString;
-
+
/** The display modes supported by this <code>GdkScreenGraphicsDevice</code>.
* If the array is <code>null</code> <code>nativeGetDisplayModes</code> has
* to be called.
@@ -85,7 +85,7 @@ class GdkScreenGraphicsDevice extends GraphicsDevice
* is still <code>null</code> afterwards, the XRandR extension is available
* and display mode changes are possible. If it is non-null XRandR is not
* available, no display mode changes are possible and no other native
- * method must be called.
+ * method must be called.
*/
DisplayMode fixedDisplayMode;
@@ -107,14 +107,14 @@ class GdkScreenGraphicsDevice extends GraphicsDevice
GtkToolkit.initializeGlobalIDs();
initIDs();
}
-
+
static native void initIDs();
-
+
GdkScreenGraphicsDevice (GdkGraphicsEnvironment e)
{
super();
env = e;
-
+
configurations = new GdkGraphicsConfiguration[1];
configurations[0] = new GdkGraphicsConfiguration(this);
}
@@ -126,13 +126,13 @@ class GdkScreenGraphicsDevice extends GraphicsDevice
{
fixedDisplayMode = nativeGetFixedDisplayMode(env);
}
-
+
/** Depending on the availability of the XRandR extension the method returns
* the screens' non-changeable display mode or null, meaning that XRandR can
* handle display mode changes.
*/
native DisplayMode nativeGetFixedDisplayMode(GdkGraphicsEnvironment env);
-
+
public int getType ()
{
// Gdk manages only raster screens.
@@ -143,17 +143,17 @@ class GdkScreenGraphicsDevice extends GraphicsDevice
{
if (idString == null)
idString = nativeGetIDString();
-
+
return idString;
}
-
- private native String nativeGetIDString();
+
+ private native String nativeGetIDString();
public GraphicsConfiguration[] getConfigurations ()
{
return (GraphicsConfiguration[]) configurations.clone();
}
-
+
public GraphicsConfiguration getDefaultConfiguration ()
{
return configurations[0];
@@ -172,7 +172,7 @@ class GdkScreenGraphicsDevice extends GraphicsDevice
{
if (fixedDisplayMode != null)
return fixedDisplayMode;
-
+
synchronized (this)
{
if (displayModes == null)
@@ -181,28 +181,28 @@ class GdkScreenGraphicsDevice extends GraphicsDevice
int index = nativeGetDisplayModeIndex(env);
int rate = nativeGetDisplayModeRate(env);
-
+
return new DisplayMode(displayModes[index].width,
displayModes[index].height,
DisplayMode.BIT_DEPTH_MULTI,
rate);
}
-
+
native int nativeGetDisplayModeIndex(GdkGraphicsEnvironment env);
-
+
native int nativeGetDisplayModeRate(GdkGraphicsEnvironment env);
-
+
public DisplayMode[] getDisplayModes()
{
if (fixedDisplayMode != null)
return new DisplayMode[] { fixedDisplayMode };
-
+
synchronized (this)
{
if (displayModes == null)
displayModes = nativeGetDisplayModes(env);
}
-
+
ArrayList<DisplayMode> list = new ArrayList<DisplayMode>();
for(int i=0;i<displayModes.length;i++)
for(int j=0;j<displayModes[i].rates.length;j++)
@@ -210,10 +210,10 @@ class GdkScreenGraphicsDevice extends GraphicsDevice
displayModes[i].height,
DisplayMode.BIT_DEPTH_MULTI,
displayModes[i].rates[j]));
-
+
return list.toArray(new DisplayMode[list.size()]);
}
-
+
native X11DisplayMode[] nativeGetDisplayModes(GdkGraphicsEnvironment env);
/**
@@ -226,7 +226,7 @@ class GdkScreenGraphicsDevice extends GraphicsDevice
{
return true;
}
-
+
public boolean isDisplayChangeSupported()
{
return fixedDisplayMode == null;
@@ -236,16 +236,16 @@ class GdkScreenGraphicsDevice extends GraphicsDevice
{
if (fixedDisplayMode != null)
throw new UnsupportedOperationException("Cannnot change display mode.");
-
+
if (dm == null)
throw new IllegalArgumentException("DisplayMode must not be null.");
-
+
synchronized (this)
{
if (displayModes == null)
displayModes = nativeGetDisplayModes(env);
}
-
+
for (int i=0; i<displayModes.length; i++)
if (displayModes[i].width == dm.getWidth()
&& displayModes[i].height == dm.getHeight())
@@ -255,19 +255,19 @@ class GdkScreenGraphicsDevice extends GraphicsDevice
nativeSetDisplayMode(env,
i,
(short) dm.getRefreshRate());
-
+
bounds = null;
}
-
+
return;
}
-
+
throw new IllegalArgumentException("Mode not supported by this device.");
}
-
+
native void nativeSetDisplayMode(GdkGraphicsEnvironment env,
int index, short rate);
-
+
/** A class that simply encapsulates the X11 display mode data.
*/
static class X11DisplayMode
@@ -275,16 +275,16 @@ class GdkScreenGraphicsDevice extends GraphicsDevice
short[] rates;
int width;
int height;
-
+
X11DisplayMode(int width, int height, short[] rates)
{
this.width = width;
this.height = height;
this.rates = rates;
}
-
+
}
-
+
public void setFullScreenWindow(Window w)
{
// Bring old fullscreen window back into its original state.
@@ -293,7 +293,7 @@ class GdkScreenGraphicsDevice extends GraphicsDevice
if (fullscreenWindow instanceof Frame)
{
// Decoration state can only be switched when the peer is
- // non-existent. That means we have to dispose the
+ // non-existent. That means we have to dispose the
// Frame.
Frame f = (Frame) fullscreenWindow;
if (oldWindowDecorationState != f.isUndecorated())
@@ -302,13 +302,13 @@ class GdkScreenGraphicsDevice extends GraphicsDevice
f.setUndecorated(oldWindowDecorationState);
}
}
-
+
fullscreenWindow.setBounds(oldWindowBounds);
if (!fullscreenWindow.isVisible())
fullscreenWindow.setVisible(true);
}
-
+
// If applicable remove decoration, then maximize the window and
// bring it to the foreground.
if (w != null)
@@ -323,27 +323,27 @@ class GdkScreenGraphicsDevice extends GraphicsDevice
f.setUndecorated(true);
}
}
-
+
oldWindowBounds = w.getBounds();
-
+
DisplayMode dm = getDisplayMode();
-
+
w.setBounds(0, 0, dm.getWidth(), dm.getHeight());
-
+
if (!w.isVisible())
w.setVisible(true);
-
+
w.requestFocus();
w.toFront();
-
+
}
-
+
fullscreenWindow = w;
}
-
+
public Window getFullScreenWindow()
{
- return fullscreenWindow;
+ return fullscreenWindow;
}
Rectangle getBounds()
@@ -353,10 +353,10 @@ class GdkScreenGraphicsDevice extends GraphicsDevice
if (bounds == null)
bounds = nativeGetBounds();
}
-
+
return bounds;
}
-
+
native Rectangle nativeGetBounds();
}
diff --git a/gnu/java/awt/peer/gtk/GtkButtonPeer.java b/gnu/java/awt/peer/gtk/GtkButtonPeer.java
index f18db7af9..6ff56c0f2 100644
--- a/gnu/java/awt/peer/gtk/GtkButtonPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkButtonPeer.java
@@ -78,7 +78,7 @@ public class GtkButtonPeer extends GtkComponentPeer
create (((Button) awtComponent).getLabel ());
}
- public void setLabel (String label)
+ public void setLabel (String label)
{
gtkSetLabel(label);
}
@@ -86,8 +86,8 @@ public class GtkButtonPeer extends GtkComponentPeer
void postActionEvent (int mods)
{
q().postEvent (new ActionEvent (awtWidget,
- ActionEvent.ACTION_PERFORMED,
- ((Button) awtComponent).getActionCommand (),
- mods));
+ ActionEvent.ACTION_PERFORMED,
+ ((Button) awtComponent).getActionCommand (),
+ mods));
}
}
diff --git a/gnu/java/awt/peer/gtk/GtkCheckboxPeer.java b/gnu/java/awt/peer/gtk/GtkCheckboxPeer.java
index 4a41d0696..6321bc64d 100644
--- a/gnu/java/awt/peer/gtk/GtkCheckboxPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkCheckboxPeer.java
@@ -66,7 +66,7 @@ public class GtkCheckboxPeer extends GtkComponentPeer
public native void addToGroup (long groupPointer);
public native void removeFromGroup ();
public native void switchToGroup (long groupPointer);
-
+
public native void connectSignals ();
/**
@@ -101,7 +101,7 @@ public class GtkCheckboxPeer extends GtkComponentPeer
{
groupPointer = groupMap.get(current_group);
}
-
+
if (groupPointer == null)
{
// We don't know about this group. Create a new native
@@ -118,7 +118,7 @@ public class GtkCheckboxPeer extends GtkComponentPeer
}
currentState = checkbox.getState();
gtkToggleButtonSetActive(currentState);
-
+
String label = checkbox.getLabel();
if (label != null)
gtkButtonSetLabel(label);
@@ -161,7 +161,7 @@ public class GtkCheckboxPeer extends GtkComponentPeer
{
groupPointer = groupMap.get(current_group);
}
-
+
if (groupPointer == null)
{
// We don't know about this group. Create a new native
@@ -199,14 +199,14 @@ public class GtkCheckboxPeer extends GtkComponentPeer
// to the other group.
current_group = group;
-
+
// See if the new group is already stored in our map.
Long groupPointer = null;
synchronized (groupMap)
{
groupPointer = groupMap.get(current_group);
}
-
+
if (groupPointer == null)
{
// We don't know about this group. Create a new native
@@ -236,7 +236,7 @@ public class GtkCheckboxPeer extends GtkComponentPeer
state ? ItemEvent.SELECTED : ItemEvent.DESELECTED);
}
}
-
+
public void addToGroupMap(long groupPointer)
{
synchronized (groupMap)
diff --git a/gnu/java/awt/peer/gtk/GtkChoicePeer.java b/gnu/java/awt/peer/gtk/GtkChoicePeer.java
index ff061d35c..59cacf0b6 100644
--- a/gnu/java/awt/peer/gtk/GtkChoicePeer.java
+++ b/gnu/java/awt/peer/gtk/GtkChoicePeer.java
@@ -47,7 +47,7 @@ public class GtkChoicePeer extends GtkComponentPeer
implements ChoicePeer
{
private int selected;
-
+
public GtkChoicePeer (Choice c)
{
super (c);
@@ -95,7 +95,7 @@ public class GtkChoicePeer extends GtkComponentPeer
// Ensure the triggering of an event when removing item zero if zero is the
// selected item, even though the selected index doesn't change.
if( index == 0 && selected == 0 )
- selected = -1;
+ selected = -1;
nativeRemove( index );
}
@@ -104,14 +104,14 @@ public class GtkChoicePeer extends GtkComponentPeer
selected = -1; // we do not want to trigger a select event here.
nativeRemoveAll();
}
-
+
public void addItem (String item, int position)
{
add (item, position);
}
/**
- * Callback from the native side on an item-select event,
+ * Callback from the native side on an item-select event,
* which posts an event. The event is only posted if it represents an actual
* change. Selected is set to the peer's state initially, so that the
* first call to select(int) from the constructor will not trigger an event.
@@ -122,7 +122,7 @@ public class GtkChoicePeer extends GtkComponentPeer
if( selected != index )
{
selected = index;
- postItemEvent (((Choice) awtComponent).getItem( selected ),
+ postItemEvent (((Choice) awtComponent).getItem( selected ),
ItemEvent.SELECTED);
}
}
@@ -140,4 +140,3 @@ public class GtkChoicePeer extends GtkComponentPeer
((Choice)awtComponent).select( selected );
}
}
-
diff --git a/gnu/java/awt/peer/gtk/GtkClipboard.java b/gnu/java/awt/peer/gtk/GtkClipboard.java
index e248b6daf..4250cabaa 100644
--- a/gnu/java/awt/peer/gtk/GtkClipboard.java
+++ b/gnu/java/awt/peer/gtk/GtkClipboard.java
@@ -149,7 +149,7 @@ public class GtkClipboard extends Clipboard
* gtk+ clipboard.
*/
public synchronized void setContents(Transferable contents,
- ClipboardOwner owner)
+ ClipboardOwner owner)
{
super.setContents(contents, owner);
@@ -224,7 +224,7 @@ public class GtkClipboard extends Clipboard
boolean text,
boolean images,
boolean files);
-
+
/**
* Called by the gtk+ clipboard when an application has requested
* text. Return a string representing the current clipboard
diff --git a/gnu/java/awt/peer/gtk/GtkComponentPeer.java b/gnu/java/awt/peer/gtk/GtkComponentPeer.java
index 76fefaaa5..04643c2c8 100644
--- a/gnu/java/awt/peer/gtk/GtkComponentPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkComponentPeer.java
@@ -96,7 +96,7 @@ public class GtkComponentPeer extends GtkGenericPeer
private Rectangle currentPaintArea;
/* this isEnabled differs from Component.isEnabled, in that it
- knows if a parent is disabled. In that case Component.isEnabled
+ knows if a parent is disabled. In that case Component.isEnabled
may return true, but our isEnabled will always return false */
native boolean isEnabled ();
static native boolean modalHasGrab();
@@ -207,13 +207,13 @@ public class GtkComponentPeer extends GtkGenericPeer
setEnabled (awtComponent.isEnabled ());
}
- public int checkImage (Image image, int width, int height,
- ImageObserver observer)
+ public int checkImage (Image image, int width, int height,
+ ImageObserver observer)
{
return getToolkit().checkImage(image, width, height, observer);
}
- public Image createImage (ImageProducer producer)
+ public Image createImage (ImageProducer producer)
{
return new GtkImage (producer);
}
@@ -223,17 +223,17 @@ public class GtkComponentPeer extends GtkGenericPeer
return CairoSurface.getBufferedImage(width, height);
}
- public void disable ()
+ public void disable ()
{
setEnabled (false);
}
- public void enable ()
+ public void enable ()
{
setEnabled (true);
}
- public ColorModel getColorModel ()
+ public ColorModel getColorModel ()
{
return ColorModel.getRGBdefault ();
}
@@ -250,8 +250,8 @@ public class GtkComponentPeer extends GtkGenericPeer
return ComponentGraphics.getComponentGraphics(this);
}
- public Point getLocationOnScreen ()
- {
+ public Point getLocationOnScreen ()
+ {
int point[] = new int[2];
if (Thread.currentThread() == GtkMainThread.mainThread)
gtkWidgetGetLocationOnScreenUnlocked (point);
@@ -260,7 +260,7 @@ public class GtkComponentPeer extends GtkGenericPeer
return new Point (point[0], point[1]);
}
- public Dimension getMinimumSize ()
+ public Dimension getMinimumSize ()
{
return minimumSize ();
}
@@ -274,7 +274,7 @@ public class GtkComponentPeer extends GtkGenericPeer
{
return Toolkit.getDefaultToolkit();
}
-
+
public void handleEvent (AWTEvent event)
{
int id = event.getID();
@@ -376,12 +376,12 @@ public class GtkComponentPeer extends GtkGenericPeer
}
}
- public boolean isFocusTraversable ()
+ public boolean isFocusTraversable ()
{
return true;
}
- public Dimension minimumSize ()
+ public Dimension minimumSize ()
{
int dim[] = new int[2];
@@ -404,12 +404,12 @@ public class GtkComponentPeer extends GtkGenericPeer
}
public boolean prepareImage (Image image, int width, int height,
- ImageObserver observer)
+ ImageObserver observer)
{
return getToolkit().prepareImage(image, width, height, observer);
}
- public void print (Graphics g)
+ public void print (Graphics g)
{
g.drawImage( ComponentGraphics.grab( this ), 0, 0, null );
}
@@ -421,7 +421,7 @@ public class GtkComponentPeer extends GtkGenericPeer
if (tm <= 0)
q().postEvent(new PaintEvent(awtComponent, PaintEvent.UPDATE,
- new Rectangle(x, y, width, height)));
+ new Rectangle(x, y, width, height)));
else
RepaintTimerTask.schedule(tm, x, y, width, height, awtComponent);
}
@@ -452,7 +452,7 @@ public class GtkComponentPeer extends GtkGenericPeer
}
static void schedule(long tm, int x, int y, int width, int height,
- Component c)
+ Component c)
{
repaintTimer.schedule(new RepaintTimerTask(c, x, y, width, height), tm);
}
@@ -463,12 +463,12 @@ public class GtkComponentPeer extends GtkGenericPeer
assert false: "Call new requestFocus() method instead";
}
- public void reshape (int x, int y, int width, int height)
+ public void reshape (int x, int y, int width, int height)
{
setBounds (x, y, width, height);
}
- public void setBackground (Color c)
+ public void setBackground (Color c)
{
gtkWidgetSetBackground (c.getRed(), c.getGreen(), c.getBlue());
}
@@ -481,7 +481,7 @@ public class GtkComponentPeer extends GtkGenericPeer
int new_y = y;
Component parent = awtComponent.getParent ();
-
+
// Heavyweight components that are children of one or more
// lightweight containers have to be handled specially. Because
// calls to GLightweightPeer.setBounds do nothing, GTK has no
@@ -492,14 +492,14 @@ public class GtkComponentPeer extends GtkGenericPeer
// so we need to continue adding offsets until we reach a
// container whose position GTK knows -- that is, the first
// non-lightweight.
- Insets i;
+ Insets i;
while (parent.isLightweight())
{
i = ((Container) parent).getInsets();
-
+
new_x += parent.getX() + i.left;
new_y += parent.getY() + i.top;
-
+
parent = parent.getParent();
}
// We only need to convert from Java to GTK coordinates if we're
@@ -516,7 +516,7 @@ public class GtkComponentPeer extends GtkGenericPeer
int menuBarHeight = 0;
if (peer instanceof GtkFramePeer)
menuBarHeight = ((GtkFramePeer) peer).getMenuBarHeight ();
-
+
new_x -= insets.left;
new_y -= insets.top;
new_y += menuBarHeight;
@@ -534,7 +534,7 @@ public class GtkComponentPeer extends GtkGenericPeer
setCursor (awtComponent.getCursor ());
}
- public void setCursor (Cursor cursor)
+ public void setCursor (Cursor cursor)
{
int x, y;
GtkImage image;
@@ -573,7 +573,7 @@ public class GtkComponentPeer extends GtkGenericPeer
gtkWidgetModifyFont(f.getName(), f.getStyle(), f.getSize());
}
- public void setForeground (Color c)
+ public void setForeground (Color c)
{
gtkWidgetSetForeground (c.getRed(), c.getGreen(), c.getBlue());
}
@@ -619,7 +619,7 @@ public class GtkComponentPeer extends GtkGenericPeer
}
protected void postMouseEvent(int id, long when, int mods, int x, int y,
- int clickCount, boolean popupTrigger)
+ int clickCount, boolean popupTrigger)
{
// It is important to do the getLocationOnScreen() here, instead
// of using the old MouseEvent constructors, because
@@ -638,7 +638,7 @@ public class GtkComponentPeer extends GtkGenericPeer
protected void postMouseWheelEvent(int id, long when, int mods,
int x, int y, int clickCount,
boolean popupTrigger,
- int type, int amount, int rotation)
+ int type, int amount, int rotation)
{
q().postEvent(new MouseWheelEvent(awtComponent, id, when, mods,
x, y, clickCount, popupTrigger,
@@ -693,7 +693,7 @@ public class GtkComponentPeer extends GtkGenericPeer
protected void postItemEvent (Object item, int stateChange)
{
- q().postEvent (new ItemEvent ((ItemSelectable)awtComponent,
+ q().postEvent (new ItemEvent ((ItemSelectable)awtComponent,
ItemEvent.ITEM_STATE_CHANGED,
item, stateChange));
}
@@ -721,7 +721,7 @@ public class GtkComponentPeer extends GtkGenericPeer
return false;
}
- public boolean requestFocus (Component request, boolean temporary,
+ public boolean requestFocus (Component request, boolean temporary,
boolean allowWindowFocus, long time)
{
assert request == awtComponent || isLightweightDescendant(request);
@@ -841,7 +841,7 @@ public class GtkComponentPeer extends GtkGenericPeer
caps.getBackBufferCapabilities());
else
throw new AWTException("GtkComponentPeer.createBuffers:"
- + " multi-buffering not supported");
+ + " multi-buffering not supported");
this.caps = caps;
}
@@ -861,13 +861,13 @@ public class GtkComponentPeer extends GtkGenericPeer
// create new back buffer and clear it to the background color.
if (contents == BufferCapabilities.FlipContents.BACKGROUND)
- {
- backBuffer = createVolatileImage(awtComponent.getWidth(),
- awtComponent.getHeight());
- backBuffer.getGraphics().clearRect(0, 0,
- awtComponent.getWidth(),
- awtComponent.getHeight());
- }
+ {
+ backBuffer = createVolatileImage(awtComponent.getWidth(),
+ awtComponent.getHeight());
+ backBuffer.getGraphics().clearRect(0, 0,
+ awtComponent.getWidth(),
+ awtComponent.getHeight());
+ }
// FIXME: support BufferCapabilities.FlipContents.PRIOR
}
@@ -876,7 +876,7 @@ public class GtkComponentPeer extends GtkGenericPeer
{
backBuffer.flush();
}
-
+
public String toString ()
{
return "peer of " + awtComponent.toString();
@@ -889,13 +889,13 @@ public class GtkComponentPeer extends GtkGenericPeer
public void reparent(ContainerPeer parent)
{
// FIXME: implement
-
+
}
public void setBounds(int x, int y, int width, int height, int z)
{
// FIXME: implement
setBounds (x, y, width, height);
-
+
}
public boolean isReparentSupported()
{
@@ -906,7 +906,7 @@ public class GtkComponentPeer extends GtkGenericPeer
public void layout()
{
// FIXME: implement
-
+
}
public boolean requestFocus(Component lightweightChild, boolean temporary,
diff --git a/gnu/java/awt/peer/gtk/GtkContainerPeer.java b/gnu/java/awt/peer/gtk/GtkContainerPeer.java
index 541de3d82..b7eacb9f6 100644
--- a/gnu/java/awt/peer/gtk/GtkContainerPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkContainerPeer.java
@@ -64,12 +64,12 @@ public class GtkContainerPeer extends GtkComponentPeer
{
}
- public Insets getInsets()
+ public Insets getInsets()
{
return insets;
}
- public Insets insets()
+ public Insets insets()
{
return getInsets ();
}
@@ -103,7 +103,7 @@ public class GtkContainerPeer extends GtkComponentPeer
public void setBackground (Color c)
{
super.setBackground(c);
-
+
Object components[] = ((Container) awtComponent).getComponents();
for (int i = 0; i < components.length; i++)
{
@@ -133,6 +133,6 @@ public class GtkContainerPeer extends GtkComponentPeer
public void restack()
{
//FIXME: implement
-
+
}
}
diff --git a/gnu/java/awt/peer/gtk/GtkCursor.java b/gnu/java/awt/peer/gtk/GtkCursor.java
index eb9e713d0..e382d6331 100644
--- a/gnu/java/awt/peer/gtk/GtkCursor.java
+++ b/gnu/java/awt/peer/gtk/GtkCursor.java
@@ -64,7 +64,7 @@ public class GtkCursor extends Cursor
{
return image;
}
-
+
Point getHotspot()
{
return hotspot;
diff --git a/gnu/java/awt/peer/gtk/GtkDialogPeer.java b/gnu/java/awt/peer/gtk/GtkDialogPeer.java
index 13906544d..3393eb9d0 100644
--- a/gnu/java/awt/peer/gtk/GtkDialogPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkDialogPeer.java
@@ -52,7 +52,7 @@ public class GtkDialogPeer extends GtkWindowPeer
void create ()
{
Dialog dialog = (Dialog) awtComponent;
-
+
// Create a decorated dialog window.
create (GDK_WINDOW_TYPE_HINT_DIALOG, !((Dialog) awtComponent).isUndecorated ());
diff --git a/gnu/java/awt/peer/gtk/GtkFileDialogPeer.java b/gnu/java/awt/peer/gtk/GtkFileDialogPeer.java
index 7d5ef91de..cddc530fd 100644
--- a/gnu/java/awt/peer/gtk/GtkFileDialogPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkFileDialogPeer.java
@@ -48,7 +48,7 @@ import java.io.FilenameFilter;
public class GtkFileDialogPeer extends GtkDialogPeer implements FileDialogPeer
{
static final String FS = System.getProperty("file.separator");
-
+
private String currentFile = null;
private String currentDirectory = null;
private FilenameFilter filter;
@@ -66,7 +66,7 @@ public class GtkFileDialogPeer extends GtkDialogPeer implements FileDialogPeer
((FileDialog) awtComponent).getMode());
FileDialog fd = (FileDialog) awtComponent;
-
+
nativeSetDirectory(System.getProperty("user.dir"));
setDirectory(fd.getDirectory());
setFile(fd.getFile());
@@ -136,7 +136,7 @@ public class GtkFileDialogPeer extends GtkDialogPeer implements FileDialogPeer
nativeSetDirectory(FS);
return;
}
-
+
// GtkFileChooser requires absolute directory names. If the given directory
// name is not absolute, construct it based on current directory if it is not
// null. Otherwise, use FS.
@@ -175,15 +175,15 @@ public class GtkFileDialogPeer extends GtkDialogPeer implements FileDialogPeer
// called back by native side: handle_response_cb
// only called from the GTK thread
- void gtkHideFileDialog ()
+ void gtkHideFileDialog ()
{
// hide calls back the peer's setVisible method, so locking is a
// problem.
((Dialog) awtComponent).hide();
}
-
+
// called back by native side: handle_response_cb
- void gtkDisposeFileDialog ()
+ void gtkDisposeFileDialog ()
{
((Dialog) awtComponent).dispose();
}
diff --git a/gnu/java/awt/peer/gtk/GtkFramePeer.java b/gnu/java/awt/peer/gtk/GtkFramePeer.java
index 87dbd5e0f..a36854ce0 100644
--- a/gnu/java/awt/peer/gtk/GtkFramePeer.java
+++ b/gnu/java/awt/peer/gtk/GtkFramePeer.java
@@ -130,8 +130,8 @@ public class GtkFramePeer extends GtkWindowPeer
setMenuBarWidth (menuBar, menuBarWidth);
super.setBounds(x, y, width, height + menuBarHeight);
- }
-
+ }
+
public void setResizable (boolean resizable)
{
// Call setSize; otherwise when resizable is changed from true to
@@ -144,7 +144,7 @@ public class GtkFramePeer extends GtkWindowPeer
}
protected void postInsetsChangedEvent (int top, int left,
- int bottom, int right)
+ int bottom, int right)
{
insets.top = top + menuBarHeight;
insets.left = left;
@@ -174,15 +174,15 @@ public class GtkFramePeer extends GtkWindowPeer
native void nativeSetIconImage (GtkImage image);
- public void setIconImage (Image image)
+ public void setIconImage (Image image)
{
if (image != null)
{
GtkImage gtkImage;
if (image instanceof GtkImage)
gtkImage = (GtkImage) image;
- else
- gtkImage = new GtkImage(image.getSource());
+ else
+ gtkImage = new GtkImage(image.getSource());
if (gtkImage.isLoaded && ! gtkImage.errorLoading)
nativeSetIconImage(gtkImage);
@@ -236,7 +236,7 @@ public class GtkFramePeer extends GtkWindowPeer
public void setBoundsPrivate(int x, int y, int width, int height)
{
// TODO Auto-generated method stub
-
+
}
public boolean requestWindowFocus()
@@ -252,5 +252,3 @@ public class GtkFramePeer extends GtkWindowPeer
}
}
-
-
diff --git a/gnu/java/awt/peer/gtk/GtkGenericPeer.java b/gnu/java/awt/peer/gtk/GtkGenericPeer.java
index 8d63699ea..1b2c07b5d 100644
--- a/gnu/java/awt/peer/gtk/GtkGenericPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkGenericPeer.java
@@ -109,10 +109,10 @@ public class GtkGenericPeer
this.awtWidget = awtWidget;
}
- protected void postActionEvent (String command, int mods)
+ protected void postActionEvent (String command, int mods)
{
- q().postEvent (new ActionEvent (awtWidget, ActionEvent.ACTION_PERFORMED,
- command, mods));
+ q().postEvent (new ActionEvent (awtWidget, ActionEvent.ACTION_PERFORMED,
+ command, mods));
}
// Return a unique integer for use in the native state mapping
@@ -123,7 +123,7 @@ public class GtkGenericPeer
// Let's assume this will never wrap.
return next_native_state++;
}
-
+
/**
* Helper method to set Font for Gtk Widget.
*/
diff --git a/gnu/java/awt/peer/gtk/GtkImage.java b/gnu/java/awt/peer/gtk/GtkImage.java
index 719669eae..b0a5aa0b1 100644
--- a/gnu/java/awt/peer/gtk/GtkImage.java
+++ b/gnu/java/awt/peer/gtk/GtkImage.java
@@ -60,7 +60,7 @@ import gnu.classpath.Pointer;
* A GdkPixbuf is 'on-screen' and the gdk cannot draw to it,
* this is used for the other constructors (and other createImage methods), and
* corresponds to the Image implementations returned by the Toolkit.createImage
- * methods, and is basically immutable.
+ * methods, and is basically immutable.
*
* @author Sven de Marothy
*/
@@ -79,7 +79,7 @@ public class GtkImage extends Image
boolean isLoaded;
/**
- * Pointer to the GdkPixbuf -
+ * Pointer to the GdkPixbuf -
* don't change the name without changing the native code.
*/
Pointer pixbuf;
@@ -102,7 +102,7 @@ public class GtkImage extends Image
/*
* The 32-bit AABBGGRR format the GDK uses.
*/
- static ColorModel nativeModel = new DirectColorModel(32,
+ static ColorModel nativeModel = new DirectColorModel(32,
0x000000FF,
0x0000FF00,
0x00FF0000,
@@ -116,7 +116,7 @@ public class GtkImage extends Image
/**
* Lock that should be held for all gdkpixbuf operations. We don't use
* the global gdk_threads_enter/leave functions in most places since
- * most gdkpixbuf operations can be done in parallel to drawing and
+ * most gdkpixbuf operations can be done in parallel to drawing and
* manipulating gtk widgets.
*/
static Object pixbufLock = new Object();
@@ -170,8 +170,8 @@ public class GtkImage extends Image
/**
* Constructs a GtkImage from an ImageProducer. Asynchronity is handled in
- * the following manner:
- * A GtkImageConsumer gets the image data, and calls setImage() when
+ * the following manner:
+ * A GtkImageConsumer gets the image data, and calls setImage() when
* completely finished. The GtkImage is not considered loaded until the
* GtkImageConsumer is completely finished. We go for all "all or nothing".
*/
@@ -215,7 +215,7 @@ public class GtkImage extends Image
throw new IllegalArgumentException("Couldn't load image: "
+ filename);
}
- }
+ }
catch(IOException e)
{
IllegalArgumentException iae;
@@ -269,7 +269,7 @@ public class GtkImage extends Image
int n = 0;
while ((n = bis.read(buf)) != -1)
- baos.write(buf, 0, n);
+ baos.write(buf, 0, n);
bis.close();
}
catch(IOException e)
@@ -361,8 +361,8 @@ public class GtkImage extends Image
/**
* Callback from the image consumer.
*/
- public void setImage(int width, int height,
- int[] pixels, Hashtable<?,?> properties)
+ public void setImage(int width, int height,
+ int[] pixels, Hashtable<?,?> properties)
{
this.width = width;
this.height = height;
@@ -392,12 +392,12 @@ public class GtkImage extends Image
return width;
}
-
+
public synchronized int getHeight (ImageObserver observer)
{
if (addObserver(observer))
return -1;
-
+
return height;
}
@@ -405,7 +405,7 @@ public class GtkImage extends Image
{
if (addObserver(observer))
return UndefinedProperty;
-
+
Object value = props.get (name);
return (value == null) ? UndefinedProperty : value;
}
@@ -426,7 +426,7 @@ public class GtkImage extends Image
else
return null;
}
- return new MemoryImageSource(width, height, nativeModel, pixels,
+ return new MemoryImageSource(width, height, nativeModel, pixels,
0, width);
}
@@ -438,7 +438,7 @@ public class GtkImage extends Image
throw new IllegalAccessError("This method only works for off-screen"
+" Images.");
}
-
+
/**
* Returns a scaled instance of this pixbuf.
*/
@@ -454,7 +454,7 @@ public class GtkImage extends Image
}
/**
- * If the image is loaded and comes from an ImageProducer,
+ * If the image is loaded and comes from an ImageProducer,
* regenerate the image from there.
*
* I have no idea if this is ever actually used. Since GtkImage can't be
@@ -468,9 +468,9 @@ public class GtkImage extends Image
observers = new Vector<ImageObserver>();
isLoaded = false;
synchronized(pixbufLock)
- {
- freePixbuf();
- }
+ {
+ freePixbuf();
+ }
source.startProduction(new GtkImageConsumer(this, source));
}
}
@@ -510,7 +510,7 @@ public class GtkImage extends Image
*/
private void deliver()
{
- int flags = ImageObserver.HEIGHT |
+ int flags = ImageObserver.HEIGHT |
ImageObserver.WIDTH |
ImageObserver.PROPERTIES |
ImageObserver.ALLBITS;
@@ -522,7 +522,7 @@ public class GtkImage extends Image
observers = null;
}
-
+
/**
* Adds an observer, if we need to.
* @return true if an observer was added.
diff --git a/gnu/java/awt/peer/gtk/GtkImageConsumer.java b/gnu/java/awt/peer/gtk/GtkImageConsumer.java
index 44cfaf926..65cae7a89 100644
--- a/gnu/java/awt/peer/gtk/GtkImageConsumer.java
+++ b/gnu/java/awt/peer/gtk/GtkImageConsumer.java
@@ -92,11 +92,11 @@ public class GtkImageConsumer implements ImageConsumer
public synchronized void setHints (int flags)
{
// This method informs us in which order the pixels are
- // delivered, for progressive-loading support, etc.
+ // delivered, for progressive-loading support, etc.
// Since we wait until it's all loaded, we can ignore the hints.
}
- public synchronized void setPixels (int x, int y, int width, int height,
+ public synchronized void setPixels (int x, int y, int width, int height,
ColorModel cm, byte[] pixels,
int offset, int scansize)
{
@@ -158,7 +158,7 @@ public class GtkImageConsumer implements ImageConsumer
for (int i = 0; i < pixels.length; i++)
ret[i] = pixels[i] & 0xFF;
-
+
return ret;
}
@@ -167,5 +167,3 @@ public class GtkImageConsumer implements ImageConsumer
this.properties = props;
}
}
-
-
diff --git a/gnu/java/awt/peer/gtk/GtkLabelPeer.java b/gnu/java/awt/peer/gtk/GtkLabelPeer.java
index 76f8e5fe3..0bdacbf33 100644
--- a/gnu/java/awt/peer/gtk/GtkLabelPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkLabelPeer.java
@@ -74,7 +74,7 @@ public class GtkLabelPeer extends GtkComponentPeer
if (text != null)
setNativeText(text);
}
-
+
public GtkLabelPeer (Label l)
{
super (l);
diff --git a/gnu/java/awt/peer/gtk/GtkListPeer.java b/gnu/java/awt/peer/gtk/GtkListPeer.java
index f943a75d1..b1cc6e522 100644
--- a/gnu/java/awt/peer/gtk/GtkListPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkListPeer.java
@@ -73,7 +73,7 @@ public class GtkListPeer extends GtkComponentPeer
public GtkListPeer (List list)
{
super (list);
-
+
setMultipleMode (list.isMultipleMode ());
if (list.getItemCount () > 0)
@@ -83,20 +83,20 @@ public class GtkListPeer extends GtkComponentPeer
native void append (String items[]);
public native void add (String item, int index);
-
+
public void addItem (String item, int index)
{
add (item, index);
}
-
+
public void clear ()
{
removeAll ();
}
-
+
public native void delItems (int start, int end);
public native void deselect (int index);
-
+
public Dimension getMinimumSize (int rows)
{
return minimumSize (rows);
@@ -106,7 +106,7 @@ public class GtkListPeer extends GtkComponentPeer
{
return preferredSize (rows);
}
-
+
public native int[] getSelectedIndexes ();
public native void makeVisible (int index);
@@ -158,7 +158,7 @@ public class GtkListPeer extends GtkComponentPeer
// Double-click only generates an Action event if
// something is selected.
if (selectedItem != null)
- postActionEvent (((List) awtComponent).getSelectedItem (),
+ postActionEvent (((List) awtComponent).getSelectedItem (),
me.getModifiersEx ());
}
}
diff --git a/gnu/java/awt/peer/gtk/GtkMenuComponentPeer.java b/gnu/java/awt/peer/gtk/GtkMenuComponentPeer.java
index 1e37cefc1..78f640361 100644
--- a/gnu/java/awt/peer/gtk/GtkMenuComponentPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkMenuComponentPeer.java
@@ -60,7 +60,7 @@ public abstract class GtkMenuComponentPeer extends GtkGenericPeer
{
MenuComponent mc = ((MenuComponent) awtWidget);
Font f = mc.getFont();
-
+
if (f == null)
{
MenuContainer parent = mc.getParent ();
diff --git a/gnu/java/awt/peer/gtk/GtkMenuPeer.java b/gnu/java/awt/peer/gtk/GtkMenuPeer.java
index ff6bdca9f..c55347393 100644
--- a/gnu/java/awt/peer/gtk/GtkMenuPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkMenuPeer.java
@@ -57,7 +57,7 @@ public class GtkMenuPeer extends GtkMenuItemPeer
protected native void create (String label);
private native void addItem(MenuItemPeer item, int key,
- boolean shiftModifier);
+ boolean shiftModifier);
/** XXX - Document this and the override in GtkPopupMenuPeer. */
native void setupAccelGroup (GtkGenericPeer container);
@@ -75,7 +75,7 @@ public class GtkMenuPeer extends GtkMenuItemPeer
public GtkMenuPeer (Menu menu)
{
super (menu);
-
+
if (menu.isTearOff())
addTearOff();
diff --git a/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.java b/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.java
index 7407744af..55c9146c4 100644
--- a/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.java
@@ -49,18 +49,17 @@ import java.awt.peer.MouseInfoPeer;
public class GtkMouseInfoPeer implements MouseInfoPeer
{
private static GdkGraphicsEnvironment gde = new GdkGraphicsEnvironment();
-
+
public int fillPointWithCoords(Point p)
{
int[] coords = gde.getMouseCoordinates();
- p.x = coords[1];
+ p.x = coords[1];
p.y = coords[2];
return coords[0];
}
-
+
public boolean isWindowUnderMouse(Window w)
{
return gde.isWindowUnderMouse((GtkWindowPeer) w.getPeer());
}
}
-
diff --git a/gnu/java/awt/peer/gtk/GtkPanelPeer.java b/gnu/java/awt/peer/gtk/GtkPanelPeer.java
index e0053f763..00b506c10 100644
--- a/gnu/java/awt/peer/gtk/GtkPanelPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkPanelPeer.java
@@ -59,7 +59,7 @@ public class GtkPanelPeer extends GtkContainerPeer
if (id == MouseEvent.MOUSE_PRESSED)
awtComponent.requestFocusInWindow();
-
+
super.handleEvent(event);
}
diff --git a/gnu/java/awt/peer/gtk/GtkPopupMenuPeer.java b/gnu/java/awt/peer/gtk/GtkPopupMenuPeer.java
index 4d66a3f50..1b0ec8e63 100644
--- a/gnu/java/awt/peer/gtk/GtkPopupMenuPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkPopupMenuPeer.java
@@ -60,7 +60,7 @@ public class GtkPopupMenuPeer extends GtkMenuPeer
Point abs = origin.getLocationOnScreen ();
show (abs.x + x, abs.y + y, 0);
}
-
+
public void show (Event e)
{
diff --git a/gnu/java/awt/peer/gtk/GtkScrollbarPeer.java b/gnu/java/awt/peer/gtk/GtkScrollbarPeer.java
index c29706f40..d3f160c83 100644
--- a/gnu/java/awt/peer/gtk/GtkScrollbarPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkScrollbarPeer.java
@@ -50,7 +50,7 @@ public class GtkScrollbarPeer extends GtkComponentPeer
Scrollbar sb = (Scrollbar) awtComponent;
create (sb.getOrientation (), sb.getValue (),
- sb.getMinimum (), sb.getMaximum (),
+ sb.getMinimum (), sb.getMaximum (),
sb.getUnitIncrement (), sb.getBlockIncrement (),
sb.getVisibleAmount ());
}
@@ -85,7 +85,7 @@ public class GtkScrollbarPeer extends GtkComponentPeer
protected void postAdjustmentEvent (int type, int value)
{
Scrollbar bar = (Scrollbar) awtComponent;
- q().postEvent(new AdjustmentEvent(bar,
+ q().postEvent(new AdjustmentEvent(bar,
AdjustmentEvent.ADJUSTMENT_VALUE_CHANGED,
type, value, true));
}
diff --git a/gnu/java/awt/peer/gtk/GtkSelection.java b/gnu/java/awt/peer/gtk/GtkSelection.java
index 967a2edb4..78ed69676 100644
--- a/gnu/java/awt/peer/gtk/GtkSelection.java
+++ b/gnu/java/awt/peer/gtk/GtkSelection.java
@@ -87,7 +87,7 @@ public class GtkSelection implements Transferable
* mimeTypesDelivered is true.
*/
private DataFlavor[] dataFlavors;
-
+
/**
* Indicates a requestText() call was made and the corresponding
* textAvailable() callback was triggered.
@@ -100,7 +100,7 @@ public class GtkSelection implements Transferable
* is true.
*/
private String text;
-
+
/**
* Indicates a requestImage() call was made and the corresponding
* imageAvailable() callback was triggered.
@@ -228,7 +228,7 @@ public class GtkSelection implements Transferable
// extra element.
ArrayList<DataFlavor> flavorsList =
new ArrayList<DataFlavor>(mimeTypes.length + 1);
-
+
for (int i = 0; i < mimeTypes.length; i++)
{
try
@@ -262,7 +262,7 @@ public class GtkSelection implements Transferable
npe.printStackTrace();
}
}
-
+
dataFlavors = new DataFlavor[flavorsList.size()];
flavorsList.toArray(dataFlavors);
}
@@ -406,10 +406,10 @@ public class GtkSelection implements Transferable
}
requestInProgress = false;
}
-
+
if (imagePointer != null)
image = new GtkImage(imagePointer);
-
+
imagePointer = null;
result = image;
if (! GtkClipboard.canCache)
@@ -572,7 +572,7 @@ public class GtkSelection implements Transferable
bytes = null;
bytesDelivered = false;
requestInProgress = false;
-
+
requestLock.notifyAll();
}
return result;
diff --git a/gnu/java/awt/peer/gtk/GtkToolkit.java b/gnu/java/awt/peer/gtk/GtkToolkit.java
index 486304ef0..3c470589e 100644
--- a/gnu/java/awt/peer/gtk/GtkToolkit.java
+++ b/gnu/java/awt/peer/gtk/GtkToolkit.java
@@ -182,10 +182,10 @@ public class GtkToolkit extends gnu.java.awt.ClasspathToolkit
*/
initializeGlobalIDs();
- int portableNativeSync;
- String portNatSyncProp =
+ int portableNativeSync;
+ String portNatSyncProp =
System.getProperty("gnu.classpath.awt.gtk.portable.native.sync");
-
+
if (portNatSyncProp == null)
portableNativeSync = -1; // unset
else if (Boolean.valueOf(portNatSyncProp).booleanValue())
@@ -204,12 +204,12 @@ public class GtkToolkit extends gnu.java.awt.ClasspathToolkit
public native void beep();
private native void getScreenSizeDimensions(int[] xy);
-
- public int checkImage (Image image, int width, int height,
- ImageObserver observer)
+
+ public int checkImage (Image image, int width, int height,
+ ImageObserver observer)
{
- int status = ImageObserver.ALLBITS
- | ImageObserver.WIDTH
+ int status = ImageObserver.ALLBITS
+ | ImageObserver.WIDTH
| ImageObserver.HEIGHT;
if (image instanceof GtkImage)
@@ -223,17 +223,17 @@ public class GtkToolkit extends gnu.java.awt.ClasspathToolkit
-1, -1,
image.getWidth (observer),
image.getHeight (observer));
-
+
return status;
}
- /**
+ /**
* Helper to return either a Image -- the argument -- or a
* GtkImage with the errorLoading flag set if the argument is null.
*/
static Image imageOrError(Image b)
{
- if (b == null)
+ if (b == null)
return GtkImage.getErrorImage();
else
return b;
@@ -243,7 +243,7 @@ public class GtkToolkit extends gnu.java.awt.ClasspathToolkit
{
if (filename.length() == 0)
return new GtkImage ();
-
+
Image image;
try
{
@@ -261,11 +261,11 @@ public class GtkToolkit extends gnu.java.awt.ClasspathToolkit
return new AsyncImage(url);
}
- public Image createImage (ImageProducer producer)
+ public Image createImage (ImageProducer producer)
{
if (producer == null)
return null;
-
+
Image image;
try
{
@@ -279,7 +279,7 @@ public class GtkToolkit extends gnu.java.awt.ClasspathToolkit
}
public Image createImage (byte[] imagedata, int imageoffset,
- int imagelength)
+ int imagelength)
{
Image image;
try
@@ -294,13 +294,13 @@ public class GtkToolkit extends gnu.java.awt.ClasspathToolkit
}
return imageOrError(image);
}
-
+
/**
* Creates an ImageProducer from the specified URL. The image is assumed
- * to be in a recognised format.
+ * to be in a recognised format.
*
* @param url URL to read image data from.
- */
+ */
public ImageProducer createImageProducer(URL url)
{
return createImage( url ).getSource();
@@ -308,29 +308,29 @@ public class GtkToolkit extends gnu.java.awt.ClasspathToolkit
/**
* Returns the native color model (which isn't the same as the default
- * ARGB color model, but doesn't have to be).
+ * ARGB color model, but doesn't have to be).
*/
- public ColorModel getColorModel ()
+ public ColorModel getColorModel ()
{
/* Return the GDK-native ABGR format */
- return new DirectColorModel(32,
+ return new DirectColorModel(32,
0x000000FF,
0x0000FF00,
0x00FF0000,
0xFF000000);
}
- public String[] getFontList ()
+ public String[] getFontList ()
{
- return (new String[] { "Dialog",
- "DialogInput",
- "Monospaced",
+ return (new String[] { "Dialog",
+ "DialogInput",
+ "Monospaced",
"Serif",
"SansSerif" });
}
static class LRUCache<K,V> extends LinkedHashMap<K,V>
- {
+ {
int max_entries;
public LRUCache(int max)
{
@@ -347,12 +347,12 @@ public class GtkToolkit extends gnu.java.awt.ClasspathToolkit
new LRUCache<Map,ClasspathFontPeer>(50);
private LRUCache<Object,Image> imageCache = new LRUCache<Object,Image>(50);
- public FontMetrics getFontMetrics (Font font)
+ public FontMetrics getFontMetrics (Font font)
{
return ((GdkFontPeer) font.getPeer()).getFontMetrics(font);
}
- public Image getImage (String filename)
+ public Image getImage (String filename)
{
if (imageCache.containsKey(filename))
return imageCache.get(filename);
@@ -364,7 +364,7 @@ public class GtkToolkit extends gnu.java.awt.ClasspathToolkit
}
}
- public Image getImage (URL url)
+ public Image getImage (URL url)
{
if (imageCache.containsKey(url))
return imageCache.get(url);
@@ -376,7 +376,7 @@ public class GtkToolkit extends gnu.java.awt.ClasspathToolkit
}
}
- public PrintJob getPrintJob (Frame frame, String jobtitle, Properties props)
+ public PrintJob getPrintJob (Frame frame, String jobtitle, Properties props)
{
SecurityManager sm;
sm = System.getSecurityManager();
@@ -395,7 +395,7 @@ public class GtkToolkit extends gnu.java.awt.ClasspathToolkit
return new Dimension(dim[0], dim[1]);
}
- public Clipboard getSystemClipboard()
+ public Clipboard getSystemClipboard()
{
SecurityManager secman = System.getSecurityManager();
if (secman != null)
@@ -409,7 +409,7 @@ public class GtkToolkit extends gnu.java.awt.ClasspathToolkit
SecurityManager secman = System.getSecurityManager();
if (secman != null)
secman.checkSystemClipboardAccess();
-
+
return GtkClipboard.getSelectionInstance();
}
@@ -417,8 +417,8 @@ public class GtkToolkit extends gnu.java.awt.ClasspathToolkit
* Prepares a GtkImage. For every other kind of Image it just
* assumes the image is already prepared for rendering.
*/
- public boolean prepareImage (Image image, int width, int height,
- ImageObserver observer)
+ public boolean prepareImage (Image image, int width, int height,
+ ImageObserver observer)
{
/* GtkImages are always prepared, as long as they're loaded. */
if (image instanceof GtkImage)
@@ -446,13 +446,13 @@ public class GtkToolkit extends gnu.java.awt.ClasspathToolkit
if (c.getBackground () == null)
c.setBackground (cp.getBackground ());
// if (c.getFont () == null)
- // c.setFont (cp.getFont ());
-
+ // c.setFont (cp.getFont ());
+
/* Make the Peer reflect the state of the Component */
if (! (c instanceof Window))
{
cp.setCursor (c.getCursor ());
-
+
Rectangle bounds = c.getBounds ();
cp.setBounds (bounds.x, bounds.y, bounds.width, bounds.height);
cp.setVisible (c.isVisible ());
@@ -465,13 +465,13 @@ public class GtkToolkit extends gnu.java.awt.ClasspathToolkit
return new GtkButtonPeer (b);
}
- protected CanvasPeer createCanvas (Canvas c)
+ protected CanvasPeer createCanvas (Canvas c)
{
checkHeadless();
return new GtkCanvasPeer (c);
}
- protected CheckboxPeer createCheckbox (Checkbox cb)
+ protected CheckboxPeer createCheckbox (Checkbox cb)
{
checkHeadless();
return new GtkCheckboxPeer (cb);
@@ -483,7 +483,7 @@ public class GtkToolkit extends gnu.java.awt.ClasspathToolkit
return new GtkCheckboxMenuItemPeer (cmi);
}
- protected ChoicePeer createChoice (Choice c)
+ protected ChoicePeer createChoice (Choice c)
{
checkHeadless();
return new GtkChoicePeer (c);
@@ -509,7 +509,7 @@ public class GtkToolkit extends gnu.java.awt.ClasspathToolkit
return new GtkFramePeer (f);
}
- protected LabelPeer createLabel (Label label)
+ protected LabelPeer createLabel (Label label)
{
checkHeadless();
return new GtkLabelPeer (label);
@@ -521,55 +521,55 @@ public class GtkToolkit extends gnu.java.awt.ClasspathToolkit
return new GtkListPeer (list);
}
- protected MenuPeer createMenu (Menu m)
+ protected MenuPeer createMenu (Menu m)
{
checkHeadless();
return new GtkMenuPeer (m);
}
- protected MenuBarPeer createMenuBar (MenuBar mb)
+ protected MenuBarPeer createMenuBar (MenuBar mb)
{
checkHeadless();
return new GtkMenuBarPeer (mb);
}
- protected MenuItemPeer createMenuItem (MenuItem mi)
+ protected MenuItemPeer createMenuItem (MenuItem mi)
{
checkHeadless();
return new GtkMenuItemPeer (mi);
}
- protected PanelPeer createPanel (Panel p)
+ protected PanelPeer createPanel (Panel p)
{
checkHeadless();
return new GtkPanelPeer (p);
}
- protected PopupMenuPeer createPopupMenu (PopupMenu target)
+ protected PopupMenuPeer createPopupMenu (PopupMenu target)
{
checkHeadless();
return new GtkPopupMenuPeer (target);
}
- protected ScrollPanePeer createScrollPane (ScrollPane sp)
+ protected ScrollPanePeer createScrollPane (ScrollPane sp)
{
checkHeadless();
return new GtkScrollPanePeer (sp);
}
- protected ScrollbarPeer createScrollbar (Scrollbar sb)
+ protected ScrollbarPeer createScrollbar (Scrollbar sb)
{
checkHeadless();
return new GtkScrollbarPeer (sb);
}
- protected TextAreaPeer createTextArea (TextArea ta)
+ protected TextAreaPeer createTextArea (TextArea ta)
{
checkHeadless();
return new GtkTextAreaPeer (ta);
}
- protected TextFieldPeer createTextField (TextField tf)
+ protected TextFieldPeer createTextField (TextField tf)
{
checkHeadless();
return new GtkTextFieldPeer (tf);
@@ -589,7 +589,7 @@ public class GtkToolkit extends gnu.java.awt.ClasspathToolkit
return new GtkEmbeddedWindowPeer (w);
}
- /**
+ /**
* @deprecated part of the older "logical font" system in earlier AWT
* implementations. Our newer Font class uses getClasspathFontPeer.
*/
@@ -601,7 +601,7 @@ public class GtkToolkit extends gnu.java.awt.ClasspathToolkit
/**
* Private method that allows size to be set at initialization time.
*/
- private FontPeer getFontPeer (String name, int style, int size)
+ private FontPeer getFontPeer (String name, int style, int size)
{
Map<TextAttribute,Object> attrs = new HashMap<TextAttribute,Object>();
ClasspathFontPeer.copyStyleToAttrs (style, attrs);
@@ -612,7 +612,7 @@ public class GtkToolkit extends gnu.java.awt.ClasspathToolkit
/**
* Newer method to produce a peer for a Font object, even though Sun's
* design claims Font should now be peerless, we do not agree with this
- * model, hence "ClasspathFontPeer".
+ * model, hence "ClasspathFontPeer".
*/
public ClasspathFontPeer getClasspathFontPeer (String name,
@@ -634,7 +634,7 @@ public class GtkToolkit extends gnu.java.awt.ClasspathToolkit
}
}
- protected EventQueue getSystemEventQueueImpl()
+ protected EventQueue getSystemEventQueueImpl()
{
synchronized (GtkToolkit.class)
{
@@ -642,7 +642,7 @@ public class GtkToolkit extends gnu.java.awt.ClasspathToolkit
{
q = new EventQueue();
}
- }
+ }
return q;
}
@@ -659,9 +659,9 @@ public class GtkToolkit extends gnu.java.awt.ClasspathToolkit
throw new InvalidDnDOperationException();
return new GtkDragSourceContextPeer(e);
}
-
+
public <T extends DragGestureRecognizer> T
- createDragGestureRecognizer(Class<T> recognizer, DragSource ds,
+ createDragGestureRecognizer(Class<T> recognizer, DragSource ds,
Component comp, int actions,
DragGestureListener l)
{
@@ -690,7 +690,7 @@ public class GtkToolkit extends gnu.java.awt.ClasspathToolkit
getScreenSizeDimensions(dims);
return new Rectangle(0, 0, dims[0], dims[1]);
}
-
+
// ClasspathToolkit methods
public GraphicsEnvironment getLocalGraphicsEnvironment()
@@ -711,14 +711,14 @@ public class GtkToolkit extends gnu.java.awt.ClasspathToolkit
public boolean getLockingKeyState(int keyCode)
{
int state = getLockState(keyCode);
-
+
if (state != -1)
return state == 1;
-
+
if (AWTUtilities.isValidKey(keyCode))
throw new UnsupportedOperationException
("cannot get locking state of key code " + keyCode);
-
+
throw new IllegalArgumentException("invalid key code " + keyCode);
}
diff --git a/gnu/java/awt/peer/gtk/GtkVolatileImage.java b/gnu/java/awt/peer/gtk/GtkVolatileImage.java
index 8660ced8e..663839f23 100644
--- a/gnu/java/awt/peer/gtk/GtkVolatileImage.java
+++ b/gnu/java/awt/peer/gtk/GtkVolatileImage.java
@@ -65,7 +65,7 @@ public class GtkVolatileImage extends VolatileImage
0x0000FF00,
0x00FF0000,
0xFF000000);
-
+
/**
* Don't touch, accessed from native code.
*/
@@ -76,15 +76,15 @@ public class GtkVolatileImage extends VolatileImage
native void destroy(long pointer);
native int[] nativeGetPixels(long pointer);
-
+
/**
* Gets the pixels in the current image from GDK.
- *
+ *
* Note that pixels are in 32-bit RGBA, non-premultiplied, which is different
* from Cairo's premultiplied ARGB, which is different from Java's standard
* non-premultiplied ARGB. Caution is advised when using this method, to
* ensure that the data format remains consistent with what you expect.
- *
+ *
* @return the current pixels, as reported by GDK.
*/
public int[] getPixels()
@@ -106,8 +106,8 @@ public class GtkVolatileImage extends VolatileImage
nativeDrawVolatile(nativePointer, srcPtr, x, y, w, h);
}
- public GtkVolatileImage(GtkComponentPeer component,
- int width, int height, ImageCapabilities caps)
+ public GtkVolatileImage(GtkComponentPeer component,
+ int width, int height, ImageCapabilities caps)
{
this.width = width;
this.height = height;
@@ -184,7 +184,7 @@ public class GtkVolatileImage extends VolatileImage
{
return width;
}
-
+
public int getHeight(java.awt.image.ImageObserver observer)
{
return height;
@@ -194,7 +194,7 @@ public class GtkVolatileImage extends VolatileImage
{
return null;
}
-
+
/**
* Creates a SampleModel that matches GDK's native format
*/
diff --git a/gnu/java/awt/peer/gtk/GtkWindowPeer.java b/gnu/java/awt/peer/gtk/GtkWindowPeer.java
index 9744c3a53..c8e1bceb7 100644
--- a/gnu/java/awt/peer/gtk/GtkWindowPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkWindowPeer.java
@@ -119,13 +119,13 @@ public class GtkWindowPeer extends GtkContainerPeer
y = awtComponent.getY();
height = awtComponent.getHeight();
width = awtComponent.getWidth();
-
+
if (!window.isFocusableWindow())
type = GDK_WINDOW_TYPE_HINT_MENU;
-
+
if (parent != null)
parent_peer = (GtkWindowPeer) awtComponent.getParent().getPeer();
-
+
create (type, decorated, parent_peer);
}
@@ -173,14 +173,14 @@ public class GtkWindowPeer extends GtkContainerPeer
public void setBounds (int x, int y, int width, int height)
{
- if (x != getX() || y != getY() || width != getWidth()
+ if (x != getX() || y != getY() || width != getWidth()
|| height != getHeight())
{
this.x = x;
this.y = y;
this.width = width;
this.height = height;
-
+
nativeSetBounds (x, y,
width - insets.left - insets.right,
height - insets.top - insets.bottom);
@@ -194,7 +194,7 @@ public class GtkWindowPeer extends GtkContainerPeer
// Called from setResizable
protected native void setSize (int width, int height);
-
+
/**
* Needed by both GtkFramePeer and GtkDialogPeer subclasses, so
* implemented here. But never actually called on a GtkWindowPeer
@@ -215,7 +215,7 @@ public class GtkWindowPeer extends GtkContainerPeer
}
protected void postInsetsChangedEvent (int top, int left,
- int bottom, int right)
+ int bottom, int right)
{
insets.top = top;
insets.left = left;
@@ -324,8 +324,8 @@ public class GtkWindowPeer extends GtkContainerPeer
// insets but GtkFramePeer and GtkDialogPeer insets will be
// non-zero.
q().postEvent (new PaintEvent (awtComponent, PaintEvent.PAINT,
- new Rectangle (x + insets.left,
- y + insets.top,
+ new Rectangle (x + insets.left,
+ y + insets.top,
width, height)));
}
@@ -335,7 +335,7 @@ public class GtkWindowPeer extends GtkContainerPeer
return false;
}
- public boolean requestFocus (Component request, boolean temporary,
+ public boolean requestFocus (Component request, boolean temporary,
boolean allowWindowFocus, long time)
{
assert request == awtComponent || isLightweightDescendant(request);
@@ -380,7 +380,7 @@ public class GtkWindowPeer extends GtkContainerPeer
return g;
}
- protected void postMouseEvent(int id, long when, int mods, int x, int y,
+ protected void postMouseEvent(int id, long when, int mods, int x, int y,
int clickCount, boolean popupTrigger)
{
// Translate AWT co-ordinates, which include a window frame's
@@ -388,8 +388,8 @@ public class GtkWindowPeer extends GtkContainerPeer
// frame's insets. GtkWindowPeer should always have all-zero
// insets but GtkFramePeer and GtkDialogPeer insets will be
// non-zero.
- super.postMouseEvent (id, when, mods,
- x + insets.left, y + insets.top,
+ super.postMouseEvent (id, when, mods,
+ x + insets.left, y + insets.top,
clickCount, popupTrigger);
}
diff --git a/gnu/java/awt/peer/gtk/VolatileImageGraphics.java b/gnu/java/awt/peer/gtk/VolatileImageGraphics.java
index b5858f905..2dfcdbdec 100644
--- a/gnu/java/awt/peer/gtk/VolatileImageGraphics.java
+++ b/gnu/java/awt/peer/gtk/VolatileImageGraphics.java
@@ -108,7 +108,7 @@ public class VolatileImageGraphics extends ComponentGraphics
{
if (comp == null || comp instanceof AlphaComposite)
super.draw(s);
-
+
// Custom composite
else
{
@@ -119,11 +119,11 @@ public class VolatileImageGraphics extends ComponentGraphics
g2d.setColor(this.getColor());
g2d.setStroke(this.getStroke());
g2d.draw(s);
-
+
drawComposite(s.getBounds2D(), null);
}
}
-
+
public void fill(Shape s)
{
if (comp == null || comp instanceof AlphaComposite)
@@ -139,16 +139,16 @@ public class VolatileImageGraphics extends ComponentGraphics
g2d.setPaint(this.getPaint());
g2d.setColor(this.getColor());
g2d.fill(s);
-
+
drawComposite(s.getBounds2D(), null);
}
}
-
+
public void drawGlyphVector(GlyphVector gv, float x, float y)
{
if (comp == null || comp instanceof AlphaComposite)
super.drawGlyphVector(gv, x, y);
-
+
// Custom composite
else
{
@@ -156,11 +156,11 @@ public class VolatileImageGraphics extends ComponentGraphics
createBuffer();
Graphics2D g2d = (Graphics2D)buffer.getGraphics();
-
+
g2d.setPaint(this.getPaint());
g2d.setColor(this.getColor());
g2d.drawGlyphVector(gv, x, y);
-
+
Rectangle2D bounds = gv.getLogicalBounds();
bounds = new Rectangle2D.Double(x + bounds.getX(), y + bounds.getY(),
bounds.getWidth(), bounds.getHeight());
@@ -173,7 +173,7 @@ public class VolatileImageGraphics extends ComponentGraphics
{
if (comp == null || comp instanceof AlphaComposite)
return super.drawImage(img, xform, bgcolor, obs);
-
+
// Custom composite
else
{
@@ -186,7 +186,7 @@ public class VolatileImageGraphics extends ComponentGraphics
img = Toolkit.getDefaultToolkit().createImage(source);
}
BufferedImage bImg = (BufferedImage) img;
-
+
// Find dimensions of translation
Point2D origin = new Point2D.Double(bImg.getMinX(), bImg.getMinY());
Point2D pt = new Point2D.Double(bImg.getWidth(), bImg.getHeight());
@@ -195,10 +195,10 @@ public class VolatileImageGraphics extends ComponentGraphics
origin = xform.transform(origin, origin);
pt = xform.transform(pt, pt);
}
-
+
// Create buffer and draw image
createBuffer();
-
+
Graphics2D g2d = (Graphics2D)buffer.getGraphics();
g2d.setRenderingHints(this.getRenderingHints());
g2d.drawImage(img, xform, obs);
@@ -211,31 +211,31 @@ public class VolatileImageGraphics extends ComponentGraphics
obs);
}
}
-
+
public boolean drawImage(Image img, int x, int y, ImageObserver observer)
{
if (img instanceof GtkVolatileImage
&& (comp == null || comp instanceof AlphaComposite))
{
- owner.drawVolatile( ((GtkVolatileImage)img).nativePointer,
+ owner.drawVolatile( ((GtkVolatileImage)img).nativePointer,
x, y,
- ((GtkVolatileImage)img).width,
+ ((GtkVolatileImage)img).width,
((GtkVolatileImage)img).height );
return true;
- }
+ }
return super.drawImage( img, x, y, observer );
}
-
+
public boolean drawImage(Image img, int x, int y, int width, int height,
ImageObserver observer)
{
if ((img instanceof GtkVolatileImage)
&& (comp == null || comp instanceof AlphaComposite))
{
- owner.drawVolatile( ((GtkVolatileImage)img).nativePointer,
+ owner.drawVolatile( ((GtkVolatileImage)img).nativePointer,
x, y, width, height );
return true;
- }
+ }
return super.drawImage( img, x, y, width, height, observer );
}
@@ -243,31 +243,31 @@ public class VolatileImageGraphics extends ComponentGraphics
{
return new Rectangle2D.Double(0, 0, owner.width, owner.height);
}
-
+
private boolean drawComposite(Rectangle2D bounds, ImageObserver observer)
{
// Clip source to visible areas that need updating
Rectangle2D clip = this.getClipBounds();
Rectangle2D.intersect(bounds, clip, bounds);
-
+
BufferedImage buffer2 = buffer;
if (!bounds.equals(buffer2.getRaster().getBounds()))
buffer2 = buffer2.getSubimage((int)bounds.getX(), (int)bounds.getY(),
(int)bounds.getWidth(),
(int)bounds.getHeight());
-
+
// Get current on-screen pixels (destination) and clip to bounds
BufferedImage current = owner.getSnapshot();
double[] points = new double[] {bounds.getX(), bounds.getY(),
bounds.getMaxX(), bounds.getMaxY()};
transform.transform(points, 0, points, 0, 2);
-
+
Rectangle2D deviceBounds = new Rectangle2D.Double(points[0], points[1],
points[2] - points[0],
points[3] - points[1]);
Rectangle2D.intersect(deviceBounds, this.getClipInDevSpace(), deviceBounds);
-
+
current = current.getSubimage((int)deviceBounds.getX(),
(int)deviceBounds.getY(),
(int)deviceBounds.getWidth(),
@@ -276,7 +276,7 @@ public class VolatileImageGraphics extends ComponentGraphics
// Perform actual composite operation
compCtx.compose(buffer2.getRaster(), current.getRaster(),
buffer2.getRaster());
-
+
// This MUST call directly into the "action" method in CairoGraphics2D,
// not one of the wrappers, to ensure that the composite isn't processed
// more than once!
@@ -290,7 +290,7 @@ public class VolatileImageGraphics extends ComponentGraphics
return rv;
}
-
+
private void createBuffer()
{
if (buffer == null)
@@ -299,7 +299,7 @@ public class VolatileImageGraphics extends ComponentGraphics
rst = Raster.createWritableRaster(GtkVolatileImage.createGdkSampleModel(owner.width,
owner.height),
new Point(0,0));
-
+
buffer = new BufferedImage(GtkVolatileImage.gdkColorModel, rst,
GtkVolatileImage.gdkColorModel.isAlphaPremultiplied(),
new Hashtable());
@@ -307,12 +307,12 @@ public class VolatileImageGraphics extends ComponentGraphics
else
{
Graphics2D g2d = ((Graphics2D)buffer.getGraphics());
-
+
g2d.setBackground(new Color(0,0,0,0));
g2d.clearRect(0, 0, buffer.getWidth(), buffer.getHeight());
}
}
-
+
protected ColorModel getNativeCM()
{
// We should really return GtkVolatileImage.gdkColorModel ,
@@ -323,4 +323,3 @@ public class VolatileImageGraphics extends ComponentGraphics
return CairoSurface.cairoCM_pre;
}
}
-
diff --git a/gnu/java/awt/peer/headless/HeadlessGraphicsEnvironment.java b/gnu/java/awt/peer/headless/HeadlessGraphicsEnvironment.java
index b3eeb1baa..401b895b8 100644
--- a/gnu/java/awt/peer/headless/HeadlessGraphicsEnvironment.java
+++ b/gnu/java/awt/peer/headless/HeadlessGraphicsEnvironment.java
@@ -1,4 +1,4 @@
-/* HeadlessGraphicsEnvironment.java -- A graphics environment for headless mode
+/* HeadlessGraphicsEnvironment.java -- A graphics environment for headless mode
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/gnu/java/awt/peer/qt/MainQtThread.java b/gnu/java/awt/peer/qt/MainQtThread.java
index fdd6da0a6..bee979ac7 100644
--- a/gnu/java/awt/peer/qt/MainQtThread.java
+++ b/gnu/java/awt/peer/qt/MainQtThread.java
@@ -81,6 +81,4 @@ public class MainQtThread extends Thread
exec(QApplicationPointer);
}
-}
-
-
+}
diff --git a/gnu/java/awt/peer/qt/QMatrix.java b/gnu/java/awt/peer/qt/QMatrix.java
index 428cda173..ca4d55b59 100644
--- a/gnu/java/awt/peer/qt/QMatrix.java
+++ b/gnu/java/awt/peer/qt/QMatrix.java
@@ -53,8 +53,8 @@ public class QMatrix extends NativeWrapper
init( matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5] );
}
- private native void init(double m00, double m10, double m01, double m11,
- double m02, double m12 );
+ private native void init(double m00, double m10, double m01, double m11,
+ double m02, double m12 );
private native double[] getMatrix();
@@ -64,10 +64,9 @@ public class QMatrix extends NativeWrapper
}
public native void dispose();
-
+
public void finalize()
{
dispose();
}
}
-
diff --git a/gnu/java/awt/peer/qt/QPainterPath.java b/gnu/java/awt/peer/qt/QPainterPath.java
index 8d176a156..848b10497 100644
--- a/gnu/java/awt/peer/qt/QPainterPath.java
+++ b/gnu/java/awt/peer/qt/QPainterPath.java
@@ -61,31 +61,31 @@ public class QPainterPath extends NativeWrapper
while( !pi.isDone() )
{
- switch( pi.currentSegment(coords) )
- {
- case PathIterator.SEG_MOVETO:
- moveTo( coords[0], coords[1] );
- break;
-
- case PathIterator.SEG_CLOSE:
- close();
- break;
-
- case PathIterator.SEG_LINETO:
- lineTo( coords[0], coords[1] );
- break;
-
- case PathIterator.SEG_QUADTO:
- quadTo( coords[0], coords[1], coords[2], coords[3] );
- break;
-
- case PathIterator.SEG_CUBICTO:
- cubicTo( coords[0], coords[1],
- coords[2], coords[3],
- coords[4], coords[5] );
- break;
- }
- pi.next();
+ switch( pi.currentSegment(coords) )
+ {
+ case PathIterator.SEG_MOVETO:
+ moveTo( coords[0], coords[1] );
+ break;
+
+ case PathIterator.SEG_CLOSE:
+ close();
+ break;
+
+ case PathIterator.SEG_LINETO:
+ lineTo( coords[0], coords[1] );
+ break;
+
+ case PathIterator.SEG_QUADTO:
+ quadTo( coords[0], coords[1], coords[2], coords[3] );
+ break;
+
+ case PathIterator.SEG_CUBICTO:
+ cubicTo( coords[0], coords[1],
+ coords[2], coords[3],
+ coords[4], coords[5] );
+ break;
+ }
+ pi.next();
}
}
@@ -129,13 +129,12 @@ public class QPainterPath extends NativeWrapper
private native void quadTo(double x1, double y1, double x2, double y2);
private native void cubicTo(double x1, double y1, double x2, double y2,
- double x3, double y3);
+ double x3, double y3);
public native void dispose();
-
+
public void finalize()
{
dispose();
}
}
-
diff --git a/gnu/java/awt/peer/qt/QPen.java b/gnu/java/awt/peer/qt/QPen.java
index ec41015ed..aee308c26 100644
--- a/gnu/java/awt/peer/qt/QPen.java
+++ b/gnu/java/awt/peer/qt/QPen.java
@@ -62,10 +62,9 @@ public class QPen extends NativeWrapper
private native void init(double width, int cap, int join, double miterlimit);
public native void dispose();
-
+
public void finalize()
{
dispose();
}
}
-
diff --git a/gnu/java/awt/peer/qt/QtAudioClip.java b/gnu/java/awt/peer/qt/QtAudioClip.java
index 43387acf6..ae2e350eb 100644
--- a/gnu/java/awt/peer/qt/QtAudioClip.java
+++ b/gnu/java/awt/peer/qt/QtAudioClip.java
@@ -57,9 +57,9 @@ public class QtAudioClip extends NativeWrapper implements AudioClip
File f = new File(filename);
try
{
- String fn = f.getCanonicalPath();
- loadClip( fn );
- }
+ String fn = f.getCanonicalPath();
+ loadClip( fn );
+ }
catch(IOException e)
{
}
@@ -67,7 +67,7 @@ public class QtAudioClip extends NativeWrapper implements AudioClip
public QtAudioClip(URL url)
{
-
+
}
private native void loadClip(String filename);
@@ -78,7 +78,7 @@ public class QtAudioClip extends NativeWrapper implements AudioClip
/**
* Checks that Qt and sound is available.
- */
+ */
private void checkForQt()
{
if( t == null )
diff --git a/gnu/java/awt/peer/qt/QtButtonPeer.java b/gnu/java/awt/peer/qt/QtButtonPeer.java
index 629f45911..6722eb285 100644
--- a/gnu/java/awt/peer/qt/QtButtonPeer.java
+++ b/gnu/java/awt/peer/qt/QtButtonPeer.java
@@ -62,18 +62,14 @@ public class QtButtonPeer extends QtComponentPeer implements ButtonPeer
void fireClick(int modifiers)
{
ActionEvent e = new ActionEvent(owner,
- ActionEvent.ACTION_PERFORMED,
- ((Button)owner).getActionCommand(),
- System.currentTimeMillis(),
- modifiers);
+ ActionEvent.ACTION_PERFORMED,
+ ((Button)owner).getActionCommand(),
+ System.currentTimeMillis(),
+ modifiers);
QtToolkit.eventQueue.postEvent(e);
}
// ************ Public methods *********************
-
+
public native void setLabel( String label );
}
-
-
-
-
diff --git a/gnu/java/awt/peer/qt/QtCheckboxPeer.java b/gnu/java/awt/peer/qt/QtCheckboxPeer.java
index acac5e460..37fb51c48 100644
--- a/gnu/java/awt/peer/qt/QtCheckboxPeer.java
+++ b/gnu/java/awt/peer/qt/QtCheckboxPeer.java
@@ -50,18 +50,18 @@ public class QtCheckboxPeer extends QtComponentPeer implements CheckboxPeer
// Map QButtonGroup<->CheckboxGroup
private static WeakHashMap groupMap;
- static
+ static
{
groupMap = new WeakHashMap();
}
-
+
public QtCheckboxPeer( QtToolkit kit, Checkbox owner )
{
super( kit, owner );
}
-
+
protected native void init();
-
+
protected void setup()
{
super.setup();
@@ -73,32 +73,32 @@ public class QtCheckboxPeer extends QtComponentPeer implements CheckboxPeer
private void fireToggle(boolean checked)
{
if (group == null)
- ((Checkbox)owner).setState( checked );
+ ((Checkbox)owner).setState( checked );
else
if ( checked )
- group.setSelectedCheckbox((Checkbox)owner);
+ group.setSelectedCheckbox((Checkbox)owner);
int sel = checked ? ItemEvent.SELECTED : ItemEvent.DESELECTED;
- ItemEvent e = new ItemEvent((Checkbox)owner,
- ItemEvent.ITEM_STATE_CHANGED,
- ((Checkbox)owner).getLabel(),
- sel);
+ ItemEvent e = new ItemEvent((Checkbox)owner,
+ ItemEvent.ITEM_STATE_CHANGED,
+ ((Checkbox)owner).getLabel(),
+ sel);
QtToolkit.eventQueue.postEvent(e);
}
-
+
// ************ Public methods *********************
-
+
public void setCheckboxGroup( CheckboxGroup group )
- {
- if(this.group == group)
+ {
+ if(this.group == group)
return;
// if we change from a checkbox to a radio button or vice versa
if((this.group == null) != (group == null))
{
- this.group = group;
- callInit();
- setup();
+ this.group = group;
+ callInit();
+ setup();
}
this.group = group;
@@ -109,5 +109,3 @@ public class QtCheckboxPeer extends QtComponentPeer implements CheckboxPeer
public native void setState( boolean state );
}
-
-
diff --git a/gnu/java/awt/peer/qt/QtChoicePeer.java b/gnu/java/awt/peer/qt/QtChoicePeer.java
index 30674b36e..d279468cd 100644
--- a/gnu/java/awt/peer/qt/QtChoicePeer.java
+++ b/gnu/java/awt/peer/qt/QtChoicePeer.java
@@ -47,16 +47,16 @@ public class QtChoicePeer extends QtComponentPeer implements ChoicePeer
{
super( kit, owner );
}
-
+
protected native void init();
protected void setup()
{
super.setup();
-
+
Choice c = (Choice) owner;
int n = c.getItemCount();
- for ( int i = 0; i < n ; i++ )
+ for ( int i = 0; i < n ; i++ )
add( c.getItem( i ), i );
select( c.getSelectedIndex() );
}
@@ -64,10 +64,10 @@ public class QtChoicePeer extends QtComponentPeer implements ChoicePeer
private void fireChoice( int index )
{
((Choice)owner).select( index );
- ItemEvent e = new ItemEvent((Choice)owner,
- ItemEvent.ITEM_STATE_CHANGED,
- ((Choice)owner).getItem(index),
- ItemEvent.SELECTED);
+ ItemEvent e = new ItemEvent((Choice)owner,
+ ItemEvent.ITEM_STATE_CHANGED,
+ ((Choice)owner).getItem(index),
+ ItemEvent.SELECTED);
QtToolkit.eventQueue.postEvent(e);
}
@@ -91,5 +91,3 @@ public class QtChoicePeer extends QtComponentPeer implements ChoicePeer
public native void select( int index );
}
-
-
diff --git a/gnu/java/awt/peer/qt/QtComponentGraphics.java b/gnu/java/awt/peer/qt/QtComponentGraphics.java
index c5c839e32..27e12e659 100644
--- a/gnu/java/awt/peer/qt/QtComponentGraphics.java
+++ b/gnu/java/awt/peer/qt/QtComponentGraphics.java
@@ -43,8 +43,8 @@ import java.awt.Graphics;
import java.awt.Rectangle;
/**
- * QtComponentPainter is a Graphics2D context for painting directly to AWT
- * components. They require an existing QPainter object (the one passed into
+ * QtComponentPainter is a Graphics2D context for painting directly to AWT
+ * components. They require an existing QPainter object (the one passed into
* the native paint method), and are created there (ONLY).
*
* Since this context does direct on-screen drawing it is NOT thread-safe,
@@ -63,15 +63,15 @@ public class QtComponentGraphics extends QtGraphics
*
* @param ptr the pointer to the QPainter object.
*/
- public QtComponentGraphics(long ptr, QtComponentPeer component,
- int x, int y, int w, int h)
+ public QtComponentGraphics(long ptr, QtComponentPeer component,
+ int x, int y, int w, int h)
{
nativeObject = ptr;
peer = component;
Rectangle r = new Rectangle(x, y, w, h);
initialClip = r;
-
+
setAlpha( 1.0 );
Color c = component.owner.getBackground();
if(c == null)
@@ -103,11 +103,11 @@ public class QtComponentGraphics extends QtGraphics
/**
* This is a tricky one
- */
- public void copyArea(int x, int y, int width, int height,
- int dx, int dy)
+ */
+ public void copyArea(int x, int y, int width, int height,
+ int dx, int dy)
{
- // FIXME
+ // FIXME
}
/**
@@ -117,6 +117,4 @@ public class QtComponentGraphics extends QtGraphics
{
return peer.getGraphicsConfiguration();
}
-}
-
-
+}
diff --git a/gnu/java/awt/peer/qt/QtComponentPeer.java b/gnu/java/awt/peer/qt/QtComponentPeer.java
index 334f59088..16149b2e6 100644
--- a/gnu/java/awt/peer/qt/QtComponentPeer.java
+++ b/gnu/java/awt/peer/qt/QtComponentPeer.java
@@ -66,7 +66,7 @@ import java.awt.event.ComponentEvent; // 100%
import java.awt.event.FocusEvent; // 100%
import java.awt.event.InputEvent; // (abstract)
import java.awt.event.KeyEvent; // 2/3
-import java.awt.event.MouseEvent; // 70%?
+import java.awt.event.MouseEvent; // 70%?
import java.awt.event.PaintEvent; // Yup.
import java.awt.event.WindowEvent; // 2/ 12
import java.util.Timer;
@@ -117,16 +117,16 @@ public class QtComponentPeer extends NativeWrapper implements ComponentPeer
this.toolkit = kit;
qtApp = QtToolkit.guiThread.QApplicationPointer;
nativeObject = 0;
- synchronized(this)
+ synchronized(this)
{
- callInit(); // Calls the init method FROM THE MAIN THREAD.
- try
- {
- wait(); // Wait for the thing to be created.
- }
- catch(InterruptedException e)
- {
- }
+ callInit(); // Calls the init method FROM THE MAIN THREAD.
+ try
+ {
+ wait(); // Wait for the thing to be created.
+ }
+ catch(InterruptedException e)
+ {
+ }
}
setup();
hasMotionListeners = false;
@@ -147,30 +147,30 @@ public class QtComponentPeer extends NativeWrapper implements ComponentPeer
settingUp = true;
if (owner != null)
{
- if (owner instanceof javax.swing.JComponent)
- setBackground(owner.getBackground());
- else
- owner.setBackground(getNativeBackground());
-
- if (owner.getForeground() != null)
- setForeground(owner.getForeground());
- else
- setForeground( Color.black );
-
- if (owner.getCursor() != null)
- if (owner.getCursor().getType() != Cursor.DEFAULT_CURSOR)
- setCursor(owner.getCursor());
-
- if (owner.getFont() != null)
- setFont(owner.getFont());
-
- setEnabled( owner.isEnabled() );
-
- backBuffer = null;
- updateBounds();
-
- setVisible( owner.isVisible() );
- QtToolkit.repaintThread.queueComponent(this);
+ if (owner instanceof javax.swing.JComponent)
+ setBackground(owner.getBackground());
+ else
+ owner.setBackground(getNativeBackground());
+
+ if (owner.getForeground() != null)
+ setForeground(owner.getForeground());
+ else
+ setForeground( Color.black );
+
+ if (owner.getCursor() != null)
+ if (owner.getCursor().getType() != Cursor.DEFAULT_CURSOR)
+ setCursor(owner.getCursor());
+
+ if (owner.getFont() != null)
+ setFont(owner.getFont());
+
+ setEnabled( owner.isEnabled() );
+
+ backBuffer = null;
+ updateBounds();
+
+ setVisible( owner.isVisible() );
+ QtToolkit.repaintThread.queueComponent(this);
}
settingUp = false;
}
@@ -189,9 +189,9 @@ public class QtComponentPeer extends NativeWrapper implements ComponentPeer
private boolean drawableComponent()
{
- return ((this instanceof QtContainerPeer &&
- !(this instanceof QtScrollPanePeer)) ||
- (this instanceof QtCanvasPeer));
+ return ((this instanceof QtContainerPeer &&
+ !(this instanceof QtScrollPanePeer)) ||
+ (this instanceof QtCanvasPeer));
}
void updateBounds()
@@ -204,19 +204,19 @@ public class QtComponentPeer extends NativeWrapper implements ComponentPeer
{
if(width <= 0 || height <= 0)
return;
-
+
if( !drawableComponent() && backBuffer == null)
return;
if( backBuffer != null )
{
- if( width < backBuffer.width && height < backBuffer.height )
- return;
- backBuffer.dispose();
+ if( width < backBuffer.width && height < backBuffer.height )
+ return;
+ backBuffer.dispose();
}
backBuffer = new QtImage(width, height);
}
-
+
// ************ Event methods *********************
@@ -227,18 +227,18 @@ public class QtComponentPeer extends NativeWrapper implements ComponentPeer
{
if (owner instanceof Window)
{
- WindowEvent e = new WindowEvent((Window)owner,
- WindowEvent.WINDOW_CLOSING);
- QtToolkit.eventQueue.postEvent(e);
+ WindowEvent e = new WindowEvent((Window)owner,
+ WindowEvent.WINDOW_CLOSING);
+ QtToolkit.eventQueue.postEvent(e);
}
}
protected void enterEvent(int modifiers, int x, int y, int dummy)
{
- MouseEvent e = new MouseEvent(owner,
- MouseEvent.MOUSE_ENTERED,
- System.currentTimeMillis(),
- (modifiers & 0x2FF), x, y, 0, false);
+ MouseEvent e = new MouseEvent(owner,
+ MouseEvent.MOUSE_ENTERED,
+ System.currentTimeMillis(),
+ (modifiers & 0x2FF), x, y, 0, false);
QtToolkit.eventQueue.postEvent(e);
}
@@ -257,31 +257,31 @@ public class QtComponentPeer extends NativeWrapper implements ComponentPeer
protected void keyPressEvent(int modifiers, int code, int unicode, int dummy)
{
KeyboardFocusManager manager = KeyboardFocusManager.getCurrentKeyboardFocusManager ();
- KeyEvent e = new KeyEvent(owner,
- KeyEvent.KEY_PRESSED,
- System.currentTimeMillis(),
- modifiers, code, (char)(unicode & 0xFFFF),
- KeyEvent.KEY_LOCATION_UNKNOWN);
+ KeyEvent e = new KeyEvent(owner,
+ KeyEvent.KEY_PRESSED,
+ System.currentTimeMillis(),
+ modifiers, code, (char)(unicode & 0xFFFF),
+ KeyEvent.KEY_LOCATION_UNKNOWN);
if (!manager.dispatchEvent (e))
QtToolkit.eventQueue.postEvent(e);
}
protected void keyReleaseEvent(int modifiers, int code, int unicode, int dummy)
{
- KeyEvent e = new KeyEvent(owner,
- KeyEvent.KEY_RELEASED,
- System.currentTimeMillis(),
- modifiers, code, (char)(unicode & 0xFFFF),
- KeyEvent.KEY_LOCATION_UNKNOWN);
+ KeyEvent e = new KeyEvent(owner,
+ KeyEvent.KEY_RELEASED,
+ System.currentTimeMillis(),
+ modifiers, code, (char)(unicode & 0xFFFF),
+ KeyEvent.KEY_LOCATION_UNKNOWN);
QtToolkit.eventQueue.postEvent(e);
}
protected void leaveEvent(int modifiers, int x, int y, int dummy)
{
- MouseEvent e = new MouseEvent(owner,
- MouseEvent.MOUSE_EXITED,
- System.currentTimeMillis(),
- (modifiers & 0x2FF), x, y, 0, false);
+ MouseEvent e = new MouseEvent(owner,
+ MouseEvent.MOUSE_EXITED,
+ System.currentTimeMillis(),
+ (modifiers & 0x2FF), x, y, 0, false);
QtToolkit.eventQueue.postEvent(e);
}
@@ -291,17 +291,17 @@ public class QtComponentPeer extends NativeWrapper implements ComponentPeer
if( (eventMask & AWTEvent.MOUSE_EVENT_MASK) == 0 )
return;
int button = 0;
- if((modifiers & InputEvent.BUTTON1_DOWN_MASK) ==
+ if((modifiers & InputEvent.BUTTON1_DOWN_MASK) ==
InputEvent.BUTTON1_DOWN_MASK) button = 1;
- if((modifiers & InputEvent.BUTTON2_DOWN_MASK) ==
+ if((modifiers & InputEvent.BUTTON2_DOWN_MASK) ==
InputEvent.BUTTON2_DOWN_MASK) button = 2;
- if((modifiers & InputEvent.BUTTON3_DOWN_MASK) ==
+ if((modifiers & InputEvent.BUTTON3_DOWN_MASK) ==
InputEvent.BUTTON3_DOWN_MASK) button = 3;
- MouseEvent e = new MouseEvent(owner,
- MouseEvent.MOUSE_CLICKED,
- System.currentTimeMillis(),
- (modifiers & 0x2FF), x, y, clickCount,
- false, button);
+ MouseEvent e = new MouseEvent(owner,
+ MouseEvent.MOUSE_CLICKED,
+ System.currentTimeMillis(),
+ (modifiers & 0x2FF), x, y, clickCount,
+ false, button);
QtToolkit.eventQueue.postEvent(e);
}
@@ -311,21 +311,21 @@ public class QtComponentPeer extends NativeWrapper implements ComponentPeer
return;
int button = 0;
- if((modifiers & InputEvent.BUTTON1_DOWN_MASK) ==
+ if((modifiers & InputEvent.BUTTON1_DOWN_MASK) ==
InputEvent.BUTTON1_DOWN_MASK) button = 1;
- if((modifiers & InputEvent.BUTTON2_DOWN_MASK) ==
+ if((modifiers & InputEvent.BUTTON2_DOWN_MASK) ==
InputEvent.BUTTON2_DOWN_MASK) button = 2;
- if((modifiers & InputEvent.BUTTON3_DOWN_MASK) ==
- InputEvent.BUTTON3_DOWN_MASK) button = 3;
+ if((modifiers & InputEvent.BUTTON3_DOWN_MASK) ==
+ InputEvent.BUTTON3_DOWN_MASK) button = 3;
- int type = (button != 0) ?
+ int type = (button != 0) ?
MouseEvent.MOUSE_DRAGGED :MouseEvent.MOUSE_MOVED;
-
- MouseEvent e = new MouseEvent(owner,
- type,
- System.currentTimeMillis(),
- (modifiers & 0x2FF), x, y, clickCount,
- false, button);
+
+ MouseEvent e = new MouseEvent(owner,
+ type,
+ System.currentTimeMillis(),
+ (modifiers & 0x2FF), x, y, clickCount,
+ false, button);
QtToolkit.eventQueue.postEvent(e);
}
@@ -334,18 +334,18 @@ public class QtComponentPeer extends NativeWrapper implements ComponentPeer
if( (eventMask & AWTEvent.MOUSE_EVENT_MASK) == 0 )
return;
int button = 0;
- if((modifiers & InputEvent.BUTTON1_DOWN_MASK) ==
+ if((modifiers & InputEvent.BUTTON1_DOWN_MASK) ==
InputEvent.BUTTON1_DOWN_MASK) button = 1;
- if((modifiers & InputEvent.BUTTON2_DOWN_MASK) ==
+ if((modifiers & InputEvent.BUTTON2_DOWN_MASK) ==
InputEvent.BUTTON2_DOWN_MASK) button = 2;
- if((modifiers & InputEvent.BUTTON3_DOWN_MASK) ==
+ if((modifiers & InputEvent.BUTTON3_DOWN_MASK) ==
InputEvent.BUTTON3_DOWN_MASK) button = 3;
- MouseEvent e = new MouseEvent(owner,
- MouseEvent.MOUSE_PRESSED,
- System.currentTimeMillis(),
- (modifiers & 0x2FF), x, y, clickCount,
- ( button == POPUP_TRIGGER ),
- button);
+ MouseEvent e = new MouseEvent(owner,
+ MouseEvent.MOUSE_PRESSED,
+ System.currentTimeMillis(),
+ (modifiers & 0x2FF), x, y, clickCount,
+ ( button == POPUP_TRIGGER ),
+ button);
QtToolkit.eventQueue.postEvent(e);
}
@@ -354,18 +354,18 @@ public class QtComponentPeer extends NativeWrapper implements ComponentPeer
if( (eventMask & AWTEvent.MOUSE_EVENT_MASK) == 0 )
return;
int button = 0;
- if((modifiers & InputEvent.BUTTON1_DOWN_MASK) ==
+ if((modifiers & InputEvent.BUTTON1_DOWN_MASK) ==
InputEvent.BUTTON1_DOWN_MASK) button = 1;
- if((modifiers & InputEvent.BUTTON2_DOWN_MASK) ==
+ if((modifiers & InputEvent.BUTTON2_DOWN_MASK) ==
InputEvent.BUTTON2_DOWN_MASK) button = 2;
- if((modifiers & InputEvent.BUTTON3_DOWN_MASK) ==
+ if((modifiers & InputEvent.BUTTON3_DOWN_MASK) ==
InputEvent.BUTTON3_DOWN_MASK) button = 3;
- MouseEvent e = new MouseEvent(owner,
- MouseEvent.MOUSE_RELEASED,
- System.currentTimeMillis(),
- (modifiers & 0x2FF), x, y, clickCount,
- false, button);
+ MouseEvent e = new MouseEvent(owner,
+ MouseEvent.MOUSE_RELEASED,
+ System.currentTimeMillis(),
+ (modifiers & 0x2FF), x, y, clickCount,
+ false, button);
QtToolkit.eventQueue.postEvent(e);
}
@@ -373,16 +373,16 @@ public class QtComponentPeer extends NativeWrapper implements ComponentPeer
{
if( !ignoreResize )
{
- // Since Component.setLocation calls back to setBounds,
- // we need to ignore that.
- ignoreResize = true;
- owner.setLocation( x, y );
- ignoreResize = false;
+ // Since Component.setLocation calls back to setBounds,
+ // we need to ignore that.
+ ignoreResize = true;
+ owner.setLocation( x, y );
+ ignoreResize = false;
}
}
- protected void resizeEvent(int oldWidth, int oldHeight,
- int width, int height)
+ protected void resizeEvent(int oldWidth, int oldHeight,
+ int width, int height)
{
if(!(owner instanceof Window))
return;
@@ -390,8 +390,8 @@ public class QtComponentPeer extends NativeWrapper implements ComponentPeer
ignoreResize = true;
owner.setSize(width, height);
ignoreResize = false;
- ComponentEvent e = new ComponentEvent(owner,
- ComponentEvent.COMPONENT_RESIZED);
+ ComponentEvent e = new ComponentEvent(owner,
+ ComponentEvent.COMPONENT_RESIZED);
QtToolkit.eventQueue.postEvent(e);
QtToolkit.repaintThread.queueComponent(this);
}
@@ -400,22 +400,22 @@ public class QtComponentPeer extends NativeWrapper implements ComponentPeer
{
if (owner instanceof Window)
{
- WindowEvent e = new WindowEvent((Window)owner,
- WindowEvent.WINDOW_OPENED);
- QtToolkit.eventQueue.postEvent(e);
+ WindowEvent e = new WindowEvent((Window)owner,
+ WindowEvent.WINDOW_OPENED);
+ QtToolkit.eventQueue.postEvent(e);
}
- else
+ else
{
- ComponentEvent e = new ComponentEvent(owner,
- ComponentEvent.COMPONENT_SHOWN);
- QtToolkit.eventQueue.postEvent(e);
+ ComponentEvent e = new ComponentEvent(owner,
+ ComponentEvent.COMPONENT_SHOWN);
+ QtToolkit.eventQueue.postEvent(e);
}
}
protected void hideEvent()
{
- ComponentEvent e = new ComponentEvent(owner,
- ComponentEvent.COMPONENT_HIDDEN);
+ ComponentEvent e = new ComponentEvent(owner,
+ ComponentEvent.COMPONENT_HIDDEN);
QtToolkit.eventQueue.postEvent(e);
}
@@ -431,18 +431,18 @@ public class QtComponentPeer extends NativeWrapper implements ComponentPeer
public boolean canDetermineObscurity()
{
return true;
- }
+ }
public int checkImage(Image img,
- int w,
- int h,
- ImageObserver o)
+ int w,
+ int h,
+ ImageObserver o)
{
return toolkit.checkImage(img, w, h, o);
}
public void createBuffers(int numBuffers, BufferCapabilities caps)
- throws AWTException
+ throws AWTException
{
// FIXME
}
@@ -516,9 +516,9 @@ public class QtComponentPeer extends NativeWrapper implements ComponentPeer
public Graphics getGraphics()
{
if( backBuffer == null )
- {
- Rectangle r = owner.getBounds();
- backBuffer = new QtImage( r.width, r.height );
+ {
+ Rectangle r = owner.getBounds();
+ backBuffer = new QtImage( r.width, r.height );
}
return backBuffer.getDirectGraphics( this );
}
@@ -533,16 +533,16 @@ public class QtComponentPeer extends NativeWrapper implements ComponentPeer
public Point getLocationOnScreen()
{
Point p = new Point();
- synchronized( p )
+ synchronized( p )
{
- getLocationOnScreenNative( p );
- try
- {
- p.wait(); // Wait for the thing to be created.
- }
- catch(InterruptedException e)
- {
- }
+ getLocationOnScreenNative( p );
+ try
+ {
+ p.wait(); // Wait for the thing to be created.
+ }
+ catch(InterruptedException e)
+ {
+ }
}
return p;
}
@@ -552,16 +552,16 @@ public class QtComponentPeer extends NativeWrapper implements ComponentPeer
private Dimension getSize(boolean preferred)
{
Dimension d = new Dimension();
- synchronized( d )
+ synchronized( d )
{
- getSizeNative(d, preferred);
- try
- {
- d.wait(); // Wait for the thing to be created.
- }
- catch(InterruptedException e)
- {
- }
+ getSizeNative(d, preferred);
+ try
+ {
+ d.wait(); // Wait for the thing to be created.
+ }
+ catch(InterruptedException e)
+ {
+ }
}
return d;
}
@@ -570,7 +570,7 @@ public class QtComponentPeer extends NativeWrapper implements ComponentPeer
{
return getSize( false );
}
-
+
public Dimension getPreferredSize()
{
return getSize( true );
@@ -582,7 +582,7 @@ public class QtComponentPeer extends NativeWrapper implements ComponentPeer
}
public native boolean handlesWheelScrolling();
-
+
public void hide()
{
setVisible(false);
@@ -610,17 +610,17 @@ public class QtComponentPeer extends NativeWrapper implements ComponentPeer
public native void requestFocus();
- public boolean requestFocus (Component source, boolean bool1,
- boolean bool2, long x)
+ public boolean requestFocus (Component source, boolean bool1,
+ boolean bool2, long x)
{
// FIXME
return true;
}
public void reshape(int x,
- int y,
- int width,
- int height)
+ int y,
+ int width,
+ int height)
{
setBounds( x, y, width, height );
}
@@ -662,7 +662,7 @@ public class QtComponentPeer extends NativeWrapper implements ComponentPeer
return;
setGround(c.getRed(), c.getGreen(), c.getBlue(), true);
}
-
+
public native void setVisible(boolean b);
public void show()
@@ -678,71 +678,71 @@ public class QtComponentPeer extends NativeWrapper implements ComponentPeer
switch (eventID)
{
case ComponentEvent.COMPONENT_SHOWN:
- QtToolkit.repaintThread.queueComponent(this);
+ QtToolkit.repaintThread.queueComponent(this);
break;
case PaintEvent.PAINT:
- case PaintEvent.UPDATE:
- r = ((PaintEvent)e).getUpdateRect();
- QtToolkit.repaintThread.queueComponent(this, r.x, r.y,
- r.width, r.height);
+ case PaintEvent.UPDATE:
+ r = ((PaintEvent)e).getUpdateRect();
+ QtToolkit.repaintThread.queueComponent(this, r.x, r.y,
+ r.width, r.height);
break;
case KeyEvent.KEY_PRESSED:
- break;
+ break;
case KeyEvent.KEY_RELEASED:
- break;
+ break;
}
}
/**
* paint() is called back from the native side in response to a native
* repaint event.
- */
+ */
public void paint(Graphics g)
{
Rectangle r = g.getClipBounds();
if (backBuffer != null)
- backBuffer.drawPixelsScaledFlipped ((QtGraphics) g,
- 0, 0, 0, /* bg colors */
- false, false, /* no flipping */
- r.x, r.y, r.width, r.height,
- r.x, r.y, r.width, r.height,
- false ); /* no compositing */
+ backBuffer.drawPixelsScaledFlipped ((QtGraphics) g,
+ 0, 0, 0, /* bg colors */
+ false, false, /* no flipping */
+ r.x, r.y, r.width, r.height,
+ r.x, r.y, r.width, r.height,
+ false ); /* no compositing */
}
public void paintBackBuffer() throws InterruptedException
{
if( backBuffer != null )
{
- backBuffer.clear();
- Graphics2D bbg = (Graphics2D)backBuffer.getGraphics();
- owner.paint(bbg);
- bbg.dispose();
+ backBuffer.clear();
+ Graphics2D bbg = (Graphics2D)backBuffer.getGraphics();
+ owner.paint(bbg);
+ bbg.dispose();
}
}
- public void paintBackBuffer(int x, int y, int w, int h)
+ public void paintBackBuffer(int x, int y, int w, int h)
throws InterruptedException
{
if( backBuffer != null )
{
- Graphics2D bbg = (Graphics2D)backBuffer.getGraphics();
- bbg.setBackground( getNativeBackground() );
- bbg.clearRect(x, y, w, h);
- bbg.setClip(x, y, w, h);
- owner.paint(bbg);
- bbg.dispose();
+ Graphics2D bbg = (Graphics2D)backBuffer.getGraphics();
+ bbg.setBackground( getNativeBackground() );
+ bbg.clearRect(x, y, w, h);
+ bbg.setClip(x, y, w, h);
+ owner.paint(bbg);
+ bbg.dispose();
}
}
public boolean prepareImage(Image img,
- int w,
- int h,
- ImageObserver o)
+ int w,
+ int h,
+ ImageObserver o)
{
return toolkit.prepareImage(img, w, h, o);
}
-
+
public void print(Graphics g)
{
// FIXME
@@ -752,16 +752,16 @@ public class QtComponentPeer extends NativeWrapper implements ComponentPeer
* Schedules a timed repaint.
*/
public void repaint(long tm,
- int x,
- int y,
- int w,
- int h)
+ int x,
+ int y,
+ int w,
+ int h)
{
if( tm <= 0 )
{
- QtToolkit.repaintThread.queueComponent(this, x, y, w, h);
- return;
- }
+ QtToolkit.repaintThread.queueComponent(this, x, y, w, h);
+ return;
+ }
Timer t = new Timer();
t.schedule(new RepaintTimerTask(this, x, y, w, h), tm);
}
@@ -778,20 +778,20 @@ public class QtComponentPeer extends NativeWrapper implements ComponentPeer
/**
* Timed repainter
*/
- private class RepaintTimerTask extends TimerTask
- {
+ private class RepaintTimerTask extends TimerTask
+ {
private int x, y, w, h;
private QtComponentPeer peer;
RepaintTimerTask(QtComponentPeer peer, int x, int y, int w, int h)
- {
+ {
this.x=x;
this.y=y;
this.w=w;
- this.h=h;
+ this.h=h;
this.peer=peer;
}
public void run()
- {
+ {
QtToolkit.repaintThread.queueComponent(peer, x, y, w, h);
}
}
@@ -808,7 +808,7 @@ public class QtComponentPeer extends NativeWrapper implements ComponentPeer
public void setBounds(int x, int y, int width, int height, int z)
{
// TODO Auto-generated method stub
-
+
}
public boolean isReparentSupported()
diff --git a/gnu/java/awt/peer/qt/QtContainerPeer.java b/gnu/java/awt/peer/qt/QtContainerPeer.java
index ec04b0567..ee2873730 100644
--- a/gnu/java/awt/peer/qt/QtContainerPeer.java
+++ b/gnu/java/awt/peer/qt/QtContainerPeer.java
@@ -60,13 +60,13 @@ public class QtContainerPeer extends QtComponentPeer implements ContainerPeer
// ************ Public methods *********************
public void beginLayout()
{
- // FIXME
+ // FIXME
}
public void beginValidate()
{
}
-
+
public void endLayout()
{
QtUpdate();
@@ -75,7 +75,7 @@ public class QtContainerPeer extends QtComponentPeer implements ContainerPeer
public void endValidate()
{
}
-
+
public Insets getInsets()
{
return new Insets(0, 0, 0, 0);
@@ -101,15 +101,12 @@ public class QtContainerPeer extends QtComponentPeer implements ContainerPeer
public void cancelPendingPaint(int x, int y, int width, int height)
{
// TODO Auto-generated method stub
-
+
}
public void restack()
{
// TODO Auto-generated method stub
-
+
}
}
-
-
-
diff --git a/gnu/java/awt/peer/qt/QtDialogPeer.java b/gnu/java/awt/peer/qt/QtDialogPeer.java
index 23e5c0653..2f2c25550 100644
--- a/gnu/java/awt/peer/qt/QtDialogPeer.java
+++ b/gnu/java/awt/peer/qt/QtDialogPeer.java
@@ -68,6 +68,6 @@ public class QtDialogPeer extends QtWindowPeer implements DialogPeer
public void setBounds(int x, int y, int width, int height)
{
setBoundsNative(x, y, width, height,
- !((Dialog)owner).isResizable());
+ !((Dialog)owner).isResizable());
}
}
diff --git a/gnu/java/awt/peer/qt/QtEmbeddedWindowPeer.java b/gnu/java/awt/peer/qt/QtEmbeddedWindowPeer.java
index 0f859b78e..de76cd17f 100644
--- a/gnu/java/awt/peer/qt/QtEmbeddedWindowPeer.java
+++ b/gnu/java/awt/peer/qt/QtEmbeddedWindowPeer.java
@@ -40,7 +40,7 @@ package gnu.java.awt.peer.qt;
import java.awt.Component;
import gnu.java.awt.peer.EmbeddedWindowPeer;
-/**
+/**
* Embedded window peer for applets.
* FIXME: EmbeddedWindowPeer and this class should extend Window, NOT Frame.
*/
@@ -50,7 +50,7 @@ public class QtEmbeddedWindowPeer extends QtFramePeer implements EmbeddedWindowP
{
super( kit, owner );
}
-
+
protected native void init();
protected void setup()
diff --git a/gnu/java/awt/peer/qt/QtFileDialogPeer.java b/gnu/java/awt/peer/qt/QtFileDialogPeer.java
index 4937031aa..06943d955 100644
--- a/gnu/java/awt/peer/qt/QtFileDialogPeer.java
+++ b/gnu/java/awt/peer/qt/QtFileDialogPeer.java
@@ -81,4 +81,3 @@ public class QtFileDialogPeer extends QtDialogPeer implements FileDialogPeer
// FIXME
}
}
-
diff --git a/gnu/java/awt/peer/qt/QtFontMetrics.java b/gnu/java/awt/peer/qt/QtFontMetrics.java
index 3b182b5ea..1998339dc 100644
--- a/gnu/java/awt/peer/qt/QtFontMetrics.java
+++ b/gnu/java/awt/peer/qt/QtFontMetrics.java
@@ -93,7 +93,7 @@ public class QtFontMetrics extends FontMetrics
native Rectangle2D getStringBounds(String s);
// ****************** Package private ***************************
-
+
native boolean canDisplay( int c );
// ****************** Public methods ****************************
diff --git a/gnu/java/awt/peer/qt/QtFontPeer.java b/gnu/java/awt/peer/qt/QtFontPeer.java
index bd16daf28..03ed1d2df 100644
--- a/gnu/java/awt/peer/qt/QtFontPeer.java
+++ b/gnu/java/awt/peer/qt/QtFontPeer.java
@@ -103,17 +103,17 @@ public class QtFontPeer extends ClasspathFontPeer
return metrics.canDisplay( c );
}
- public int canDisplayUpTo (Font font, CharacterIterator i,
- int start, int limit)
+ public int canDisplayUpTo (Font font, CharacterIterator i,
+ int start, int limit)
{
int index = start;
char c = i.setIndex( index );
while( index <= limit )
{
- if(!canDisplay(font, c))
- return index;
- index++;
- c = i.next();
+ if(!canDisplay(font, c))
+ return index;
+ index++;
+ c = i.next();
}
return -1;
}
@@ -149,23 +149,23 @@ public class QtFontPeer extends ClasspathFontPeer
}
public GlyphVector createGlyphVector (Font font,
- FontRenderContext frc,
- CharacterIterator ci)
+ FontRenderContext frc,
+ CharacterIterator ci)
{
throw new UnsupportedOperationException();
}
- public GlyphVector createGlyphVector (Font font,
- FontRenderContext ctx,
- int[] glyphCodes)
+ public GlyphVector createGlyphVector (Font font,
+ FontRenderContext ctx,
+ int[] glyphCodes)
{
throw new UnsupportedOperationException();
}
- public GlyphVector layoutGlyphVector (Font font,
- FontRenderContext frc,
- char[] chars, int start,
- int limit, int flags)
+ public GlyphVector layoutGlyphVector (Font font,
+ FontRenderContext frc,
+ char[] chars, int start,
+ int limit, int flags)
{
throw new UnsupportedOperationException();
}
@@ -180,16 +180,16 @@ public class QtFontPeer extends ClasspathFontPeer
throw new UnsupportedOperationException();
}
- public LineMetrics getLineMetrics (Font font,
- CharacterIterator ci,
- int begin, int limit,
- FontRenderContext rc)
+ public LineMetrics getLineMetrics (Font font,
+ CharacterIterator ci,
+ int begin, int limit,
+ FontRenderContext rc)
{
throw new UnsupportedOperationException();
}
- public Rectangle2D getMaxCharBounds (Font font,
- FontRenderContext rc)
+ public Rectangle2D getMaxCharBounds (Font font,
+ FontRenderContext rc)
{
throw new UnsupportedOperationException();
}
diff --git a/gnu/java/awt/peer/qt/QtFramePeer.java b/gnu/java/awt/peer/qt/QtFramePeer.java
index e3b578933..d5162106f 100644
--- a/gnu/java/awt/peer/qt/QtFramePeer.java
+++ b/gnu/java/awt/peer/qt/QtFramePeer.java
@@ -75,7 +75,7 @@ public class QtFramePeer extends QtWindowPeer implements FramePeer
private native int menuBarHeight();
// ************ Public methods *********************
-
+
public void destroy()
{
dispose();
@@ -83,13 +83,13 @@ public class QtFramePeer extends QtWindowPeer implements FramePeer
public int getState()
{
- // FIXME
+ // FIXME
return theState;
}
public Insets getInsets()
{
- int mbHeight = ( ((Frame)owner).getMenuBar() != null ) ?
+ int mbHeight = ( ((Frame)owner).getMenuBar() != null ) ?
menuBarHeight() : 0;
return new Insets(mbHeight, 0, 0, 0);
}
@@ -98,30 +98,30 @@ public class QtFramePeer extends QtWindowPeer implements FramePeer
{
if (im instanceof QtImage)
setIcon( (QtImage)im );
- else
+ else
setIcon( new QtImage( im.getSource() ) );
}
public void setMaximizedBounds(Rectangle rect)
{
// FIXME
- }
+ }
public void setMenuBar(MenuBar mb)
{
if( mb != null )
{
- QtMenuBarPeer mbpeer = (QtMenuBarPeer)mb.getPeer();
- if( mbpeer == null )
- {
- mb.addNotify();
- mbpeer = (QtMenuBarPeer)mb.getPeer();
- if( mbpeer == null )
- throw new IllegalStateException("No menu bar peer.");
- }
- mbpeer.addMenus();
- setMenu( mbpeer );
- }
+ QtMenuBarPeer mbpeer = (QtMenuBarPeer)mb.getPeer();
+ if( mbpeer == null )
+ {
+ mb.addNotify();
+ mbpeer = (QtMenuBarPeer)mb.getPeer();
+ if( mbpeer == null )
+ throw new IllegalStateException("No menu bar peer.");
+ }
+ mbpeer.addMenus();
+ setMenu( mbpeer );
+ }
else
setMenu( null );
}
@@ -140,13 +140,13 @@ public class QtFramePeer extends QtWindowPeer implements FramePeer
public void setBoundsPrivate(int x, int y, int width, int height)
{
// TODO Auto-generated method stub
-
+
}
public void updateAlwaysOnTop()
{
// TODO Auto-generated method stub
-
+
}
public boolean requestWindowFocus()
diff --git a/gnu/java/awt/peer/qt/QtGraphics.java b/gnu/java/awt/peer/qt/QtGraphics.java
index 5694e8d20..f68cc0dbd 100644
--- a/gnu/java/awt/peer/qt/QtGraphics.java
+++ b/gnu/java/awt/peer/qt/QtGraphics.java
@@ -75,7 +75,7 @@ import java.util.Map;
/**
* QtGraphics is an abstract implementation of Graphics2D over a QPainter
- * object. This is to be subclassed for different drawing contexts,
+ * object. This is to be subclassed for different drawing contexts,
* which may have different requirements.
*/
public abstract class QtGraphics extends Graphics2D
@@ -100,9 +100,9 @@ public abstract class QtGraphics extends Graphics2D
protected Paint currentPaint; // current paint
protected RenderingHints renderingHints; // the rendering hints.
- /**
+ /**
* Owner Graphics, used by subcontext created by create()
- * to avoid GC of the original context.
+ * to avoid GC of the original context.
*/
Graphics parent;
@@ -154,12 +154,12 @@ public abstract class QtGraphics extends Graphics2D
{
AffineTransform current = getTransform();
setTransform( identity );
- setClip( initialClip );
+ setClip( initialClip );
setTransform( current );
}
- protected native void initImage(QtImage image);
- protected native void initVolatileImage(QtVolatileImage image);
+ protected native void initImage(QtImage image);
+ protected native void initVolatileImage(QtVolatileImage image);
// Creates a new native QPainter object on the same context.
private native void cloneNativeContext( QtGraphics parent );
@@ -174,10 +174,10 @@ public abstract class QtGraphics extends Graphics2D
private native void setNativeStroke(QPen p);
private native void setNativeComposite(int alphaMode);
private native void drawStringNative(String string, double x, double y);
- private native void setLinearGradient(int r1, int g1, int b1,
- int r2, int g2, int b2,
- double x1, double y1,
- double x2, double y2, boolean cyclic);
+ private native void setLinearGradient(int r1, int g1, int b1,
+ int r2, int g2, int b2,
+ double x1, double y1,
+ double x2, double y2, boolean cyclic);
private native void setAlphaNative(double alpha);
private native void setFontNative(QtFontPeer font);
private native QPainterPath getClipNative();
@@ -195,8 +195,8 @@ public abstract class QtGraphics extends Graphics2D
*/
public abstract Graphics create();
- public abstract void copyArea(int x, int y, int width, int height,
- int dx, int dy);
+ public abstract void copyArea(int x, int y, int width, int height,
+ int dx, int dy);
public abstract GraphicsConfiguration getDeviceConfiguration();
@@ -210,7 +210,7 @@ public abstract class QtGraphics extends Graphics2D
{
if( c == null )
c = Color.white;
- this.color = c;
+ this.color = c;
int alpha = (int)(c.getAlpha() * currentAlpha);
setColor(c.getRed(), c.getGreen(), c.getBlue(), alpha);
}
@@ -238,15 +238,15 @@ public abstract class QtGraphics extends Graphics2D
{
if( onStroke )
{
- Shape stroked = currentStroke.createStrokedShape( s );
- return stroked.intersects( (double)rect.x, (double)rect.y,
- (double)rect.width, (double)rect.height );
+ Shape stroked = currentStroke.createStrokedShape( s );
+ return stroked.intersects( (double)rect.x, (double)rect.y,
+ (double)rect.width, (double)rect.height );
}
- return s.intersects( (double)rect.x, (double)rect.y,
- (double)rect.width, (double)rect.height );
+ return s.intersects( (double)rect.x, (double)rect.y,
+ (double)rect.width, (double)rect.height );
}
- // ******************* Font ***********************
+ // ******************* Font ***********************
public Font getFont()
{
return font;
@@ -287,7 +287,7 @@ public abstract class QtGraphics extends Graphics2D
}
public Shape getClip()
- {
+ {
return getClipNative().getPath();
}
@@ -307,7 +307,7 @@ public abstract class QtGraphics extends Graphics2D
// ***************** Drawing primitives *********************
public void draw(Shape s)
- {
+ {
if( nativeStroking )
drawNative( new QPainterPath(s) );
else
@@ -330,14 +330,14 @@ public abstract class QtGraphics extends Graphics2D
public void drawRect(int x, int y, int width, int height)
{
if( nativeStroking )
- drawNative( new QPainterPath((double)x, (double)y,
- (double)width, (double)height) );
+ drawNative( new QPainterPath((double)x, (double)y,
+ (double)width, (double)height) );
else
fillNative( new QPainterPath
- ( currentStroke.createStrokedShape
- (new Rectangle2D.Double
- ((double)x, (double)y,
- (double)width, (double)height) ) ) );
+ ( currentStroke.createStrokedShape
+ (new Rectangle2D.Double
+ ((double)x, (double)y,
+ (double)width, (double)height) ) ) );
}
public void fillRect(int x, int y, int width, int height)
@@ -353,24 +353,24 @@ public abstract class QtGraphics extends Graphics2D
setColor( c );
}
- public void drawRoundRect(int x, int y, int width, int height,
- int arcWidth, int arcHeight)
+ public void drawRoundRect(int x, int y, int width, int height,
+ int arcWidth, int arcHeight)
{
- draw( new RoundRectangle2D.Double(x, y, width, height,
- arcWidth, arcHeight) );
+ draw( new RoundRectangle2D.Double(x, y, width, height,
+ arcWidth, arcHeight) );
}
- public void fillRoundRect(int x, int y, int width, int height,
- int arcWidth, int arcHeight)
+ public void fillRoundRect(int x, int y, int width, int height,
+ int arcWidth, int arcHeight)
{
- fill( new RoundRectangle2D.Double(x, y, width, height,
- arcWidth, arcHeight) );
+ fill( new RoundRectangle2D.Double(x, y, width, height,
+ arcWidth, arcHeight) );
}
public void drawOval(int x, int y, int width, int height)
{
- draw( new Ellipse2D.Double((double)x, (double)y,
- (double)width, (double)height) );
+ draw( new Ellipse2D.Double((double)x, (double)y,
+ (double)width, (double)height) );
}
public void fillOval(int x, int y, int width, int height)
@@ -378,18 +378,18 @@ public abstract class QtGraphics extends Graphics2D
fill( new Ellipse2D.Double(x, y, width, height) );
}
- public void drawArc(int x, int y, int width, int height,
- int arcStart, int arcAngle)
+ public void drawArc(int x, int y, int width, int height,
+ int arcStart, int arcAngle)
{
- draw( new Arc2D.Double(x, y, width, height, arcStart, arcAngle,
- Arc2D.OPEN) );
+ draw( new Arc2D.Double(x, y, width, height, arcStart, arcAngle,
+ Arc2D.OPEN) );
}
- public void fillArc(int x, int y, int width, int height,
- int arcStart, int arcAngle)
+ public void fillArc(int x, int y, int width, int height,
+ int arcStart, int arcAngle)
{
- fill( new Arc2D.Double(x, y, width, height, arcStart, arcAngle,
- Arc2D.CHORD) );
+ fill( new Arc2D.Double(x, y, width, height, arcStart, arcAngle,
+ Arc2D.CHORD) );
}
public void drawPolyline(int xPoints[], int yPoints[], int npoints)
@@ -428,17 +428,17 @@ public abstract class QtGraphics extends Graphics2D
{
// FIXME - to something more correct ?
String s = "";
- for(char c = ci.first(); c != CharacterIterator.DONE; c = ci.next())
+ for(char c = ci.first(); c != CharacterIterator.DONE; c = ci.next())
s += c;
drawString(s, x, y);
}
- public void drawString(AttributedCharacterIterator ci,
- float x, float y)
+ public void drawString(AttributedCharacterIterator ci,
+ float x, float y)
{
// FIXME - to something more correct ?
String s = "";
- for(char c = ci.first(); c != CharacterIterator.DONE; c = ci.next())
+ for(char c = ci.first(); c != CharacterIterator.DONE; c = ci.next())
s += c;
drawString(s, x, y);
}
@@ -450,68 +450,68 @@ public abstract class QtGraphics extends Graphics2D
// ******************* Image drawing ******************************
public boolean drawImage(Image image,
- AffineTransform Tx,
- ImageObserver obs)
+ AffineTransform Tx,
+ ImageObserver obs)
{
if (image instanceof QtImage)
return ((QtImage)image).drawImage(this, new QMatrix( Tx ), obs);
- return (new QtImage(image.getSource())).drawImage(this,
- new QMatrix( Tx ),
- obs);
+ return (new QtImage(image.getSource())).drawImage(this,
+ new QMatrix( Tx ),
+ obs);
}
- public boolean drawImage(Image image, int x, int y, Color bgcolor,
- ImageObserver observer)
+ public boolean drawImage(Image image, int x, int y, Color bgcolor,
+ ImageObserver observer)
{
if (image instanceof QtImage)
return ((QtImage)image).drawImage (this, x, y, bgcolor, observer);
- return (new QtImage(image.getSource())).drawImage (this, x, y,
- bgcolor, observer);
+ return (new QtImage(image.getSource())).drawImage (this, x, y,
+ bgcolor, observer);
}
- public boolean drawImage(Image image,
- int dx1, int dy1, int dx2, int dy2,
- int sx1, int sy1, int sx2, int sy2,
- Color bgcolor, ImageObserver observer)
+ public boolean drawImage(Image image,
+ int dx1, int dy1, int dx2, int dy2,
+ int sx1, int sy1, int sx2, int sy2,
+ Color bgcolor, ImageObserver observer)
{
if (image instanceof QtImage)
- return ((QtImage)image).drawImage(this, dx1, dy1, dx2, dy2,
- sx1, sy1, sx2, sy2, bgcolor, observer);
+ return ((QtImage)image).drawImage(this, dx1, dy1, dx2, dy2,
+ sx1, sy1, sx2, sy2, bgcolor, observer);
- return (new QtImage(image.getSource())).drawImage(this, dx1, dy1,
- dx2, dy2,
- sx1, sy1, sx2, sy2,
- bgcolor, observer);
+ return (new QtImage(image.getSource())).drawImage(this, dx1, dy1,
+ dx2, dy2,
+ sx1, sy1, sx2, sy2,
+ bgcolor, observer);
}
- public boolean drawImage(Image image, int x, int y,
- int width, int height, Color bgcolor,
- ImageObserver observer)
+ public boolean drawImage(Image image, int x, int y,
+ int width, int height, Color bgcolor,
+ ImageObserver observer)
{
if (image instanceof QtImage)
- return ((QtImage)image).drawImage (this, x, y, width, height,
- bgcolor, observer);
- return (new QtImage(image.getSource())).drawImage (this, x, y,
- width, height,
- bgcolor, observer);
+ return ((QtImage)image).drawImage (this, x, y, width, height,
+ bgcolor, observer);
+ return (new QtImage(image.getSource())).drawImage (this, x, y,
+ width, height,
+ bgcolor, observer);
}
-
- public boolean drawImage(Image image, int x, int y, int width, int height,
- ImageObserver observer)
+
+ public boolean drawImage(Image image, int x, int y, int width, int height,
+ ImageObserver observer)
{
return drawImage(image, x, y, width, height, null, observer);
}
-
+
public boolean drawImage(Image image, int x, int y, ImageObserver observer)
{
return drawImage(image, x, y, null, observer);
}
-
+
public boolean drawImage(Image image, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, ImageObserver observer)
{
- return drawImage(image, dx1, dy1, dx2, dy2,
- sx1, sy1, sx2, sy2, null, observer);
+ return drawImage(image, dx1, dy1, dx2, dy2,
+ sx1, sy1, sx2, sy2, null, observer);
}
// *********************** Transform methods *************************
@@ -531,7 +531,7 @@ public abstract class QtGraphics extends Graphics2D
xform.rotate( theta );
setQtTransform( new QMatrix( xform ) );
}
-
+
public void rotate(double theta, double x, double y)
{
xform.rotate(theta, x, y);
@@ -549,7 +549,7 @@ public abstract class QtGraphics extends Graphics2D
xform.shear(shx, shy);
setQtTransform( new QMatrix( xform ) );
}
-
+
public void transform(AffineTransform Tx)
{
xform.concatenate( Tx );
@@ -572,14 +572,14 @@ public abstract class QtGraphics extends Graphics2D
{
try // ..to convert the stroke into a native one.
{
- QPen pen = new QPen( s );
- nativeStroking = true;
- setNativeStroke( pen );
- setColor( color );
- }
+ QPen pen = new QPen( s );
+ nativeStroking = true;
+ setNativeStroke( pen );
+ setColor( color );
+ }
catch (IllegalArgumentException e)
{
- nativeStroking = false;
+ nativeStroking = false;
}
currentStroke = s;
}
@@ -593,27 +593,27 @@ public abstract class QtGraphics extends Graphics2D
{
if( comp == null)
{
- setNativeComposite( AlphaComposite.SRC_OVER );
- return;
+ setNativeComposite( AlphaComposite.SRC_OVER );
+ return;
}
if( comp instanceof AlphaComposite )
{
- if( ((AlphaComposite)comp).getRule() != AlphaComposite.XOR )
- setAlpha( ((AlphaComposite)comp).getAlpha() );
- setNativeComposite( ((AlphaComposite)comp).getRule() );
- composite = comp;
+ if( ((AlphaComposite)comp).getRule() != AlphaComposite.XOR )
+ setAlpha( ((AlphaComposite)comp).getAlpha() );
+ setNativeComposite( ((AlphaComposite)comp).getRule() );
+ composite = comp;
}
else
{
- // FIXME: this check is only required "if this Graphics2D
- // context is drawing to a Component on the display screen".
- SecurityManager sm = System.getSecurityManager();
- if (sm != null)
- sm.checkPermission(new AWTPermission("readDisplayPixels"));
-
- throw new UnsupportedOperationException("We don't support custom"+
- " composites yet.");
+ // FIXME: this check is only required "if this Graphics2D
+ // context is drawing to a Component on the display screen".
+ SecurityManager sm = System.getSecurityManager();
+ if (sm != null)
+ sm.checkPermission(new AWTPermission("readDisplayPixels"));
+
+ throw new UnsupportedOperationException("We don't support custom"+
+ " composites yet.");
}
}
@@ -625,28 +625,28 @@ public abstract class QtGraphics extends Graphics2D
public void setPaint(Paint p)
{
if( p == null )
- return;
+ return;
// FIXME
currentPaint = p;
if( p instanceof GradientPaint )
{
- GradientPaint lg = (GradientPaint)p;
- setLinearGradient(lg.getColor1().getRed(), lg.getColor1().getGreen(),
- lg.getColor1().getBlue(), lg.getColor2().getRed(),
- lg.getColor2().getGreen(), lg.getColor2().getBlue(),
- lg.getPoint1().getX(), lg.getPoint1().getY(),
- lg.getPoint2().getX(), lg.getPoint2().getY(),
- lg.isCyclic() );
- return;
+ GradientPaint lg = (GradientPaint)p;
+ setLinearGradient(lg.getColor1().getRed(), lg.getColor1().getGreen(),
+ lg.getColor1().getBlue(), lg.getColor2().getRed(),
+ lg.getColor2().getGreen(), lg.getColor2().getBlue(),
+ lg.getPoint1().getX(), lg.getPoint1().getY(),
+ lg.getPoint2().getX(), lg.getPoint2().getY(),
+ lg.isCyclic() );
+ return;
}
if( p instanceof Color )
{
- setColor((Color) p);
- return;
+ setColor((Color) p);
+ return;
}
throw new UnsupportedOperationException("We don't support custom"+
- " paints yet.");
+ " paints yet.");
}
public Paint getPaint()
@@ -671,7 +671,7 @@ public abstract class QtGraphics extends Graphics2D
{
return (RenderingHints) renderingHints.clone();
}
-
+
public void setRenderingHints(Map<?,?> hints)
{
renderingHints = new RenderingHints( null );
@@ -711,5 +711,4 @@ public abstract class QtGraphics extends Graphics2D
{
throw new UnsupportedOperationException("Not implemented yet");
}
-}
-
+}
diff --git a/gnu/java/awt/peer/qt/QtGraphicsEnvironment.java b/gnu/java/awt/peer/qt/QtGraphicsEnvironment.java
index 15a015922..dec4db2c8 100644
--- a/gnu/java/awt/peer/qt/QtGraphicsEnvironment.java
+++ b/gnu/java/awt/peer/qt/QtGraphicsEnvironment.java
@@ -55,7 +55,7 @@ public class QtGraphicsEnvironment extends GraphicsEnvironment
toolkit = tk;
// Get the number of screens from Qt.
int n = toolkit.numScreens();
-
+
/**
* Create the screen device objects
*/
@@ -77,7 +77,7 @@ public class QtGraphicsEnvironment extends GraphicsEnvironment
{
return toolkit.getFontList();
}
-
+
public String[] getAvailableFontFamilyNames(Locale l)
{
return getAvailableFontFamilyNames();
@@ -103,5 +103,3 @@ public class QtGraphicsEnvironment extends GraphicsEnvironment
return toolkit;
}
}
-
-
diff --git a/gnu/java/awt/peer/qt/QtImage.java b/gnu/java/awt/peer/qt/QtImage.java
index b6fbb1dca..b7e50ea25 100644
--- a/gnu/java/awt/peer/qt/QtImage.java
+++ b/gnu/java/awt/peer/qt/QtImage.java
@@ -95,11 +95,11 @@ public class QtImage extends Image
/*
* The 32-bit AARRGGBB format the uses.
*/
- static ColorModel nativeModel = new DirectColorModel(32,
- 0x00FF0000,
- 0x0000FF00,
- 0x000000FF,
- 0xFF000000);
+ static ColorModel nativeModel = new DirectColorModel(32,
+ 0x00FF0000,
+ 0x0000FF00,
+ 0x000000FF,
+ 0xFF000000);
/**
* HashMap of Graphics objects painting on this Image.
*/
@@ -126,7 +126,7 @@ public class QtImage extends Image
private native void setPixels(int[] pixels);
/**
- * Loads an image
+ * Loads an image
*/
private native boolean loadImage(String name);
@@ -153,35 +153,35 @@ public class QtImage extends Image
/**
* Draws the image optionally composited.
*/
- native void drawPixels (QtGraphics gc,
- int bg_red, int bg_green, int bg_blue,
- int x, int y,
- boolean composite);
+ native void drawPixels (QtGraphics gc,
+ int bg_red, int bg_green, int bg_blue,
+ int x, int y,
+ boolean composite);
/**
* Draws the image, optionally scaled and composited.
*/
- private native void drawPixelsScaled (QtGraphics gc,
- int bg_red, int bg_green, int bg_blue,
- int x, int y, int width, int height,
- boolean composite);
+ private native void drawPixelsScaled (QtGraphics gc,
+ int bg_red, int bg_green, int bg_blue,
+ int x, int y, int width, int height,
+ boolean composite);
/**
* Draws the image transformed.
*/
private native void drawPixelsTransformed (QtGraphics gc, QMatrix transform);
-
+
/**
* Draws the image scaled flipped and optionally composited.
*/
- native void drawPixelsScaledFlipped (QtGraphics gc,
- int bg_red, int bg_green,
- int bg_blue,
- boolean flipX, boolean flipY,
- int srcX, int srcY,
- int srcWidth, int srcHeight,
- int dstX, int dstY,
- int dstWidth, int dstHeight,
- boolean composite);
+ native void drawPixelsScaledFlipped (QtGraphics gc,
+ int bg_red, int bg_green,
+ int bg_blue,
+ boolean flipX, boolean flipY,
+ int srcX, int srcY,
+ int srcWidth, int srcHeight,
+ int dstX, int dstY,
+ int dstWidth, int dstHeight,
+ boolean composite);
/**
* Creates the image from an ImageProducer. May result in an error image.
@@ -216,13 +216,13 @@ public class QtImage extends Image
byte[] buf = new byte[5000];
int n = 0;
- while ( (n = bis.read( buf )) != -1 )
- baos.write(buf, 0, n);
+ while ( (n = bis.read( buf )) != -1 )
+ baos.write(buf, 0, n);
bis.close();
}
catch(IOException e)
{
- throw new IllegalArgumentException("Couldn't load image.");
+ throw new IllegalArgumentException("Couldn't load image.");
}
if ( loadImageFromData( baos.toByteArray() ) != true )
throw new IllegalArgumentException("Couldn't load image.");
@@ -245,19 +245,19 @@ public class QtImage extends Image
props = new Hashtable();
try
{
- String fn = f.getCanonicalPath();
- if (loadImage( fn ) != true)
- {
- errorLoading = true;
- isLoaded = false;
- return;
- }
- }
+ String fn = f.getCanonicalPath();
+ if (loadImage( fn ) != true)
+ {
+ errorLoading = true;
+ isLoaded = false;
+ return;
+ }
+ }
catch(IOException e)
{
- errorLoading = true;
- isLoaded = false;
- return;
+ errorLoading = true;
+ isLoaded = false;
+ return;
}
errorLoading = false;
isLoaded = true;
@@ -315,8 +315,8 @@ public class QtImage extends Image
/**
* Callback from the image consumer.
*/
- public void setImage(int width, int height,
- int[] pixels, Hashtable properties)
+ public void setImage(int width, int height,
+ int[] pixels, Hashtable properties)
{
this.width = width;
this.height = height;
@@ -324,8 +324,8 @@ public class QtImage extends Image
if (width <= 0 || height <= 0 || pixels == null)
{
- errorLoading = true;
- return;
+ errorLoading = true;
+ return;
}
isLoaded = true;
@@ -343,12 +343,12 @@ public class QtImage extends Image
return width;
}
-
+
public int getHeight (ImageObserver observer)
{
if (addObserver(observer))
return -1;
-
+
return height;
}
@@ -356,7 +356,7 @@ public class QtImage extends Image
{
if (addObserver(observer))
return UndefinedProperty;
-
+
Object value = props.get (name);
return (value == null) ? UndefinedProperty : value;
}
@@ -368,8 +368,8 @@ public class QtImage extends Image
{
if (!isLoaded)
return null;
- return new MemoryImageSource(width, height, nativeModel, getPixels(),
- 0, width);
+ return new MemoryImageSource(width, height, nativeModel, getPixels(),
+ 0, width);
}
void putPainter(QtImageGraphics g)
@@ -391,7 +391,7 @@ public class QtImage extends Image
*/
public Graphics getGraphics ()
{
- if (!isLoaded || killFlag)
+ if (!isLoaded || killFlag)
return null;
return new QtImageGraphics(this);
@@ -402,28 +402,28 @@ public class QtImage extends Image
*/
Graphics getDirectGraphics(QtComponentPeer peer)
{
- if (!isLoaded)
+ if (!isLoaded)
return null;
return new QtImageDirectGraphics(this, peer);
}
-
+
/**
* Returns a scaled instance of this image.
*/
public Image getScaledInstance(int width,
- int height,
- int hints)
+ int height,
+ int hints)
{
if (width <= 0 || height <= 0)
throw new IllegalArgumentException("Width and height of scaled bitmap"+
- "must be >= 0");
+ "must be >= 0");
return new QtImage(this, width, height, hints);
}
/**
- * If the image is loaded and comes from an ImageProducer,
+ * If the image is loaded and comes from an ImageProducer,
* regenerate the image from there.
*
* I have no idea if this is ever actually used. Since QtImage can't be
@@ -434,10 +434,10 @@ public class QtImage extends Image
{
if (isLoaded && source != null)
{
- observers = new Vector();
- isLoaded = false;
- freeImage();
- source.startProduction(new QtImageConsumer(this, source));
+ observers = new Vector();
+ isLoaded = false;
+ freeImage();
+ source.startProduction(new QtImageConsumer(this, source));
}
}
@@ -450,11 +450,11 @@ public class QtImage extends Image
{
if (isLoaded)
{
- if( painters == null || painters.isEmpty() )
- freeImage();
- else
- killFlag = true; // can't destroy image yet.
- // Do so when all painters are gone.
+ if( painters == null || painters.isEmpty() )
+ freeImage();
+ else
+ killFlag = true; // can't destroy image yet.
+ // Do so when all painters are gone.
}
}
@@ -465,12 +465,12 @@ public class QtImage extends Image
{
if (addObserver(observer))
{
- if (errorLoading == true)
- return ImageObserver.ERROR;
- else
- return 0;
+ if (errorLoading == true)
+ return ImageObserver.ERROR;
+ else
+ return 0;
}
-
+
return ImageObserver.ALLBITS | ImageObserver.WIDTH | ImageObserver.HEIGHT;
}
@@ -480,7 +480,7 @@ public class QtImage extends Image
* Draws an image with eventual scaling/transforming.
*/
public boolean drawImage (QtGraphics g, QMatrix matrix,
- ImageObserver observer)
+ ImageObserver observer)
{
if (addObserver(observer))
return false;
@@ -495,14 +495,14 @@ public class QtImage extends Image
* compositing with a background color.
*/
public boolean drawImage (QtGraphics g, int x, int y,
- Color bgcolor, ImageObserver observer)
+ Color bgcolor, ImageObserver observer)
{
if (addObserver(observer))
return false;
if(bgcolor != null)
- drawPixels(g, bgcolor.getRed (), bgcolor.getGreen (),
- bgcolor.getBlue (), x, y, true);
+ drawPixels(g, bgcolor.getRed (), bgcolor.getGreen (),
+ bgcolor.getBlue (), x, y, true);
else
drawPixels(g, 0, 0, 0, x, y, false);
@@ -510,18 +510,18 @@ public class QtImage extends Image
}
/**
- * Draws an image to the QtGraphics context, at (x,y) scaled to
+ * Draws an image to the QtGraphics context, at (x,y) scaled to
* width and height, with optional compositing with a background color.
*/
public boolean drawImage (QtGraphics g, int x, int y, int width, int height,
- Color bgcolor, ImageObserver observer)
+ Color bgcolor, ImageObserver observer)
{
if (addObserver(observer))
return false;
if(bgcolor != null)
- drawPixelsScaled(g, bgcolor.getRed (), bgcolor.getGreen (),
- bgcolor.getBlue (), x, y, width, height, true);
+ drawPixelsScaled(g, bgcolor.getRed (), bgcolor.getGreen (),
+ bgcolor.getBlue (), x, y, width, height, true);
else
drawPixelsScaled(g, 0, 0, 0, x, y, width, height, false);
@@ -531,9 +531,9 @@ public class QtImage extends Image
/**
* Draws an image with eventual scaling/transforming.
*/
- public boolean drawImage (QtGraphics g, int dx1, int dy1, int dx2, int dy2,
- int sx1, int sy1, int sx2, int sy2,
- Color bgcolor, ImageObserver observer)
+ public boolean drawImage (QtGraphics g, int dx1, int dy1, int dx2, int dy2,
+ int sx1, int sy1, int sx2, int sy2,
+ Color bgcolor, ImageObserver observer)
{
if (addObserver(observer))
return false;
@@ -549,53 +549,53 @@ public class QtImage extends Image
int dstX = (dx1 < dx2) ? dx1 : dx2;
int dstY = (dy1 < dy2) ? dy1 : dy2;
- // Clipping. This requires the dst to be scaled as well,
+ // Clipping. This requires the dst to be scaled as well,
if (srcWidth > width)
{
- dstWidth = (int)((double)dstWidth*((double)width/(double)srcWidth));
- srcWidth = width - srcX;
+ dstWidth = (int)((double)dstWidth*((double)width/(double)srcWidth));
+ srcWidth = width - srcX;
}
- if (srcHeight > height)
+ if (srcHeight > height)
{
- dstHeight = (int)((double)dstHeight*((double)height/(double)srcHeight));
- srcHeight = height - srcY;
+ dstHeight = (int)((double)dstHeight*((double)height/(double)srcHeight));
+ srcHeight = height - srcY;
}
if (srcWidth + srcX > width)
{
- dstWidth = (int)((double)dstWidth * (double)(width - srcX)/(double)srcWidth);
- srcWidth = width - srcX;
+ dstWidth = (int)((double)dstWidth * (double)(width - srcX)/(double)srcWidth);
+ srcWidth = width - srcX;
}
if (srcHeight + srcY > height)
{
- dstHeight = (int)((double)dstHeight * (double)(width - srcY)/(double)srcHeight);
- srcHeight = height - srcY;
+ dstHeight = (int)((double)dstHeight * (double)(width - srcY)/(double)srcHeight);
+ srcHeight = height - srcY;
}
if ( srcWidth <= 0 || srcHeight <= 0 || dstWidth <= 0 || dstHeight <= 0)
return true;
if(bgcolor != null)
- drawPixelsScaledFlipped (g, bgcolor.getRed (), bgcolor.getGreen (),
- bgcolor.getBlue (),
- flipX, flipY,
- srcX, srcY,
- srcWidth, srcHeight,
- dstX, dstY,
- dstWidth, dstHeight,
- true);
+ drawPixelsScaledFlipped (g, bgcolor.getRed (), bgcolor.getGreen (),
+ bgcolor.getBlue (),
+ flipX, flipY,
+ srcX, srcY,
+ srcWidth, srcHeight,
+ dstX, dstY,
+ dstWidth, dstHeight,
+ true);
else
drawPixelsScaledFlipped (g, 0, 0, 0, flipX, flipY,
- srcX, srcY, srcWidth, srcHeight,
- dstX, dstY, dstWidth, dstHeight,
- false);
+ srcX, srcY, srcWidth, srcHeight,
+ dstX, dstY, dstWidth, dstHeight,
+ false);
return true;
}
- public native void copyArea(int x, int y, int width, int height,
- int dx, int dy);
+ public native void copyArea(int x, int y, int width, int height,
+ int dx, int dy);
// Private methods ////////////////////////////////////////////////
@@ -604,19 +604,19 @@ public class QtImage extends Image
*/
private void deliver()
{
- int flags = ImageObserver.HEIGHT |
+ int flags = ImageObserver.HEIGHT |
ImageObserver.WIDTH |
ImageObserver.PROPERTIES |
ImageObserver.ALLBITS;
if (observers != null)
for(int i=0; i < observers.size(); i++)
- ((ImageObserver)observers.elementAt(i)).
- imageUpdate(this, flags, 0, 0, width, height);
+ ((ImageObserver)observers.elementAt(i)).
+ imageUpdate(this, flags, 0, 0, width, height);
observers = null;
}
-
+
/**
* Adds an observer, if we need to.
* @return true if an observer was added.
@@ -625,10 +625,10 @@ public class QtImage extends Image
{
if (!isLoaded)
{
- if(observer != null)
- if (!observers.contains (observer))
- observers.addElement (observer);
- return true;
+ if(observer != null)
+ if (!observers.contains (observer))
+ observers.addElement (observer);
+ return true;
}
return false;
}
diff --git a/gnu/java/awt/peer/qt/QtImageConsumer.java b/gnu/java/awt/peer/qt/QtImageConsumer.java
index 7096c21e4..9883475f9 100644
--- a/gnu/java/awt/peer/qt/QtImageConsumer.java
+++ b/gnu/java/awt/peer/qt/QtImageConsumer.java
@@ -86,44 +86,44 @@ public class QtImageConsumer implements ImageConsumer
public synchronized void setHints (int flags)
{
// This method informs us in which order the pixels are
- // delivered, for progressive-loading support, etc.
+ // delivered, for progressive-loading support, etc.
// Since we wait until it's all loaded, we can ignore the hints.
}
- public synchronized void setPixels (int x, int y, int width, int height,
- ColorModel cm, byte[] pixels,
- int offset, int scansize)
+ public synchronized void setPixels (int x, int y, int width, int height,
+ ColorModel cm, byte[] pixels,
+ int offset, int scansize)
{
setPixels (x, y, width, height, cm, convertPixels (pixels), offset,
scansize);
}
- public synchronized void setPixels (int x, int y, int width, int height,
- ColorModel cm, int[] pixels,
- int offset, int scansize)
+ public synchronized void setPixels (int x, int y, int width, int height,
+ ColorModel cm, int[] pixels,
+ int offset, int scansize)
{
if (pixelCache == null)
return; // Not sure this should ever happen.
if (cm.equals(QtImage.nativeModel))
for (int i = 0; i < height; i++)
- System.arraycopy (pixels, offset + (i * scansize),
- pixelCache, (y + i) * this.width + x,
- width);
+ System.arraycopy (pixels, offset + (i * scansize),
+ pixelCache, (y + i) * this.width + x,
+ width);
else
{
- for (int i = 0; i < height; i++)
- for (int j = 0; j < width; j++)
- {
- // get in AARRGGBB and convert to AABBGGRR
- int pix = cm.getRGB(pixels[offset + (i * scansize) + x + j]);
- byte b = (byte)(pix & 0xFF);
- byte r = (byte)(((pix & 0x00FF0000) >> 16) & 0xFF);
- pix &= 0xFF00FF00;
- pix |= ((b & 0xFF) << 16);
- pix |= (r & 0xFF);
- pixelCache[(y + i) * this.width + x + j] = pix;
- }
+ for (int i = 0; i < height; i++)
+ for (int j = 0; j < width; j++)
+ {
+ // get in AARRGGBB and convert to AABBGGRR
+ int pix = cm.getRGB(pixels[offset + (i * scansize) + x + j]);
+ byte b = (byte)(pix & 0xFF);
+ byte r = (byte)(((pix & 0x00FF0000) >> 16) & 0xFF);
+ pix &= 0xFF00FF00;
+ pix |= ((b & 0xFF) << 16);
+ pix |= (r & 0xFF);
+ pixelCache[(y + i) * this.width + x + j] = pix;
+ }
}
}
@@ -136,7 +136,7 @@ public class QtImageConsumer implements ImageConsumer
for (int i = 0; i < pixels.length; i++)
ret[i] = pixels[i] & 0xFF;
-
+
return ret;
}
@@ -145,5 +145,3 @@ public class QtImageConsumer implements ImageConsumer
this.properties = props;
}
}
-
-
diff --git a/gnu/java/awt/peer/qt/QtImageDirectGraphics.java b/gnu/java/awt/peer/qt/QtImageDirectGraphics.java
index d49084af8..daa174ad4 100644
--- a/gnu/java/awt/peer/qt/QtImageDirectGraphics.java
+++ b/gnu/java/awt/peer/qt/QtImageDirectGraphics.java
@@ -75,7 +75,7 @@ public class QtImageDirectGraphics extends QtImageGraphics
}
public void draw(Shape s)
- {
+ {
super.draw(s);
scheduleUpdate();
}
@@ -105,43 +105,41 @@ public class QtImageDirectGraphics extends QtImageGraphics
}
public boolean drawImage(Image image,
- AffineTransform Tx,
- ImageObserver obs)
+ AffineTransform Tx,
+ ImageObserver obs)
{
boolean r = super.drawImage(image, Tx, obs);
scheduleUpdate();
return r;
}
- public boolean drawImage(Image image, int x, int y, Color bgcolor,
- ImageObserver observer)
+ public boolean drawImage(Image image, int x, int y, Color bgcolor,
+ ImageObserver observer)
{
boolean r = super.drawImage(image, x, y, bgcolor, observer);
scheduleUpdate();
return r;
}
- public boolean drawImage(Image image,
- int dx1, int dy1, int dx2, int dy2,
- int sx1, int sy1, int sx2, int sy2,
- Color bgcolor, ImageObserver observer)
+ public boolean drawImage(Image image,
+ int dx1, int dy1, int dx2, int dy2,
+ int sx1, int sy1, int sx2, int sy2,
+ Color bgcolor, ImageObserver observer)
{
- boolean r = super.drawImage( image, dx1, dy1, dx2, dy2,
- sx1, sy1, sx2, sy2,
- bgcolor, observer);
+ boolean r = super.drawImage( image, dx1, dy1, dx2, dy2,
+ sx1, sy1, sx2, sy2,
+ bgcolor, observer);
scheduleUpdate();
return r;
}
- public boolean drawImage(Image image, int x, int y,
- int width, int height, Color bgcolor,
- ImageObserver observer)
+ public boolean drawImage(Image image, int x, int y,
+ int width, int height, Color bgcolor,
+ ImageObserver observer)
{
- boolean r = super.drawImage(image, x, y, width, height, bgcolor,
- observer);
+ boolean r = super.drawImage(image, x, y, width, height, bgcolor,
+ observer);
scheduleUpdate();
return r;
}
-}
-
-
+}
diff --git a/gnu/java/awt/peer/qt/QtImageGraphics.java b/gnu/java/awt/peer/qt/QtImageGraphics.java
index 1224d6915..bba25e068 100644
--- a/gnu/java/awt/peer/qt/QtImageGraphics.java
+++ b/gnu/java/awt/peer/qt/QtImageGraphics.java
@@ -65,17 +65,17 @@ public class QtImageGraphics extends QtGraphics
int w, h;
if(image instanceof QtImage)
{
- w = ((QtImage)image).width;
- h = ((QtImage)image).height;
- initImage((QtImage) image );
- ((QtImage)image).putPainter( this );
- }
+ w = ((QtImage)image).width;
+ h = ((QtImage)image).height;
+ initImage((QtImage) image );
+ ((QtImage)image).putPainter( this );
+ }
else
{
- w = ((QtVolatileImage)image).width;
- h = ((QtVolatileImage)image).height;
- initVolatileImage((QtVolatileImage) image );
- ((QtVolatileImage)image).putPainter( this );
+ w = ((QtVolatileImage)image).width;
+ h = ((QtVolatileImage)image).height;
+ initVolatileImage((QtVolatileImage) image );
+ ((QtVolatileImage)image).putPainter( this );
}
parentImage = image;
@@ -92,7 +92,7 @@ public class QtImageGraphics extends QtGraphics
*/
QtImageGraphics( QtImageGraphics g )
{
- super( g );
+ super( g );
parentImage = g.parentImage;
if(parentImage instanceof QtImage)
((QtImage)parentImage).putPainter( this );
@@ -119,9 +119,9 @@ public class QtImageGraphics extends QtGraphics
/**
* Copy an area.
- */
- public void copyArea(int x, int y, int width, int height,
- int dx, int dy)
+ */
+ public void copyArea(int x, int y, int width, int height,
+ int dx, int dy)
{
if(parentImage instanceof QtImage)
((QtImage)parentImage).copyArea(x, y, width, height, dx, dy);
@@ -136,6 +136,4 @@ public class QtImageGraphics extends QtGraphics
{
throw new UnsupportedOperationException("Not implemented yet");
}
-}
-
-
+}
diff --git a/gnu/java/awt/peer/qt/QtLabelPeer.java b/gnu/java/awt/peer/qt/QtLabelPeer.java
index 449c9b3cb..80acd491d 100644
--- a/gnu/java/awt/peer/qt/QtLabelPeer.java
+++ b/gnu/java/awt/peer/qt/QtLabelPeer.java
@@ -46,9 +46,9 @@ public class QtLabelPeer extends QtComponentPeer implements LabelPeer
{
super( kit, owner );
}
-
+
protected native void init();
-
+
protected void setup()
{
super.setup();
diff --git a/gnu/java/awt/peer/qt/QtListPeer.java b/gnu/java/awt/peer/qt/QtListPeer.java
index 9df250a42..14ae2a0cd 100644
--- a/gnu/java/awt/peer/qt/QtListPeer.java
+++ b/gnu/java/awt/peer/qt/QtListPeer.java
@@ -84,26 +84,26 @@ public class QtListPeer extends QtComponentPeer implements ListPeer
if( index == -1)
((List)owner).deselect( ((List)owner).getSelectedIndex() );
else
- {
- ((List)owner).select( index );
- ItemEvent e = new ItemEvent((List)owner,
- ItemEvent.ITEM_STATE_CHANGED,
- ""+index,
- ItemEvent.SELECTED);
- QtToolkit.eventQueue.postEvent(e);
- }
+ {
+ ((List)owner).select( index );
+ ItemEvent e = new ItemEvent((List)owner,
+ ItemEvent.ITEM_STATE_CHANGED,
+ ""+index,
+ ItemEvent.SELECTED);
+ QtToolkit.eventQueue.postEvent(e);
+ }
}
/**
* Called back when an item is double-clicked.
- */
+ */
private void itemDoubleClicked( int index, int modifiers )
{
ActionEvent e = new ActionEvent(owner,
- ActionEvent.ACTION_PERFORMED,
- ((List)owner).getItem( index ),
- System.currentTimeMillis(),
- modifiers);
+ ActionEvent.ACTION_PERFORMED,
+ ((List)owner).getItem( index ),
+ System.currentTimeMillis(),
+ modifiers);
QtToolkit.eventQueue.postEvent(e);
}
@@ -129,10 +129,10 @@ public class QtListPeer extends QtComponentPeer implements ListPeer
public native void delItems(int start_index, int end_index);
public void deselect(int index)
- {
+ {
if( ignoreNextSelect == true )
ignoreNextSelect = false;
- else
+ else
select(index, false);
}
@@ -159,7 +159,7 @@ public class QtListPeer extends QtComponentPeer implements ListPeer
{
if( ignoreNextSelect == true )
ignoreNextSelect = false;
- else
+ else
select(index, true);
}
diff --git a/gnu/java/awt/peer/qt/QtMenuBarPeer.java b/gnu/java/awt/peer/qt/QtMenuBarPeer.java
index c91b37f37..962d76d41 100644
--- a/gnu/java/awt/peer/qt/QtMenuBarPeer.java
+++ b/gnu/java/awt/peer/qt/QtMenuBarPeer.java
@@ -47,15 +47,15 @@ public class QtMenuBarPeer extends QtMenuComponentPeer implements MenuBarPeer
{
super( kit, owner );
}
-
+
protected native void init();
-
+
protected void setup()
{
}
- /**
- * Recurses the menubar adding menus (and menu items),
+ /**
+ * Recurses the menubar adding menus (and menu items),
* called from the Frame peer.
*/
void addMenus()
@@ -99,4 +99,3 @@ public class QtMenuBarPeer extends QtMenuComponentPeer implements MenuBarPeer
delMenu( (QtMenuPeer)m.getPeer() );
}
}
-
diff --git a/gnu/java/awt/peer/qt/QtMenuComponentPeer.java b/gnu/java/awt/peer/qt/QtMenuComponentPeer.java
index 7e292d00f..2050bef06 100644
--- a/gnu/java/awt/peer/qt/QtMenuComponentPeer.java
+++ b/gnu/java/awt/peer/qt/QtMenuComponentPeer.java
@@ -41,27 +41,27 @@ import java.awt.Font;
import java.awt.MenuComponent;
import java.awt.peer.MenuComponentPeer;
-public class QtMenuComponentPeer extends NativeWrapper
+public class QtMenuComponentPeer extends NativeWrapper
implements MenuComponentPeer
{
protected QtToolkit toolkit;
protected MenuComponent owner;
-
+
public QtMenuComponentPeer( QtToolkit kit, MenuComponent owner )
{
this.toolkit = kit;
this.owner = owner;
nativeObject = 0;
- synchronized(this)
+ synchronized(this)
{
- callInit(); // Calls the init method FROM THE MAIN THREAD.
- try
- {
- wait(); // Wait for the thing to be created.
- }
- catch(InterruptedException e)
- {
- }
+ callInit(); // Calls the init method FROM THE MAIN THREAD.
+ try
+ {
+ wait(); // Wait for the thing to be created.
+ }
+ catch(InterruptedException e)
+ {
+ }
}
setup();
}
@@ -80,7 +80,7 @@ public class QtMenuComponentPeer extends NativeWrapper
{
dispose();
}
-
+
// ************ Public methods *********************
public native void dispose();
@@ -88,7 +88,7 @@ public class QtMenuComponentPeer extends NativeWrapper
public void setFont(Font font)
{
// TODO Auto-generated method stub
-
+
}
}
diff --git a/gnu/java/awt/peer/qt/QtMenuItemPeer.java b/gnu/java/awt/peer/qt/QtMenuItemPeer.java
index 7658ff078..2b77540a5 100644
--- a/gnu/java/awt/peer/qt/QtMenuItemPeer.java
+++ b/gnu/java/awt/peer/qt/QtMenuItemPeer.java
@@ -43,7 +43,7 @@ import java.awt.event.ActionEvent;
import java.awt.peer.MenuItemPeer;
import java.awt.peer.CheckboxMenuItemPeer;
-public class QtMenuItemPeer extends QtMenuComponentPeer
+public class QtMenuItemPeer extends QtMenuComponentPeer
implements MenuItemPeer, CheckboxMenuItemPeer
{
public QtMenuItemPeer( QtToolkit toolkit, MenuItem owner )
@@ -73,15 +73,15 @@ public class QtMenuItemPeer extends QtMenuComponentPeer
private void fireClick(int modifiers)
{
ActionEvent e = new ActionEvent(owner,
- ActionEvent.ACTION_PERFORMED,
- ((MenuItem)owner).getActionCommand(),
- System.currentTimeMillis(),
- (modifiers & 0x2FF));
+ ActionEvent.ACTION_PERFORMED,
+ ((MenuItem)owner).getActionCommand(),
+ System.currentTimeMillis(),
+ (modifiers & 0x2FF));
QtToolkit.eventQueue.postEvent(e);
}
// ************ Public methods *********************
-
+
public void disable()
{
setEnabled(false);
@@ -98,10 +98,3 @@ public class QtMenuItemPeer extends QtMenuComponentPeer
public native void setState(boolean state);
}
-
-
-
-
-
-
-
diff --git a/gnu/java/awt/peer/qt/QtMenuPeer.java b/gnu/java/awt/peer/qt/QtMenuPeer.java
index 87324c710..0f65fecbd 100644
--- a/gnu/java/awt/peer/qt/QtMenuPeer.java
+++ b/gnu/java/awt/peer/qt/QtMenuPeer.java
@@ -56,7 +56,7 @@ public class QtMenuPeer extends QtMenuComponentPeer implements MenuPeer
}
protected native void init();
-
+
protected void setup()
{
items = new Vector();
@@ -65,29 +65,29 @@ public class QtMenuPeer extends QtMenuComponentPeer implements MenuPeer
allowTearOff();
}
- // Recurse the menu tree adding items,
+ // Recurse the menu tree adding items,
// called from the MenuBar addMenus() method, called from the Frame peer.
void addItems()
{
if(!itemsAdded)
{
- Menu o = (Menu)owner;
- for( int i=0; i < o.getItemCount(); i++ )
- {
- MenuItem ci = o.getItem(i);
- if (ci instanceof Menu && ci.getPeer() != null)
- ((QtMenuPeer)ci.getPeer()).addItems();
- addItem( ci );
- }
- itemsAdded = true;
+ Menu o = (Menu)owner;
+ for( int i=0; i < o.getItemCount(); i++ )
+ {
+ MenuItem ci = o.getItem(i);
+ if (ci instanceof Menu && ci.getPeer() != null)
+ ((QtMenuPeer)ci.getPeer()).addItems();
+ addItem( ci );
+ }
+ itemsAdded = true;
}
}
private void fireClick()
{
ActionEvent e = new ActionEvent(owner,
- ActionEvent.ACTION_PERFORMED,
- ((Menu)owner).getActionCommand());
+ ActionEvent.ACTION_PERFORMED,
+ ((Menu)owner).getActionCommand());
QtToolkit.eventQueue.postEvent(e);
}
@@ -112,13 +112,13 @@ public class QtMenuPeer extends QtMenuComponentPeer implements MenuPeer
{
if( item instanceof Menu || item instanceof PopupMenu)
insertMenu((QtMenuPeer)item.getPeer());
- else
+ else
{
- QtMenuItemPeer p = (QtMenuItemPeer)item.getPeer();
- insertItem(p);
+ QtMenuItemPeer p = (QtMenuItemPeer)item.getPeer();
+ insertItem(p);
}
}
-
+
public void addSeparator()
{
insertSeperator();
@@ -147,6 +147,3 @@ public class QtMenuPeer extends QtMenuComponentPeer implements MenuPeer
public native void setLabel(String text);
}
-
-
-
diff --git a/gnu/java/awt/peer/qt/QtPanelPeer.java b/gnu/java/awt/peer/qt/QtPanelPeer.java
index 9e4352331..1ac0ca9a6 100644
--- a/gnu/java/awt/peer/qt/QtPanelPeer.java
+++ b/gnu/java/awt/peer/qt/QtPanelPeer.java
@@ -46,7 +46,7 @@ public class QtPanelPeer extends QtContainerPeer implements PanelPeer
{
super( kit, owner );
}
-
+
protected native void init();
protected void setup()
diff --git a/gnu/java/awt/peer/qt/QtPopupMenuPeer.java b/gnu/java/awt/peer/qt/QtPopupMenuPeer.java
index b96c5c510..eb4dae404 100644
--- a/gnu/java/awt/peer/qt/QtPopupMenuPeer.java
+++ b/gnu/java/awt/peer/qt/QtPopupMenuPeer.java
@@ -74,6 +74,3 @@ public class QtPopupMenuPeer extends QtMenuPeer implements PopupMenuPeer
show((Component)e.target, e.x, e.y);
}
}
-
-
-
diff --git a/gnu/java/awt/peer/qt/QtRepaintThread.java b/gnu/java/awt/peer/qt/QtRepaintThread.java
index 405505e9b..6861be8fc 100644
--- a/gnu/java/awt/peer/qt/QtRepaintThread.java
+++ b/gnu/java/awt/peer/qt/QtRepaintThread.java
@@ -42,13 +42,13 @@ package gnu.java.awt.peer.qt;
* do this directly from the paint callback in QtComponentPeer, because that
* is executed from the main thread. Thus, if a call is made at the same time
* which requires execution by the main thread, and this is sharing a lock with
- * paint(), then a deadlock will occur, which must be avoided. In general,
+ * paint(), then a deadlock will occur, which must be avoided. In general,
* the main Qt thread should avoid calling into java code as far as possible.
*
*/
-public class QtRepaintThread extends Thread
+public class QtRepaintThread extends Thread
{
- static class RepaintComponent
+ static class RepaintComponent
{
public QtComponentPeer curr;
public RepaintComponent next;
@@ -72,7 +72,7 @@ public class QtRepaintThread extends Thread
this.h = h;
}
}
-
+
RepaintComponent component;
boolean busy;
@@ -85,39 +85,39 @@ public class QtRepaintThread extends Thread
{
while( true )
{
- try
- {
- busy = false;
- // Wait for a repaint
- sleep(100);
- busy = true;
- }
- catch (InterruptedException ie)
- {
- while( component != null )
- {
- try
- {
- if( component.paintAll )
- {
- // update the back-buffer.
- component.curr.paintBackBuffer();
- component.curr.QtUpdate(); // trigger a native repaint event
- }
- else
- {
- component.curr.paintBackBuffer(component.x, component.y,
- component.w, component.h);
- component.curr.QtUpdateArea(component.x, component.y,
- component.w, component.h);
- }
- }
- catch (InterruptedException e)
- {
- }
- component = component.next;
- }
- }
+ try
+ {
+ busy = false;
+ // Wait for a repaint
+ sleep(100);
+ busy = true;
+ }
+ catch (InterruptedException ie)
+ {
+ while( component != null )
+ {
+ try
+ {
+ if( component.paintAll )
+ {
+ // update the back-buffer.
+ component.curr.paintBackBuffer();
+ component.curr.QtUpdate(); // trigger a native repaint event
+ }
+ else
+ {
+ component.curr.paintBackBuffer(component.x, component.y,
+ component.w, component.h);
+ component.curr.QtUpdateArea(component.x, component.y,
+ component.w, component.h);
+ }
+ }
+ catch (InterruptedException e)
+ {
+ }
+ component = component.next;
+ }
+ }
}
}
@@ -130,9 +130,9 @@ public class QtRepaintThread extends Thread
component = new RepaintComponent(p);
else
{
- RepaintComponent r = component;
- while( r.next != null ) r = r.next;
- r.next = new RepaintComponent(p);
+ RepaintComponent r = component;
+ while( r.next != null ) r = r.next;
+ r.next = new RepaintComponent(p);
}
interrupt();
}
@@ -140,16 +140,16 @@ public class QtRepaintThread extends Thread
/**
* Enqueue a component for repainting.
*/
- public synchronized void queueComponent(QtComponentPeer p, int x, int y,
- int w, int h)
+ public synchronized void queueComponent(QtComponentPeer p, int x, int y,
+ int w, int h)
{
if( component == null )
component = new RepaintComponent(p, x, y, w, h);
else
{
- RepaintComponent r = component;
- while( r.next != null ) r = r.next;
- r.next = new RepaintComponent(p, x, y, w, h);
+ RepaintComponent r = component;
+ while( r.next != null ) r = r.next;
+ r.next = new RepaintComponent(p, x, y, w, h);
}
interrupt();
}
diff --git a/gnu/java/awt/peer/qt/QtScreenDevice.java b/gnu/java/awt/peer/qt/QtScreenDevice.java
index c2d73aed1..c7d8a4784 100644
--- a/gnu/java/awt/peer/qt/QtScreenDevice.java
+++ b/gnu/java/awt/peer/qt/QtScreenDevice.java
@@ -113,4 +113,3 @@ public class QtScreenDevice extends GraphicsDevice
{
}
}
-
diff --git a/gnu/java/awt/peer/qt/QtScreenDeviceConfiguration.java b/gnu/java/awt/peer/qt/QtScreenDeviceConfiguration.java
index c67b55bf4..34de36c09 100644
--- a/gnu/java/awt/peer/qt/QtScreenDeviceConfiguration.java
+++ b/gnu/java/awt/peer/qt/QtScreenDeviceConfiguration.java
@@ -47,7 +47,7 @@ import java.awt.image.VolatileImage;
import java.awt.geom.AffineTransform;
public class QtScreenDeviceConfiguration extends GraphicsConfiguration {
-
+
private QtScreenDevice owner;
private Rectangle bounds;
private double dpiX, dpiY;
@@ -67,21 +67,21 @@ public class QtScreenDeviceConfiguration extends GraphicsConfiguration {
switch( depth )
{
case 24:
- return new BufferedImage(width, height, BufferedImage.TYPE_3BYTE_BGR);
+ return new BufferedImage(width, height, BufferedImage.TYPE_3BYTE_BGR);
case 16:
- return new BufferedImage(width, height,
- BufferedImage.TYPE_USHORT_565_RGB);
+ return new BufferedImage(width, height,
+ BufferedImage.TYPE_USHORT_565_RGB);
case 8:
- return new BufferedImage(width, height, BufferedImage.TYPE_BYTE_INDEXED);
+ return new BufferedImage(width, height, BufferedImage.TYPE_BYTE_INDEXED);
default:
case 32:
- return new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
+ return new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
}
}
public BufferedImage createCompatibleImage(int width, int height, int transparency)
{
- // FIXME: Take the transpareny flag into account?
+ // FIXME: Take the transpareny flag into account?
// For now, ignore it and just use an alpha channel.
if(depth == 32)
return new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
@@ -92,9 +92,9 @@ public class QtScreenDeviceConfiguration extends GraphicsConfiguration {
{
return new QtVolatileImage( width, height );
}
-
- public VolatileImage createCompatibleVolatileImage(int width, int height,
- ImageCapabilities caps)
+
+ public VolatileImage createCompatibleVolatileImage(int width, int height,
+ ImageCapabilities caps)
{
return createCompatibleVolatileImage( width, height );
}
@@ -121,7 +121,7 @@ public class QtScreenDeviceConfiguration extends GraphicsConfiguration {
return new AffineTransform();
}
- public GraphicsDevice getDevice()
+ public GraphicsDevice getDevice()
{
return owner;
}
@@ -137,8 +137,8 @@ public class QtScreenDeviceConfiguration extends GraphicsConfiguration {
return nTrans;
}
- public VolatileImage createCompatibleVolatileImage(int width, int height,
- int transparency)
+ public VolatileImage createCompatibleVolatileImage(int width, int height,
+ int transparency)
{
return createCompatibleVolatileImage(width, height);
}
diff --git a/gnu/java/awt/peer/qt/QtScrollPanePeer.java b/gnu/java/awt/peer/qt/QtScrollPanePeer.java
index c3731cbd5..079d06de7 100644
--- a/gnu/java/awt/peer/qt/QtScrollPanePeer.java
+++ b/gnu/java/awt/peer/qt/QtScrollPanePeer.java
@@ -48,7 +48,7 @@ public class QtScrollPanePeer extends QtContainerPeer implements ScrollPanePeer
{
super( kit, owner );
}
-
+
protected native void init();
protected void setup()
@@ -73,9 +73,9 @@ public class QtScrollPanePeer extends QtContainerPeer implements ScrollPanePeer
{
// FIXME : more accurate?
return new Insets(5 + getHScrollbarHeight(), // Top
- 5 + getVScrollbarWidth(), // Left
- 5, // Bottom
- 5); // Right
+ 5 + getVScrollbarWidth(), // Left
+ 5, // Bottom
+ 5); // Right
}
public void setUnitIncrement(Adjustable item, int inc)
diff --git a/gnu/java/awt/peer/qt/QtScrollbarPeer.java b/gnu/java/awt/peer/qt/QtScrollbarPeer.java
index 838cca62d..694287131 100644
--- a/gnu/java/awt/peer/qt/QtScrollbarPeer.java
+++ b/gnu/java/awt/peer/qt/QtScrollbarPeer.java
@@ -65,13 +65,13 @@ public class QtScrollbarPeer extends QtComponentPeer implements ScrollbarPeer
private void fireMoved(int type, int value)
{
AdjustmentEvent e = new AdjustmentEvent((Scrollbar)owner,
- AdjustmentEvent.ADJUSTMENT_VALUE_CHANGED,
- type, value);
+ AdjustmentEvent.ADJUSTMENT_VALUE_CHANGED,
+ type, value);
QtToolkit.eventQueue.postEvent(e);
}
-
+
// ************ Public methods *********************
-
+
public native void setLineIncrement(int inc);
public native void setPageIncrement(int inc);
diff --git a/gnu/java/awt/peer/qt/QtTextAreaPeer.java b/gnu/java/awt/peer/qt/QtTextAreaPeer.java
index f37b9537c..a5aff58ef 100644
--- a/gnu/java/awt/peer/qt/QtTextAreaPeer.java
+++ b/gnu/java/awt/peer/qt/QtTextAreaPeer.java
@@ -69,7 +69,7 @@ public class QtTextAreaPeer extends QtComponentPeer implements TextAreaPeer
* Called back on a text edit.
*/
private void textChanged()
- {
+ {
TextEvent e = new TextEvent(owner, TextEvent.TEXT_VALUE_CHANGED);
QtToolkit.eventQueue.postEvent(e);
}
@@ -95,7 +95,7 @@ public class QtTextAreaPeer extends QtComponentPeer implements TextAreaPeer
public native int getIndexAtPoint(int x, int y);
// public void reshape(int x, int y,
-// int width, int height)
+// int width, int height)
// {
// if(width != 0 || height != 0)
// super.reshape(x, y, width, height);
@@ -177,4 +177,3 @@ public class QtTextAreaPeer extends QtComponentPeer implements TextAreaPeer
return null;
}
}
-
diff --git a/gnu/java/awt/peer/qt/QtTextFieldPeer.java b/gnu/java/awt/peer/qt/QtTextFieldPeer.java
index 0e3d5af78..f92943202 100644
--- a/gnu/java/awt/peer/qt/QtTextFieldPeer.java
+++ b/gnu/java/awt/peer/qt/QtTextFieldPeer.java
@@ -80,7 +80,7 @@ public class QtTextFieldPeer extends QtComponentPeer implements TextFieldPeer
// ************ Public methods *********************
- public long filterEvents(long e)
+ public long filterEvents(long e)
{
return e;
}
@@ -91,7 +91,7 @@ public class QtTextFieldPeer extends QtComponentPeer implements TextFieldPeer
{
return new Rectangle(0,0,0,0);
}
-
+
public int getIndexAtPoint(int x, int y)
{
// FIXME
@@ -157,4 +157,3 @@ public class QtTextFieldPeer extends QtComponentPeer implements TextFieldPeer
return null;
}
}
-
diff --git a/gnu/java/awt/peer/qt/QtToolkit.java b/gnu/java/awt/peer/qt/QtToolkit.java
index 4cea976ac..9f8a691c6 100644
--- a/gnu/java/awt/peer/qt/QtToolkit.java
+++ b/gnu/java/awt/peer/qt/QtToolkit.java
@@ -111,7 +111,7 @@ import java.util.Properties;
public class QtToolkit extends ClasspathToolkit
{
public static EventQueue eventQueue = null; // the native event queue
- public static QtRepaintThread repaintThread = null;
+ public static QtRepaintThread repaintThread = null;
public static MainQtThread guiThread = null;
public static QtGraphicsEnvironment graphicsEnv = null;
@@ -122,12 +122,12 @@ public class QtToolkit extends ClasspathToolkit
System.loadLibrary("qtpeer");
String theme = null;
- try
+ try
{
- String style = System.getProperty("qtoptions.style");
- if(style != null)
- theme = style;
- }
+ String style = System.getProperty("qtoptions.style");
+ if(style != null)
+ theme = style;
+ }
catch(SecurityException e)
{
}
@@ -136,12 +136,12 @@ public class QtToolkit extends ClasspathToolkit
}
boolean doublebuffer = true;
- try
+ try
{
- String style = System.getProperty("qtoptions.nodoublebuffer");
- if(style != null)
- doublebuffer = false;
- }
+ String style = System.getProperty("qtoptions.nodoublebuffer");
+ if(style != null)
+ doublebuffer = false;
+ }
catch(SecurityException e)
{
}
@@ -171,7 +171,7 @@ public class QtToolkit extends ClasspathToolkit
}
native String[] nativeFontFamilies();
-
+
native int numScreens();
native int defaultScreen();
@@ -213,7 +213,7 @@ public class QtToolkit extends ClasspathToolkit
return new QtMenuItemPeer( this, target );
}
- public DragSourceContextPeer createDragSourceContextPeer(DragGestureEvent dge)
+ public DragSourceContextPeer createDragSourceContextPeer(DragGestureEvent dge)
{
throw new RuntimeException("Not implemented");
}
@@ -232,16 +232,16 @@ public class QtToolkit extends ClasspathToolkit
{
return new QtImage( producer );
}
-
+
public Image createImage(byte[] imageData,
- int imageOffset,
- int imageLength)
+ int imageOffset,
+ int imageLength)
{
byte[] dataCopy = new byte[imageLength];
System.arraycopy(imageData, imageOffset, dataCopy, 0, imageLength);
return new QtImage( dataCopy );
}
-
+
public Image createImage(String filename)
{
return new QtImage( filename );
@@ -256,7 +256,7 @@ public class QtToolkit extends ClasspathToolkit
{
return new QtTextFieldPeer(this,target);
}
-
+
protected LabelPeer createLabel(Label target)
{
return new QtLabelPeer( this, target );
@@ -335,11 +335,11 @@ public class QtToolkit extends ClasspathToolkit
public ColorModel getColorModel()
{
- return new DirectColorModel(32,
- 0x00FF0000,
- 0x0000FF00,
- 0x000000FF,
- 0xFF000000);
+ return new DirectColorModel(32,
+ 0x00FF0000,
+ 0x0000FF00,
+ 0x000000FF,
+ 0xFF000000);
}
/**
@@ -347,11 +347,11 @@ public class QtToolkit extends ClasspathToolkit
*/
public String[] getFontList()
{
- String[] builtIn = new String[] { "Dialog",
- "DialogInput",
- "Monospaced",
- "Serif",
- "SansSerif" };
+ String[] builtIn = new String[] { "Dialog",
+ "DialogInput",
+ "Monospaced",
+ "Serif",
+ "SansSerif" };
String[] nat = nativeFontFamilies();
String[] allFonts = new String[ nat.length + 5 ];
System.arraycopy(builtIn, 0, allFonts, 0, 5);
@@ -365,7 +365,7 @@ public class QtToolkit extends ClasspathToolkit
}
protected FontPeer getFontPeer(String name,
- int style)
+ int style)
{
Map attrs = new HashMap ();
ClasspathFontPeer.copyStyleToAttrs(style, attrs);
@@ -384,14 +384,14 @@ public class QtToolkit extends ClasspathToolkit
}
public PrintJob getPrintJob(Frame frame,
- String jobtitle,
- Properties props)
+ String jobtitle,
+ Properties props)
{
SecurityManager sm;
sm = System.getSecurityManager();
if (sm != null)
sm.checkPrintJobAccess();
-
+
throw new RuntimeException("Not implemented");
}
@@ -412,8 +412,8 @@ public class QtToolkit extends ClasspathToolkit
public Map mapInputMethodHighlight(InputMethodHighlight highlight)
{
return null; // FIXME
- }
-
+ }
+
public boolean prepareImage(Image image, int w, int h, ImageObserver observer)
{
if(image instanceof QtImage)
@@ -431,7 +431,7 @@ public class QtToolkit extends ClasspathToolkit
}
public ClasspathFontPeer getClasspathFontPeer (String name, Map attrs)
- {
+ {
return new QtFontPeer (name, attrs);
}
diff --git a/gnu/java/awt/peer/qt/QtVolatileImage.java b/gnu/java/awt/peer/qt/QtVolatileImage.java
index c81bb2a09..a203de0d0 100644
--- a/gnu/java/awt/peer/qt/QtVolatileImage.java
+++ b/gnu/java/awt/peer/qt/QtVolatileImage.java
@@ -74,11 +74,11 @@ public class QtVolatileImage extends VolatileImage
/*
* The 32-bit AARRGGBB format the uses.
*/
- static ColorModel nativeModel = new DirectColorModel(32,
- 0x00FF0000,
- 0x0000FF00,
- 0x000000FF,
- 0xFF000000);
+ static ColorModel nativeModel = new DirectColorModel(32,
+ 0x00FF0000,
+ 0x0000FF00,
+ 0x000000FF,
+ 0xFF000000);
/**
* Clears the image to RGBA 0
@@ -111,7 +111,7 @@ public class QtVolatileImage extends VolatileImage
private native void freeImage();
/**
- * Blit a QImage
+ * Blit a QImage
*/
public native void blit(QtImage i);
public native void blit(QtImage i, int x, int y, int w, int h);
@@ -124,35 +124,35 @@ public class QtVolatileImage extends VolatileImage
/**
* Draws the image optionally composited.
*/
- private native void drawPixels (QtGraphics gc,
- int bg_red, int bg_green, int bg_blue,
- int x, int y,
- boolean composite);
+ private native void drawPixels (QtGraphics gc,
+ int bg_red, int bg_green, int bg_blue,
+ int x, int y,
+ boolean composite);
/**
* Draws the image, optionally scaled and composited.
*/
- private native void drawPixelsScaled (QtGraphics gc,
- int bg_red, int bg_green, int bg_blue,
- int x, int y, int width, int height,
- boolean composite);
+ private native void drawPixelsScaled (QtGraphics gc,
+ int bg_red, int bg_green, int bg_blue,
+ int x, int y, int width, int height,
+ boolean composite);
/**
* Draws the image transformed.
*/
private native void drawPixelsTransformed (QtGraphics gc, QMatrix transform);
-
+
/**
* Draws the image scaled flipped and optionally composited.
*/
- native void drawPixelsScaledFlipped (QtGraphics gc,
- int bg_red, int bg_green,
- int bg_blue,
- boolean flipX, boolean flipY,
- int srcX, int srcY,
- int srcWidth, int srcHeight,
- int dstX, int dstY,
- int dstWidth, int dstHeight,
- boolean composite);
+ native void drawPixelsScaledFlipped (QtGraphics gc,
+ int bg_red, int bg_green,
+ int bg_blue,
+ boolean flipX, boolean flipY,
+ int srcX, int srcY,
+ int srcWidth, int srcHeight,
+ int dstX, int dstY,
+ int dstWidth, int dstHeight,
+ boolean composite);
/**
* Constructs an empty QtVolatileImage.
@@ -169,8 +169,8 @@ public class QtVolatileImage extends VolatileImage
/**
* Constructs a scaled version of the src bitmap, using Qt
*/
- private QtVolatileImage (QtVolatileImage src, int width, int height,
- int hints)
+ private QtVolatileImage (QtVolatileImage src, int width, int height,
+ int hints)
{
this.width = width;
this.height = height;
@@ -190,7 +190,7 @@ public class QtVolatileImage extends VolatileImage
if( painters == null || painters.isEmpty() )
freeImage();
else
- killFlag = true; // can't destroy image yet.
+ killFlag = true; // can't destroy image yet.
// Do so when all painters are gone.
}
@@ -200,7 +200,7 @@ public class QtVolatileImage extends VolatileImage
{
return getWidth();
}
-
+
public int getHeight (ImageObserver observer)
{
return getHeight();
@@ -217,8 +217,8 @@ public class QtVolatileImage extends VolatileImage
*/
public ImageProducer getSource ()
{
- return new MemoryImageSource(width, height, nativeModel, getPixels(),
- 0, width);
+ return new MemoryImageSource(width, height, nativeModel, getPixels(),
+ 0, width);
}
void putPainter(QtImageGraphics g)
@@ -244,17 +244,17 @@ public class QtVolatileImage extends VolatileImage
putPainter( g );
return g;
}
-
+
/**
* Returns a scaled instance of this image.
*/
public Image getScaledInstance(int width,
- int height,
- int hints)
+ int height,
+ int hints)
{
if (width <= 0 || height <= 0)
throw new IllegalArgumentException("Width and height of scaled bitmap"+
- "must be >= 0");
+ "must be >= 0");
return new QtVolatileImage(this, width, height, hints);
}
@@ -280,7 +280,7 @@ public class QtVolatileImage extends VolatileImage
* Draws an image with eventual scaling/transforming.
*/
public boolean drawImage (QtGraphics g, QMatrix matrix,
- ImageObserver observer)
+ ImageObserver observer)
{
drawPixelsTransformed (g, matrix);
return true;
@@ -291,11 +291,11 @@ public class QtVolatileImage extends VolatileImage
* compositing with a background color.
*/
public boolean drawImage (QtGraphics g, int x, int y,
- Color bgcolor, ImageObserver observer)
+ Color bgcolor, ImageObserver observer)
{
if(bgcolor != null)
- drawPixels(g, bgcolor.getRed (), bgcolor.getGreen (),
- bgcolor.getBlue (), x, y, true);
+ drawPixels(g, bgcolor.getRed (), bgcolor.getGreen (),
+ bgcolor.getBlue (), x, y, true);
else
drawPixels(g, 0, 0, 0, x, y, false);
@@ -303,27 +303,27 @@ public class QtVolatileImage extends VolatileImage
}
/**
- * Draws an image to the QtGraphics context, at (x,y) scaled to
+ * Draws an image to the QtGraphics context, at (x,y) scaled to
* width and height, with optional compositing with a background color.
*/
public boolean drawImage (QtGraphics g, int x, int y, int width, int height,
- Color bgcolor, ImageObserver observer)
+ Color bgcolor, ImageObserver observer)
{
if(bgcolor != null)
- drawPixelsScaled(g, bgcolor.getRed (), bgcolor.getGreen (),
- bgcolor.getBlue (), x, y, width, height, true);
+ drawPixelsScaled(g, bgcolor.getRed (), bgcolor.getGreen (),
+ bgcolor.getBlue (), x, y, width, height, true);
else
drawPixelsScaled(g, 0, 0, 0, x, y, width, height, false);
-
+
return true;
}
/**
* Draws an image with eventual scaling/transforming.
*/
- public boolean drawImage (QtGraphics g, int dx1, int dy1, int dx2, int dy2,
- int sx1, int sy1, int sx2, int sy2,
- Color bgcolor, ImageObserver observer)
+ public boolean drawImage (QtGraphics g, int dx1, int dy1, int dx2, int dy2,
+ int sx1, int sy1, int sx2, int sy2,
+ Color bgcolor, ImageObserver observer)
{
boolean flipX = (dx1 > dx2)^(sx1 > sx2);
boolean flipY = (dy1 > dy2)^(sy1 > sy2);
@@ -336,53 +336,53 @@ public class QtVolatileImage extends VolatileImage
int dstX = (dx1 < dx2) ? dx1 : dx2;
int dstY = (dy1 < dy2) ? dy1 : dy2;
- // Clipping. This requires the dst to be scaled as well,
+ // Clipping. This requires the dst to be scaled as well,
if (srcWidth > width)
{
- dstWidth = (int)((double)dstWidth*((double)width/(double)srcWidth));
- srcWidth = width - srcX;
+ dstWidth = (int)((double)dstWidth*((double)width/(double)srcWidth));
+ srcWidth = width - srcX;
}
- if (srcHeight > height)
+ if (srcHeight > height)
{
- dstHeight = (int)((double)dstHeight*((double)height/(double)srcHeight));
- srcHeight = height - srcY;
+ dstHeight = (int)((double)dstHeight*((double)height/(double)srcHeight));
+ srcHeight = height - srcY;
}
if (srcWidth + srcX > width)
{
- dstWidth = (int)((double)dstWidth * (double)(width - srcX)/(double)srcWidth);
- srcWidth = width - srcX;
+ dstWidth = (int)((double)dstWidth * (double)(width - srcX)/(double)srcWidth);
+ srcWidth = width - srcX;
}
if (srcHeight + srcY > height)
{
- dstHeight = (int)((double)dstHeight * (double)(width - srcY)/(double)srcHeight);
- srcHeight = height - srcY;
+ dstHeight = (int)((double)dstHeight * (double)(width - srcY)/(double)srcHeight);
+ srcHeight = height - srcY;
}
if ( srcWidth <= 0 || srcHeight <= 0 || dstWidth <= 0 || dstHeight <= 0)
return true;
if(bgcolor != null)
- drawPixelsScaledFlipped (g, bgcolor.getRed (), bgcolor.getGreen (),
- bgcolor.getBlue (),
- flipX, flipY,
- srcX, srcY,
- srcWidth, srcHeight,
- dstX, dstY,
- dstWidth, dstHeight,
- true);
+ drawPixelsScaledFlipped (g, bgcolor.getRed (), bgcolor.getGreen (),
+ bgcolor.getBlue (),
+ flipX, flipY,
+ srcX, srcY,
+ srcWidth, srcHeight,
+ dstX, dstY,
+ dstWidth, dstHeight,
+ true);
else
drawPixelsScaledFlipped (g, 0, 0, 0, flipX, flipY,
- srcX, srcY, srcWidth, srcHeight,
- dstX, dstY, dstWidth, dstHeight,
- false);
+ srcX, srcY, srcWidth, srcHeight,
+ dstX, dstY, dstWidth, dstHeight,
+ false);
return true;
}
-
- public native void copyArea(int x, int y, int width, int height,
- int dx, int dy);
+
+ public native void copyArea(int x, int y, int width, int height,
+ int dx, int dy);
//******************** VolatileImage stuff ********************
@@ -402,10 +402,10 @@ public class QtVolatileImage extends VolatileImage
{
return new ImageCapabilities(false)
{
- public boolean isTrueVolatile()
- {
- return false;
- }
+ public boolean isTrueVolatile()
+ {
+ return false;
+ }
};
}
@@ -416,8 +416,8 @@ public class QtVolatileImage extends VolatileImage
public BufferedImage getSnapshot()
{
- BufferedImage bi = new BufferedImage(width, height,
- BufferedImage.TYPE_INT_ARGB_PRE);
+ BufferedImage bi = new BufferedImage(width, height,
+ BufferedImage.TYPE_INT_ARGB_PRE);
bi.setRGB( 0, 0, width, height, getPixels(), 0, width);
return bi;
}
diff --git a/gnu/java/awt/peer/qt/QtWindowPeer.java b/gnu/java/awt/peer/qt/QtWindowPeer.java
index e0a9e8c55..2dfe2ec5a 100644
--- a/gnu/java/awt/peer/qt/QtWindowPeer.java
+++ b/gnu/java/awt/peer/qt/QtWindowPeer.java
@@ -53,7 +53,7 @@ public class QtWindowPeer extends QtContainerPeer implements WindowPeer
{
super.setup();
}
-
+
// ************ Public methods *********************
public native void toBack();
@@ -68,7 +68,7 @@ public class QtWindowPeer extends QtContainerPeer implements WindowPeer
public void updateAlwaysOnTop()
{
// TODO Auto-generated method stub
-
+
}
public boolean requestWindowFocus()
diff --git a/gnu/java/awt/peer/swing/SwingButtonPeer.java b/gnu/java/awt/peer/swing/SwingButtonPeer.java
index 192d612ee..1a42fc953 100644
--- a/gnu/java/awt/peer/swing/SwingButtonPeer.java
+++ b/gnu/java/awt/peer/swing/SwingButtonPeer.java
@@ -185,7 +185,7 @@ public class SwingButtonPeer
par = button.getParent();
return par;
}
-
+
/**
* Handles focus events by forwarding it to
* <code>processFocusEvent()</code>.
@@ -232,7 +232,7 @@ public class SwingButtonPeer
for (int i = 0; i < l.length; ++i)
l[i].actionPerformed(ev);
}
-
+
}
/**
diff --git a/gnu/java/awt/peer/swing/SwingCheckboxPeer.java b/gnu/java/awt/peer/swing/SwingCheckboxPeer.java
index 03d6388e9..7080831a2 100755
--- a/gnu/java/awt/peer/swing/SwingCheckboxPeer.java
+++ b/gnu/java/awt/peer/swing/SwingCheckboxPeer.java
@@ -62,7 +62,7 @@ public class SwingCheckboxPeer extends SwingComponentPeer implements
/**
* A spezialized Swing checkbox used to paint the checkbox for the
- * AWT checkbox.
+ * AWT checkbox.
*/
private class SwingCheckbox
extends JCheckBox
@@ -211,7 +211,7 @@ public class SwingCheckboxPeer extends SwingComponentPeer implements
* Receives notification when an action was performend on the button.
*
* @param event the action event
- */
+ */
public void itemStateChanged(ItemEvent event)
{
awtCheckbox.setState(event.getStateChange()==ItemEvent.SELECTED);
@@ -224,7 +224,7 @@ public class SwingCheckboxPeer extends SwingComponentPeer implements
l[i].itemStateChanged(ev);
}
}
-
+
/**
* Creates a new SwingCheckboxPeer instance.
*/
diff --git a/gnu/java/awt/peer/swing/SwingComponent.java b/gnu/java/awt/peer/swing/SwingComponent.java
index d22f55d6f..ca42fb748 100644
--- a/gnu/java/awt/peer/swing/SwingComponent.java
+++ b/gnu/java/awt/peer/swing/SwingComponent.java
@@ -87,7 +87,7 @@ public interface SwingComponent
* @param ev the key event
*/
void handleKeyEvent(KeyEvent ev);
-
+
/**
* Handles a focus event. This is usually forwarded to
* {@link Component#processFocusEvent(FocusEvent)} of the swing
diff --git a/gnu/java/awt/peer/swing/SwingComponentPeer.java b/gnu/java/awt/peer/swing/SwingComponentPeer.java
index 71a7bac4d..8be95dcb7 100644
--- a/gnu/java/awt/peer/swing/SwingComponentPeer.java
+++ b/gnu/java/awt/peer/swing/SwingComponentPeer.java
@@ -195,7 +195,7 @@ public class SwingComponentPeer
public Image createImage(ImageProducer prod)
{
Image image = Toolkit.getDefaultToolkit().createImage(prod);
- return image;
+ return image;
}
/**
@@ -379,7 +379,7 @@ public class SwingComponentPeer
/**
* Handles the given event. This is called from
- * {@link Component#dispatchEvent(AWTEvent)} to give the peer a chance to
+ * {@link Component#dispatchEvent(AWTEvent)} to give the peer a chance to
* react to events for the component.
*
* @param e the event
@@ -458,7 +458,7 @@ public class SwingComponentPeer
/**
* Returns <code>true</code> if the component can receive keyboard input
* focus. This is called from {@link Component#isFocusTraversable()}.
- *
+ *
* This is implemented to return isFocusable() from the Swing component.
*
* @specnote Part of the earlier 1.1 API, replaced by isFocusable().
@@ -591,10 +591,10 @@ public class SwingComponentPeer
/**
* Requests that this component receives the focus. This is called from
* {@link Component#requestFocus()}.
- *
+ *
* This calls requestFocus() on the Swing component.
*
- * @specnote Part of the earlier 1.1 API, apparently replaced by argument
+ * @specnote Part of the earlier 1.1 API, apparently replaced by argument
* form of the same method.
*/
public void requestFocus()
@@ -762,7 +762,7 @@ public class SwingComponentPeer
swingComponent.getJComponent().setVisible(true);
}
- /**
+ /**
* Get the graphics configuration of the component. The color model
* of the component can be derived from the configuration.
*
@@ -845,7 +845,7 @@ public class SwingComponentPeer
* Returns true, if this component can handle wheel scrolling,
* <code>false</code> otherwise.
*
- * This is not yet implemented and returns <code>false</code>.
+ * This is not yet implemented and returns <code>false</code>.
*
* @return true, if this component can handle wheel scrolling,
* <code>false</code> otherwise
@@ -979,7 +979,7 @@ public class SwingComponentPeer
/**
* Reparent this component under another container.
- *
+ *
* @param parent
* @since 1.5
*/
@@ -1009,7 +1009,7 @@ public class SwingComponentPeer
/**
* Check if this component supports being reparented.
- *
+ *
* @return true if this component can be reparented,
* false otherwise.
* @since 1.5
@@ -1051,13 +1051,13 @@ public class SwingComponentPeer
} finally {
userGraphics.dispose();
}
-
+
}
/**
* Paints the actual 'heavyweight' swing component, if there is one
* associated to this peer.
- *
+ *
* @param g the graphics to paint the component with
*/
protected void peerPaintComponent(Graphics g)
@@ -1115,7 +1115,7 @@ public class SwingComponentPeer
swingComponent.handleFocusEvent(e);
}
-
+
/**
* Returns the AWT component for this peer.
*
diff --git a/gnu/java/awt/peer/swing/SwingContainerPeer.java b/gnu/java/awt/peer/swing/SwingContainerPeer.java
index 2d5d97ff1..ca3adc4c7 100644
--- a/gnu/java/awt/peer/swing/SwingContainerPeer.java
+++ b/gnu/java/awt/peer/swing/SwingContainerPeer.java
@@ -340,7 +340,7 @@ public class SwingContainerPeer
}
}
}
-
+
/**
* Handles key events on the component. This is usually forwarded to the
* SwingComponent's processKeyEvent() method.
@@ -352,12 +352,12 @@ public class SwingContainerPeer
Component owner = getFocusOwner();
if(owner != null)
owner.getPeer().handleEvent(e);
- else
+ else
super.handleKeyEvent(e);
}
private Component focusOwner = null;
-
+
private Component getFocusOwner()
{
if(focusOwner == null)
@@ -369,10 +369,10 @@ public class SwingContainerPeer
{
focusOwner = child;
break;
- }
+ }
}
}
return focusOwner;
}
-
+
}
diff --git a/gnu/java/awt/peer/swing/SwingLabelPeer.java b/gnu/java/awt/peer/swing/SwingLabelPeer.java
index 55c394ecb..5c979d613 100644
--- a/gnu/java/awt/peer/swing/SwingLabelPeer.java
+++ b/gnu/java/awt/peer/swing/SwingLabelPeer.java
@@ -62,7 +62,7 @@ public class SwingLabelPeer
{
/**
- * A spezialized Swing label used to paint the label for the AWT Label.
+ * A spezialized Swing label used to paint the label for the AWT Label.
*
* @author Roman Kennke (kennke@aicas.com)
*/
@@ -71,13 +71,13 @@ public class SwingLabelPeer
implements SwingComponent
{
Label label;
-
-
+
+
SwingLabel(Label label)
{
this.label = label;
}
-
+
/**
* Returns this label.
*
diff --git a/gnu/java/awt/peer/swing/SwingListPeer.java b/gnu/java/awt/peer/swing/SwingListPeer.java
index 22a6052bb..cf766fd4f 100644
--- a/gnu/java/awt/peer/swing/SwingListPeer.java
+++ b/gnu/java/awt/peer/swing/SwingListPeer.java
@@ -63,7 +63,7 @@ public class SwingListPeer
{
/**
- * A spezialized Swing scroller used to hold the list.
+ * A spezialized Swing scroller used to hold the list.
*
* @author Roman Kennke (kennke@aicas.com)
*/
@@ -139,7 +139,7 @@ public class SwingListPeer
processFocusEvent(ev);
}
-
+
/**
* Overridden so that this method returns the correct value even without a
* peer.
@@ -356,7 +356,7 @@ public class SwingListPeer
super.peerPaint(g, update);
jList.doLayout();
jList.list();
-
+
Rectangle r = getBounds();
g.setColor(Color.RED);
g.drawRect(r.x, r.y, r.width, r.height);
diff --git a/gnu/java/awt/peer/swing/SwingMenuItemPeer.java b/gnu/java/awt/peer/swing/SwingMenuItemPeer.java
index 8b9d47ec0..721b3349f 100644
--- a/gnu/java/awt/peer/swing/SwingMenuItemPeer.java
+++ b/gnu/java/awt/peer/swing/SwingMenuItemPeer.java
@@ -83,7 +83,7 @@ public class SwingMenuItemPeer
event.setSource(awtMenuItem);
Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(event);
}
-
+
}
/**
diff --git a/gnu/java/awt/peer/swing/SwingMenuPeer.java b/gnu/java/awt/peer/swing/SwingMenuPeer.java
index ecb54a524..afe20616d 100644
--- a/gnu/java/awt/peer/swing/SwingMenuPeer.java
+++ b/gnu/java/awt/peer/swing/SwingMenuPeer.java
@@ -140,7 +140,7 @@ public class SwingMenuPeer
{
MenuItem item = awtMenu.getItem(i);
item.addNotify();
- SwingMenuItemPeer peer = (SwingMenuItemPeer) item.getPeer();
+ SwingMenuItemPeer peer = (SwingMenuItemPeer) item.getPeer();
menu.add(peer.menuItem);
}
}
diff --git a/gnu/java/awt/peer/swing/SwingTextAreaPeer.java b/gnu/java/awt/peer/swing/SwingTextAreaPeer.java
index 5be82f695..d56e950ec 100644
--- a/gnu/java/awt/peer/swing/SwingTextAreaPeer.java
+++ b/gnu/java/awt/peer/swing/SwingTextAreaPeer.java
@@ -66,7 +66,7 @@ public class SwingTextAreaPeer
{
/**
- * A spezialized Swing scroller used to hold the textarea.
+ * A spezialized Swing scroller used to hold the textarea.
*
* @author Roman Kennke (kennke@aicas.com)
*/
@@ -112,7 +112,7 @@ public class SwingTextAreaPeer
else
{
ev.setSource(this);
- this.dispatchEvent(ev);
+ this.dispatchEvent(ev);
}
}
@@ -208,7 +208,7 @@ public class SwingTextAreaPeer
par = SwingTextAreaPeer.this.awtComponent.getParent();
return par;
}
-
+
public void requestFocus() {
SwingTextAreaPeer.this.requestFocus(awtComponent, false, true, 0);
}
@@ -311,7 +311,7 @@ public class SwingTextAreaPeer
true, 0);
}
}
-
+
/**
* The actual JTextArea.
*/
@@ -349,7 +349,7 @@ public class SwingTextAreaPeer
rows = 5;
textArea.setRows(rows);
}
-
+
jTextArea.setColumns(columns);
jTextArea.setRows(rows);
}
diff --git a/gnu/java/awt/peer/swing/SwingTextFieldPeer.java b/gnu/java/awt/peer/swing/SwingTextFieldPeer.java
index 28dc5f339..9750c9bf7 100644
--- a/gnu/java/awt/peer/swing/SwingTextFieldPeer.java
+++ b/gnu/java/awt/peer/swing/SwingTextFieldPeer.java
@@ -76,7 +76,7 @@ public class SwingTextFieldPeer
SwingTextField(TextField textField)
{
- this.textField = textField;
+ this.textField = textField;
}
/**
@@ -173,7 +173,7 @@ public class SwingTextFieldPeer
processFocusEvent(ev);
}
-
+
public Container getParent()
{
Container par = null;
@@ -186,7 +186,7 @@ public class SwingTextFieldPeer
{
return SwingTextFieldPeer.this.getGraphics();
}
-
+
public void requestFocus() {
SwingTextFieldPeer.this.requestFocus(awtComponent, false, true, 0);
}
diff --git a/gnu/java/awt/peer/x/GLGraphics.java b/gnu/java/awt/peer/x/GLGraphics.java
index dde5b9195..3cf3797ab 100644
--- a/gnu/java/awt/peer/x/GLGraphics.java
+++ b/gnu/java/awt/peer/x/GLGraphics.java
@@ -72,7 +72,7 @@ public class GLGraphics extends AbstractGraphics2D
public void setBackground(Color b)
{
super.setBackground(b);
-
+
gl.clearColor(b.getRed() / 255.F, b.getGreen() / 255.F,
b.getBlue() / 255.F, b.getAlpha() / 255.F);
}
@@ -128,7 +128,7 @@ public class GLGraphics extends AbstractGraphics2D
{
// FIXME: not sure it's correct
return new Rectangle(0, 0,
- gl.display.default_screen.width,
+ gl.display.default_screen.width,
gl.display.default_screen.height);
}
}
diff --git a/gnu/java/awt/peer/x/KeyboardMapping.java b/gnu/java/awt/peer/x/KeyboardMapping.java
index 8cda31d81..c982a30d5 100644
--- a/gnu/java/awt/peer/x/KeyboardMapping.java
+++ b/gnu/java/awt/peer/x/KeyboardMapping.java
@@ -54,7 +54,7 @@ final class KeyboardMapping
/**
* Maps X keycodes to AWT keycodes.
- *
+ *
* @param xInput the X input event
* @param xKeyCode the X keycode to map
* @param xMods the X modifiers
diff --git a/gnu/java/awt/peer/x/XEventPump.java b/gnu/java/awt/peer/x/XEventPump.java
index 379839196..8e80b97a3 100644
--- a/gnu/java/awt/peer/x/XEventPump.java
+++ b/gnu/java/awt/peer/x/XEventPump.java
@@ -178,7 +178,7 @@ public class XEventPump
{
target = awtWindow;
}
-
+
MouseEvent mp = new MouseEvent(target, MouseEvent.MOUSE_PRESSED,
System.currentTimeMillis(),
KeyboardMapping.mapModifiers(event.getState())
@@ -187,26 +187,26 @@ public class XEventPump
1, false, button);
Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(mp);
}
-
+
private void handleButtonRelease(ButtonRelease event)
{
Integer key = new Integer(event.getEventWindowID());
Window awtWindow = (Window) windows.get(key);
int button = event.detail();
-
+
// AWT cannot handle more than 3 buttons and expects 0 instead.
if (button >= gnu.x11.Input.BUTTON3)
button = 0;
drag = -1;
-
+
Component target =
findMouseEventTarget(awtWindow, event.getEventX(), event.getEventY());
if(target == null)
{
target = awtWindow;
}
-
+
MouseEvent mr = new MouseEvent(target, MouseEvent.MOUSE_RELEASED,
System.currentTimeMillis(),
KeyboardMapping.mapModifiers(event.getState())
@@ -215,15 +215,15 @@ public class XEventPump
1, false, button);
Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(mr);
}
-
-
+
+
private void handleMotionNotify(MotionNotify event)
{
Integer key = new Integer(event.getEventWindowID());
Window awtWindow = (Window) windows.get(key);
int button = event.detail();
-
+
// AWT cannot handle more than 3 buttons and expects 0 instead.
if (button >= gnu.x11.Input.BUTTON3)
button = 0;
@@ -250,26 +250,26 @@ public class XEventPump
}
Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(mm);
}
-
+
// FIME: refactor and make faster, maybe caching the event and handle
// and/or check timing (timing is generated for PropertyChange)?
private void handleExpose(Expose event)
{
Integer key = new Integer(event.window_id);
Window awtWindow = (Window) windows.get(key);
-
+
if (XToolkit.DEBUG)
System.err.println("expose request for window id: " + key);
-
+
Rectangle r = new Rectangle(event.x(), event.y(), event.width(),
event.height());
// We need to clear the background of the exposed rectangle.
assert awtWindow != null : "awtWindow == null for window ID: " + key;
-
+
Graphics g = awtWindow.getGraphics();
g.clearRect(r.x, r.y, r.width, r.height);
g.dispose();
-
+
XWindowPeer xwindow = (XWindowPeer) awtWindow.getPeer();
Insets i = xwindow.insets();
if (event.width() != awtWindow.getWidth() - i.left - i.right
@@ -279,75 +279,75 @@ public class XEventPump
int h = event.height();
int x = xwindow.xwindow.x;
int y = xwindow.xwindow.y;
-
+
if (XToolkit.DEBUG)
System.err.println("Setting size on AWT window: " + w
+ ", " + h + ", " + awtWindow.getWidth()
+ ", " + awtWindow.getHeight());
-
+
// new width and height
xwindow.xwindow.width = w;
xwindow.xwindow.height = h;
-
+
// reshape the window
ComponentReshapeEvent cre =
new ComponentReshapeEvent(awtWindow, x, y, w, h);
awtWindow.dispatchEvent(cre);
}
-
+
ComponentEvent ce =
new ComponentEvent(awtWindow, ComponentEvent.COMPONENT_RESIZED);
awtWindow.dispatchEvent(ce);
-
+
PaintEvent pev = new PaintEvent(awtWindow, PaintEvent.UPDATE, r);
Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(pev);
}
-
+
private void handleDestroyNotify(DestroyNotify destroyNotify)
{
if (XToolkit.DEBUG)
System.err.println("DestroyNotify event: " + destroyNotify);
-
+
Integer key = new Integer(destroyNotify.event_window_id);
Window awtWindow = (Window) windows.get(key);
-
+
AWTEvent event = new WindowEvent(awtWindow, WindowEvent.WINDOW_CLOSED);
Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(event);
}
-
+
private void handleClientMessage(ClientMessage clientMessage)
{
if (XToolkit.DEBUG)
System.err.println("ClientMessage event: " + clientMessage);
-
+
if (clientMessage.delete_window())
{
if (XToolkit.DEBUG)
System.err.println("ClientMessage is a delete_window event");
-
+
Integer key = new Integer(clientMessage.window_id);
Window awtWindow = (Window) windows.get(key);
-
+
AWTEvent event = new WindowEvent(awtWindow, WindowEvent.WINDOW_CLOSING);
Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(event);
}
}
-
+
private void handleEvent(Event xEvent)
{
if (XToolkit.DEBUG)
System.err.println("fetched event: " + xEvent);
-
+
switch (xEvent.code() & 0x7f)
{
case ButtonPress.CODE:
this.handleButtonPress((ButtonPress) xEvent);
break;
case ButtonRelease.CODE:
- this.handleButtonRelease((ButtonRelease) xEvent);
+ this.handleButtonRelease((ButtonRelease) xEvent);
break;
case MotionNotify.CODE:
- this.handleMotionNotify((MotionNotify) xEvent);
+ this.handleMotionNotify((MotionNotify) xEvent);
break;
case Expose.CODE:
this.handleExpose((Expose) xEvent);
@@ -410,7 +410,7 @@ public class XEventPump
keyChar);
Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(ke);
}
-
+
}
else
{
@@ -438,9 +438,9 @@ public class XEventPump
return MouseEvent.BUTTON3_DOWN_MASK | MouseEvent.BUTTON3_MASK;
}
- return 0;
+ return 0;
}
-
+
/**
* Finds the heavyweight mouse event target.
*
diff --git a/gnu/java/awt/peer/x/XFontPeer.java b/gnu/java/awt/peer/x/XFontPeer.java
index 4372c965f..190209014 100644
--- a/gnu/java/awt/peer/x/XFontPeer.java
+++ b/gnu/java/awt/peer/x/XFontPeer.java
@@ -98,12 +98,12 @@ public class XFontPeer
{
/**
* The ascent of the font.
- */
+ */
int ascent;
/**
* The descent of the font.
- */
+ */
int descent;
/**
@@ -253,7 +253,7 @@ public class XFontPeer
*
* @param c the char buffer holding the string
* @param offset the starting offset of the string in the buffer
- * @param length the number of characters in the string buffer
+ * @param length the number of characters in the string buffer
*
* @return the overall width of the specified string
*/
@@ -393,7 +393,7 @@ public class XFontPeer
{
return 1.F; // TODO: Provided by X??
}
-
+
}
/**
@@ -410,7 +410,7 @@ public class XFontPeer
/**
* The font metrics for this font.
*/
- XFontMetrics fontMetrics;
+ XFontMetrics fontMetrics;
/**
* Creates a new XFontPeer for the specified font name, style and size.
@@ -694,7 +694,7 @@ public class XFontPeer
case Font.PLAIN:
default:
key.append("plain");
-
+
}
String protoType = fontProperties.getProperty(key.toString());
diff --git a/gnu/java/awt/peer/x/XFramePeer.java b/gnu/java/awt/peer/x/XFramePeer.java
index a355c68b3..cde67778d 100644
--- a/gnu/java/awt/peer/x/XFramePeer.java
+++ b/gnu/java/awt/peer/x/XFramePeer.java
@@ -107,10 +107,10 @@ public class XFramePeer
// TODO: Implement this.
throw new UnsupportedOperationException("Not yet implemented.");
}
-
+
/**
* Check if this frame peer supports being restacked.
- *
+ *
* @return true if this frame peer can be restacked,
* false otherwise
* @since 1.5
@@ -120,10 +120,10 @@ public class XFramePeer
// TODO: Implement this.
throw new UnsupportedOperationException("Not yet implemented.");
}
-
+
/**
* Sets the bounds of this frame peer.
- *
+ *
* @param x the new x co-ordinate
* @param y the new y co-ordinate
* @param width the new width
diff --git a/gnu/java/awt/peer/x/XGraphics2D.java b/gnu/java/awt/peer/x/XGraphics2D.java
index 0339a424d..1fce2dcf7 100644
--- a/gnu/java/awt/peer/x/XGraphics2D.java
+++ b/gnu/java/awt/peer/x/XGraphics2D.java
@@ -325,7 +325,7 @@ public class XGraphics2D
colorMap.put(c, col);
}*/
//xgc.set_foreground(col);
-
+
xgc.set_foreground(c.getRGB());
foreground = c;
}
@@ -394,19 +394,19 @@ public class XGraphics2D
xdrawable.put_image(xgc, zpixmap, x, y);
imageCache.put(image, zpixmap);
} else {
-
+
// TODO optimize reusing the rectangles
Rectangle source =
new Rectangle(0, 0, xdrawable.width, xdrawable.height);
Rectangle target = new Rectangle(x, y, w, h);
-
- Rectangle destination = source.intersection(target);
-
+
+ Rectangle destination = source.intersection(target);
+
x = destination.x;
y = destination.y;
w = destination.width;
h = destination.height;
-
+
ZPixmap zpixmap =
(ZPixmap) xdrawable.image(x, y, w, h,
0xffffffff,
@@ -506,4 +506,3 @@ public class XGraphics2D
}
}
-
diff --git a/gnu/java/awt/peer/x/XGraphicsConfiguration.java b/gnu/java/awt/peer/x/XGraphicsConfiguration.java
index becb92a7d..aed11a3af 100644
--- a/gnu/java/awt/peer/x/XGraphicsConfiguration.java
+++ b/gnu/java/awt/peer/x/XGraphicsConfiguration.java
@@ -127,7 +127,7 @@ public class XGraphicsConfiguration
throw new UnsupportedOperationException("Not yet implemented");
default:
throw new IllegalArgumentException("Unknown transparency type: "
- + transparency);
+ + transparency);
}
return im;
}
@@ -159,8 +159,8 @@ public class XGraphicsConfiguration
{
Display d = device.getDisplay();
Screen screen = d.default_screen;
-
- return new Rectangle(0, 0, screen.width, screen.height);
+
+ return new Rectangle(0, 0, screen.width, screen.height);
}
/**
diff --git a/gnu/java/awt/peer/x/XGraphicsDevice.java b/gnu/java/awt/peer/x/XGraphicsDevice.java
index ca37f3adb..6b65e14ed 100644
--- a/gnu/java/awt/peer/x/XGraphicsDevice.java
+++ b/gnu/java/awt/peer/x/XGraphicsDevice.java
@@ -136,7 +136,7 @@ public class XGraphicsDevice
}
catch (EscherServerConnectionException e)
{
- throw new RuntimeException(e.getCause());
+ throw new RuntimeException(e.getCause());
}
}
}
@@ -155,7 +155,7 @@ public class XGraphicsDevice
throw new RuntimeException(e.getCause());
}
}
-
+
eventPump = new XEventPump(display);
}
return display;
@@ -167,7 +167,7 @@ public class XGraphicsDevice
}
/**
- * Tries to load the LocalSocket class and initiate a connection to the
+ * Tries to load the LocalSocket class and initiate a connection to the
* local X server.
*/
private Socket createLocalSocket()
diff --git a/gnu/java/awt/peer/x/XGraphicsEnvironment.java b/gnu/java/awt/peer/x/XGraphicsEnvironment.java
index 8ec8d57bb..7b1d82fee 100644
--- a/gnu/java/awt/peer/x/XGraphicsEnvironment.java
+++ b/gnu/java/awt/peer/x/XGraphicsEnvironment.java
@@ -130,7 +130,7 @@ public class XGraphicsEnvironment
defaultDevice = initDefaultDevice();
devices = new XGraphicsDevice[]{ defaultDevice };
}
-
+
}
/**
diff --git a/gnu/java/awt/peer/x/XImage.java b/gnu/java/awt/peer/x/XImage.java
index fa94d00c1..f3df89f4d 100644
--- a/gnu/java/awt/peer/x/XImage.java
+++ b/gnu/java/awt/peer/x/XImage.java
@@ -81,7 +81,7 @@ public class XImage
public ImageProducer getSource()
{
- return new XImageProducer();
+ return new XImageProducer();
}
/**
@@ -113,11 +113,11 @@ public class XImage
{
pixmap.free();
}
-
+
protected class XImageProducer implements ImageProducer
{
private Vector<ImageConsumer> consumers = new Vector<ImageConsumer>();
-
+
public void addConsumer(ImageConsumer ic)
{
if (ic != null && !isConsumer(ic))
@@ -148,30 +148,30 @@ public class XImage
{
int width = XImage.this.getWidth(null);
int height = XImage.this.getHeight(null);
-
+
XGraphics2D graphics = (XGraphics2D) getGraphics();
ColorModel model = graphics.getColorModel();
graphics.dispose();
-
+
ZPixmap zpixmap = (ZPixmap)
XImage.this.pixmap.image(0, 0, width, height,
0xffffffff,
gnu.x11.image.Image.Format.ZPIXMAP);
-
+
int size = zpixmap.get_data_length();
System.out.println("size: " + size + ", w = " + width + ", h = " + height);
-
+
int [] pixel = new int[size];
for (int i = 0; i < size; i++)
pixel[i] = zpixmap.get_data_element(i);
consumer.setHints(ImageConsumer.SINGLEPASS);
-
+
consumer.setDimensions(width, height);
consumer.setPixels(0, 0, width, height, model, pixel, 0, width);
consumer.imageComplete(ImageConsumer.STATICIMAGEDONE);
}
-
+
System.out.println("done!");
}
}
diff --git a/gnu/java/awt/peer/x/XToolkit.java b/gnu/java/awt/peer/x/XToolkit.java
index af12574a1..a3eeb0f53 100644
--- a/gnu/java/awt/peer/x/XToolkit.java
+++ b/gnu/java/awt/peer/x/XToolkit.java
@@ -239,23 +239,23 @@ public class XToolkit
protected ButtonPeer createButton(Button target)
{
checkHeadLess("No ButtonPeer can be created in an headless" +
- "graphics environment.");
-
+ "graphics environment.");
+
return new SwingButtonPeer(target);
}
protected TextFieldPeer createTextField(TextField target)
{
checkHeadLess("No TextFieldPeer can be created in an headless " +
- "graphics environment.");
-
+ "graphics environment.");
+
return new SwingTextFieldPeer(target);
}
protected LabelPeer createLabel(Label target)
{
checkHeadLess("No LabelPeer can be created in an headless graphics " +
- "environment.");
+ "environment.");
return new SwingLabelPeer(target);
}
@@ -269,7 +269,7 @@ public class XToolkit
{
checkHeadLess("No CheckboxPeer can be created in an headless graphics " +
"environment.");
-
+
return new SwingCheckboxPeer(target);
}
@@ -288,8 +288,8 @@ public class XToolkit
protected TextAreaPeer createTextArea(TextArea target)
{
checkHeadLess("No TextAreaPeer can be created in an headless graphics " +
- "environment.");
-
+ "environment.");
+
return new SwingTextAreaPeer(target);
}
@@ -518,7 +518,7 @@ public class XToolkit
/**
* Creates an image that is returned when calls to createImage() yields an
* error.
- *
+ *
* @return an image that is returned when calls to createImage() yields an
* error
*/
@@ -660,7 +660,7 @@ public class XToolkit
{
if(message == null)
message = "This method cannot be called in headless mode.";
-
+
throw new HeadlessException(message);
}
}
diff --git a/gnu/java/awt/peer/x/XWindowPeer.java b/gnu/java/awt/peer/x/XWindowPeer.java
index 930247da5..541eb74fa 100644
--- a/gnu/java/awt/peer/x/XWindowPeer.java
+++ b/gnu/java/awt/peer/x/XWindowPeer.java
@@ -80,7 +80,7 @@ public class XWindowPeer
| Event.KEY_RELEASE_MASK
//| Event.VISIBILITY_CHANGE_MASK //
;
-
+
/**
* The X window.
*/
@@ -105,10 +105,10 @@ public class XWindowPeer
int h = Math.max(window.getHeight(), 1);
xwindow = new Window(dev.getDisplay().default_root, x, y, w, h, 0, atts);
xwindow.select_input(standardSelect);
-
+
dev.getEventPump().registerWindow(xwindow, window);
xwindow.set_wm_delete_window();
-
+
boolean undecorated;
if (awtComponent instanceof Frame)
{
@@ -178,11 +178,11 @@ public class XWindowPeer
*/
public Graphics getGraphics()
{
- XGraphics2D xg2d = new XGraphics2D(xwindow);
- xg2d.setColor(awtComponent.getForeground());
- xg2d.setBackground(awtComponent.getBackground());
- xg2d.setFont(awtComponent.getFont());
- return xg2d;
+ XGraphics2D xg2d = new XGraphics2D(xwindow);
+ xg2d.setColor(awtComponent.getForeground());
+ xg2d.setBackground(awtComponent.getBackground());
+ xg2d.setFont(awtComponent.getFont());
+ return xg2d;
}
public Image createImage(int w, int h)
@@ -226,7 +226,7 @@ public class XWindowPeer
// // Reset input selection.
// atts.set_override_redirect(false);
// xwindow.change_attributes(atts);
-
+
// Determine the frame insets.
Atom atom = (Atom) Atom.intern(dev.getDisplay(), "_NET_FRAME_EXTENTS");
Window.Property p = xwindow.get_property(false, atom, Atom.CARDINAL, 0,
@@ -295,7 +295,7 @@ public class XWindowPeer
XGraphicsDevice dev = XToolkit.getDefaultDevice();
dev.getEventPump().unregisterWindow(xwindow);
}
-
+
public Window getXwindow()
{
return xwindow;
diff --git a/gnu/java/awt/print/JavaPrinterGraphics.java b/gnu/java/awt/print/JavaPrinterGraphics.java
index b86eea50b..64d197cd0 100644
--- a/gnu/java/awt/print/JavaPrinterGraphics.java
+++ b/gnu/java/awt/print/JavaPrinterGraphics.java
@@ -107,47 +107,47 @@ public class JavaPrinterGraphics extends Graphics implements PrinterGraphics
* If Pageable is non-null, it will print that, otherwise it will use
* the supplied printable and pageFormat.
*/
- public SpooledDocument spoolPostScript(Printable printable,
- PageFormat pageFormat,
- Pageable pageable)
+ public SpooledDocument spoolPostScript(Printable printable,
+ PageFormat pageFormat,
+ Pageable pageable)
throws PrinterException
{
- try
+ try
{
- // spool to a temporary file
- File temp = File.createTempFile("cpspool", ".ps");
- temp.deleteOnExit();
-
- PrintWriter out = new PrintWriter
- (new BufferedWriter
- (new OutputStreamWriter
- (new FileOutputStream(temp), "ISO8859_1"), 1000000));
-
- writePSHeader(out);
-
- if(pageable != null)
- {
- for(int index = 0; index < pageable.getNumberOfPages(); index++)
- spoolPage(out, pageable.getPrintable(index),
- pageable.getPageFormat(index), index);
- }
- else
- {
- int index = 0;
- while(spoolPage(out, printable, pageFormat, index++) ==
- Printable.PAGE_EXISTS)
+ // spool to a temporary file
+ File temp = File.createTempFile("cpspool", ".ps");
+ temp.deleteOnExit();
+
+ PrintWriter out = new PrintWriter
+ (new BufferedWriter
+ (new OutputStreamWriter
+ (new FileOutputStream(temp), "ISO8859_1"), 1000000));
+
+ writePSHeader(out);
+
+ if(pageable != null)
+ {
+ for(int index = 0; index < pageable.getNumberOfPages(); index++)
+ spoolPage(out, pageable.getPrintable(index),
+ pageable.getPageFormat(index), index);
+ }
+ else
+ {
+ int index = 0;
+ while(spoolPage(out, printable, pageFormat, index++) ==
+ Printable.PAGE_EXISTS)
;
- }
- out.println("%%Trailer");
- out.println("%%EOF");
- out.close();
- return new SpooledDocument( temp );
- }
- catch (IOException e)
+ }
+ out.println("%%Trailer");
+ out.println("%%EOF");
+ out.close();
+ return new SpooledDocument( temp );
+ }
+ catch (IOException e)
{
- PrinterException pe = new PrinterException();
- pe.initCause(e);
- throw pe;
+ PrinterException pe = new PrinterException();
+ pe.initCause(e);
+ throw pe;
}
}
@@ -156,9 +156,9 @@ public class JavaPrinterGraphics extends Graphics implements PrinterGraphics
* PAGE_EXISTS if it was.
*/
public int spoolPage(PrintWriter out,
- Printable printable,
- PageFormat pageFormat,
- int index) throws IOException, PrinterException
+ Printable printable,
+ PageFormat pageFormat,
+ int index) throws IOException, PrinterException
{
initImage( pageFormat );
if(printable.print(this, pageFormat, index) == Printable.NO_SUCH_PAGE)
@@ -168,22 +168,22 @@ public class JavaPrinterGraphics extends Graphics implements PrinterGraphics
writePage( out, pageFormat );
return Printable.PAGE_EXISTS;
}
-
+
private void initImage(PageFormat pageFormat)
{
// Create a really big image and draw to that.
xSize = (int)(DPI*pageFormat.getWidth()/72.0);
ySize = (int)(DPI*pageFormat.getHeight()/72.0);
-
+
// Swap X and Y sizes if it's a Landscape page.
if( pageFormat.getOrientation() != PageFormat.PORTRAIT )
{
- int t = xSize;
- xSize = ySize;
- ySize = t;
+ int t = xSize;
+ xSize = ySize;
+ ySize = t;
}
- // FIXME: This should at least be BufferedImage.
+ // FIXME: This should at least be BufferedImage.
// Fix once we have a working B.I.
// Graphics2D should also be supported of course.
image = CairoSurface.getBufferedImage(xSize, ySize);
@@ -196,7 +196,7 @@ public class JavaPrinterGraphics extends Graphics implements PrinterGraphics
private void writePSHeader(PrintWriter out)
{
- out.println("%!PS-Adobe-3.0");
+ out.println("%!PS-Adobe-3.0");
out.println("%%Title: "+printerJob.getJobName());
out.println("%%Creator: GNU Classpath ");
out.println("%%DocumentData: Clean8Bit");
@@ -204,19 +204,19 @@ public class JavaPrinterGraphics extends Graphics implements PrinterGraphics
out.println("%%DocumentNeededResources: font Times-Roman Helvetica Courier");
// out.println("%%Pages: "+); // FIXME # pages.
out.println("%%EndComments");
-
+
out.println("%%BeginProlog");
out.println("%%EndProlog");
out.println("%%BeginSetup");
-
+
// FIXME: Paper name
// E.g. "A4" "Letter"
// out.println("%%BeginFeature: *PageSize A4");
-
+
out.println("%%EndFeature");
out.println("%%EndSetup");
-
+
// out.println("%%Page: 1 1");
}
@@ -232,14 +232,14 @@ public class JavaPrinterGraphics extends Graphics implements PrinterGraphics
out.println( "%%Orientation: Portrait" );
else
{
- out.println( "%%Orientation: Landscape" );
- double t = pWidth;
- pWidth = pHeight;
- pHeight = t;
+ out.println( "%%Orientation: Landscape" );
+ double t = pWidth;
+ pWidth = pHeight;
+ pHeight = t;
}
-
+
out.println("gsave % first save");
-
+
// 595x842; 612x792 respectively
out.println("<< /PageSize [" +pWidth + " "+pHeight+ "] >> setpagedevice");
@@ -247,8 +247,8 @@ public class JavaPrinterGraphics extends Graphics implements PrinterGraphics
AffineTransform pageTransform = new AffineTransform();
if( pageFormat.getOrientation() == PageFormat.REVERSE_LANDSCAPE )
{
- pageTransform.translate(pWidth, pHeight);
- pageTransform.scale(-1.0, -1.0);
+ pageTransform.translate(pWidth, pHeight);
+ pageTransform.scale(-1.0, -1.0);
}
concatCTM(out, pageTransform);
out.println("%%EndPageSetup");
@@ -257,7 +257,7 @@ public class JavaPrinterGraphics extends Graphics implements PrinterGraphics
// Draw the image
- out.println(xSize+" "+ySize+" 8 [1 0 0 -1 0 "+ySize+" ]");
+ out.println(xSize+" "+ySize+" 8 [1 0 0 -1 0 "+ySize+" ]");
out.println("{currentfile 3 string readhexstring pop} bind");
out.println("false 3 colorimage");
int[] pixels = new int[xSize * ySize];
@@ -272,19 +272,19 @@ public class JavaPrinterGraphics extends Graphics implements PrinterGraphics
int n = 0;
for (int j = 0; j < ySize; j++) {
for (int i = 0; i < xSize; i++) {
- out.print( colorTripleHex(pixels[j * xSize + i]) );
- if(((++n)%11) == 0) out.println();
+ out.print( colorTripleHex(pixels[j * xSize + i]) );
+ if(((++n)%11) == 0) out.println();
}
}
-
+
out.println();
out.println("%%EOF");
out.println("grestore");
out.println("showpage");
}
-
+
/**
- * Get a nonsperated hex RGB triple, e.g. FFFFFF = white
+ * Get a nonsperated hex RGB triple, e.g. FFFFFF = white
*/
private String colorTripleHex(int num){
String s = "";
@@ -292,10 +292,10 @@ public class JavaPrinterGraphics extends Graphics implements PrinterGraphics
try {
s = Integer.toHexString( ( num & 0x00FFFFFF ) );
if( s.length() < 6 )
- {
- s = "000000"+s;
- return s.substring(s.length()-6);
- }
+ {
+ s = "000000"+s;
+ return s.substring(s.length()-6);
+ }
} catch (Exception e){
s = "FFFFFF";
}
@@ -306,7 +306,7 @@ public class JavaPrinterGraphics extends Graphics implements PrinterGraphics
private void concatCTM(PrintWriter out, AffineTransform Tx){
double[] matrixElements = new double[6];
Tx.getMatrix(matrixElements);
-
+
out.print("[ ");
for(int i=0;i<6;i++)
out.print(matrixElements[i]+" ");
@@ -349,14 +349,14 @@ public class JavaPrinterGraphics extends Graphics implements PrinterGraphics
{
}
- public void drawArc(int x, int y, int width, int height, int startAngle,
- int arcAngle)
+ public void drawArc(int x, int y, int width, int height, int startAngle,
+ int arcAngle)
{
g.drawArc(x, y, width, height, startAngle, arcAngle);
}
- public boolean drawImage(Image img, int x, int y, Color bgcolor,
- ImageObserver observer)
+ public boolean drawImage(Image img, int x, int y, Color bgcolor,
+ ImageObserver observer)
{
return g.drawImage(img, x, y, bgcolor, observer);
}
@@ -366,31 +366,31 @@ public class JavaPrinterGraphics extends Graphics implements PrinterGraphics
return g.drawImage(img, x, y, observer);
}
- public boolean drawImage(Image img, int x, int y, int width, int height,
- Color bgcolor, ImageObserver observer)
+ public boolean drawImage(Image img, int x, int y, int width, int height,
+ Color bgcolor, ImageObserver observer)
{
return g.drawImage(img, x, y, width, height, bgcolor, observer);
}
- public boolean drawImage(Image img, int x, int y, int width, int height,
- ImageObserver observer)
+ public boolean drawImage(Image img, int x, int y, int width, int height,
+ ImageObserver observer)
{
return g.drawImage(img, x, y, width, height, observer);
}
- public boolean drawImage(Image img, int dx1, int dy1, int dx2, int dy2,
- int sx1, int sy1, int sx2, int sy2, Color bgcolor,
- ImageObserver observer)
+ public boolean drawImage(Image img, int dx1, int dy1, int dx2, int dy2,
+ int sx1, int sy1, int sx2, int sy2, Color bgcolor,
+ ImageObserver observer)
{
- return g.drawImage(img, dx1, dy1, dx2, dy2,
- sx1, sy1, sx2, sy2, bgcolor, observer);
+ return g.drawImage(img, dx1, dy1, dx2, dy2,
+ sx1, sy1, sx2, sy2, bgcolor, observer);
}
- public boolean drawImage(Image img, int dx1, int dy1, int dx2, int dy2,
- int sx1, int sy1, int sx2, int sy2, ImageObserver observer)
+ public boolean drawImage(Image img, int dx1, int dy1, int dx2, int dy2,
+ int sx1, int sy1, int sx2, int sy2, ImageObserver observer)
{
- return g.drawImage(img, dx1, dy1, dx2, dy2,
- sx1, sy1, sx2, sy2, observer);
+ return g.drawImage(img, dx1, dy1, dx2, dy2,
+ sx1, sy1, sx2, sy2, observer);
}
public void drawLine(int x1, int y1, int x2, int y2)
@@ -413,8 +413,8 @@ public class JavaPrinterGraphics extends Graphics implements PrinterGraphics
g.drawPolyline(xPoints, yPoints, nPoints);
}
- public void drawRoundRect(int x, int y, int width, int height,
- int arcWidth, int arcHeight)
+ public void drawRoundRect(int x, int y, int width, int height,
+ int arcWidth, int arcHeight)
{
g.drawRoundRect(x, y, width, height, arcWidth, arcHeight);
}
@@ -429,8 +429,8 @@ public class JavaPrinterGraphics extends Graphics implements PrinterGraphics
g.drawString(str, x, y);
}
- public void fillArc(int x, int y, int width, int height,
- int startAngle, int arcAngle)
+ public void fillArc(int x, int y, int width, int height,
+ int startAngle, int arcAngle)
{
g.fillArc(x, y, width, height, startAngle, arcAngle);
}
@@ -450,8 +450,8 @@ public class JavaPrinterGraphics extends Graphics implements PrinterGraphics
g.fillRect(x, y, width, height);
}
- public void fillRoundRect(int x, int y, int width, int height,
- int arcWidth, int arcHeight)
+ public void fillRoundRect(int x, int y, int width, int height,
+ int arcWidth, int arcHeight)
{
g.fillRoundRect(x, y, width, height, arcWidth, arcHeight);
}
@@ -516,4 +516,3 @@ public class JavaPrinterGraphics extends Graphics implements PrinterGraphics
g.translate(x, y);
}
}
-
diff --git a/gnu/java/awt/print/JavaPrinterJob.java b/gnu/java/awt/print/JavaPrinterJob.java
index adeeba04a..295d231cb 100644
--- a/gnu/java/awt/print/JavaPrinterJob.java
+++ b/gnu/java/awt/print/JavaPrinterJob.java
@@ -113,15 +113,15 @@ public class JavaPrinterJob extends PrinterJob
{
// lookup all services without any constraints
services = PrintServiceLookup.lookupPrintServices
- (DocFlavor.INPUT_STREAM.POSTSCRIPT, null);
+ (DocFlavor.INPUT_STREAM.POSTSCRIPT, null);
}
private static final Class copyClass = (new Copies(1)).getClass();
private static final Class jobNameClass = (new JobName("", null)).getClass();
private static final Class userNameClass = (new RequestingUserName("", null)).getClass();
-
+
/**
- * Initializes a new instance of <code>PrinterJob</code>.
+ * Initializes a new instance of <code>PrinterJob</code>.
*/
public JavaPrinterJob()
{
@@ -143,7 +143,7 @@ public class JavaPrinterJob extends PrinterJob
else if( orientation.equals(OrientationRequested.LANDSCAPE) )
pageFormat.setOrientation(PageFormat.LANDSCAPE);
else if( orientation.equals(OrientationRequested.REVERSE_LANDSCAPE) )
- pageFormat.setOrientation(PageFormat.REVERSE_LANDSCAPE);
+ pageFormat.setOrientation(PageFormat.REVERSE_LANDSCAPE);
}
/**
@@ -203,11 +203,11 @@ public class JavaPrinterJob extends PrinterJob
{
try
{
- if(printJob != null && (printJob instanceof CancelablePrintJob))
- {
- ((CancelablePrintJob)printJob).cancel();
- cancelled = true;
- }
+ if(printJob != null && (printJob instanceof CancelablePrintJob))
+ {
+ ((CancelablePrintJob)printJob).cancel();
+ cancelled = true;
+ }
}
catch(PrintException pe)
{
@@ -261,20 +261,20 @@ public class JavaPrinterJob extends PrinterJob
return;
PostScriptGraphics2D pg = new PostScriptGraphics2D( this );
- SpooledDocument doc = pg.spoolPostScript( printable, pageFormat,
- pageable );
+ SpooledDocument doc = pg.spoolPostScript( printable, pageFormat,
+ pageable );
cancelled = false;
printJob = printer.createPrintJob();
try
{
- printJob.print(doc, attributes);
+ printJob.print(doc, attributes);
}
- catch (PrintException pe)
+ catch (PrintException pe)
{
- PrinterException p = new PrinterException();
- p.initCause(pe);
- throw p;
+ PrinterException p = new PrinterException();
+ p.initCause(pe);
+ throw p;
}
// no printjob active.
printJob = null;
@@ -313,22 +313,22 @@ public class JavaPrinterJob extends PrinterJob
throws HeadlessException
{
PrintService chosenPrinter = ServiceUI.printDialog
- (null, 50, 50, services, null,
+ (null, 50, 50, services, null,
DocFlavor.INPUT_STREAM.POSTSCRIPT, attributes);
getPageAttributes();
if( chosenPrinter != null )
{
- try
- {
- setPrintService( chosenPrinter );
- }
- catch(PrinterException pe)
- {
- // Should not happen.
- }
- return true;
+ try
+ {
+ setPrintService( chosenPrinter );
+ }
+ catch(PrinterException pe)
+ {
+ // Should not happen.
+ }
+ return true;
}
return false;
}
diff --git a/gnu/java/awt/print/PostScriptGraphics2D.java b/gnu/java/awt/print/PostScriptGraphics2D.java
index 01894e5a4..10fc25c2f 100644
--- a/gnu/java/awt/print/PostScriptGraphics2D.java
+++ b/gnu/java/awt/print/PostScriptGraphics2D.java
@@ -126,7 +126,7 @@ class PostScriptGraphics2D extends Graphics2D
private double Y = pageY;
private boolean gradientOn = false;
- /**
+ /**
* Constructor
*
*/
@@ -162,74 +162,74 @@ class PostScriptGraphics2D extends Graphics2D
* If Pageable is non-null, it will print that, otherwise it will use
* the supplied printable and pageFormat.
*/
- public SpooledDocument spoolPostScript(Printable printable,
- PageFormat pageFormat,
- Pageable pageable)
+ public SpooledDocument spoolPostScript(Printable printable,
+ PageFormat pageFormat,
+ Pageable pageable)
throws PrinterException
{
- try
+ try
{
- // spool to a temporary file
- File temp = File.createTempFile("cpspool", ".ps");
- temp.deleteOnExit();
-
- out = new PrintWriter(new BufferedWriter
- (new OutputStreamWriter
- (new FileOutputStream(temp),
- "ISO8859_1"), 1000000));
-
- writePSHeader();
-
- if(pageable != null)
- {
- for(int index = 0; index < pageable.getNumberOfPages(); index++)
- spoolPage(out, pageable.getPrintable(index),
- pageable.getPageFormat(index), index);
- }
- else
- {
- int index = 0;
- while(spoolPage(out, printable, pageFormat, index++) ==
- Printable.PAGE_EXISTS)
+ // spool to a temporary file
+ File temp = File.createTempFile("cpspool", ".ps");
+ temp.deleteOnExit();
+
+ out = new PrintWriter(new BufferedWriter
+ (new OutputStreamWriter
+ (new FileOutputStream(temp),
+ "ISO8859_1"), 1000000));
+
+ writePSHeader();
+
+ if(pageable != null)
+ {
+ for(int index = 0; index < pageable.getNumberOfPages(); index++)
+ spoolPage(out, pageable.getPrintable(index),
+ pageable.getPageFormat(index), index);
+ }
+ else
+ {
+ int index = 0;
+ while(spoolPage(out, printable, pageFormat, index++) ==
+ Printable.PAGE_EXISTS)
;
- }
- out.println("%%Trailer");
- out.println("%%EOF");
- out.close();
- return new SpooledDocument( temp );
- }
- catch (IOException e)
+ }
+ out.println("%%Trailer");
+ out.println("%%EOF");
+ out.close();
+ return new SpooledDocument( temp );
+ }
+ catch (IOException e)
{
- PrinterException pe = new PrinterException();
- pe.initCause(e);
- throw pe;
+ PrinterException pe = new PrinterException();
+ pe.initCause(e);
+ throw pe;
}
}
//--------------------------------------------------------------------------
- /**
+ /**
* Write the postscript file header,
- * setup the page format and transforms.
+ * setup the page format and transforms.
*/
private void writePSHeader()
{
- out.println("%!PS-Adobe-3.0");
+ out.println("%!PS-Adobe-3.0");
out.println("%%Title: "+printerJob.getJobName());
out.println("%%Creator: GNU Classpath ");
out.println("%%DocumentData: Clean8Bit");
out.println("%%DocumentNeededResources: font Times-Roman Helvetica Courier");
out.println("%%EndComments");
-
+
out.println("%%BeginProlog");
out.println("%%EndProlog");
out.println("%%BeginSetup");
-
+
out.println("%%EndFeature");
setupFonts();
out.println("%%EndSetup");
-
+
// set default fonts and colors
setFont( new Font("Dialog", Font.PLAIN, 12) );
currentColor = Color.white;
@@ -268,9 +268,9 @@ class PostScriptGraphics2D extends Graphics2D
* PAGE_EXISTS if it was.
*/
public int spoolPage(PrintWriter out,
- Printable printable,
- PageFormat pageFormat,
- int index) throws IOException, PrinterException
+ Printable printable,
+ PageFormat pageFormat,
+ int index) throws IOException, PrinterException
{
out.println("%%BeginPageSetup");
@@ -282,23 +282,23 @@ class PostScriptGraphics2D extends Graphics2D
out.println( "%%Orientation: Portrait" );
else
{
- out.println( "%%Orientation: Landscape" );
- double t = pageX;
- pageX = pageY;
- pageY = t;
+ out.println( "%%Orientation: Landscape" );
+ double t = pageX;
+ pageX = pageY;
+ pageY = t;
}
-
+
setClip(0, 0, (int)pageX, (int)pageY);
out.println("gsave % first save");
-
+
// 595x842; 612x792 respectively
out.println("<< /PageSize [" +pageX + " "+pageY+ "] >> setpagedevice");
if( pageFormat.getOrientation() != PageFormat.LANDSCAPE )
{
- pageTransform.translate(pageX, 0);
- pageTransform.scale(-1.0, 1.0);
+ pageTransform.translate(pageX, 0);
+ pageTransform.scale(-1.0, 1.0);
}
// save the original CTM
@@ -312,7 +312,7 @@ class PostScriptGraphics2D extends Graphics2D
if( printable.print(this, pageFormat, index) == Printable.NO_SUCH_PAGE )
return Printable.NO_SUCH_PAGE;
-
+
out.println("grestore");
out.println("showpage");
@@ -417,7 +417,7 @@ class PostScriptGraphics2D extends Graphics2D
setStroke(currentStroke);
}
- //--------------- Image drawing ------------------------------------------
+ //--------------- Image drawing ------------------------------------------
public boolean drawImage(Image img, int x, int y, Color bgcolor,
ImageObserver observer)
{
@@ -425,7 +425,7 @@ class PostScriptGraphics2D extends Graphics2D
int h = img.getHeight(null);
return drawImage(img, x, y, x + w, y + h, 0, 0, w - 1, h - 1, bgcolor,
- observer);
+ observer);
}
public boolean drawImage(Image img, int dx1, int dy1, int dx2, int dy2,
@@ -439,31 +439,31 @@ class PostScriptGraphics2D extends Graphics2D
// swap X and Y's
if (sx1 > sx2)
{
- n = sx1;
- sx1 = sx2;
- sx2 = n;
- flipx = ! flipx;
+ n = sx1;
+ sx1 = sx2;
+ sx2 = n;
+ flipx = ! flipx;
}
if (sy1 > sy2)
{
- n = sy1;
- sy1 = sy2;
- sy2 = n;
- flipy = ! flipy;
+ n = sy1;
+ sy1 = sy2;
+ sy2 = n;
+ flipy = ! flipy;
}
if (dx1 > dx2)
{
- n = dx1;
- dx1 = dx2;
- dx2 = n;
- flipx = ! flipx;
+ n = dx1;
+ dx1 = dx2;
+ dx2 = n;
+ flipx = ! flipx;
}
if (dy1 > dy2)
{
- n = dy1;
- dy1 = dy2;
- dy2 = n;
- flipy = ! flipy;
+ n = dy1;
+ dy1 = dy2;
+ dy2 = n;
+ flipy = ! flipy;
}
n = 0;
int sw = sx2 - sx1; // source width
@@ -487,28 +487,28 @@ class PostScriptGraphics2D extends Graphics2D
PixelGrabber pg = new PixelGrabber(img, sx1, sy1, sw, sh, pixels, 0, sw);
try
{
- pg.grabPixels();
+ pg.grabPixels();
}
catch (InterruptedException e)
{
- System.err.println("interrupted waiting for pixels!");
- return (false);
+ System.err.println("interrupted waiting for pixels!");
+ return (false);
}
if ((pg.getStatus() & ImageObserver.ABORT) != 0)
{
- System.err.println("image fetch aborted or errored");
- return (false);
+ System.err.println("image fetch aborted or errored");
+ return (false);
}
for (int j = 0; j < sh; j++)
{
- for (int i = 0; i < sw; i++)
- {
- out.print(colorTripleHex(new Color(pixels[j * sw + i])));
- if (((++n) % 11) == 0)
- out.println();
- }
+ for (int i = 0; i < sw; i++)
+ {
+ out.print(colorTripleHex(new Color(pixels[j * sw + i])));
+ if (((++n) % 11) == 0)
+ out.println();
+ }
}
out.println();
@@ -522,7 +522,7 @@ class PostScriptGraphics2D extends Graphics2D
ImageObserver observer)
{
return drawImage(img, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2, null,
- observer);
+ observer);
}
public boolean drawImage(Image img, int x, int y, ImageObserver observer)
@@ -531,18 +531,18 @@ class PostScriptGraphics2D extends Graphics2D
}
public boolean drawImage(Image img, int x, int y, int width, int height,
- Color bgcolor, ImageObserver observer)
+ Color bgcolor, ImageObserver observer)
{
int sw = img.getWidth(null);
int sh = img.getHeight(null);
return drawImage(img, x, y, x + width, y + height, /* destination */
- 0, 0, sw - 1, sh - 1, /* source */
- bgcolor, observer);
+ 0, 0, sw - 1, sh - 1, /* source */
+ bgcolor, observer);
// correct?
}
public boolean drawImage(Image img, int x, int y, int width, int height,
- ImageObserver observer)
+ ImageObserver observer)
{
return drawImage(img, x, y, width, height, null, observer);
}
@@ -602,8 +602,8 @@ class PostScriptGraphics2D extends Graphics2D
if( currentFontIsPS )
{
- drawStringPSFont(str, x, y);
- return;
+ drawStringPSFont(str, x, y);
+ return;
}
TextLayout text = new TextLayout(str, currentFont, getFontRenderContext());
@@ -626,22 +626,22 @@ class PostScriptGraphics2D extends Graphics2D
popCTM();
pushCTM();
- double[] test =
+ double[] test =
{
- pageTransform.getScaleX(), pageTransform.getShearY(),
- pageTransform.getShearX(), pageTransform.getScaleY(),
- pageTransform.getTranslateX(),
- -pageTransform.getTranslateY() + pageY
+ pageTransform.getScaleX(), pageTransform.getShearY(),
+ pageTransform.getShearX(), pageTransform.getScaleY(),
+ pageTransform.getTranslateX(),
+ -pageTransform.getTranslateY() + pageY
};
- double[] test2 =
+ double[] test2 =
{
- currentTransform.getScaleX(),
- currentTransform.getShearY(),
- -currentTransform.getShearX(),
- -currentTransform.getScaleY(),
- currentTransform.getTranslateX(),
- currentTransform.getTranslateY()
+ currentTransform.getScaleX(),
+ currentTransform.getShearY(),
+ -currentTransform.getShearX(),
+ -currentTransform.getScaleY(),
+ currentTransform.getTranslateX(),
+ currentTransform.getTranslateY()
};
AffineTransform total = new AffineTransform(test);
@@ -673,43 +673,43 @@ class PostScriptGraphics2D extends Graphics2D
while (! pi.isDone())
{
- switch (pi.currentSegment(coords))
- {
- case PathIterator.SEG_MOVETO:
- out.println((coords[0]) + " " + (Y - coords[1]) + " moveto");
- cx = coords[0];
- cy = coords[1];
- break;
- case PathIterator.SEG_LINETO:
- out.println((coords[0]) + " " + (Y - coords[1]) + " lineto");
- cx = coords[0];
- cy = coords[1];
- break;
- case PathIterator.SEG_QUADTO:
- // convert to cubic bezier points
- float x1 = (cx + 2 * coords[0]) / 3;
- float y1 = (cy + 2 * coords[1]) / 3;
- float x2 = (2 * coords[2] + coords[0]) / 3;
- float y2 = (2 * coords[3] + coords[1]) / 3;
-
- out.print((x1) + " " + (Y - y1) + " ");
- out.print((x2) + " " + (Y - y2) + " ");
- out.println((coords[2]) + " " + (Y - coords[3]) + " curveto");
- cx = coords[2];
- cy = coords[3];
- break;
- case PathIterator.SEG_CUBICTO:
- out.print((coords[0]) + " " + (Y - coords[1]) + " ");
- out.print((coords[2]) + " " + (Y - coords[3]) + " ");
- out.println((coords[4]) + " " + (Y - coords[5]) + " curveto");
- cx = coords[4];
- cy = coords[5];
- break;
- case PathIterator.SEG_CLOSE:
- out.println("closepath");
- break;
- }
- pi.next();
+ switch (pi.currentSegment(coords))
+ {
+ case PathIterator.SEG_MOVETO:
+ out.println((coords[0]) + " " + (Y - coords[1]) + " moveto");
+ cx = coords[0];
+ cy = coords[1];
+ break;
+ case PathIterator.SEG_LINETO:
+ out.println((coords[0]) + " " + (Y - coords[1]) + " lineto");
+ cx = coords[0];
+ cy = coords[1];
+ break;
+ case PathIterator.SEG_QUADTO:
+ // convert to cubic bezier points
+ float x1 = (cx + 2 * coords[0]) / 3;
+ float y1 = (cy + 2 * coords[1]) / 3;
+ float x2 = (2 * coords[2] + coords[0]) / 3;
+ float y2 = (2 * coords[3] + coords[1]) / 3;
+
+ out.print((x1) + " " + (Y - y1) + " ");
+ out.print((x2) + " " + (Y - y2) + " ");
+ out.println((coords[2]) + " " + (Y - coords[3]) + " curveto");
+ cx = coords[2];
+ cy = coords[3];
+ break;
+ case PathIterator.SEG_CUBICTO:
+ out.print((coords[0]) + " " + (Y - coords[1]) + " ");
+ out.print((coords[2]) + " " + (Y - coords[3]) + " ");
+ out.println((coords[4]) + " " + (Y - coords[5]) + " curveto");
+ cx = coords[4];
+ cy = coords[5];
+ break;
+ case PathIterator.SEG_CLOSE:
+ out.println("closepath");
+ break;
+ }
+ pi.next();
}
out.println("fill");
@@ -851,7 +851,7 @@ class PostScriptGraphics2D extends Graphics2D
try
{
- out.close();
+ out.close();
}
catch (Exception e)
{
@@ -877,43 +877,43 @@ class PostScriptGraphics2D extends Graphics2D
while (! pi.isDone())
{
- switch (pi.currentSegment(coords))
- {
- case PathIterator.SEG_MOVETO:
- out.println(coords[0] + " " + (coords[1]) + " moveto");
- cx = coords[0];
- cy = coords[1];
- break;
- case PathIterator.SEG_LINETO:
- out.println(coords[0] + " " + (coords[1]) + " lineto");
- cx = coords[0];
- cy = coords[1];
- break;
- case PathIterator.SEG_QUADTO:
- // convert to cubic bezier points
- float x1 = (cx + 2 * coords[0]) / 3;
- float y1 = (cy + 2 * coords[1]) / 3;
- float x2 = (2 * coords[2] + coords[0]) / 3;
- float y2 = (2 * coords[3] + coords[1]) / 3;
-
- out.print(x1 + " " + (Y - y1) + " ");
- out.print(x2 + " " + (Y - y2) + " ");
- out.println(coords[2] + " " + (Y - coords[3]) + " curveto");
- cx = coords[2];
- cy = coords[3];
- break;
- case PathIterator.SEG_CUBICTO:
- out.print(coords[0] + " " + coords[1] + " ");
- out.print(coords[2] + " " + coords[3] + " ");
- out.println(coords[4] + " " + coords[5] + " curveto");
- cx = coords[4];
- cy = coords[5];
- break;
- case PathIterator.SEG_CLOSE:
- out.println("closepath");
- break;
- }
- pi.next();
+ switch (pi.currentSegment(coords))
+ {
+ case PathIterator.SEG_MOVETO:
+ out.println(coords[0] + " " + (coords[1]) + " moveto");
+ cx = coords[0];
+ cy = coords[1];
+ break;
+ case PathIterator.SEG_LINETO:
+ out.println(coords[0] + " " + (coords[1]) + " lineto");
+ cx = coords[0];
+ cy = coords[1];
+ break;
+ case PathIterator.SEG_QUADTO:
+ // convert to cubic bezier points
+ float x1 = (cx + 2 * coords[0]) / 3;
+ float y1 = (cy + 2 * coords[1]) / 3;
+ float x2 = (2 * coords[2] + coords[0]) / 3;
+ float y2 = (2 * coords[3] + coords[1]) / 3;
+
+ out.print(x1 + " " + (Y - y1) + " ");
+ out.print(x2 + " " + (Y - y2) + " ");
+ out.println(coords[2] + " " + (Y - coords[3]) + " curveto");
+ cx = coords[2];
+ cy = coords[3];
+ break;
+ case PathIterator.SEG_CUBICTO:
+ out.print(coords[0] + " " + coords[1] + " ");
+ out.print(coords[2] + " " + coords[3] + " ");
+ out.println(coords[4] + " " + coords[5] + " curveto");
+ cx = coords[4];
+ cy = coords[5];
+ break;
+ case PathIterator.SEG_CLOSE:
+ out.println("closepath");
+ break;
+ }
+ pi.next();
}
}
@@ -923,8 +923,8 @@ class PostScriptGraphics2D extends Graphics2D
{
clipShape = s;
out.println("% clip INACTIVE");
- // writeShape(s);
- // out.println("clip");
+ // writeShape(s);
+ // out.println("clip");
}
/** Strokes the outline of a Shape using the
@@ -946,7 +946,7 @@ class PostScriptGraphics2D extends Graphics2D
out.println("% drawGlyphVector");
Shape s = gv.getOutline();
drawStringShape(AffineTransform.getTranslateInstance(x, y)
- .createTransformedShape(s));
+ .createTransformedShape(s));
}
/** Renders the text of the specified iterator,
@@ -971,17 +971,17 @@ class PostScriptGraphics2D extends Graphics2D
out.println("% fill");
if (! gradientOn)
{
- writeShape(s);
- out.println("fill");
+ writeShape(s);
+ out.println("fill");
}
else
{
- out.println("gsave");
- writeShape(s);
- out.println("clip");
- writeGradient();
- out.println("shfill");
- out.println("grestore");
+ out.println("gsave");
+ writeShape(s);
+ out.println("clip");
+ writeGradient();
+ out.println("shfill");
+ out.println("grestore");
}
}
@@ -1011,10 +1011,10 @@ class PostScriptGraphics2D extends Graphics2D
{
out.println("% getFontRenderContext()");
- double[] scaling =
+ double[] scaling =
{
- pageTransform.getScaleX(), 0, 0,
- -pageTransform.getScaleY(), 0, 0
+ pageTransform.getScaleX(), 0, 0,
+ -pageTransform.getScaleY(), 0, 0
};
return (new FontRenderContext(new AffineTransform(scaling), false, true));
@@ -1050,15 +1050,15 @@ class PostScriptGraphics2D extends Graphics2D
return currentTransform;
}
- /**
- * Checks whether or not the specified Shape intersects
- * the specified Rectangle, which is in device space.
+ /**
+ * Checks whether or not the specified Shape intersects
+ * the specified Rectangle, which is in device space.
*/
public boolean hit(Rectangle rect, Shape s, boolean onStroke)
{
Rectangle2D.Double r = new Rectangle2D.Double(rect.getX(), rect.getY(),
- rect.getWidth(),
- rect.getHeight());
+ rect.getWidth(),
+ rect.getHeight());
return s.intersects(r);
}
@@ -1082,13 +1082,13 @@ class PostScriptGraphics2D extends Graphics2D
gradientOn = false;
if (paint instanceof Color)
{
- setColor((Color) paint);
- return;
+ setColor((Color) paint);
+ return;
}
if (paint instanceof GradientPaint)
{
- gradientOn = true;
- return;
+ gradientOn = true;
+ return;
}
}
@@ -1096,13 +1096,13 @@ class PostScriptGraphics2D extends Graphics2D
private String colorTriple(Color c)
{
return (((double) c.getRed() / 255.0) + " "
- + ((double) c.getGreen() / 255.0) + " "
- + ((double) c.getBlue() / 255.0));
+ + ((double) c.getGreen() / 255.0) + " "
+ + ((double) c.getBlue() / 255.0));
}
/**
* Get a nonsperated hex RGB triple, eg FFFFFF = white
- * used by writeGradient and drawImage
+ * used by writeGradient and drawImage
*/
private String colorTripleHex(Color c)
{
@@ -1135,11 +1135,11 @@ class PostScriptGraphics2D extends Graphics2D
// get number of repetitions
while (x + n * dx < pageY && y + n * dy < pageX && x + n * dx > 0
- && y + n * dy > 0)
+ && y + n * dy > 0)
n++;
out.println("<<"); // start
- out.println("/ShadingType 2"); // gradient fill
+ out.println("/ShadingType 2"); // gradient fill
out.println("/ColorSpace [ /DeviceRGB ]"); // RGB colors
out.print("/Coords [");
out.print(x + " " + y + " " + (x + n * dx) + " " + (y + n * dy) + " ");
@@ -1152,17 +1152,17 @@ class PostScriptGraphics2D extends Graphics2D
out.println("/BitsPerSample 8");
out.println("/Size [ " + (1 + n) + " ]");
out.print("/DataSource < " + colorTripleHex(paint.getColor1()) + " "
- + colorTripleHex(paint.getColor2()) + " ");
+ + colorTripleHex(paint.getColor2()) + " ");
for (; n > 1; n--)
if (paint.isCyclic())
- {
- if ((n % 2) == 1)
- out.print(colorTripleHex(paint.getColor1()) + " ");
- else
- out.print(colorTripleHex(paint.getColor2()) + " ");
- }
+ {
+ if ((n % 2) == 1)
+ out.print(colorTripleHex(paint.getColor1()) + " ");
+ else
+ out.print(colorTripleHex(paint.getColor2()) + " ");
+ }
else
- out.print(colorTripleHex(paint.getColor2()) + " ");
+ out.print(colorTripleHex(paint.getColor2()) + " ");
out.println(">");
out.println(">>");
out.println(">>");
@@ -1181,7 +1181,7 @@ class PostScriptGraphics2D extends Graphics2D
/* we don't allow the changing of rendering hints. */
}
- /**
+ /**
* Sets the Stroke for the Graphics2D context. BasicStroke fully implemented.
*/
public void setStroke(Stroke s)
@@ -1195,53 +1195,53 @@ class PostScriptGraphics2D extends Graphics2D
out.println("% setStroke()");
try
{
- // set the line width
- out.println(bs.getLineWidth() + " setlinewidth");
-
- // set the line dash
- float[] dashArray = bs.getDashArray();
- if (dashArray != null)
- {
- out.print("[ ");
- for (int i = 0; i < dashArray.length; i++)
- out.print(dashArray[i] + " ");
- out.println("] " + bs.getDashPhase() + " setdash");
- }
- else
- out.println("[] 0 setdash"); // set solid
-
- // set the line cap
- switch (bs.getEndCap())
- {
- case BasicStroke.CAP_BUTT:
- out.println("0 setlinecap");
- break;
- case BasicStroke.CAP_ROUND:
- out.println("1 setlinecap");
- break;
- case BasicStroke.CAP_SQUARE:
- out.println("2 setlinecap");
- break;
- }
-
- // set the line join
- switch (bs.getLineJoin())
- {
- case BasicStroke.JOIN_BEVEL:
- out.println("2 setlinejoin");
- break;
- case BasicStroke.JOIN_MITER:
- out.println("0 setlinejoin");
- out.println(bs.getMiterLimit() + " setmiterlimit");
- break;
- case BasicStroke.JOIN_ROUND:
- out.println("1 setlinejoin");
- break;
- }
+ // set the line width
+ out.println(bs.getLineWidth() + " setlinewidth");
+
+ // set the line dash
+ float[] dashArray = bs.getDashArray();
+ if (dashArray != null)
+ {
+ out.print("[ ");
+ for (int i = 0; i < dashArray.length; i++)
+ out.print(dashArray[i] + " ");
+ out.println("] " + bs.getDashPhase() + " setdash");
+ }
+ else
+ out.println("[] 0 setdash"); // set solid
+
+ // set the line cap
+ switch (bs.getEndCap())
+ {
+ case BasicStroke.CAP_BUTT:
+ out.println("0 setlinecap");
+ break;
+ case BasicStroke.CAP_ROUND:
+ out.println("1 setlinecap");
+ break;
+ case BasicStroke.CAP_SQUARE:
+ out.println("2 setlinecap");
+ break;
+ }
+
+ // set the line join
+ switch (bs.getLineJoin())
+ {
+ case BasicStroke.JOIN_BEVEL:
+ out.println("2 setlinejoin");
+ break;
+ case BasicStroke.JOIN_MITER:
+ out.println("0 setlinejoin");
+ out.println(bs.getMiterLimit() + " setmiterlimit");
+ break;
+ case BasicStroke.JOIN_ROUND:
+ out.println("1 setlinejoin");
+ break;
+ }
}
catch (Exception e)
{
- out.println("% Exception in setStroke()");
+ out.println("% Exception in setStroke()");
}
}
diff --git a/gnu/java/awt/print/SpooledDocument.java b/gnu/java/awt/print/SpooledDocument.java
index 812906b18..54819984f 100644
--- a/gnu/java/awt/print/SpooledDocument.java
+++ b/gnu/java/awt/print/SpooledDocument.java
@@ -53,13 +53,13 @@ public class SpooledDocument implements Doc
public SpooledDocument(File file)
{
- try
+ try
{
- fis = new FileInputStream(file);
+ fis = new FileInputStream(file);
}
- catch (FileNotFoundException ffne)
+ catch (FileNotFoundException ffne)
{
- // Shouldn't happen.
+ // Shouldn't happen.
}
}
@@ -77,7 +77,7 @@ public class SpooledDocument implements Doc
{
return fis;
}
-
+
public Reader getReaderForText()
{
return new InputStreamReader(fis);
diff --git a/gnu/java/beans/BeanInfoEmbryo.java b/gnu/java/beans/BeanInfoEmbryo.java
index 0cf73e5b9..cc474e817 100644
--- a/gnu/java/beans/BeanInfoEmbryo.java
+++ b/gnu/java/beans/BeanInfoEmbryo.java
@@ -7,7 +7,7 @@ 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
@@ -70,79 +70,79 @@ import java.util.Vector;
public class BeanInfoEmbryo {
- // by using a TreeMap the properties will be sorted alphabetically by name
- // which matches the (undocumented) behavior of jdk
- TreeMap properties = new TreeMap();
- Hashtable events = new Hashtable();
- Vector methods = new Vector();
-
- BeanDescriptor beanDescriptor;
- BeanInfo[] additionalBeanInfo;
- java.awt.Image[] im;
- String defaultPropertyName;
- String defaultEventName;
-
- public BeanInfoEmbryo() {
- }
-
- public BeanInfo getBeanInfo() {
- int defaultProperty = -1;
- int defaultEvent = -1;
-
- PropertyDescriptor[] Aproperties = new PropertyDescriptor[properties.size()];
- int i = 0;
- Iterator it = properties.entrySet().iterator();
- while (it.hasNext()) {
- Aproperties[i] = (PropertyDescriptor) (((Map.Entry)it.next()).getValue());
- if(defaultPropertyName != null && Aproperties[i].getName().equals(defaultPropertyName)) {
- defaultProperty = i;
- }
- i++;
- }
-
- EventSetDescriptor[] Aevents = new EventSetDescriptor[events.size()];
- i = 0;
- Enumeration e = events.elements();
- while (e.hasMoreElements()) {
- Aevents[i] = (EventSetDescriptor) e.nextElement();
- if(defaultEventName != null && Aevents[i].getName().equals(defaultEventName)) {
- defaultEvent = i;
- }
- i++;
- }
-
- MethodDescriptor[] Amethods = new MethodDescriptor[methods.size()];
- methods.copyInto(Amethods);
-
- return new ExplicitBeanInfo(beanDescriptor,additionalBeanInfo,Aproperties,defaultProperty,Aevents,defaultEvent,Amethods,im);
- }
-
- public void setBeanDescriptor(BeanDescriptor b) {
- beanDescriptor = b;
- }
-
- public void setAdditionalBeanInfo(BeanInfo[] b) {
- additionalBeanInfo = b;
- }
-
- public boolean hasProperty(PropertyDescriptor p) {
- return properties.get(p.getName()) != null;
- }
- public void addProperty(PropertyDescriptor p) {
- properties.put(p.getName(),p);
- }
- public void addIndexedProperty(IndexedPropertyDescriptor p) {
- properties.put(p.getName(),p);
- }
-
- public boolean hasEvent(EventSetDescriptor e) {
- return events.get(e.getName()) != null;
- }
- public void addEvent(EventSetDescriptor e) {
- events.put(e.getName(),e);
- }
-
- public boolean hasMethod(MethodDescriptor m) {
+ // by using a TreeMap the properties will be sorted alphabetically by name
+ // which matches the (undocumented) behavior of jdk
+ TreeMap properties = new TreeMap();
+ Hashtable events = new Hashtable();
+ Vector methods = new Vector();
+
+ BeanDescriptor beanDescriptor;
+ BeanInfo[] additionalBeanInfo;
+ java.awt.Image[] im;
+ String defaultPropertyName;
+ String defaultEventName;
+
+ public BeanInfoEmbryo() {
+ }
+
+ public BeanInfo getBeanInfo() {
+ int defaultProperty = -1;
+ int defaultEvent = -1;
+
+ PropertyDescriptor[] Aproperties = new PropertyDescriptor[properties.size()];
+ int i = 0;
+ Iterator it = properties.entrySet().iterator();
+ while (it.hasNext()) {
+ Aproperties[i] = (PropertyDescriptor) (((Map.Entry)it.next()).getValue());
+ if(defaultPropertyName != null && Aproperties[i].getName().equals(defaultPropertyName)) {
+ defaultProperty = i;
+ }
+ i++;
+ }
+
+ EventSetDescriptor[] Aevents = new EventSetDescriptor[events.size()];
+ i = 0;
+ Enumeration e = events.elements();
+ while (e.hasMoreElements()) {
+ Aevents[i] = (EventSetDescriptor) e.nextElement();
+ if(defaultEventName != null && Aevents[i].getName().equals(defaultEventName)) {
+ defaultEvent = i;
+ }
+ i++;
+ }
+
+ MethodDescriptor[] Amethods = new MethodDescriptor[methods.size()];
+ methods.copyInto(Amethods);
+
+ return new ExplicitBeanInfo(beanDescriptor,additionalBeanInfo,Aproperties,defaultProperty,Aevents,defaultEvent,Amethods,im);
+ }
+
+ public void setBeanDescriptor(BeanDescriptor b) {
+ beanDescriptor = b;
+ }
+
+ public void setAdditionalBeanInfo(BeanInfo[] b) {
+ additionalBeanInfo = b;
+ }
+
+ public boolean hasProperty(PropertyDescriptor p) {
+ return properties.get(p.getName()) != null;
+ }
+ public void addProperty(PropertyDescriptor p) {
+ properties.put(p.getName(),p);
+ }
+ public void addIndexedProperty(IndexedPropertyDescriptor p) {
+ properties.put(p.getName(),p);
+ }
+
+ public boolean hasEvent(EventSetDescriptor e) {
+ return events.get(e.getName()) != null;
+ }
+ public void addEvent(EventSetDescriptor e) {
+ events.put(e.getName(),e);
+ }
+
+ public boolean hasMethod(MethodDescriptor m) {
for(int i=0;i<methods.size();i++) {
Method thisMethod = ((MethodDescriptor)methods.elementAt(i)).getMethod();
if(m.getMethod().getName().equals(thisMethod.getName())
@@ -152,20 +152,20 @@ public class BeanInfoEmbryo {
}
}
return false;
- }
- public void addMethod(MethodDescriptor m) {
- methods.addElement(m);
- }
-
- public void setDefaultPropertyName(String defaultPropertyName) {
- this.defaultPropertyName = defaultPropertyName;
- }
-
- public void setDefaultEventName(String defaultEventName) {
- this.defaultEventName = defaultEventName;
- }
-
- public void setIcons(java.awt.Image[] im) {
- this.im = im;
- }
+ }
+ public void addMethod(MethodDescriptor m) {
+ methods.addElement(m);
+ }
+
+ public void setDefaultPropertyName(String defaultPropertyName) {
+ this.defaultPropertyName = defaultPropertyName;
+ }
+
+ public void setDefaultEventName(String defaultEventName) {
+ this.defaultEventName = defaultEventName;
+ }
+
+ public void setIcons(java.awt.Image[] im) {
+ this.im = im;
+ }
}
diff --git a/gnu/java/beans/DefaultExceptionListener.java b/gnu/java/beans/DefaultExceptionListener.java
index 42b31fae8..124ad9c94 100644
--- a/gnu/java/beans/DefaultExceptionListener.java
+++ b/gnu/java/beans/DefaultExceptionListener.java
@@ -55,12 +55,12 @@ public class DefaultExceptionListener implements ExceptionListener
{
public final static DefaultExceptionListener INSTANCE
= new DefaultExceptionListener();
-
+
public void exceptionThrown(Exception e)
{
System.err.println("exception thrown: "
+ e + " - message: "
+ e.getMessage());
}
-
+
}
diff --git a/gnu/java/beans/ExplicitBeanInfo.java b/gnu/java/beans/ExplicitBeanInfo.java
index 6da5e8696..30f1de4fc 100644
--- a/gnu/java/beans/ExplicitBeanInfo.java
+++ b/gnu/java/beans/ExplicitBeanInfo.java
@@ -7,7 +7,7 @@ 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
@@ -55,95 +55,95 @@ import java.beans.PropertyDescriptor;
**/
public class ExplicitBeanInfo implements BeanInfo {
- /** The BeanDescriptor returned by getBeanDescriptor. **/
- protected BeanDescriptor beanDescriptor;
-
- /** The EventSetDescriptor array returned by
- ** getEventSetDescriptors().
- **/
- protected EventSetDescriptor[] eventSetDescriptors = new EventSetDescriptor[0];
-
- /** The PropertyDescriptor array returned by
- ** getPropertyDescriptors().
- **/
- protected PropertyDescriptor[] propertyDescriptors = new PropertyDescriptor[0];
-
- /** The MethodDescriptor array returned by
- ** getMethodDescriptors().
- **/
- protected MethodDescriptor[] methodDescriptors;
-
- /** The default property index. **/
- protected int defaultPropertyIndex;
-
- /** The default event index. **/
- protected int defaultEventIndex;
-
- /** The BeanInfo array returned by
- ** getAdditionalBeanInfo().
- **/
- protected BeanInfo[] additionalBeanInfo;
-
- /** The set of icons. **/
- protected Image[] icons;
-
- public ExplicitBeanInfo(BeanDescriptor beanDescriptor,
- BeanInfo[] additionalBeanInfo,
- PropertyDescriptor[] propertyDescriptors,
- int defaultPropertyIndex,
- EventSetDescriptor[] eventSetDescriptors,
- int defaultEventIndex,
- MethodDescriptor[] methodDescriptors,
- Image[] icons) {
- this.beanDescriptor = beanDescriptor;
- this.additionalBeanInfo = additionalBeanInfo;
- this.propertyDescriptors = propertyDescriptors;
- this.defaultPropertyIndex = defaultPropertyIndex;
- this.eventSetDescriptors = eventSetDescriptors;
- this.defaultEventIndex = defaultEventIndex;
- this.methodDescriptors = methodDescriptors;
- this.icons = icons;
- }
-
- /** Get Bean descriptor. **/
- public BeanDescriptor getBeanDescriptor() {
- return beanDescriptor;
- }
-
- /** Get Bean events. **/
- public EventSetDescriptor[] getEventSetDescriptors() {
- return eventSetDescriptors;
- }
-
- /** Get default event set. **/
- public int getDefaultEventIndex() {
- return defaultEventIndex;
- }
-
- /** Get Bean properties. **/
- public PropertyDescriptor[] getPropertyDescriptors() {
- return propertyDescriptors;
- }
-
- /** Get "default" property. **/
- public int getDefaultPropertyIndex() {
- return defaultPropertyIndex;
- }
-
- /** Get Bean methods. **/
- public MethodDescriptor[] getMethodDescriptors() {
- return methodDescriptors;
- }
-
- /** Get additional Bean info. **/
- public BeanInfo[] getAdditionalBeanInfo() {
- return additionalBeanInfo;
- }
-
- /** Get Bean icons.
- ** @param iconType the type of icon
- **/
- public Image getIcon(int iconType) {
- return icons != null ? icons[iconType - 1] : null;
- }
+ /** The BeanDescriptor returned by getBeanDescriptor. **/
+ protected BeanDescriptor beanDescriptor;
+
+ /** The EventSetDescriptor array returned by
+ ** getEventSetDescriptors().
+ **/
+ protected EventSetDescriptor[] eventSetDescriptors = new EventSetDescriptor[0];
+
+ /** The PropertyDescriptor array returned by
+ ** getPropertyDescriptors().
+ **/
+ protected PropertyDescriptor[] propertyDescriptors = new PropertyDescriptor[0];
+
+ /** The MethodDescriptor array returned by
+ ** getMethodDescriptors().
+ **/
+ protected MethodDescriptor[] methodDescriptors;
+
+ /** The default property index. **/
+ protected int defaultPropertyIndex;
+
+ /** The default event index. **/
+ protected int defaultEventIndex;
+
+ /** The BeanInfo array returned by
+ ** getAdditionalBeanInfo().
+ **/
+ protected BeanInfo[] additionalBeanInfo;
+
+ /** The set of icons. **/
+ protected Image[] icons;
+
+ public ExplicitBeanInfo(BeanDescriptor beanDescriptor,
+ BeanInfo[] additionalBeanInfo,
+ PropertyDescriptor[] propertyDescriptors,
+ int defaultPropertyIndex,
+ EventSetDescriptor[] eventSetDescriptors,
+ int defaultEventIndex,
+ MethodDescriptor[] methodDescriptors,
+ Image[] icons) {
+ this.beanDescriptor = beanDescriptor;
+ this.additionalBeanInfo = additionalBeanInfo;
+ this.propertyDescriptors = propertyDescriptors;
+ this.defaultPropertyIndex = defaultPropertyIndex;
+ this.eventSetDescriptors = eventSetDescriptors;
+ this.defaultEventIndex = defaultEventIndex;
+ this.methodDescriptors = methodDescriptors;
+ this.icons = icons;
+ }
+
+ /** Get Bean descriptor. **/
+ public BeanDescriptor getBeanDescriptor() {
+ return beanDescriptor;
+ }
+
+ /** Get Bean events. **/
+ public EventSetDescriptor[] getEventSetDescriptors() {
+ return eventSetDescriptors;
+ }
+
+ /** Get default event set. **/
+ public int getDefaultEventIndex() {
+ return defaultEventIndex;
+ }
+
+ /** Get Bean properties. **/
+ public PropertyDescriptor[] getPropertyDescriptors() {
+ return propertyDescriptors;
+ }
+
+ /** Get "default" property. **/
+ public int getDefaultPropertyIndex() {
+ return defaultPropertyIndex;
+ }
+
+ /** Get Bean methods. **/
+ public MethodDescriptor[] getMethodDescriptors() {
+ return methodDescriptors;
+ }
+
+ /** Get additional Bean info. **/
+ public BeanInfo[] getAdditionalBeanInfo() {
+ return additionalBeanInfo;
+ }
+
+ /** Get Bean icons.
+ ** @param iconType the type of icon
+ **/
+ public Image getIcon(int iconType) {
+ return icons != null ? icons[iconType - 1] : null;
+ }
}
diff --git a/gnu/java/beans/IntrospectionIncubator.java b/gnu/java/beans/IntrospectionIncubator.java
index e0d9480e3..978429a1e 100644
--- a/gnu/java/beans/IntrospectionIncubator.java
+++ b/gnu/java/beans/IntrospectionIncubator.java
@@ -7,7 +7,7 @@ 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
@@ -69,373 +69,373 @@ import java.util.Vector;
**/
public class IntrospectionIncubator {
- Hashtable propertyMethods = new Hashtable();
- Hashtable listenerMethods = new Hashtable();
- Vector otherMethods = new Vector();
-
- Class propertyStopClass;
- Class eventStopClass;
- Class methodStopClass;
-
- public IntrospectionIncubator() {
- }
-
- /** Examines the given method and files it in a suitable collection.
- * It files the method as a property method if it finds:
- * <ul>
- * <li>boolean "is" getter</li>
- * <li>"get" style getter</li>
- * <li>single argument setter</li>
- * <li>indiced setter and getter</li>
- * </ul>
- * It files the method as a listener method if all of these rules apply:
- * <ul>
- * <li>the method name starts with "add" or "remove"</li>
- * <li>there is only a single argument</li>
- * <li>the argument type is a subclass of <code>java.util.EventListener</code></li>
- * </ul>
- * All public methods are filed as such.
- *
- * @param method The method instance to examine.
- */
- public void addMethod(Method method) {
- if(Modifier.isPublic(method.getModifiers())) {
- String name = ClassHelper.getTruncatedName(method.getName());
- Class retType = method.getReturnType();
- Class[] params = method.getParameterTypes();
- boolean isVoid = retType.equals(java.lang.Void.TYPE);
- Class methodClass = method.getDeclaringClass();
-
- /* Accepts the method for examination if no stop class is given or the method is declared in a subclass of the stop class.
- * The rules for this are described in {@link java.beans.Introspector.getBeanInfo(Class, Class)}.
- * This block finds out whether the method is a suitable getter or setter method (or read/write method).
- */
- if(isReachable(propertyStopClass, methodClass)) {
- /* At this point a method may regarded as a property's read or write method if its name
- * starts with "is", "get" or "set". However, if a method is static it cannot be part
- * of a property.
- */
- if(Modifier.isStatic(method.getModifiers())) {
- // files method as other because it is static
- otherMethods.addElement(method);
- } else if(name.startsWith("is")
- && retType.equals(java.lang.Boolean.TYPE)
- && params.length == 0) {
- // files method as boolean "is" style getter
- addToPropertyHash(name,method,IS);
- } else if(name.startsWith("get") && !isVoid) {
- if(params.length == 0) {
- // files as legal non-argument getter
- addToPropertyHash(name,method,GET);
- } else if(params.length == 1 && params[0].equals(java.lang.Integer.TYPE)) {
- // files as legal indiced getter
- addToPropertyHash(name,method,GET_I);
- } else {
- // files as other because the method's signature is not Bean-like
- otherMethods.addElement(method);
- }
- } else if(name.startsWith("set") && isVoid) {
- if(params.length == 1) {
- // files as legal single-argument setter method
- addToPropertyHash(name,method,SET);
- } else if(params.length == 2 && params[0].equals(java.lang.Integer.TYPE)) {
- // files as legal indiced setter method
- addToPropertyHash(name,method,SET_I);
- } else {
- // files as other because the method's signature is not Bean-like
- otherMethods.addElement(method);
- }
- }
- }
-
- if(isReachable(eventStopClass, methodClass)) {
- if(name.startsWith("add")
- && isVoid
- && params.length == 1
- && java.util.EventListener.class.isAssignableFrom(params[0])) {
- addToListenerHash(name,method,ADD);
- } else if(name.startsWith("remove")
- && isVoid
- && params.length == 1
- && java.util.EventListener.class.isAssignableFrom(params[0])) {
- addToListenerHash(name,method,REMOVE);
- }
- }
-
- if(isReachable(methodStopClass, methodClass)) {
- // files as reachable public method
- otherMethods.addElement(method);
- }
-
- }
- }
-
- public void addMethods(Method[] m) {
- for(int i=0;i<m.length;i++) {
- addMethod(m[i]);
- }
- }
-
- public void setPropertyStopClass(Class c) {
- propertyStopClass = c;
- }
-
- public void setEventStopClass(Class c) {
- eventStopClass = c;
- }
-
- public void setMethodStopClass(Class c) {
- methodStopClass = c;
- }
-
-
- public BeanInfoEmbryo getBeanInfoEmbryo() throws IntrospectionException {
- BeanInfoEmbryo b = new BeanInfoEmbryo();
- findXXX(b,IS);
- findXXXInt(b,GET_I);
- findXXXInt(b,SET_I);
- findXXX(b,GET);
- findXXX(b,SET);
- findAddRemovePairs(b);
- for(int i=0;i<otherMethods.size();i++) {
- MethodDescriptor newMethod = new MethodDescriptor((Method)otherMethods.elementAt(i));
- if(!b.hasMethod(newMethod)) {
- b.addMethod(new MethodDescriptor((Method)otherMethods.elementAt(i)));
- }
- }
- return b;
- }
-
- public BeanInfo getBeanInfo() throws IntrospectionException {
- return getBeanInfoEmbryo().getBeanInfo();
- }
-
-
- void findAddRemovePairs(BeanInfoEmbryo b) throws IntrospectionException {
- Enumeration listenerEnum = listenerMethods.keys();
- while(listenerEnum.hasMoreElements()) {
- DoubleKey k = (DoubleKey)listenerEnum.nextElement();
- Method[] m = (Method[])listenerMethods.get(k);
- if(m[ADD] != null && m[REMOVE] != null) {
- EventSetDescriptor e = new EventSetDescriptor(Introspector.decapitalize(k.getName()),
- k.getType(), k.getType().getMethods(),
- m[ADD],m[REMOVE]);
- e.setUnicast(ArrayHelper.contains(m[ADD].getExceptionTypes(),java.util.TooManyListenersException.class));
- if(!b.hasEvent(e)) {
- b.addEvent(e);
- }
- }
- }
- }
-
- void findXXX(BeanInfoEmbryo b, int funcType) throws IntrospectionException {
- Enumeration keys = propertyMethods.keys();
- while(keys.hasMoreElements()) {
- DoubleKey k = (DoubleKey)keys.nextElement();
- Method[] m = (Method[])propertyMethods.get(k);
- if(m[funcType] != null) {
- PropertyDescriptor p = new PropertyDescriptor(Introspector.decapitalize(k.getName()),
- m[IS] != null ? m[IS] : m[GET],
- m[SET]);
- if(m[SET] != null) {
- p.setConstrained(ArrayHelper.contains(m[SET].getExceptionTypes(),java.beans.PropertyVetoException.class));
- }
- if(!b.hasProperty(p)) {
- b.addProperty(p);
- }
- }
- }
- }
-
- void findXXXInt(BeanInfoEmbryo b, int funcType) throws IntrospectionException {
- Enumeration keys = propertyMethods.keys();
- while(keys.hasMoreElements()) {
- DoubleKey k = (DoubleKey)keys.nextElement();
- Method[] m = (Method[])propertyMethods.get(k);
- if(m[funcType] != null) {
- boolean constrained;
- if(m[SET_I] != null) {
- constrained = ArrayHelper.contains(m[SET_I].getExceptionTypes(),java.beans.PropertyVetoException.class);
- } else {
- constrained = false;
- }
-
- /** Find out if there is an array type get or set **/
- Class arrayType = Array.newInstance(k.getType(),0).getClass();
- DoubleKey findSetArray = new DoubleKey(arrayType,k.getName());
- Method[] m2 = (Method[])propertyMethods.get(findSetArray);
- IndexedPropertyDescriptor p;
- if(m2 == null) {
- p = new IndexedPropertyDescriptor(Introspector.decapitalize(k.getName()),
- null,null,
- m[GET_I],m[SET_I]);
- } else {
- if(constrained && m2[SET] != null) {
- constrained = ArrayHelper.contains(m2[SET].getExceptionTypes(),java.beans.PropertyVetoException.class);
- }
- p = new IndexedPropertyDescriptor(Introspector.decapitalize(k.getName()),
- m2[GET],m2[SET],
- m[GET_I],m[SET_I]);
- }
- p.setConstrained(constrained);
- if(!b.hasProperty(p)) {
- b.addProperty(p);
- }
- }
- }
- }
-
- static final int IS=0;
- static final int GET_I=1;
- static final int SET_I=2;
- static final int GET=3;
- static final int SET=4;
-
- static final int ADD=0;
- static final int REMOVE=1;
-
- void addToPropertyHash(String name, Method method, int funcType) {
- String newName;
- Class type;
-
- switch(funcType) {
- case IS:
- type = java.lang.Boolean.TYPE;
- newName = name.substring(2);
- break;
- case GET_I:
- type = method.getReturnType();
- newName = name.substring(3);
- break;
- case SET_I:
- type = method.getParameterTypes()[1];
- newName = name.substring(3);
- break;
- case GET:
- type = method.getReturnType();
- newName = name.substring(3);
- break;
- case SET:
- type = method.getParameterTypes()[0];
- newName = name.substring(3);
- break;
- default:
- return;
- }
- newName = capitalize(newName);
- if (newName.length() == 0)
- return;
-
- DoubleKey k = new DoubleKey(type,newName);
- Method[] methods = (Method[])propertyMethods.get(k);
- if(methods == null) {
- methods = new Method[5];
- propertyMethods.put(k,methods);
- }
- methods[funcType] = method;
- }
-
- void addToListenerHash(String name, Method method, int funcType) {
- String newName;
- Class type;
-
- switch(funcType) {
- case ADD:
- type = method.getParameterTypes()[0];
- newName = name.substring(3,name.length()-8);
- break;
- case REMOVE:
- type = method.getParameterTypes()[0];
- newName = name.substring(6,name.length()-8);
- break;
- default:
- return;
- }
- newName = capitalize(newName);
- if (newName.length() == 0)
- return;
-
- DoubleKey k = new DoubleKey(type,newName);
- Method[] methods = (Method[])listenerMethods.get(k);
- if(methods == null) {
- methods = new Method[2];
- listenerMethods.put(k,methods);
- }
- methods[funcType] = method;
- }
-
- /* Determines whether <code>stopClass</code> is <code>null</code>
- * or <code>declaringClass<code> is a true subclass of <code>stopClass</code>.
- * This expression is useful to detect whether a method should be introspected or not.
- * The rules for this are described in {@link java.beans.Introspector.getBeanInfo(Class, Class)}.
- */
- static boolean isReachable(Class stopClass, Class declaringClass) {
- return stopClass == null || (stopClass.isAssignableFrom(declaringClass) && !stopClass.equals(declaringClass));
- }
-
- /** Transforms a property name into a part of a method name.
- * E.g. "value" becomes "Value" which can then concatenated with
- * "set", "get" or "is" to form a valid method name.
- *
- * Implementation notes:
- * If "" is the argument, it is returned without changes.
- * If <code>null</code> is the argument, <code>null</code> is returned.
- *
- * @param name Name of a property.
- * @return Part of a method name of a property.
- */
- static String capitalize(String name) {
- try {
- if(Character.isUpperCase(name.charAt(0))) {
- return name;
- } else {
- char[] c = name.toCharArray();
- c[0] = Character.toLowerCase(c[0]);
- return new String(c);
- }
- } catch(StringIndexOutOfBoundsException E) {
- return name;
- } catch(NullPointerException E) {
- return null;
- }
- }
+ Hashtable propertyMethods = new Hashtable();
+ Hashtable listenerMethods = new Hashtable();
+ Vector otherMethods = new Vector();
+
+ Class propertyStopClass;
+ Class eventStopClass;
+ Class methodStopClass;
+
+ public IntrospectionIncubator() {
+ }
+
+ /** Examines the given method and files it in a suitable collection.
+ * It files the method as a property method if it finds:
+ * <ul>
+ * <li>boolean "is" getter</li>
+ * <li>"get" style getter</li>
+ * <li>single argument setter</li>
+ * <li>indiced setter and getter</li>
+ * </ul>
+ * It files the method as a listener method if all of these rules apply:
+ * <ul>
+ * <li>the method name starts with "add" or "remove"</li>
+ * <li>there is only a single argument</li>
+ * <li>the argument type is a subclass of <code>java.util.EventListener</code></li>
+ * </ul>
+ * All public methods are filed as such.
+ *
+ * @param method The method instance to examine.
+ */
+ public void addMethod(Method method) {
+ if(Modifier.isPublic(method.getModifiers())) {
+ String name = ClassHelper.getTruncatedName(method.getName());
+ Class retType = method.getReturnType();
+ Class[] params = method.getParameterTypes();
+ boolean isVoid = retType.equals(java.lang.Void.TYPE);
+ Class methodClass = method.getDeclaringClass();
+
+ /* Accepts the method for examination if no stop class is given or the method is declared in a subclass of the stop class.
+ * The rules for this are described in {@link java.beans.Introspector.getBeanInfo(Class, Class)}.
+ * This block finds out whether the method is a suitable getter or setter method (or read/write method).
+ */
+ if(isReachable(propertyStopClass, methodClass)) {
+ /* At this point a method may regarded as a property's read or write method if its name
+ * starts with "is", "get" or "set". However, if a method is static it cannot be part
+ * of a property.
+ */
+ if(Modifier.isStatic(method.getModifiers())) {
+ // files method as other because it is static
+ otherMethods.addElement(method);
+ } else if(name.startsWith("is")
+ && retType.equals(java.lang.Boolean.TYPE)
+ && params.length == 0) {
+ // files method as boolean "is" style getter
+ addToPropertyHash(name,method,IS);
+ } else if(name.startsWith("get") && !isVoid) {
+ if(params.length == 0) {
+ // files as legal non-argument getter
+ addToPropertyHash(name,method,GET);
+ } else if(params.length == 1 && params[0].equals(java.lang.Integer.TYPE)) {
+ // files as legal indiced getter
+ addToPropertyHash(name,method,GET_I);
+ } else {
+ // files as other because the method's signature is not Bean-like
+ otherMethods.addElement(method);
+ }
+ } else if(name.startsWith("set") && isVoid) {
+ if(params.length == 1) {
+ // files as legal single-argument setter method
+ addToPropertyHash(name,method,SET);
+ } else if(params.length == 2 && params[0].equals(java.lang.Integer.TYPE)) {
+ // files as legal indiced setter method
+ addToPropertyHash(name,method,SET_I);
+ } else {
+ // files as other because the method's signature is not Bean-like
+ otherMethods.addElement(method);
+ }
+ }
+ }
+
+ if(isReachable(eventStopClass, methodClass)) {
+ if(name.startsWith("add")
+ && isVoid
+ && params.length == 1
+ && java.util.EventListener.class.isAssignableFrom(params[0])) {
+ addToListenerHash(name,method,ADD);
+ } else if(name.startsWith("remove")
+ && isVoid
+ && params.length == 1
+ && java.util.EventListener.class.isAssignableFrom(params[0])) {
+ addToListenerHash(name,method,REMOVE);
+ }
+ }
+
+ if(isReachable(methodStopClass, methodClass)) {
+ // files as reachable public method
+ otherMethods.addElement(method);
+ }
+
+ }
+ }
+
+ public void addMethods(Method[] m) {
+ for(int i=0;i<m.length;i++) {
+ addMethod(m[i]);
+ }
+ }
+
+ public void setPropertyStopClass(Class c) {
+ propertyStopClass = c;
+ }
+
+ public void setEventStopClass(Class c) {
+ eventStopClass = c;
+ }
+
+ public void setMethodStopClass(Class c) {
+ methodStopClass = c;
+ }
+
+
+ public BeanInfoEmbryo getBeanInfoEmbryo() throws IntrospectionException {
+ BeanInfoEmbryo b = new BeanInfoEmbryo();
+ findXXX(b,IS);
+ findXXXInt(b,GET_I);
+ findXXXInt(b,SET_I);
+ findXXX(b,GET);
+ findXXX(b,SET);
+ findAddRemovePairs(b);
+ for(int i=0;i<otherMethods.size();i++) {
+ MethodDescriptor newMethod = new MethodDescriptor((Method)otherMethods.elementAt(i));
+ if(!b.hasMethod(newMethod)) {
+ b.addMethod(new MethodDescriptor((Method)otherMethods.elementAt(i)));
+ }
+ }
+ return b;
+ }
+
+ public BeanInfo getBeanInfo() throws IntrospectionException {
+ return getBeanInfoEmbryo().getBeanInfo();
+ }
+
+
+ void findAddRemovePairs(BeanInfoEmbryo b) throws IntrospectionException {
+ Enumeration listenerEnum = listenerMethods.keys();
+ while(listenerEnum.hasMoreElements()) {
+ DoubleKey k = (DoubleKey)listenerEnum.nextElement();
+ Method[] m = (Method[])listenerMethods.get(k);
+ if(m[ADD] != null && m[REMOVE] != null) {
+ EventSetDescriptor e = new EventSetDescriptor(Introspector.decapitalize(k.getName()),
+ k.getType(), k.getType().getMethods(),
+ m[ADD],m[REMOVE]);
+ e.setUnicast(ArrayHelper.contains(m[ADD].getExceptionTypes(),java.util.TooManyListenersException.class));
+ if(!b.hasEvent(e)) {
+ b.addEvent(e);
+ }
+ }
+ }
+ }
+
+ void findXXX(BeanInfoEmbryo b, int funcType) throws IntrospectionException {
+ Enumeration keys = propertyMethods.keys();
+ while(keys.hasMoreElements()) {
+ DoubleKey k = (DoubleKey)keys.nextElement();
+ Method[] m = (Method[])propertyMethods.get(k);
+ if(m[funcType] != null) {
+ PropertyDescriptor p = new PropertyDescriptor(Introspector.decapitalize(k.getName()),
+ m[IS] != null ? m[IS] : m[GET],
+ m[SET]);
+ if(m[SET] != null) {
+ p.setConstrained(ArrayHelper.contains(m[SET].getExceptionTypes(),java.beans.PropertyVetoException.class));
+ }
+ if(!b.hasProperty(p)) {
+ b.addProperty(p);
+ }
+ }
+ }
+ }
+
+ void findXXXInt(BeanInfoEmbryo b, int funcType) throws IntrospectionException {
+ Enumeration keys = propertyMethods.keys();
+ while(keys.hasMoreElements()) {
+ DoubleKey k = (DoubleKey)keys.nextElement();
+ Method[] m = (Method[])propertyMethods.get(k);
+ if(m[funcType] != null) {
+ boolean constrained;
+ if(m[SET_I] != null) {
+ constrained = ArrayHelper.contains(m[SET_I].getExceptionTypes(),java.beans.PropertyVetoException.class);
+ } else {
+ constrained = false;
+ }
+
+ /** Find out if there is an array type get or set **/
+ Class arrayType = Array.newInstance(k.getType(),0).getClass();
+ DoubleKey findSetArray = new DoubleKey(arrayType,k.getName());
+ Method[] m2 = (Method[])propertyMethods.get(findSetArray);
+ IndexedPropertyDescriptor p;
+ if(m2 == null) {
+ p = new IndexedPropertyDescriptor(Introspector.decapitalize(k.getName()),
+ null,null,
+ m[GET_I],m[SET_I]);
+ } else {
+ if(constrained && m2[SET] != null) {
+ constrained = ArrayHelper.contains(m2[SET].getExceptionTypes(),java.beans.PropertyVetoException.class);
+ }
+ p = new IndexedPropertyDescriptor(Introspector.decapitalize(k.getName()),
+ m2[GET],m2[SET],
+ m[GET_I],m[SET_I]);
+ }
+ p.setConstrained(constrained);
+ if(!b.hasProperty(p)) {
+ b.addProperty(p);
+ }
+ }
+ }
+ }
+
+ static final int IS=0;
+ static final int GET_I=1;
+ static final int SET_I=2;
+ static final int GET=3;
+ static final int SET=4;
+
+ static final int ADD=0;
+ static final int REMOVE=1;
+
+ void addToPropertyHash(String name, Method method, int funcType) {
+ String newName;
+ Class type;
+
+ switch(funcType) {
+ case IS:
+ type = java.lang.Boolean.TYPE;
+ newName = name.substring(2);
+ break;
+ case GET_I:
+ type = method.getReturnType();
+ newName = name.substring(3);
+ break;
+ case SET_I:
+ type = method.getParameterTypes()[1];
+ newName = name.substring(3);
+ break;
+ case GET:
+ type = method.getReturnType();
+ newName = name.substring(3);
+ break;
+ case SET:
+ type = method.getParameterTypes()[0];
+ newName = name.substring(3);
+ break;
+ default:
+ return;
+ }
+ newName = capitalize(newName);
+ if (newName.length() == 0)
+ return;
+
+ DoubleKey k = new DoubleKey(type,newName);
+ Method[] methods = (Method[])propertyMethods.get(k);
+ if(methods == null) {
+ methods = new Method[5];
+ propertyMethods.put(k,methods);
+ }
+ methods[funcType] = method;
+ }
+
+ void addToListenerHash(String name, Method method, int funcType) {
+ String newName;
+ Class type;
+
+ switch(funcType) {
+ case ADD:
+ type = method.getParameterTypes()[0];
+ newName = name.substring(3,name.length()-8);
+ break;
+ case REMOVE:
+ type = method.getParameterTypes()[0];
+ newName = name.substring(6,name.length()-8);
+ break;
+ default:
+ return;
+ }
+ newName = capitalize(newName);
+ if (newName.length() == 0)
+ return;
+
+ DoubleKey k = new DoubleKey(type,newName);
+ Method[] methods = (Method[])listenerMethods.get(k);
+ if(methods == null) {
+ methods = new Method[2];
+ listenerMethods.put(k,methods);
+ }
+ methods[funcType] = method;
+ }
+
+ /* Determines whether <code>stopClass</code> is <code>null</code>
+ * or <code>declaringClass<code> is a true subclass of <code>stopClass</code>.
+ * This expression is useful to detect whether a method should be introspected or not.
+ * The rules for this are described in {@link java.beans.Introspector.getBeanInfo(Class, Class)}.
+ */
+ static boolean isReachable(Class stopClass, Class declaringClass) {
+ return stopClass == null || (stopClass.isAssignableFrom(declaringClass) && !stopClass.equals(declaringClass));
+ }
+
+ /** Transforms a property name into a part of a method name.
+ * E.g. "value" becomes "Value" which can then concatenated with
+ * "set", "get" or "is" to form a valid method name.
+ *
+ * Implementation notes:
+ * If "" is the argument, it is returned without changes.
+ * If <code>null</code> is the argument, <code>null</code> is returned.
+ *
+ * @param name Name of a property.
+ * @return Part of a method name of a property.
+ */
+ static String capitalize(String name) {
+ try {
+ if(Character.isUpperCase(name.charAt(0))) {
+ return name;
+ } else {
+ char[] c = name.toCharArray();
+ c[0] = Character.toLowerCase(c[0]);
+ return new String(c);
+ }
+ } catch(StringIndexOutOfBoundsException E) {
+ return name;
+ } catch(NullPointerException E) {
+ return null;
+ }
+ }
}
/** This class is a hashmap key that consists of a <code>Class</code> and a
* <code>String</code> element.
- *
+ *
* It is used for XXX: find out what this is used for
- *
+ *
* @author John Keiser
* @author Robert Schuster
- */
+ */
class DoubleKey {
- Class type;
- String name;
-
- DoubleKey(Class type, String name) {
- this.type = type;
- this.name = name;
- }
-
- Class getType() {
- return type;
- }
-
- String getName() {
- return name;
- }
-
- public boolean equals(Object o) {
- if(o instanceof DoubleKey) {
- DoubleKey d = (DoubleKey)o;
- return d.type.equals(type) && d.name.equals(name);
- } else {
- return false;
- }
- }
-
- public int hashCode() {
- return type.hashCode() ^ name.hashCode();
- }
+ Class type;
+ String name;
+
+ DoubleKey(Class type, String name) {
+ this.type = type;
+ this.name = name;
+ }
+
+ Class getType() {
+ return type;
+ }
+
+ String getName() {
+ return name;
+ }
+
+ public boolean equals(Object o) {
+ if(o instanceof DoubleKey) {
+ DoubleKey d = (DoubleKey)o;
+ return d.type.equals(type) && d.name.equals(name);
+ } else {
+ return false;
+ }
+ }
+
+ public int hashCode() {
+ return type.hashCode() ^ name.hashCode();
+ }
}
diff --git a/gnu/java/beans/decoder/AbstractContext.java b/gnu/java/beans/decoder/AbstractContext.java
index 0e95d4329..e6f90e21f 100644
--- a/gnu/java/beans/decoder/AbstractContext.java
+++ b/gnu/java/beans/decoder/AbstractContext.java
@@ -7,7 +7,7 @@ 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
diff --git a/gnu/java/beans/decoder/AbstractCreatableObjectContext.java b/gnu/java/beans/decoder/AbstractCreatableObjectContext.java
index 47f04fa1c..d108f191c 100644
--- a/gnu/java/beans/decoder/AbstractCreatableObjectContext.java
+++ b/gnu/java/beans/decoder/AbstractCreatableObjectContext.java
@@ -7,7 +7,7 @@ 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
@@ -65,7 +65,7 @@ abstract class AbstractCreatableObjectContext extends AbstractObjectContext
/** Adds a parameter object to this Context. Implement this without caring
* for illegal states because this has been done already.
*
- * @param obj The parameter object to be added.
+ * @param obj The parameter object to be added.
*/
protected abstract void addParameterObjectImpl(Object obj);
@@ -83,7 +83,7 @@ abstract class AbstractCreatableObjectContext extends AbstractObjectContext
/** Creates the result object. This method is called only once. Implement this
* without checking for double invocations as this is already being prevented.
*
- * @param outerContext The Context that exists around this one.
+ * @param outerContext The Context that exists around this one.
* @return The result object.
* @throws AssemblerException if the object creation fails somehow.
*/
diff --git a/gnu/java/beans/decoder/AbstractElementHandler.java b/gnu/java/beans/decoder/AbstractElementHandler.java
index e5578a990..51765658f 100644
--- a/gnu/java/beans/decoder/AbstractElementHandler.java
+++ b/gnu/java/beans/decoder/AbstractElementHandler.java
@@ -7,7 +7,7 @@ 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
@@ -91,21 +91,21 @@ abstract class AbstractElementHandler implements ElementHandler
{
try
{
- // lets the subclass create the appropriate Context instance
- context = startElement(attributes, exceptionListener);
+ // lets the subclass create the appropriate Context instance
+ context = startElement(attributes, exceptionListener);
}
catch (AssemblyException pe)
{
- Throwable t = pe.getCause();
+ Throwable t = pe.getCause();
- if (t instanceof Exception)
- exceptionListener.exceptionThrown((Exception) t);
- else
- throw new InternalError("Unexpected Throwable type in AssemblerException. Please file a bug report.");
+ if (t instanceof Exception)
+ exceptionListener.exceptionThrown((Exception) t);
+ else
+ throw new InternalError("Unexpected Throwable type in AssemblerException. Please file a bug report.");
- notifyContextFailed();
+ notifyContextFailed();
- return;
+ return;
}
}
@@ -129,48 +129,48 @@ abstract class AbstractElementHandler implements ElementHandler
// is then invalid or may not exist at all)
if (!hasFailed)
{
- try
- {
- // note: the order of operations is very important here
- // sends the stored character data to the Context
- endElement(buffer.toString());
-
- // reports to the parent handler if this handler's Context is a
- // statement (returning no value BACK to the parent's Context)
- if (context.isStatement())
- {
- // This may create a valid result in the parent's Context
- // or let it fail
- parent.notifyStatement(exceptionListener);
-
- // skips any further processing if the parent handler is now marked
- // as failed
- if (parent.hasFailed())
- return;
- }
-
- // processes the Context and stores the result
- putObject(context.getId(), context.endContext(parent.getContext()));
-
- // transfers the Context's results to the parent's Context
- // if it is an expression (rather than a statement)
- if (! context.isStatement())
- parent.getContext().addParameterObject(context.getResult());
- }
- catch (AssemblyException pe)
- {
- // notifies that an exception was thrown in this handler's Context
- Throwable t = pe.getCause();
-
- if (t instanceof Exception)
- exceptionListener.exceptionThrown((Exception) t);
- else
- throw (InternalError) new InternalError("Severe problem while decoding XML data.")
- .initCause(t);
-
- // marks the handler as failed
- notifyContextFailed();
- }
+ try
+ {
+ // note: the order of operations is very important here
+ // sends the stored character data to the Context
+ endElement(buffer.toString());
+
+ // reports to the parent handler if this handler's Context is a
+ // statement (returning no value BACK to the parent's Context)
+ if (context.isStatement())
+ {
+ // This may create a valid result in the parent's Context
+ // or let it fail
+ parent.notifyStatement(exceptionListener);
+
+ // skips any further processing if the parent handler is now marked
+ // as failed
+ if (parent.hasFailed())
+ return;
+ }
+
+ // processes the Context and stores the result
+ putObject(context.getId(), context.endContext(parent.getContext()));
+
+ // transfers the Context's results to the parent's Context
+ // if it is an expression (rather than a statement)
+ if (! context.isStatement())
+ parent.getContext().addParameterObject(context.getResult());
+ }
+ catch (AssemblyException pe)
+ {
+ // notifies that an exception was thrown in this handler's Context
+ Throwable t = pe.getCause();
+
+ if (t instanceof Exception)
+ exceptionListener.exceptionThrown((Exception) t);
+ else
+ throw (InternalError) new InternalError("Severe problem while decoding XML data.")
+ .initCause(t);
+
+ // marks the handler as failed
+ notifyContextFailed();
+ }
}
}
@@ -184,31 +184,31 @@ abstract class AbstractElementHandler implements ElementHandler
{
try
{
-
- // propagates to parent handler first to generate objects
- // needed by this Context instance
- if(context.isStatement())
- {
- parent.notifyStatement(exceptionListener);
- }
-
- // Some Context instances do stuff which can fail now. If that
- // happens this handler is marked as failed.
- context.notifyStatement(parent.getContext());
+
+ // propagates to parent handler first to generate objects
+ // needed by this Context instance
+ if(context.isStatement())
+ {
+ parent.notifyStatement(exceptionListener);
+ }
+
+ // Some Context instances do stuff which can fail now. If that
+ // happens this handler is marked as failed.
+ context.notifyStatement(parent.getContext());
}
catch (AssemblyException ae)
{
- // notifies that an exception was thrown in this handler's Context
- Throwable t = ae.getCause();
+ // notifies that an exception was thrown in this handler's Context
+ Throwable t = ae.getCause();
- if (t instanceof Exception)
- exceptionListener.exceptionThrown((Exception) t);
- else
- throw (InternalError) new InternalError("Severe problem while decoding XML data.")
- .initCause(t);
+ if (t instanceof Exception)
+ exceptionListener.exceptionThrown((Exception) t);
+ else
+ throw (InternalError) new InternalError("Severe problem while decoding XML data.")
+ .initCause(t);
- // marks the handler as failed
- notifyContextFailed();
+ // marks the handler as failed
+ notifyContextFailed();
}
}
diff --git a/gnu/java/beans/decoder/AbstractObjectContext.java b/gnu/java/beans/decoder/AbstractObjectContext.java
index 202c33b34..963ef0905 100644
--- a/gnu/java/beans/decoder/AbstractObjectContext.java
+++ b/gnu/java/beans/decoder/AbstractObjectContext.java
@@ -7,7 +7,7 @@ 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
diff --git a/gnu/java/beans/decoder/ArrayContext.java b/gnu/java/beans/decoder/ArrayContext.java
index cf4267f27..bdec1c647 100644
--- a/gnu/java/beans/decoder/ArrayContext.java
+++ b/gnu/java/beans/decoder/ArrayContext.java
@@ -7,7 +7,7 @@ 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
@@ -67,7 +67,7 @@ class ArrayContext extends AbstractContext
*/
public void notifyStatement(Context outerContext)
{
- // method call intentionally ignored because there is not any useful effect
+ // method call intentionally ignored because there is not any useful effect
}
/* (non-Javadoc)
@@ -92,11 +92,11 @@ class ArrayContext extends AbstractContext
{
try
{
- Array.set(array, index, o);
+ Array.set(array, index, o);
}
catch (ArrayIndexOutOfBoundsException aioobe)
{
- throw new AssemblyException(aioobe);
+ throw new AssemblyException(aioobe);
}
}
@@ -104,11 +104,11 @@ class ArrayContext extends AbstractContext
{
try
{
- return Array.get(array, index);
+ return Array.get(array, index);
}
catch (ArrayIndexOutOfBoundsException aioobe)
{
- throw new AssemblyException(aioobe);
+ throw new AssemblyException(aioobe);
}
}
diff --git a/gnu/java/beans/decoder/ArrayHandler.java b/gnu/java/beans/decoder/ArrayHandler.java
index 23f028519..28930f519 100644
--- a/gnu/java/beans/decoder/ArrayHandler.java
+++ b/gnu/java/beans/decoder/ArrayHandler.java
@@ -7,7 +7,7 @@ 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
@@ -86,31 +86,31 @@ class ArrayHandler extends AbstractElementHandler
if (className != null)
{
- try
- {
- Class klass;
-
- if (typeMap.containsKey(className))
- klass = (Class) typeMap.get(className);
- else
- klass = instantiateClass(className);
-
- String length = attributes.getValue("length");
- if (length != null)
- // creates Array with predefined length
- return new ArrayContext(id, klass, Integer.parseInt(length));
- else
- // creates Array without length restriction
- return new GrowableArrayContext(id, klass);
- }
- catch (ClassNotFoundException cnfe)
- {
- throw new AssemblyException(cnfe);
- }
- catch (NumberFormatException nfe)
- {
- throw new AssemblyException(nfe);
- }
+ try
+ {
+ Class klass;
+
+ if (typeMap.containsKey(className))
+ klass = (Class) typeMap.get(className);
+ else
+ klass = instantiateClass(className);
+
+ String length = attributes.getValue("length");
+ if (length != null)
+ // creates Array with predefined length
+ return new ArrayContext(id, klass, Integer.parseInt(length));
+ else
+ // creates Array without length restriction
+ return new GrowableArrayContext(id, klass);
+ }
+ catch (ClassNotFoundException cnfe)
+ {
+ throw new AssemblyException(cnfe);
+ }
+ catch (NumberFormatException nfe)
+ {
+ throw new AssemblyException(nfe);
+ }
}
throw new AssemblyException(new IllegalArgumentException("Missing 'class' attribute in <array> tag."));
diff --git a/gnu/java/beans/decoder/AssemblyException.java b/gnu/java/beans/decoder/AssemblyException.java
index 29dfa65ac..206c5841b 100644
--- a/gnu/java/beans/decoder/AssemblyException.java
+++ b/gnu/java/beans/decoder/AssemblyException.java
@@ -7,7 +7,7 @@ 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
@@ -41,7 +41,7 @@ package gnu.java.beans.decoder;
/** The AssemblyException is used to wrap the cause of problems when assembling objects.
* In all cases only the wrapped exception is given to the PersistenceParser's
* ExceptionListener instance (never the AssemblyException itself).
- *
+ *
* <p>Note: Often multiple steps are needed to construct a fully usuable object instance.
* Such a construction can be called assembly and thats why this exception was
* named AssemblyException.</p>
diff --git a/gnu/java/beans/decoder/BooleanHandler.java b/gnu/java/beans/decoder/BooleanHandler.java
index a675e8c90..20aed9a3f 100644
--- a/gnu/java/beans/decoder/BooleanHandler.java
+++ b/gnu/java/beans/decoder/BooleanHandler.java
@@ -7,7 +7,7 @@ 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
diff --git a/gnu/java/beans/decoder/ByteHandler.java b/gnu/java/beans/decoder/ByteHandler.java
index d6c33d14d..830bbc747 100644
--- a/gnu/java/beans/decoder/ByteHandler.java
+++ b/gnu/java/beans/decoder/ByteHandler.java
@@ -7,7 +7,7 @@ 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
diff --git a/gnu/java/beans/decoder/CharHandler.java b/gnu/java/beans/decoder/CharHandler.java
index 1b31e5b05..114df8b79 100644
--- a/gnu/java/beans/decoder/CharHandler.java
+++ b/gnu/java/beans/decoder/CharHandler.java
@@ -7,7 +7,7 @@ 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
diff --git a/gnu/java/beans/decoder/ClassHandler.java b/gnu/java/beans/decoder/ClassHandler.java
index 1dbdd63e7..c67a79a48 100644
--- a/gnu/java/beans/decoder/ClassHandler.java
+++ b/gnu/java/beans/decoder/ClassHandler.java
@@ -7,7 +7,7 @@ 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
@@ -56,11 +56,11 @@ class ClassHandler extends SimpleHandler
{
try
{
- return instantiateClass(characters);
+ return instantiateClass(characters);
}
catch (ClassNotFoundException cnfe)
{
- throw new AssemblyException(cnfe);
+ throw new AssemblyException(cnfe);
}
}
}
diff --git a/gnu/java/beans/decoder/ConstructorContext.java b/gnu/java/beans/decoder/ConstructorContext.java
index 7838fb7e2..32365eef4 100644
--- a/gnu/java/beans/decoder/ConstructorContext.java
+++ b/gnu/java/beans/decoder/ConstructorContext.java
@@ -7,7 +7,7 @@ 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
@@ -57,7 +57,7 @@ class ConstructorContext extends AbstractCreatableObjectContext
ConstructorContext(String id, Class newClass)
{
setId(id);
- // sets superclass field
+ // sets superclass field
klass = newClass;
}
@@ -76,27 +76,27 @@ class ConstructorContext extends AbstractCreatableObjectContext
try
{
- Constructor constructor = MethodFinder.getConstructor(klass, args);
+ Constructor constructor = MethodFinder.getConstructor(klass, args);
- // instantiates object (klass field gets re-set by superclass)
- return constructor.newInstance(args);
+ // instantiates object (klass field gets re-set by superclass)
+ return constructor.newInstance(args);
}
catch (NoSuchMethodException nsme)
{
- throw new AssemblyException(nsme);
+ throw new AssemblyException(nsme);
}
catch (InvocationTargetException ite)
{
- throw new AssemblyException(ite.getCause());
+ throw new AssemblyException(ite.getCause());
}
catch (IllegalAccessException iae)
{
- throw new AssemblyException(iae);
+ throw new AssemblyException(iae);
}
catch (InstantiationException ie)
{
- throw new AssemblyException(ie);
+ throw new AssemblyException(ie);
}
}
-
+
}
diff --git a/gnu/java/beans/decoder/Context.java b/gnu/java/beans/decoder/Context.java
index a2db09732..4bdbc9ce5 100644
--- a/gnu/java/beans/decoder/Context.java
+++ b/gnu/java/beans/decoder/Context.java
@@ -7,7 +7,7 @@ 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
diff --git a/gnu/java/beans/decoder/DecoderContext.java b/gnu/java/beans/decoder/DecoderContext.java
index 69d84e576..174a3b71b 100644
--- a/gnu/java/beans/decoder/DecoderContext.java
+++ b/gnu/java/beans/decoder/DecoderContext.java
@@ -7,7 +7,7 @@ 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
@@ -113,12 +113,12 @@ public class DecoderContext extends AbstractContext
}
/** Returns an Iterator that retrieves the assembled objects.
- *
+ *
* @return An Iterator retrieving assembled objects.
*/
public Iterator iterator()
{
return objects.iterator();
}
-
+
}
diff --git a/gnu/java/beans/decoder/DoubleHandler.java b/gnu/java/beans/decoder/DoubleHandler.java
index 8f6be7ec0..1a14fbabf 100644
--- a/gnu/java/beans/decoder/DoubleHandler.java
+++ b/gnu/java/beans/decoder/DoubleHandler.java
@@ -7,7 +7,7 @@ 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
diff --git a/gnu/java/beans/decoder/DummyContext.java b/gnu/java/beans/decoder/DummyContext.java
index f3b24549d..03f209c8c 100644
--- a/gnu/java/beans/decoder/DummyContext.java
+++ b/gnu/java/beans/decoder/DummyContext.java
@@ -7,7 +7,7 @@ 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
@@ -60,7 +60,7 @@ public class DummyContext extends AbstractContext
*/
public void notifyStatement(Context outerContext) throws AssemblyException
{
- // intentionally ignored
+ // intentionally ignored
}
/* (non-Javadoc)
@@ -69,7 +69,7 @@ public class DummyContext extends AbstractContext
public Object endContext(Context outerContext) throws AssemblyException
{
fail();
- return null;
+ return null;
}
/* (non-Javadoc)
@@ -78,7 +78,7 @@ public class DummyContext extends AbstractContext
public boolean subContextFailed()
{
fail();
- return false;
+ return false;
}
/* (non-Javadoc)
@@ -95,7 +95,7 @@ public class DummyContext extends AbstractContext
public Object get(int index) throws AssemblyException
{
fail();
- return null;
+ return null;
}
/* (non-Javadoc)
@@ -104,13 +104,13 @@ public class DummyContext extends AbstractContext
public Object getResult()
{
fail();
- return null;
+ return null;
}
private void fail()
{
throw new InternalError("Invoking the DummyContext is not expected"
- + " - Please file a bug report at"
- + " http://www/gnu.org/software/classpath/.");
+ + " - Please file a bug report at"
+ + " http://www/gnu.org/software/classpath/.");
}
}
diff --git a/gnu/java/beans/decoder/DummyHandler.java b/gnu/java/beans/decoder/DummyHandler.java
index 880d76adc..f9c133e54 100644
--- a/gnu/java/beans/decoder/DummyHandler.java
+++ b/gnu/java/beans/decoder/DummyHandler.java
@@ -7,7 +7,7 @@ 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
@@ -89,7 +89,7 @@ class DummyHandler implements ElementHandler
throws ClassNotFoundException
{
fail();
- return null;
+ return null;
}
/* (non-Javadoc)
@@ -138,19 +138,19 @@ class DummyHandler implements ElementHandler
public Object getObject(String objectId)
{
fail();
- return null;
+ return null;
}
public ElementHandler getParent()
{
fail();
- return null;
+ return null;
}
private void fail()
{
throw new InternalError("Invoking the DummyHandler is not expected"
- + " - Please file a bug report at "
- + " http://www.gnu.org/software/classpath/.");
+ + " - Please file a bug report at "
+ + " http://www.gnu.org/software/classpath/.");
}
}
diff --git a/gnu/java/beans/decoder/ElementHandler.java b/gnu/java/beans/decoder/ElementHandler.java
index e6ae60af8..12e945bbf 100644
--- a/gnu/java/beans/decoder/ElementHandler.java
+++ b/gnu/java/beans/decoder/ElementHandler.java
@@ -7,7 +7,7 @@ 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
@@ -72,19 +72,19 @@ interface ElementHandler
/** Returns whether a subelement of the given name is allowed. The rules
* for evaluating this are derived from the javabeans.dtd which can be found
* here: <a href="http://java.sun.com/products/jfc/tsc/articles/persistence3">Java Persistence Article</a>.
- *
- * @param subElementName
+ *
+ * @param subElementName
* @return
*/
boolean isSubelementAllowed(String subElementName);
/** Provides the same functionality as Class.forName() but allows the decoder
* to use a different class loader.
- *
+ *
* @param className
* @return
* @throws ClassNotFoundException
- */
+ */
Class instantiateClass(String className) throws ClassNotFoundException;
/** Notifies the handler's Context that its child Context will not return
@@ -104,21 +104,21 @@ interface ElementHandler
boolean hasFailed();
/** Returns the Context instance this handler is working on.
- *
+ *
* @return The handler's Context instance.
*/
Context getContext();
/** Notifies the handler that its Context failed and starts a recursive
* invocation of the parent handler if it is affected by that failure.
- *
+ *
* Although the method is a public API member it is only used internally.
*/
void notifyContextFailed();
/** Stores the object under the given id. The object is not stored if the
* id is null.
- *
+ *
* @param objectId
* @param o
*/
diff --git a/gnu/java/beans/decoder/FloatHandler.java b/gnu/java/beans/decoder/FloatHandler.java
index 5f0e15cef..443f38f91 100644
--- a/gnu/java/beans/decoder/FloatHandler.java
+++ b/gnu/java/beans/decoder/FloatHandler.java
@@ -7,7 +7,7 @@ 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
diff --git a/gnu/java/beans/decoder/GrowableArrayContext.java b/gnu/java/beans/decoder/GrowableArrayContext.java
index f24a60b4a..fb386d1d5 100644
--- a/gnu/java/beans/decoder/GrowableArrayContext.java
+++ b/gnu/java/beans/decoder/GrowableArrayContext.java
@@ -7,7 +7,7 @@ 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
@@ -46,11 +46,11 @@ import java.lang.reflect.Array;
class GrowableArrayContext extends AbstractContext
{
private static final int INITIAL_SIZE = 16;
-
+
private Class klass;
private Object array;
private int length;
-
+
GrowableArrayContext(String id, Class newClass)
{
setId(id);
@@ -69,7 +69,7 @@ class GrowableArrayContext extends AbstractContext
System.arraycopy(array, 0, tmp, 0, length);
array = tmp;
}
-
+
try {
Array.set(array, length++, o);
} catch(IllegalArgumentException iae) {
@@ -97,7 +97,7 @@ class GrowableArrayContext extends AbstractContext
System.arraycopy(array, 0, tmp, 0, length);
array = tmp;
}
-
+
return array;
}
@@ -119,7 +119,7 @@ class GrowableArrayContext extends AbstractContext
try {
Array.set(array, index, o);
} catch(IllegalArgumentException iae) {
- throw new AssemblyException(iae);
+ throw new AssemblyException(iae);
}
}
diff --git a/gnu/java/beans/decoder/IndexContext.java b/gnu/java/beans/decoder/IndexContext.java
index 11f840cae..b5af9019f 100644
--- a/gnu/java/beans/decoder/IndexContext.java
+++ b/gnu/java/beans/decoder/IndexContext.java
@@ -7,7 +7,7 @@ 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
@@ -65,8 +65,8 @@ class IndexContext extends AbstractContext
{
if (! isSetter)
{
- argument = o;
- isSetter = true;
+ argument = o;
+ isSetter = true;
}
else
throw new AssemblyException(new IllegalStateException("More than one argument for indiced access is not possible."));
@@ -87,10 +87,10 @@ class IndexContext extends AbstractContext
{
if (isSetter)
{
- // setter
- outerContext.set(index, argument);
+ // setter
+ outerContext.set(index, argument);
- return null;
+ return null;
}
else
// getter
diff --git a/gnu/java/beans/decoder/IntHandler.java b/gnu/java/beans/decoder/IntHandler.java
index a96f4a031..bbd3560d7 100644
--- a/gnu/java/beans/decoder/IntHandler.java
+++ b/gnu/java/beans/decoder/IntHandler.java
@@ -7,7 +7,7 @@ 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
diff --git a/gnu/java/beans/decoder/JavaHandler.java b/gnu/java/beans/decoder/JavaHandler.java
index 3bc8c6028..c4b4f92c5 100644
--- a/gnu/java/beans/decoder/JavaHandler.java
+++ b/gnu/java/beans/decoder/JavaHandler.java
@@ -7,7 +7,7 @@ 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
@@ -69,7 +69,7 @@ public class JavaHandler extends AbstractElementHandler
protected Context startElement(Attributes attributes, ExceptionListener exceptionListener)
throws AssemblyException
{
- // may expect version and class attribute but it not used in JDK
+ // may expect version and class attribute but it not used in JDK
// so we do either
return context;
}
diff --git a/gnu/java/beans/decoder/LongHandler.java b/gnu/java/beans/decoder/LongHandler.java
index d7bfa54e5..13e0a8dde 100644
--- a/gnu/java/beans/decoder/LongHandler.java
+++ b/gnu/java/beans/decoder/LongHandler.java
@@ -7,7 +7,7 @@ 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
diff --git a/gnu/java/beans/decoder/MethodContext.java b/gnu/java/beans/decoder/MethodContext.java
index bad0a213f..84eead7a0 100644
--- a/gnu/java/beans/decoder/MethodContext.java
+++ b/gnu/java/beans/decoder/MethodContext.java
@@ -7,7 +7,7 @@ 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
diff --git a/gnu/java/beans/decoder/MethodFinder.java b/gnu/java/beans/decoder/MethodFinder.java
index 3968b173a..82783fbde 100644
--- a/gnu/java/beans/decoder/MethodFinder.java
+++ b/gnu/java/beans/decoder/MethodFinder.java
@@ -7,7 +7,7 @@ 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
@@ -43,135 +43,135 @@ import java.util.HashMap;
class MethodFinder
{
- /** Provides a mapping between a wrapper class and its corresponding primitive's type. */
- private static HashMap typeMapping = new HashMap();
-
- static {
- typeMapping.put(Byte.class, Byte.TYPE);
- typeMapping.put(Short.class, Short.TYPE);
- typeMapping.put(Integer.class, Integer.TYPE);
- typeMapping.put(Long.class, Long.TYPE);
- typeMapping.put(Float.class, Float.TYPE);
- typeMapping.put(Double.class, Double.TYPE);
-
- typeMapping.put(Character.class, Character.TYPE);
- typeMapping.put(Boolean.class, Boolean.TYPE);
- }
-
- private MethodFinder()
- {
- }
-
- /** Searches a Method which can accept the given arguments.
- *
- * @param klass
- * @param name
- * @param arguments
- * @return
- * @throws NoSuchMethodException
- */
- static Method getMethod(Class klass, String name, Object[] arguments)
- throws NoSuchMethodException
- {
- // prepares array containing the types of the arguments
- Class[] argumentTypes = getArgumentTypes(arguments);
-
- Method[] methods = klass.getMethods();
-
- // iterates over all public methods
- for (int i = 0; i < methods.length; i++)
- {
- if (methods[i].getName().equals(name))
- {
- if (matchingArgumentTypes(methods[i].getParameterTypes(),
- argumentTypes))
- return methods[i];
- }
- }
-
- throw new NoSuchMethodException(
- "Could not find a matching method named "
- + name
- + "() in class "
- + klass);
- }
-
- static Constructor getConstructor(Class klass, Object[] arguments)
- throws NoSuchMethodException
- {
- Class[] argumentTypes = getArgumentTypes(arguments);
- Constructor[] constructors = klass.getConstructors();
-
- // iterates over all public methods
- for (int i = 0; i < constructors.length; i++)
- {
- if (matchingArgumentTypes(constructors[i].getParameterTypes(),
- argumentTypes))
- return constructors[i];
- }
-
- throw new NoSuchMethodException(
- "Could not find a matching constructor in class " + klass);
- }
-
- /** Transforms an array of argument objects into an array of argument types.
- * For each argument being null the argument is null, too. An argument type
- * being null means: Accepts everything (although this can be ambigous).
- *
- * @param arguments
- * @return
- */
- private static Class[] getArgumentTypes(Object[] arguments)
- {
- if (arguments == null)
- return new Class[0];
-
- // prepares array containing the types of the arguments
- Class[] argumentTypes = new Class[arguments.length];
- for (int i = 0; i < arguments.length; i++)
- argumentTypes[i] =
- (arguments[i] == null) ? null : arguments[i].getClass();
- return argumentTypes;
- }
-
- /** Tests whether the argument types supplied to the method argument types
- * are assignable. In addition to the assignment specifications this method
- * handles the primitive's wrapper classes as if they were of their
- * primitive type (e.g Boolean.class equals Boolean.TYPE).
- * When a supplied argument type is null it is assumed that no argument
- * object was supplied for it and the test for this particular parameter will
- * pass.
- *
- * @param methodArgTypes
- * @param suppliedArgTypes
- * @return
- */
- private static boolean matchingArgumentTypes(
- Class[] methodArgTypes,
- Class[] suppliedArgTypes)
- {
- if (methodArgTypes.length != suppliedArgTypes.length)
- return false;
-
- for (int i = 0; i < methodArgTypes.length; i++)
- {
- if (suppliedArgTypes[i] == null)
- {
- // by definition a non-existant argument type (null) can be converted to everything
- continue;
- }
- else if (typeMapping.containsKey(suppliedArgTypes[i]))
- {
- Class primitiveType =
- (Class) typeMapping.get(suppliedArgTypes[i]);
- if (!(methodArgTypes[i].isAssignableFrom(suppliedArgTypes[i])
- || methodArgTypes[i].isAssignableFrom(primitiveType)))
- return false;
- }
- else if (!methodArgTypes[i].isAssignableFrom(suppliedArgTypes[i]))
- return false;
- }
-
- return true;
- }
+ /** Provides a mapping between a wrapper class and its corresponding primitive's type. */
+ private static HashMap typeMapping = new HashMap();
+
+ static {
+ typeMapping.put(Byte.class, Byte.TYPE);
+ typeMapping.put(Short.class, Short.TYPE);
+ typeMapping.put(Integer.class, Integer.TYPE);
+ typeMapping.put(Long.class, Long.TYPE);
+ typeMapping.put(Float.class, Float.TYPE);
+ typeMapping.put(Double.class, Double.TYPE);
+
+ typeMapping.put(Character.class, Character.TYPE);
+ typeMapping.put(Boolean.class, Boolean.TYPE);
+ }
+
+ private MethodFinder()
+ {
+ }
+
+ /** Searches a Method which can accept the given arguments.
+ *
+ * @param klass
+ * @param name
+ * @param arguments
+ * @return
+ * @throws NoSuchMethodException
+ */
+ static Method getMethod(Class klass, String name, Object[] arguments)
+ throws NoSuchMethodException
+ {
+ // prepares array containing the types of the arguments
+ Class[] argumentTypes = getArgumentTypes(arguments);
+
+ Method[] methods = klass.getMethods();
+
+ // iterates over all public methods
+ for (int i = 0; i < methods.length; i++)
+ {
+ if (methods[i].getName().equals(name))
+ {
+ if (matchingArgumentTypes(methods[i].getParameterTypes(),
+ argumentTypes))
+ return methods[i];
+ }
+ }
+
+ throw new NoSuchMethodException(
+ "Could not find a matching method named "
+ + name
+ + "() in class "
+ + klass);
+ }
+
+ static Constructor getConstructor(Class klass, Object[] arguments)
+ throws NoSuchMethodException
+ {
+ Class[] argumentTypes = getArgumentTypes(arguments);
+ Constructor[] constructors = klass.getConstructors();
+
+ // iterates over all public methods
+ for (int i = 0; i < constructors.length; i++)
+ {
+ if (matchingArgumentTypes(constructors[i].getParameterTypes(),
+ argumentTypes))
+ return constructors[i];
+ }
+
+ throw new NoSuchMethodException(
+ "Could not find a matching constructor in class " + klass);
+ }
+
+ /** Transforms an array of argument objects into an array of argument types.
+ * For each argument being null the argument is null, too. An argument type
+ * being null means: Accepts everything (although this can be ambigous).
+ *
+ * @param arguments
+ * @return
+ */
+ private static Class[] getArgumentTypes(Object[] arguments)
+ {
+ if (arguments == null)
+ return new Class[0];
+
+ // prepares array containing the types of the arguments
+ Class[] argumentTypes = new Class[arguments.length];
+ for (int i = 0; i < arguments.length; i++)
+ argumentTypes[i] =
+ (arguments[i] == null) ? null : arguments[i].getClass();
+ return argumentTypes;
+ }
+
+ /** Tests whether the argument types supplied to the method argument types
+ * are assignable. In addition to the assignment specifications this method
+ * handles the primitive's wrapper classes as if they were of their
+ * primitive type (e.g Boolean.class equals Boolean.TYPE).
+ * When a supplied argument type is null it is assumed that no argument
+ * object was supplied for it and the test for this particular parameter will
+ * pass.
+ *
+ * @param methodArgTypes
+ * @param suppliedArgTypes
+ * @return
+ */
+ private static boolean matchingArgumentTypes(
+ Class[] methodArgTypes,
+ Class[] suppliedArgTypes)
+ {
+ if (methodArgTypes.length != suppliedArgTypes.length)
+ return false;
+
+ for (int i = 0; i < methodArgTypes.length; i++)
+ {
+ if (suppliedArgTypes[i] == null)
+ {
+ // by definition a non-existant argument type (null) can be converted to everything
+ continue;
+ }
+ else if (typeMapping.containsKey(suppliedArgTypes[i]))
+ {
+ Class primitiveType =
+ (Class) typeMapping.get(suppliedArgTypes[i]);
+ if (!(methodArgTypes[i].isAssignableFrom(suppliedArgTypes[i])
+ || methodArgTypes[i].isAssignableFrom(primitiveType)))
+ return false;
+ }
+ else if (!methodArgTypes[i].isAssignableFrom(suppliedArgTypes[i]))
+ return false;
+ }
+
+ return true;
+ }
}
diff --git a/gnu/java/beans/decoder/NullHandler.java b/gnu/java/beans/decoder/NullHandler.java
index 549617db3..01c9727d4 100644
--- a/gnu/java/beans/decoder/NullHandler.java
+++ b/gnu/java/beans/decoder/NullHandler.java
@@ -7,7 +7,7 @@ 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
diff --git a/gnu/java/beans/decoder/ObjectContext.java b/gnu/java/beans/decoder/ObjectContext.java
index cf88a2c2c..883c1d600 100644
--- a/gnu/java/beans/decoder/ObjectContext.java
+++ b/gnu/java/beans/decoder/ObjectContext.java
@@ -7,7 +7,7 @@ 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
diff --git a/gnu/java/beans/decoder/ObjectHandler.java b/gnu/java/beans/decoder/ObjectHandler.java
index dc5b3290b..ececfbbe2 100644
--- a/gnu/java/beans/decoder/ObjectHandler.java
+++ b/gnu/java/beans/decoder/ObjectHandler.java
@@ -7,7 +7,7 @@ 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
@@ -90,78 +90,78 @@ public class ObjectHandler extends AbstractElementHandler
// decides whether we are in a static (className present) or dynamic context
if (className != null)
{
- try
- {
- Class klass = instantiateClass(className);
-
- // class name exists which means that we are in a static context.
- // so we may want to ...
- // access a static field if the fieldName exists
- if (fieldName != null)
- {
- try
- {
- return new ObjectContext(id,
- klass.getField(fieldName).get(null));
- }
- catch (NoSuchFieldException nsfe)
- {
- throw new AssemblyException(nsfe);
- }
- catch (IllegalAccessException iae)
- {
- throw new AssemblyException(iae);
- }
- }
-
- // (falling through is important!)
- // run a constructor if methodName is "new" or null
- if (methodName == null || methodName.equals("new"))
- return new ConstructorContext(id, klass);
-
- // (falling through is important!)
- // run a static method on the given class (if methodName exists, which is implied already)
- return new StaticMethodContext(id, klass, methodName);
- // XXX: should fail if unexpected attributes are present?
- }
- catch (ClassNotFoundException cnfe)
- {
- throw new AssemblyException(cnfe);
- }
+ try
+ {
+ Class klass = instantiateClass(className);
+
+ // class name exists which means that we are in a static context.
+ // so we may want to ...
+ // access a static field if the fieldName exists
+ if (fieldName != null)
+ {
+ try
+ {
+ return new ObjectContext(id,
+ klass.getField(fieldName).get(null));
+ }
+ catch (NoSuchFieldException nsfe)
+ {
+ throw new AssemblyException(nsfe);
+ }
+ catch (IllegalAccessException iae)
+ {
+ throw new AssemblyException(iae);
+ }
+ }
+
+ // (falling through is important!)
+ // run a constructor if methodName is "new" or null
+ if (methodName == null || methodName.equals("new"))
+ return new ConstructorContext(id, klass);
+
+ // (falling through is important!)
+ // run a static method on the given class (if methodName exists, which is implied already)
+ return new StaticMethodContext(id, klass, methodName);
+ // XXX: should fail if unexpected attributes are present?
+ }
+ catch (ClassNotFoundException cnfe)
+ {
+ throw new AssemblyException(cnfe);
+ }
}
else
{
- // className does not exist which means we are in the context of
- // some object and want to ...
- // access the get(int index) method if index != null
- if (index != null)
- {
- try
- {
- // Note: http://java.sun.com/products/jfc/tsc/articles/persistence3/ says
- // that <void index="4"/> will make up a get()-call. But this is wrong because
- // <void/> tags never return values (to the surrounding context)
- return new IndexContext(id, Integer.parseInt(index));
- }
- catch (NumberFormatException nfe)
- {
- throw new AssemblyException(nfe);
- }
- }
-
- // access a method if methodName exists
- if (methodName != null)
- return new MethodContext(id, methodName);
-
- // (falling through is important!)
- // access a property if a propertyName exists
- if (propertyName != null && propertyName.length() > 0)
- // this is reported as an ordinary method access where the propertyName is
- // converted into a 'getter'-method name: convert first character of property name
- // to upper case and prepend 'get'
- // Note: This will be a getter-method because the <object> tag implies that a return
- // value is expected.
- return new PropertyContext(id, propertyName);
+ // className does not exist which means we are in the context of
+ // some object and want to ...
+ // access the get(int index) method if index != null
+ if (index != null)
+ {
+ try
+ {
+ // Note: http://java.sun.com/products/jfc/tsc/articles/persistence3/ says
+ // that <void index="4"/> will make up a get()-call. But this is wrong because
+ // <void/> tags never return values (to the surrounding context)
+ return new IndexContext(id, Integer.parseInt(index));
+ }
+ catch (NumberFormatException nfe)
+ {
+ throw new AssemblyException(nfe);
+ }
+ }
+
+ // access a method if methodName exists
+ if (methodName != null)
+ return new MethodContext(id, methodName);
+
+ // (falling through is important!)
+ // access a property if a propertyName exists
+ if (propertyName != null && propertyName.length() > 0)
+ // this is reported as an ordinary method access where the propertyName is
+ // converted into a 'getter'-method name: convert first character of property name
+ // to upper case and prepend 'get'
+ // Note: This will be a getter-method because the <object> tag implies that a return
+ // value is expected.
+ return new PropertyContext(id, propertyName);
}
throw new AssemblyException(new IllegalArgumentException("Wrong or missing attributes for <object> tag."));
diff --git a/gnu/java/beans/decoder/PersistenceParser.java b/gnu/java/beans/decoder/PersistenceParser.java
index 4eb37abef..c4c8866c3 100644
--- a/gnu/java/beans/decoder/PersistenceParser.java
+++ b/gnu/java/beans/decoder/PersistenceParser.java
@@ -62,424 +62,424 @@ import org.xml.sax.helpers.DefaultHandler;
*/
public class PersistenceParser extends DefaultHandler implements Context
{
- /** The ExceptionListener instance which is informed of non-critical parsing exceptions.
- */
- private ExceptionListener exceptionListener;
-
- /** When an element was not usable all elements inside it should be skipped.
- * This is done by skipping startElement() and endElement() invocations whenever
- * this value is above 0.
- */
- private int skipElement;
-
- /** Stores the Creator instances which can instantiate the appropriate handler implementation
- * for a given element.
- */
- private HashMap handlerCreators = new HashMap();
-
- /** Denotes the current ElementHandler. To avoid checking for null-values it is pre-assigned
- * with a DummyHandler instance which must not be used but acts as a root element.
- */
- private ElementHandler currentHandler;
-
- /** The real root element that stores all objects created during parsing.
- * Package-private to avoid an accessor method.
- */
- JavaHandler javaHandler;
-
- /** Stores the decoded objects. */
- private List objects = new LinkedList();
-
- /** The XMLDecoder instance that started this PersistenceParser */
- private XMLDecoder decoder;
-
- /** Creates a PersistenceParser which reads XML data from the given InputStream, reports
- * exceptions to ExceptionListener instance, stores resulting object in the DecoderContext
- * and uses the given ClassLoader to resolve classes.
- *
- * @param inputStream
- * @param exceptionListener
- * @param decoderContext
- * @param cl
- */
- public PersistenceParser(
- InputStream inputStream,
- ExceptionListener exceptionListener,
- ClassLoader cl,
- XMLDecoder decoder)
- {
-
- this.exceptionListener = exceptionListener;
- this.decoder = decoder;
-
- DummyHandler dummyHandler = new DummyHandler();
- currentHandler = dummyHandler;
- javaHandler = new JavaHandler(dummyHandler, this, cl);
-
- SAXParserFactory factory = SAXParserFactory.newInstance();
-
- SAXParser parser;
- try
- {
- parser = factory.newSAXParser();
- }
- catch (ParserConfigurationException pce)
- {
- // should not happen when a parser is available because we did
- // not request any requirements on the XML parser
- throw (InternalError) new InternalError(
- "No SAX Parser available.").initCause(
- pce);
- }
- catch (SAXException saxe)
- {
- // should not happen when a parser is available because we did
- // not request any requirements on the XML parser
- throw (InternalError) new InternalError(
- "No SAX Parser available.").initCause(
- saxe);
- }
-
- // prepares a map of Creator instances which can instantiate a handler which is
- // appropriate for the tag that is used as a key for the Creator
- handlerCreators.put("java", new JavaHandlerCreator());
-
- // calls methods (properties), constructors, access fields
- handlerCreators.put("object", new ObjectHandlerCreator());
- handlerCreators.put("void", new VoidHandlerCreator());
-
- handlerCreators.put("array", new ArrayHandlerCreator());
-
- // these handler directly create an Object (or null)
- handlerCreators.put("class", new ClassHandlerCreator());
- handlerCreators.put("null", new NullHandlerCreator());
-
- handlerCreators.put("char", new CharHandlerCreator());
- handlerCreators.put("string", new StringHandlerCreator());
- handlerCreators.put("boolean", new BooleanHandlerCreator());
- handlerCreators.put("byte", new ByteHandlerCreator());
- handlerCreators.put("short", new ShortHandlerCreator());
- handlerCreators.put("int", new IntHandlerCreator());
- handlerCreators.put("long", new LongHandlerCreator());
- handlerCreators.put("float", new FloatHandlerCreator());
- handlerCreators.put("double", new DoubleHandlerCreator());
-
- // parses the data and sends all exceptions to the ExceptionListener
- try
- {
- parser.parse(inputStream, this);
- }
- catch (SAXException saxe)
- {
- exceptionListener.exceptionThrown(
- new IllegalArgumentException("XML data not well-formed."));
- }
- catch (IOException ioe)
- {
- exceptionListener.exceptionThrown(ioe);
- }
- }
-
- public void startElement(
- String uri,
- String localName,
- String qName,
- Attributes attributes)
- throws SAXException
- {
- /* The element is skipped if
- * a) the current handler has already failed or a previous error occured
- * which makes all children obsolete
- */
- if (currentHandler.hasFailed() || skipElement > 0)
- {
- exceptionListener.exceptionThrown(
- new IllegalArgumentException(
- "Element unusable due to previous error: " + qName));
-
- skipElement++;
-
- return;
- }
-
- /* b) Subelements are not allowed within the current ElementHandler.
- */
- if (!currentHandler.isSubelementAllowed(qName))
- {
- exceptionListener.exceptionThrown(
- new IllegalArgumentException(
- "Element is not allowed here: " + qName));
-
- skipElement++;
-
- return;
- }
-
- /* c) The tag name is not a key in the map of Creator instances. This means that
- * either the XML data is of a newer version or simply contains a miss-spelled element.
- */
- if (!handlerCreators.containsKey(qName))
- {
- exceptionListener.exceptionThrown(
- new IllegalArgumentException(
- "Element unusable because tag is unknown: " + qName));
-
- skipElement++;
-
- return;
- }
-
- // creates a new handler for the new element
- AbstractElementHandler handler =
- ((Creator) handlerCreators.get(qName)).createHandler(
- currentHandler);
-
- // makes it the current handler to receive character data
- currentHandler = handler;
-
- // starts the handler
- currentHandler.start(attributes, exceptionListener);
- }
-
- public void endElement(String uri, String localName, String qName)
- throws SAXException
- {
- // skips processing the current handler if we are parsing an element
- // which was marked invalid (in startElement() )
- if (skipElement > 0)
- {
- skipElement--;
- return;
- }
-
- // invokes the handler's finishing method
- currentHandler.end(exceptionListener);
-
- // removes the current handler and reactivates its parent
- currentHandler = currentHandler.getParent();
- }
-
- /** Transfers character data to the current handler
- */
- public void characters(char[] ch, int start, int length)
- throws SAXException
- {
- // prevents sending character data of invalid elements
- if (skipElement > 0)
- return;
-
- currentHandler.characters(ch, start, length);
- }
-
- /** Creator interface provided a mechanism to instantiate ElementHandler instances
- * for the appropriate tag.
- *
- * @author Robert Schuster
- */
- interface Creator
- {
- /** Creates an ElementHandler instance using the given ElementHandler as its parent.
- *
- * @param parent The parent ElementHandler of the result.
- * @return A new ElementHandler instance.
- */
- AbstractElementHandler createHandler(ElementHandler parent);
- }
-
- class BooleanHandlerCreator implements Creator
- {
- public AbstractElementHandler createHandler(ElementHandler parent)
- {
- return new BooleanHandler(parent);
- }
- }
-
- class ByteHandlerCreator implements Creator
- {
- public AbstractElementHandler createHandler(ElementHandler parent)
- {
- return new ByteHandler(parent);
- }
- }
-
- class ShortHandlerCreator implements Creator
- {
- public AbstractElementHandler createHandler(ElementHandler parent)
- {
- return new ShortHandler(parent);
- }
- }
-
- class IntHandlerCreator implements Creator
- {
- public AbstractElementHandler createHandler(ElementHandler parent)
- {
- return new IntHandler(parent);
- }
- }
-
- class LongHandlerCreator implements Creator
- {
- public AbstractElementHandler createHandler(ElementHandler parent)
- {
- return new LongHandler(parent);
- }
- }
-
- class FloatHandlerCreator implements Creator
- {
- public AbstractElementHandler createHandler(ElementHandler parent)
- {
- return new FloatHandler(parent);
- }
- }
-
- class DoubleHandlerCreator implements Creator
- {
- public AbstractElementHandler createHandler(ElementHandler parent)
- {
- return new DoubleHandler(parent);
- }
- }
-
- class CharHandlerCreator implements Creator
- {
- public AbstractElementHandler createHandler(ElementHandler parent)
- {
- return new CharHandler(parent);
- }
- }
-
- class StringHandlerCreator implements Creator
- {
- public AbstractElementHandler createHandler(ElementHandler parent)
- {
- return new StringHandler(parent);
- }
- }
-
- class JavaHandlerCreator implements Creator
- {
- public AbstractElementHandler createHandler(ElementHandler parent)
- {
- return javaHandler;
- }
- }
-
- class ObjectHandlerCreator implements Creator
- {
- public AbstractElementHandler createHandler(ElementHandler parent)
- {
- return new ObjectHandler(parent);
- }
- }
-
- class VoidHandlerCreator implements Creator
- {
- public AbstractElementHandler createHandler(ElementHandler parent)
- {
- return new VoidHandler(parent);
- }
- }
-
- class ClassHandlerCreator implements Creator
- {
- public AbstractElementHandler createHandler(ElementHandler parent)
- {
- return new ClassHandler(parent);
- }
- }
-
- class NullHandlerCreator implements Creator
- {
- public AbstractElementHandler createHandler(ElementHandler parent)
- {
- return new NullHandler(parent);
- }
- }
-
- class ArrayHandlerCreator implements Creator
- {
- public AbstractElementHandler createHandler(ElementHandler parent)
- {
- return new ArrayHandler(parent);
- }
- }
-
- /** Adds a decoded object to the Context. */
- public void addParameterObject(Object o) throws AssemblyException
- {
- objects.add(o);
- }
-
- public void notifyStatement(Context outerContext) throws AssemblyException
- {
- // can be ignored because theis Context does not react to statement and expressions
- // differently
- }
-
- public Object endContext(Context outerContext) throws AssemblyException
- {
- return null;
- }
-
- public boolean subContextFailed()
- {
- // failing of subcontexts is no problem for the mother of all contexts
- return false;
- }
-
- public void set(int index, Object o) throws AssemblyException
- {
- // not supported
- throw new AssemblyException(
- new IllegalArgumentException("Set method is not allowed in decoder context."));
- }
-
- public Object get(int index) throws AssemblyException
- {
- // not supported
- throw new AssemblyException(
- new IllegalArgumentException("Get method is not allowed in decoder context."));
- }
-
- public Object getResult()
- {
- // returns the XMLDecoder instance which is requested by child contexts this way.
- // That is needed to invoke methods on the decoder.
- return decoder;
- }
-
- public void setId(String id)
- {
- exceptionListener.exceptionThrown(new IllegalArgumentException("id attribute is not allowed for <java> tag."));
- }
-
- public String getId()
- {
- // appears to have no id
- return null;
- }
-
- public boolean isStatement()
- {
- // this context is a statement by definition because it never returns anything to a parent because
- // there is no such parent (DummyContext does not count!)
- return true;
- }
-
- public void setStatement(boolean b)
- {
- // ignores that because this Context is always a statement
- }
-
- /** Returns an Iterator instance which returns the decoded objects.
- *
- * This method is used by the XMLDecoder directly.
- */
- public Iterator iterator()
- {
- return objects.iterator();
- }
+ /** The ExceptionListener instance which is informed of non-critical parsing exceptions.
+ */
+ private ExceptionListener exceptionListener;
+
+ /** When an element was not usable all elements inside it should be skipped.
+ * This is done by skipping startElement() and endElement() invocations whenever
+ * this value is above 0.
+ */
+ private int skipElement;
+
+ /** Stores the Creator instances which can instantiate the appropriate handler implementation
+ * for a given element.
+ */
+ private HashMap handlerCreators = new HashMap();
+
+ /** Denotes the current ElementHandler. To avoid checking for null-values it is pre-assigned
+ * with a DummyHandler instance which must not be used but acts as a root element.
+ */
+ private ElementHandler currentHandler;
+
+ /** The real root element that stores all objects created during parsing.
+ * Package-private to avoid an accessor method.
+ */
+ JavaHandler javaHandler;
+
+ /** Stores the decoded objects. */
+ private List objects = new LinkedList();
+
+ /** The XMLDecoder instance that started this PersistenceParser */
+ private XMLDecoder decoder;
+
+ /** Creates a PersistenceParser which reads XML data from the given InputStream, reports
+ * exceptions to ExceptionListener instance, stores resulting object in the DecoderContext
+ * and uses the given ClassLoader to resolve classes.
+ *
+ * @param inputStream
+ * @param exceptionListener
+ * @param decoderContext
+ * @param cl
+ */
+ public PersistenceParser(
+ InputStream inputStream,
+ ExceptionListener exceptionListener,
+ ClassLoader cl,
+ XMLDecoder decoder)
+ {
+
+ this.exceptionListener = exceptionListener;
+ this.decoder = decoder;
+
+ DummyHandler dummyHandler = new DummyHandler();
+ currentHandler = dummyHandler;
+ javaHandler = new JavaHandler(dummyHandler, this, cl);
+
+ SAXParserFactory factory = SAXParserFactory.newInstance();
+
+ SAXParser parser;
+ try
+ {
+ parser = factory.newSAXParser();
+ }
+ catch (ParserConfigurationException pce)
+ {
+ // should not happen when a parser is available because we did
+ // not request any requirements on the XML parser
+ throw (InternalError) new InternalError(
+ "No SAX Parser available.").initCause(
+ pce);
+ }
+ catch (SAXException saxe)
+ {
+ // should not happen when a parser is available because we did
+ // not request any requirements on the XML parser
+ throw (InternalError) new InternalError(
+ "No SAX Parser available.").initCause(
+ saxe);
+ }
+
+ // prepares a map of Creator instances which can instantiate a handler which is
+ // appropriate for the tag that is used as a key for the Creator
+ handlerCreators.put("java", new JavaHandlerCreator());
+
+ // calls methods (properties), constructors, access fields
+ handlerCreators.put("object", new ObjectHandlerCreator());
+ handlerCreators.put("void", new VoidHandlerCreator());
+
+ handlerCreators.put("array", new ArrayHandlerCreator());
+
+ // these handler directly create an Object (or null)
+ handlerCreators.put("class", new ClassHandlerCreator());
+ handlerCreators.put("null", new NullHandlerCreator());
+
+ handlerCreators.put("char", new CharHandlerCreator());
+ handlerCreators.put("string", new StringHandlerCreator());
+ handlerCreators.put("boolean", new BooleanHandlerCreator());
+ handlerCreators.put("byte", new ByteHandlerCreator());
+ handlerCreators.put("short", new ShortHandlerCreator());
+ handlerCreators.put("int", new IntHandlerCreator());
+ handlerCreators.put("long", new LongHandlerCreator());
+ handlerCreators.put("float", new FloatHandlerCreator());
+ handlerCreators.put("double", new DoubleHandlerCreator());
+
+ // parses the data and sends all exceptions to the ExceptionListener
+ try
+ {
+ parser.parse(inputStream, this);
+ }
+ catch (SAXException saxe)
+ {
+ exceptionListener.exceptionThrown(
+ new IllegalArgumentException("XML data not well-formed."));
+ }
+ catch (IOException ioe)
+ {
+ exceptionListener.exceptionThrown(ioe);
+ }
+ }
+
+ public void startElement(
+ String uri,
+ String localName,
+ String qName,
+ Attributes attributes)
+ throws SAXException
+ {
+ /* The element is skipped if
+ * a) the current handler has already failed or a previous error occured
+ * which makes all children obsolete
+ */
+ if (currentHandler.hasFailed() || skipElement > 0)
+ {
+ exceptionListener.exceptionThrown(
+ new IllegalArgumentException(
+ "Element unusable due to previous error: " + qName));
+
+ skipElement++;
+
+ return;
+ }
+
+ /* b) Subelements are not allowed within the current ElementHandler.
+ */
+ if (!currentHandler.isSubelementAllowed(qName))
+ {
+ exceptionListener.exceptionThrown(
+ new IllegalArgumentException(
+ "Element is not allowed here: " + qName));
+
+ skipElement++;
+
+ return;
+ }
+
+ /* c) The tag name is not a key in the map of Creator instances. This means that
+ * either the XML data is of a newer version or simply contains a miss-spelled element.
+ */
+ if (!handlerCreators.containsKey(qName))
+ {
+ exceptionListener.exceptionThrown(
+ new IllegalArgumentException(
+ "Element unusable because tag is unknown: " + qName));
+
+ skipElement++;
+
+ return;
+ }
+
+ // creates a new handler for the new element
+ AbstractElementHandler handler =
+ ((Creator) handlerCreators.get(qName)).createHandler(
+ currentHandler);
+
+ // makes it the current handler to receive character data
+ currentHandler = handler;
+
+ // starts the handler
+ currentHandler.start(attributes, exceptionListener);
+ }
+
+ public void endElement(String uri, String localName, String qName)
+ throws SAXException
+ {
+ // skips processing the current handler if we are parsing an element
+ // which was marked invalid (in startElement() )
+ if (skipElement > 0)
+ {
+ skipElement--;
+ return;
+ }
+
+ // invokes the handler's finishing method
+ currentHandler.end(exceptionListener);
+
+ // removes the current handler and reactivates its parent
+ currentHandler = currentHandler.getParent();
+ }
+
+ /** Transfers character data to the current handler
+ */
+ public void characters(char[] ch, int start, int length)
+ throws SAXException
+ {
+ // prevents sending character data of invalid elements
+ if (skipElement > 0)
+ return;
+
+ currentHandler.characters(ch, start, length);
+ }
+
+ /** Creator interface provided a mechanism to instantiate ElementHandler instances
+ * for the appropriate tag.
+ *
+ * @author Robert Schuster
+ */
+ interface Creator
+ {
+ /** Creates an ElementHandler instance using the given ElementHandler as its parent.
+ *
+ * @param parent The parent ElementHandler of the result.
+ * @return A new ElementHandler instance.
+ */
+ AbstractElementHandler createHandler(ElementHandler parent);
+ }
+
+ class BooleanHandlerCreator implements Creator
+ {
+ public AbstractElementHandler createHandler(ElementHandler parent)
+ {
+ return new BooleanHandler(parent);
+ }
+ }
+
+ class ByteHandlerCreator implements Creator
+ {
+ public AbstractElementHandler createHandler(ElementHandler parent)
+ {
+ return new ByteHandler(parent);
+ }
+ }
+
+ class ShortHandlerCreator implements Creator
+ {
+ public AbstractElementHandler createHandler(ElementHandler parent)
+ {
+ return new ShortHandler(parent);
+ }
+ }
+
+ class IntHandlerCreator implements Creator
+ {
+ public AbstractElementHandler createHandler(ElementHandler parent)
+ {
+ return new IntHandler(parent);
+ }
+ }
+
+ class LongHandlerCreator implements Creator
+ {
+ public AbstractElementHandler createHandler(ElementHandler parent)
+ {
+ return new LongHandler(parent);
+ }
+ }
+
+ class FloatHandlerCreator implements Creator
+ {
+ public AbstractElementHandler createHandler(ElementHandler parent)
+ {
+ return new FloatHandler(parent);
+ }
+ }
+
+ class DoubleHandlerCreator implements Creator
+ {
+ public AbstractElementHandler createHandler(ElementHandler parent)
+ {
+ return new DoubleHandler(parent);
+ }
+ }
+
+ class CharHandlerCreator implements Creator
+ {
+ public AbstractElementHandler createHandler(ElementHandler parent)
+ {
+ return new CharHandler(parent);
+ }
+ }
+
+ class StringHandlerCreator implements Creator
+ {
+ public AbstractElementHandler createHandler(ElementHandler parent)
+ {
+ return new StringHandler(parent);
+ }
+ }
+
+ class JavaHandlerCreator implements Creator
+ {
+ public AbstractElementHandler createHandler(ElementHandler parent)
+ {
+ return javaHandler;
+ }
+ }
+
+ class ObjectHandlerCreator implements Creator
+ {
+ public AbstractElementHandler createHandler(ElementHandler parent)
+ {
+ return new ObjectHandler(parent);
+ }
+ }
+
+ class VoidHandlerCreator implements Creator
+ {
+ public AbstractElementHandler createHandler(ElementHandler parent)
+ {
+ return new VoidHandler(parent);
+ }
+ }
+
+ class ClassHandlerCreator implements Creator
+ {
+ public AbstractElementHandler createHandler(ElementHandler parent)
+ {
+ return new ClassHandler(parent);
+ }
+ }
+
+ class NullHandlerCreator implements Creator
+ {
+ public AbstractElementHandler createHandler(ElementHandler parent)
+ {
+ return new NullHandler(parent);
+ }
+ }
+
+ class ArrayHandlerCreator implements Creator
+ {
+ public AbstractElementHandler createHandler(ElementHandler parent)
+ {
+ return new ArrayHandler(parent);
+ }
+ }
+
+ /** Adds a decoded object to the Context. */
+ public void addParameterObject(Object o) throws AssemblyException
+ {
+ objects.add(o);
+ }
+
+ public void notifyStatement(Context outerContext) throws AssemblyException
+ {
+ // can be ignored because theis Context does not react to statement and expressions
+ // differently
+ }
+
+ public Object endContext(Context outerContext) throws AssemblyException
+ {
+ return null;
+ }
+
+ public boolean subContextFailed()
+ {
+ // failing of subcontexts is no problem for the mother of all contexts
+ return false;
+ }
+
+ public void set(int index, Object o) throws AssemblyException
+ {
+ // not supported
+ throw new AssemblyException(
+ new IllegalArgumentException("Set method is not allowed in decoder context."));
+ }
+
+ public Object get(int index) throws AssemblyException
+ {
+ // not supported
+ throw new AssemblyException(
+ new IllegalArgumentException("Get method is not allowed in decoder context."));
+ }
+
+ public Object getResult()
+ {
+ // returns the XMLDecoder instance which is requested by child contexts this way.
+ // That is needed to invoke methods on the decoder.
+ return decoder;
+ }
+
+ public void setId(String id)
+ {
+ exceptionListener.exceptionThrown(new IllegalArgumentException("id attribute is not allowed for <java> tag."));
+ }
+
+ public String getId()
+ {
+ // appears to have no id
+ return null;
+ }
+
+ public boolean isStatement()
+ {
+ // this context is a statement by definition because it never returns anything to a parent because
+ // there is no such parent (DummyContext does not count!)
+ return true;
+ }
+
+ public void setStatement(boolean b)
+ {
+ // ignores that because this Context is always a statement
+ }
+
+ /** Returns an Iterator instance which returns the decoded objects.
+ *
+ * This method is used by the XMLDecoder directly.
+ */
+ public Iterator iterator()
+ {
+ return objects.iterator();
+ }
}
diff --git a/gnu/java/beans/decoder/PropertyContext.java b/gnu/java/beans/decoder/PropertyContext.java
index 838ef814b..15751cdbc 100644
--- a/gnu/java/beans/decoder/PropertyContext.java
+++ b/gnu/java/beans/decoder/PropertyContext.java
@@ -7,7 +7,7 @@ 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
@@ -74,7 +74,7 @@ class PropertyContext extends AbstractObjectContext
throw new AssemblyException(new IllegalArgumentException("Property attribut allows zero or one argument only."));
argument = o;
- setStatement(true);
+ setStatement(true);
prefix = "set";
}
@@ -91,8 +91,8 @@ class PropertyContext extends AbstractObjectContext
if (outerObject == null)
throw new AssemblyException(new NullPointerException("No object to access property "
- + propertyName));
-
+ + propertyName));
+
// converts property name into a method name
String methodName = prefix + propertyName.substring(0, 1).toUpperCase()
@@ -103,23 +103,23 @@ class PropertyContext extends AbstractObjectContext
try
{
- Method method = MethodFinder.getMethod(outerObject.getClass(),
- methodName, args);
+ Method method = MethodFinder.getMethod(outerObject.getClass(),
+ methodName, args);
- // stores the result whether it is available or not
- setObject(method.invoke(outerObject, args));
+ // stores the result whether it is available or not
+ setObject(method.invoke(outerObject, args));
}
catch (NoSuchMethodException nsme)
{
- throw new AssemblyException(nsme);
+ throw new AssemblyException(nsme);
}
catch (InvocationTargetException ite)
{
- throw new AssemblyException(ite.getCause());
+ throw new AssemblyException(ite.getCause());
}
catch (IllegalAccessException iae)
{
- throw new AssemblyException(iae);
+ throw new AssemblyException(iae);
}
}
diff --git a/gnu/java/beans/decoder/ShortHandler.java b/gnu/java/beans/decoder/ShortHandler.java
index ab6ddbece..c5de50ab9 100644
--- a/gnu/java/beans/decoder/ShortHandler.java
+++ b/gnu/java/beans/decoder/ShortHandler.java
@@ -7,7 +7,7 @@ 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
diff --git a/gnu/java/beans/decoder/SimpleHandler.java b/gnu/java/beans/decoder/SimpleHandler.java
index bc187e8a0..1c43bb0c7 100644
--- a/gnu/java/beans/decoder/SimpleHandler.java
+++ b/gnu/java/beans/decoder/SimpleHandler.java
@@ -7,7 +7,7 @@ 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
@@ -65,7 +65,7 @@ abstract class SimpleHandler extends AbstractElementHandler
protected final Context startElement(Attributes attributes, ExceptionListener exceptionListener)
throws AssemblyException
{
-
+
// note: simple elements should not have any attributes. We inform
// the user of this syntactical but uncritical problem by sending
// an IllegalArgumentException for each unneccessary attribute
@@ -79,7 +79,7 @@ abstract class SimpleHandler extends AbstractElementHandler
+ "' discarded.");
exceptionListener.exceptionThrown(e);
}
-
+
return context = new ObjectContext();
}
@@ -89,11 +89,11 @@ abstract class SimpleHandler extends AbstractElementHandler
// reports the number when the character data can be parsed
try
{
- context.setObject(parse(characters));
+ context.setObject(parse(characters));
}
catch (NumberFormatException nfe)
{
- throw new AssemblyException(nfe);
+ throw new AssemblyException(nfe);
}
}
diff --git a/gnu/java/beans/decoder/StaticMethodContext.java b/gnu/java/beans/decoder/StaticMethodContext.java
index 959c949f7..b2cf0e602 100644
--- a/gnu/java/beans/decoder/StaticMethodContext.java
+++ b/gnu/java/beans/decoder/StaticMethodContext.java
@@ -7,7 +7,7 @@ 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
@@ -75,21 +75,21 @@ class StaticMethodContext extends AbstractCreatableObjectContext
try
{
- Method method = MethodFinder.getMethod(klass, methodName, args);
- return method.invoke(null, args);
+ Method method = MethodFinder.getMethod(klass, methodName, args);
+ return method.invoke(null, args);
}
catch (NoSuchMethodException nsme)
{
- throw new AssemblyException(nsme);
+ throw new AssemblyException(nsme);
}
catch (InvocationTargetException ite)
{
- // rethrows the reason for the InvocationTargetsException (ie. the exception in the called code)
- throw new AssemblyException(ite.getCause());
+ // rethrows the reason for the InvocationTargetsException (ie. the exception in the called code)
+ throw new AssemblyException(ite.getCause());
}
catch (IllegalAccessException iae)
{
- throw new AssemblyException(iae);
+ throw new AssemblyException(iae);
}
}
}
diff --git a/gnu/java/beans/decoder/StringHandler.java b/gnu/java/beans/decoder/StringHandler.java
index 6f2311a9e..97fc57efd 100644
--- a/gnu/java/beans/decoder/StringHandler.java
+++ b/gnu/java/beans/decoder/StringHandler.java
@@ -7,7 +7,7 @@ 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
diff --git a/gnu/java/beans/decoder/VoidHandler.java b/gnu/java/beans/decoder/VoidHandler.java
index ca3664bbe..56f315639 100644
--- a/gnu/java/beans/decoder/VoidHandler.java
+++ b/gnu/java/beans/decoder/VoidHandler.java
@@ -7,7 +7,7 @@ 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
@@ -86,7 +86,7 @@ public class VoidHandler extends AbstractElementHandler
return new ConstructorContext(id, klass);
// (falling through is important!)
- // run a static method on the given class (if methodName exists, which is implied already)
+ // run a static method on the given class (if methodName exists, which is implied already)
return new StaticMethodContext(id, klass, methodName);
}
catch (ClassNotFoundException cnfe)
diff --git a/gnu/java/beans/editors/ColorEditor.java b/gnu/java/beans/editors/ColorEditor.java
index b099eb2f0..cb69344cb 100644
--- a/gnu/java/beans/editors/ColorEditor.java
+++ b/gnu/java/beans/editors/ColorEditor.java
@@ -7,7 +7,7 @@ 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
@@ -50,51 +50,51 @@ import java.beans.PropertyEditorSupport;
**/
public class ColorEditor extends PropertyEditorSupport {
- Color[] stdColors = {Color.black,Color.blue,Color.cyan,
- Color.darkGray,Color.gray,Color.green,
- Color.lightGray,Color.magenta,Color.orange,
- Color.pink,Color.red,Color.white,
- Color.yellow};
- String[] stdColorNames = {"black","blue","cyan",
- "dark gray","gray","green",
- "light gray","magenta","orange",
- "pink","red","white",
- "yellow"};
+ Color[] stdColors = {Color.black,Color.blue,Color.cyan,
+ Color.darkGray,Color.gray,Color.green,
+ Color.lightGray,Color.magenta,Color.orange,
+ Color.pink,Color.red,Color.white,
+ Color.yellow};
+ String[] stdColorNames = {"black","blue","cyan",
+ "dark gray","gray","green",
+ "light gray","magenta","orange",
+ "pink","red","white",
+ "yellow"};
- /** setAsText for Color checks for standard color names
- ** and then checks for a #RRGGBB value or just RRGGBB,
- ** both in hex.
- **/
- public void setAsText(String val) throws IllegalArgumentException {
- if(val.length() == 0) {
- throw new IllegalArgumentException("Tried to set empty value!");
- }
- for(int i=0;i<stdColorNames.length;i++) {
- if(stdColorNames[i].equalsIgnoreCase(val)) {
- setValue(stdColors[i]);
- return;
- }
- }
- if(val.charAt(0) == '#') {
- setValue(new Color(Integer.parseInt(val.substring(1),16)));
- } else {
- setValue(new Color(Integer.parseInt(val,16)));
- }
- }
+ /** setAsText for Color checks for standard color names
+ ** and then checks for a #RRGGBB value or just RRGGBB,
+ ** both in hex.
+ **/
+ public void setAsText(String val) throws IllegalArgumentException {
+ if(val.length() == 0) {
+ throw new IllegalArgumentException("Tried to set empty value!");
+ }
+ for(int i=0;i<stdColorNames.length;i++) {
+ if(stdColorNames[i].equalsIgnoreCase(val)) {
+ setValue(stdColors[i]);
+ return;
+ }
+ }
+ if(val.charAt(0) == '#') {
+ setValue(new Color(Integer.parseInt(val.substring(1),16)));
+ } else {
+ setValue(new Color(Integer.parseInt(val,16)));
+ }
+ }
- /** getAsText for Color turns the color into either one of the standard
- ** colors or into an RGB hex value with # prepended. **/
- public String getAsText() {
- for(int i=0;i<stdColors.length;i++) {
- if(stdColors[i].equals(getValue())) {
- return stdColorNames[i];
- }
- }
- return "#" + Integer.toHexString(((Color)getValue()).getRGB() & 0x00FFFFFF);
- }
+ /** getAsText for Color turns the color into either one of the standard
+ ** colors or into an RGB hex value with # prepended. **/
+ public String getAsText() {
+ for(int i=0;i<stdColors.length;i++) {
+ if(stdColors[i].equals(getValue())) {
+ return stdColorNames[i];
+ }
+ }
+ return "#" + Integer.toHexString(((Color)getValue()).getRGB() & 0x00FFFFFF);
+ }
- /** getTags for Color returns a list of standard colors. **/
- public String[] getTags() {
- return stdColorNames;
- }
+ /** getTags for Color returns a list of standard colors. **/
+ public String[] getTags() {
+ return stdColorNames;
+ }
}
diff --git a/gnu/java/beans/editors/FontEditor.java b/gnu/java/beans/editors/FontEditor.java
index 904f7bebf..dfccb4ede 100644
--- a/gnu/java/beans/editors/FontEditor.java
+++ b/gnu/java/beans/editors/FontEditor.java
@@ -7,7 +7,7 @@ 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
@@ -52,26 +52,26 @@ import java.beans.PropertyEditorSupport;
**/
public class FontEditor extends PropertyEditorSupport {
- /** setAsText for Font calls Font.decode(). **/
- public void setAsText(String val) throws IllegalArgumentException {
- setValue(Font.decode(val));
- }
+ /** setAsText for Font calls Font.decode(). **/
+ public void setAsText(String val) throws IllegalArgumentException {
+ setValue(Font.decode(val));
+ }
- /** getAsText for Font returns a value in the format
- ** expected by Font.decode().
- **/
- public String getAsText() {
- Font f = (Font)getValue();
- if(f.isBold()) {
- if(f.isItalic()) {
- return f.getName()+"-bolditalic-"+f.getSize();
- } else {
- return f.getName()+"-bold-"+f.getSize();
- }
- } else if(f.isItalic()) {
- return f.getName()+"-italic-"+f.getSize();
- } else {
- return f.getName()+"-"+f.getSize();
- }
- }
+ /** getAsText for Font returns a value in the format
+ ** expected by Font.decode().
+ **/
+ public String getAsText() {
+ Font f = (Font)getValue();
+ if(f.isBold()) {
+ if(f.isItalic()) {
+ return f.getName()+"-bolditalic-"+f.getSize();
+ } else {
+ return f.getName()+"-bold-"+f.getSize();
+ }
+ } else if(f.isItalic()) {
+ return f.getName()+"-italic-"+f.getSize();
+ } else {
+ return f.getName()+"-"+f.getSize();
+ }
+ }
}
diff --git a/gnu/java/beans/editors/NativeBooleanEditor.java b/gnu/java/beans/editors/NativeBooleanEditor.java
index 3620cc174..1df94895a 100644
--- a/gnu/java/beans/editors/NativeBooleanEditor.java
+++ b/gnu/java/beans/editors/NativeBooleanEditor.java
@@ -7,7 +7,7 @@ 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
@@ -52,25 +52,25 @@ import java.beans.PropertyEditorSupport;
**/
public class NativeBooleanEditor extends PropertyEditorSupport {
- String[] tags = {"true","false"};
+ String[] tags = {"true","false"};
- /**
- * setAsText for boolean checks for true or false or t or f.
- * "" also means false.
- **/
- public void setAsText(String val) throws IllegalArgumentException {
- if(val.equalsIgnoreCase("true") || val.equalsIgnoreCase("t")) {
- setValue(Boolean.TRUE);
- } else if(val.equalsIgnoreCase("false") || val.equalsIgnoreCase("f") || val.equals("")) {
- setValue(Boolean.FALSE);
- } else {
- throw new IllegalArgumentException("Value must be true, false, t, f or empty.");
- }
- }
+ /**
+ * setAsText for boolean checks for true or false or t or f.
+ * "" also means false.
+ **/
+ public void setAsText(String val) throws IllegalArgumentException {
+ if(val.equalsIgnoreCase("true") || val.equalsIgnoreCase("t")) {
+ setValue(Boolean.TRUE);
+ } else if(val.equalsIgnoreCase("false") || val.equalsIgnoreCase("f") || val.equals("")) {
+ setValue(Boolean.FALSE);
+ } else {
+ throw new IllegalArgumentException("Value must be true, false, t, f or empty.");
+ }
+ }
- /** getAsText for boolean calls Boolean.toString(). **/
- public String getAsText() {
- return getValue().toString();
- }
+ /** getAsText for boolean calls Boolean.toString(). **/
+ public String getAsText() {
+ return getValue().toString();
+ }
}
diff --git a/gnu/java/beans/editors/NativeByteEditor.java b/gnu/java/beans/editors/NativeByteEditor.java
index f3ec5fa19..d427a9e3f 100644
--- a/gnu/java/beans/editors/NativeByteEditor.java
+++ b/gnu/java/beans/editors/NativeByteEditor.java
@@ -7,7 +7,7 @@ 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
@@ -49,13 +49,13 @@ import java.beans.PropertyEditorSupport;
**/
public class NativeByteEditor extends PropertyEditorSupport {
- /** setAsText for byte calls Byte.valueOf(). **/
- public void setAsText(String val) throws IllegalArgumentException {
- setValue(Byte.valueOf(val));
- }
-
- /** getAsText for byte calls Byte.toString(). **/
- public String getAsText() {
- return getValue().toString();
- }
+ /** setAsText for byte calls Byte.valueOf(). **/
+ public void setAsText(String val) throws IllegalArgumentException {
+ setValue(Byte.valueOf(val));
+ }
+
+ /** getAsText for byte calls Byte.toString(). **/
+ public String getAsText() {
+ return getValue().toString();
+ }
}
diff --git a/gnu/java/beans/editors/NativeDoubleEditor.java b/gnu/java/beans/editors/NativeDoubleEditor.java
index 8d8aae153..aa229fad7 100644
--- a/gnu/java/beans/editors/NativeDoubleEditor.java
+++ b/gnu/java/beans/editors/NativeDoubleEditor.java
@@ -7,7 +7,7 @@ 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
@@ -49,13 +49,13 @@ import java.beans.PropertyEditorSupport;
**/
public class NativeDoubleEditor extends PropertyEditorSupport {
- /** setAsText for double calls Double.valueOf(). **/
- public void setAsText(String val) throws IllegalArgumentException {
- setValue(Double.valueOf(val));
- }
-
- /** getAsText for double calls Double.toString(). **/
- public String getAsText() {
- return getValue().toString();
- }
+ /** setAsText for double calls Double.valueOf(). **/
+ public void setAsText(String val) throws IllegalArgumentException {
+ setValue(Double.valueOf(val));
+ }
+
+ /** getAsText for double calls Double.toString(). **/
+ public String getAsText() {
+ return getValue().toString();
+ }
}
diff --git a/gnu/java/beans/editors/NativeFloatEditor.java b/gnu/java/beans/editors/NativeFloatEditor.java
index 801377e7d..09f9d6b9c 100644
--- a/gnu/java/beans/editors/NativeFloatEditor.java
+++ b/gnu/java/beans/editors/NativeFloatEditor.java
@@ -7,7 +7,7 @@ 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
@@ -49,13 +49,13 @@ import java.beans.PropertyEditorSupport;
**/
public class NativeFloatEditor extends PropertyEditorSupport {
- /** setAsText for float calls Float.valueOf(). **/
- public void setAsText(String val) throws IllegalArgumentException {
- setValue(Float.valueOf(val));
- }
-
- /** getAsText for float calls Float.toString(). **/
- public String getAsText() {
- return getValue().toString();
- }
+ /** setAsText for float calls Float.valueOf(). **/
+ public void setAsText(String val) throws IllegalArgumentException {
+ setValue(Float.valueOf(val));
+ }
+
+ /** getAsText for float calls Float.toString(). **/
+ public String getAsText() {
+ return getValue().toString();
+ }
}
diff --git a/gnu/java/beans/editors/NativeIntEditor.java b/gnu/java/beans/editors/NativeIntEditor.java
index a6148841c..28b6a67d9 100644
--- a/gnu/java/beans/editors/NativeIntEditor.java
+++ b/gnu/java/beans/editors/NativeIntEditor.java
@@ -7,7 +7,7 @@ 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
@@ -49,13 +49,13 @@ import java.beans.PropertyEditorSupport;
**/
public class NativeIntEditor extends PropertyEditorSupport {
- /** setAsText for int calls Integer.valueOf(). **/
- public void setAsText(String val) throws IllegalArgumentException {
- setValue(Integer.valueOf(val));
- }
-
- /** getAsText for int calls Integer.toString(). **/
- public String getAsText() {
- return getValue().toString();
- }
+ /** setAsText for int calls Integer.valueOf(). **/
+ public void setAsText(String val) throws IllegalArgumentException {
+ setValue(Integer.valueOf(val));
+ }
+
+ /** getAsText for int calls Integer.toString(). **/
+ public String getAsText() {
+ return getValue().toString();
+ }
}
diff --git a/gnu/java/beans/editors/NativeLongEditor.java b/gnu/java/beans/editors/NativeLongEditor.java
index 95e9dc870..77223fbbc 100644
--- a/gnu/java/beans/editors/NativeLongEditor.java
+++ b/gnu/java/beans/editors/NativeLongEditor.java
@@ -7,7 +7,7 @@ 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
@@ -49,13 +49,13 @@ import java.beans.PropertyEditorSupport;
**/
public class NativeLongEditor extends PropertyEditorSupport {
- /** setAsText for long calls Long.valueOf(). **/
- public void setAsText(String val) throws IllegalArgumentException {
- setValue(Long.valueOf(val));
- }
-
- /** getAsText for long calls Long.toString(). **/
- public String getAsText() {
- return getValue().toString();
- }
+ /** setAsText for long calls Long.valueOf(). **/
+ public void setAsText(String val) throws IllegalArgumentException {
+ setValue(Long.valueOf(val));
+ }
+
+ /** getAsText for long calls Long.toString(). **/
+ public String getAsText() {
+ return getValue().toString();
+ }
}
diff --git a/gnu/java/beans/editors/NativeShortEditor.java b/gnu/java/beans/editors/NativeShortEditor.java
index ffaa26649..1d8845bde 100644
--- a/gnu/java/beans/editors/NativeShortEditor.java
+++ b/gnu/java/beans/editors/NativeShortEditor.java
@@ -7,7 +7,7 @@ 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
@@ -49,13 +49,13 @@ import java.beans.PropertyEditorSupport;
**/
public class NativeShortEditor extends PropertyEditorSupport {
- /** setAsText for short calls Short.valueOf(). **/
- public void setAsText(String val) throws IllegalArgumentException {
- setValue(Short.valueOf(val));
- }
-
- /** getAsText for short calls Short.toString(). **/
- public String getAsText() {
- return getValue().toString();
- }
+ /** setAsText for short calls Short.valueOf(). **/
+ public void setAsText(String val) throws IllegalArgumentException {
+ setValue(Short.valueOf(val));
+ }
+
+ /** getAsText for short calls Short.toString(). **/
+ public String getAsText() {
+ return getValue().toString();
+ }
}
diff --git a/gnu/java/beans/editors/StringEditor.java b/gnu/java/beans/editors/StringEditor.java
index 8242d5475..47fdce659 100644
--- a/gnu/java/beans/editors/StringEditor.java
+++ b/gnu/java/beans/editors/StringEditor.java
@@ -7,7 +7,7 @@ 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
@@ -49,13 +49,13 @@ import java.beans.PropertyEditorSupport;
**/
public class StringEditor extends PropertyEditorSupport {
- /** setAsText just sets the value. **/
- public void setAsText(String val) throws IllegalArgumentException {
- setValue(val);
- }
-
- /** getAsText just returns the value. **/
- public String getAsText() {
- return (String)getValue();
- }
+ /** setAsText just sets the value. **/
+ public void setAsText(String val) throws IllegalArgumentException {
+ setValue(val);
+ }
+
+ /** getAsText just returns the value. **/
+ public String getAsText() {
+ return (String)getValue();
+ }
}
diff --git a/gnu/java/beans/encoder/ArrayPersistenceDelegate.java b/gnu/java/beans/encoder/ArrayPersistenceDelegate.java
index 12d757e2d..52fc45796 100644
--- a/gnu/java/beans/encoder/ArrayPersistenceDelegate.java
+++ b/gnu/java/beans/encoder/ArrayPersistenceDelegate.java
@@ -7,7 +7,7 @@
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
@@ -92,12 +92,12 @@ public class ArrayPersistenceDelegate extends PersistenceDelegate
// Compares the array value against a prototypical
// null value of the array's component type in order to skip
// writing the default values of an array.
-
+
// Note: I have no idea why the persistence delegate for arrays writes
// an Expression that reads the value and then writes a Statement that sets
// the value. However it turned out that object arrays work better with the
// get-Expression and primitive array work fine with the set-Statement.
-
+
type = type.getComponentType();
if (type.isPrimitive())
{
@@ -113,7 +113,7 @@ public class ArrayPersistenceDelegate extends PersistenceDelegate
new Object[] { oldInstance,
Integer.valueOf(i),
}));
-
+
out.writeStatement(new Statement(Array.class, "set",
new Object[] {
oldInstance,
@@ -122,7 +122,7 @@ public class ArrayPersistenceDelegate extends PersistenceDelegate
}));
}
}
-
+
}
else
{
@@ -130,14 +130,14 @@ public class ArrayPersistenceDelegate extends PersistenceDelegate
for (int i = 0; i < length; i++)
{
Object oldValue = Array.get(oldInstance, i);
-
+
if (oldValue != null)
{
out.writeExpression(new Expression(Array.class, "get",
new Object[] { oldInstance,
Integer.valueOf(i),
}));
-
+
out.writeStatement(new Statement(Array.class, "set",
new Object[] {
oldInstance,
@@ -147,7 +147,7 @@ public class ArrayPersistenceDelegate extends PersistenceDelegate
}
}
}
-
+
}
}
diff --git a/gnu/java/beans/encoder/ClassPersistenceDelegate.java b/gnu/java/beans/encoder/ClassPersistenceDelegate.java
index 7b0656a5d..1430a6dbe 100644
--- a/gnu/java/beans/encoder/ClassPersistenceDelegate.java
+++ b/gnu/java/beans/encoder/ClassPersistenceDelegate.java
@@ -7,7 +7,7 @@ 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
@@ -43,7 +43,7 @@ import java.beans.PersistenceDelegate;
/** <p>The <code>ClassPersistenceDelegate</code> creates
* <code>Expression</code> instances which denote class resolutions.</p>
- *
+ *
* <p>The class resolution is always the last step when serializing a tree
* of objects. Due to the recursive nature of the algorithm we need a way
* to end the recursion. This is achieved by the implementation of this
@@ -52,8 +52,8 @@ import java.beans.PersistenceDelegate;
* we call <code>getClass()</code> on a <code>String.class</code> instance.
* This in turn lead to the resolution of the String class which is always
* encoded as <code>"".getClass()</code>. Finally the <code>Encoder</code>
- * treats strings in a special way so that the recursion ends here.
- *
+ * treats strings in a special way so that the recursion ends here.
+ *
* @author Robert Schuster (robertschuster@fsfe.org)
*/
public class ClassPersistenceDelegate extends PersistenceDelegate
@@ -62,7 +62,7 @@ public class ClassPersistenceDelegate extends PersistenceDelegate
protected Expression instantiate(Object oldInstance, Encoder out)
{
Class oldClass = (Class) oldInstance;
-
+
// Due to the special handling of String instances in the Encoder
// this Expression does not lead to further class resolutions.
if (oldClass == String.class)
@@ -72,7 +72,7 @@ public class ClassPersistenceDelegate extends PersistenceDelegate
if (oldClass == Class.class)
return new Expression(oldClass, String.class, "getClass", null);
- // This Expression will lead to the class resolution of Class.class.
+ // This Expression will lead to the class resolution of Class.class.
return new Expression(oldClass, Class.class, "forName",
new Object[] { oldClass.getName() });
}
diff --git a/gnu/java/beans/encoder/CollectionPersistenceDelegate.java b/gnu/java/beans/encoder/CollectionPersistenceDelegate.java
index f1375d2ec..bdf6fda62 100644
--- a/gnu/java/beans/encoder/CollectionPersistenceDelegate.java
+++ b/gnu/java/beans/encoder/CollectionPersistenceDelegate.java
@@ -7,7 +7,7 @@
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
@@ -49,10 +49,10 @@ import java.util.Iterator;
/** <p>A <code>PersistenceDelegate</code> implementation that calls
* the no-argument constructor to create the Collection instance and
* uses an iterator to add all the objects it reaches through it.</p>
- *
+ *
* <p>It is used for <code>Set</code> and <code>List</code>
* implementations.</p>
- *
+ *
* @author Robert Schuster (robertschuster@fsfe.org)
*/
public class CollectionPersistenceDelegate extends PersistenceDelegate
diff --git a/gnu/java/beans/encoder/Context.java b/gnu/java/beans/encoder/Context.java
index 9126d496f..8acc4907b 100644
--- a/gnu/java/beans/encoder/Context.java
+++ b/gnu/java/beans/encoder/Context.java
@@ -41,20 +41,20 @@ package gnu.java.beans.encoder;
/** A <code>Contect</code> object describes the current state
* and the call number while processing the original object
* tree in the {@link ScanEngine}.
- *
+ *
* <p>The class allows to distinguish the different calling states
* and is neccessary for the child element skipping feature of
- * the {@link GenericScannerState}.</p>
- *
+ * the {@link GenericScannerState}.</p>
+ *
* @author Robert Schuster (robertschuster@fsfe.org)
*
*/
public class Context
{
private String state;
-
+
private int call;
-
+
Context(String newState, int newCall)
{
state = newState;
@@ -66,21 +66,21 @@ public class Context
int hc = 7;
hc = 31 * hc + state.hashCode();
hc = 31 * hc + call;
-
+
return hc;
}
-
+
public boolean equals(Object o)
{
if (!(o instanceof Context))
return false;
-
+
Context that = (Context) o;
-
+
return state.equals(that.state)
&& call == that.call;
}
-
+
public String toString()
{
return "Context [state=" + state + ", call=" + call + "]";
diff --git a/gnu/java/beans/encoder/GenericScannerState.java b/gnu/java/beans/encoder/GenericScannerState.java
index 3c3f8a3d2..b07771dbe 100644
--- a/gnu/java/beans/encoder/GenericScannerState.java
+++ b/gnu/java/beans/encoder/GenericScannerState.java
@@ -60,12 +60,12 @@ import gnu.java.beans.encoder.elements.StringReference;
* This class is a {@link ScannerState} implementation that creates
* suitable {@link gnu.java.beans.encoder.elements.Element} instances
* for each transition variant.
- *
+ *
* <p>Furthermore it can optionally skip a certain number of child
- * elements. The algorithm can cope with the fact that one
+ * elements. The algorithm can cope with the fact that one
* <code>GenericScannerState</code> instance may be called at
* different levels of recursions.</p>
- *
+ *
* @author Robert Schuster (robertschuster@fsfe.org)
*/
class GenericScannerState extends ScannerState
@@ -89,19 +89,19 @@ class GenericScannerState extends ScannerState
if (skipElements > 0)
skipValues = new HashMap();
}
-
+
protected void enterImpl(Context ctx)
{
if (skipValues != null)
{
Integer skip = (Integer) skipValues.get(ctx);
-
+
if (skip == null)
{
skip = Integer.valueOf(initialSkipElements);
skipValues.put(ctx, skip);
}
-
+
skipElements = skip.intValue();
}
}
diff --git a/gnu/java/beans/encoder/IgnoringScannerState.java b/gnu/java/beans/encoder/IgnoringScannerState.java
index 054f1f005..3ec78cdf9 100644
--- a/gnu/java/beans/encoder/IgnoringScannerState.java
+++ b/gnu/java/beans/encoder/IgnoringScannerState.java
@@ -40,7 +40,7 @@ package gnu.java.beans.encoder;
/** A special {@link ScannerState} implementation that ignores all child
* elements.
- *
+ *
* <p>Consider the call hierarchy:
* <code>
* methodInvocation
@@ -50,16 +50,16 @@ package gnu.java.beans.encoder;
* classResolution
* </code>
* </p>
- *
+ *
* <p>When the ignoring state is active one can filter the elements of
* one level. One has to set up the state machine that a transition
* via "class resolution" from a state that was reached via "object
* instantation" reaches an <code>IgnoringScannerState</code>.</p>
- *
+ *
* <p>Setting the default successor of a <code>IgnoringScannerState</code>
* to itself causes all elements of the call hierarchy to be skipped
- * until another state is reached by going back.</p>
- *
+ * until another state is reached by going back.</p>
+ *
* @author Robert Schuster (robertschuster@fsfe.org)
*
*/
@@ -125,9 +125,9 @@ class IgnoringScannerState extends ScannerState
void objectReference(ObjectId id)
{
}
-
+
void end()
{
}
-
+
}
diff --git a/gnu/java/beans/encoder/MapPersistenceDelegate.java b/gnu/java/beans/encoder/MapPersistenceDelegate.java
index 84cdce94d..9ffdb5686 100644
--- a/gnu/java/beans/encoder/MapPersistenceDelegate.java
+++ b/gnu/java/beans/encoder/MapPersistenceDelegate.java
@@ -8,7 +8,7 @@
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
diff --git a/gnu/java/beans/encoder/ObjectId.java b/gnu/java/beans/encoder/ObjectId.java
index eca5c3da4..13d75d6bb 100644
--- a/gnu/java/beans/encoder/ObjectId.java
+++ b/gnu/java/beans/encoder/ObjectId.java
@@ -45,7 +45,7 @@ import java.util.HashMap;
* ObjectId provides an object identification mechanism which gives each object
* a name in the form <code>&lt;class&gt;&lt;Nameindex&gt;</code>.
* </p>
- *
+ *
* <p>
* Each id can be in an unused state which means that only one instance of the
* object is in use and a special id is not needed. Certain {@link
@@ -57,7 +57,7 @@ import java.util.HashMap;
* The second user should then invoke the {@link #init} method to generate the
* identification string and bring the id in the 'used' state.
* </p>
- *
+ *
* @author Robert Schuster (robertschuster@fsfe.org)
*/
public class ObjectId
diff --git a/gnu/java/beans/encoder/PrimitivePersistenceDelegate.java b/gnu/java/beans/encoder/PrimitivePersistenceDelegate.java
index 8cb3705b4..55626b512 100644
--- a/gnu/java/beans/encoder/PrimitivePersistenceDelegate.java
+++ b/gnu/java/beans/encoder/PrimitivePersistenceDelegate.java
@@ -8,7 +8,7 @@ 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
@@ -44,7 +44,7 @@ import java.beans.PersistenceDelegate;
/**
* A shared PersistenceDelegate implementation for all primitive types.
- *
+ *
* @author Robert Schuster (robertschuster@fsfe.org)
*/
public class PrimitivePersistenceDelegate extends PersistenceDelegate
@@ -70,5 +70,5 @@ public class PrimitivePersistenceDelegate extends PersistenceDelegate
out.writeExpression(new Expression(oldInstance, oldInstance.getClass(), "new",
new Object[] { oldInstance.toString() }));
}
-
+
}
diff --git a/gnu/java/beans/encoder/ReportingScannerState.java b/gnu/java/beans/encoder/ReportingScannerState.java
index fb6e061ae..c91bb1567 100644
--- a/gnu/java/beans/encoder/ReportingScannerState.java
+++ b/gnu/java/beans/encoder/ReportingScannerState.java
@@ -42,7 +42,7 @@ package gnu.java.beans.encoder;
* A <code>ScannerState</code> implementation that prints useful details
* about its arguments. Use it when the XML encoding does not work correctly
* and you want to find out how things relate to each other.
- *
+ *
* @author Robert Schuster (robertschuster@fsfe.org)
*/
class ReportingScannerState extends ScannerState
@@ -50,12 +50,12 @@ class ReportingScannerState extends ScannerState
void methodInvocation(String methodName)
{
- System.out.println("methodInvocation: " + methodName + "()");
+ System.out.println("methodInvocation: " + methodName + "()");
}
void staticMethodInvocation(String className, String methodName)
{
- System.out.println("staticMethodInvocation: " + className + "." + methodName + "()");
+ System.out.println("staticMethodInvocation: " + className + "." + methodName + "()");
}
void staticFieldAccess(String className, String fieldName)
@@ -65,17 +65,17 @@ class ReportingScannerState extends ScannerState
void classResolution(String className)
{
- System.out.println("classResolution: " + className);
+ System.out.println("classResolution: " + className);
}
void objectInstantiation(String className, ObjectId objectId)
{
- System.out.println("objectInstantiation: " + className);
+ System.out.println("objectInstantiation: " + className);
}
void primitiveInstantiation(String primitiveName, String valueAsString)
{
- System.out.println("primitiveInstantiation: (" + primitiveName + ") " + valueAsString);
+ System.out.println("primitiveInstantiation: (" + primitiveName + ") " + valueAsString);
}
void objectArrayInstantiation(String arrayClassName, String lengthAsString, ObjectId objectId)
@@ -90,27 +90,27 @@ class ReportingScannerState extends ScannerState
void arraySet(String indexAsString)
{
- System.out.println("arraySet: " + indexAsString);
+ System.out.println("arraySet: " + indexAsString);
}
void arrayGet(String indexAsString)
{
- System.out.println("arrayGet: " + indexAsString);
+ System.out.println("arrayGet: " + indexAsString);
}
void listGet()
{
- System.out.println("listGet");
+ System.out.println("listGet");
}
void listSet()
{
- System.out.println("listSet");
+ System.out.println("listSet");
}
void nullObject()
{
- System.out.println("nullObject");
+ System.out.println("nullObject");
}
void stringReference(String string)
@@ -125,7 +125,7 @@ class ReportingScannerState extends ScannerState
void end()
{
- System.out.println("-close");
+ System.out.println("-close");
}
-
+
}
diff --git a/gnu/java/beans/encoder/Root.java b/gnu/java/beans/encoder/Root.java
index f4eade193..a6410d716 100644
--- a/gnu/java/beans/encoder/Root.java
+++ b/gnu/java/beans/encoder/Root.java
@@ -46,14 +46,14 @@ import gnu.java.beans.encoder.elements.Element;
/** <p><code>Root</code> provides a simple interface to a tree of
* objects.</p>
- *
+ *
* <p>Using an instance of this class a logical representation of
* the real object tree that is serialized can be built. When the
* actual data should be written as XML <code>Root</code> and
* {@link gnu.java.beans.encoder.elements.Element} class can provide
* context information which is used to write the best fitting
* XML representation.</p>
- *
+ *
* @author Robert Schuster (robertschuster@fsfe.org)
*/
public class Root
@@ -61,7 +61,7 @@ public class Root
private Stack parents = new Stack();
private Element rootElement, current;
-
+
private boolean started;
public Root()
@@ -70,10 +70,10 @@ public class Root
}
/** <p>Adds another child element to the tree.</p>
- *
+ *
* <p>The new element automatically becomes the current
* element.</p>
- *
+ *
* @param elem The new child element.
*/
public void addChild(Element elem)
@@ -88,7 +88,7 @@ public class Root
* <p>Marks that the end of the current element
* is reached and that no more childs are added to
* it.</p>
- *
+ *
* <p>The behavior is to return to the nearest parent
* element.</p>
*/
@@ -100,7 +100,7 @@ public class Root
/**
* <p>Goes back to the nearest parent element but
* deletes the just created child.</p>
- *
+ *
* <p>This is used if something went wrong while
* processing the child element's {@link java.beans.Expression}
* or {@link java.beans.Statement}.</p>
@@ -117,9 +117,9 @@ public class Root
* <p>Traverses the elements in the object tree
* and creates their XML representation in the output
* stream of the given {@link Writer}.</p>
- *
+ *
* <p>Finally the <code>Writer</code> is flushed.</p>
- *
+ *
* @param writer The Writer instance that generates the XML representation.
*/
public void traverse(Writer writer)
@@ -130,16 +130,16 @@ public class Root
rootElement.writeStart(writer);
}
started = true;
-
+
traverse(writer, rootElement.iterator());
-
+
rootElement.clear();
-
+
writer.flush();
}
/** Writes the closing element and closes the {@link Writer}
- *
+ *
* @param writer The Writer instance that generates the XML representation.
*/
public void close(Writer writer)
@@ -149,7 +149,7 @@ public class Root
}
/** Recursively traverses the object tree.
- *
+ *
* @param writer The Writer instance that generates the XML representation.
* @param ite An Iterator returning Element instances.
*/
@@ -163,19 +163,19 @@ public class Root
traverse(writer, e.iterator());
e.writeEnd(writer);
-
+
e.clear();
}
}
/** <p>A special Element implementation that represents the
* encoder's context.</p>
- *
+ *
* <p>This element is written only once per Writer.</p>
- *
+ *
* <p>It is assumed that this element is never empty to simplify
* the implementation.</p>
- *
+ *
* @author Robert Schuster (robertschuster@fsfe.org);
*
*/
@@ -187,7 +187,7 @@ public class Root
new String[] { System.getProperty("java.version"),
XMLEncoder.class.getName() }, false);
}
-
+
public void writeEnd(Writer writer)
{
writer.writeEnd(false);
diff --git a/gnu/java/beans/encoder/ScanEngine.java b/gnu/java/beans/encoder/ScanEngine.java
index b78a81413..9ced143f0 100644
--- a/gnu/java/beans/encoder/ScanEngine.java
+++ b/gnu/java/beans/encoder/ScanEngine.java
@@ -1,4 +1,4 @@
-/* ScanEngine.java
+/* ScanEngine.java
-- Scans the input and generates an object tree that can be written as XML.
Copyright (C) 2005 Free Software Foundation, Inc.
@@ -54,7 +54,7 @@ import java.util.Stack;
* {@link #writeObject} method and feeds it to a state machine. The
* state machine then constructs and object tree which is finally
* written as XML by a {@link Writer} implementation.</p>
- *
+ *
* <p>How does it work?</p>
* <p>The <code>ScanEngine</code> sits below the {@link java.beans.XMLEncoder}
* class and is called by it exclusively. The <code>XMLEncoder</code> sends
@@ -65,7 +65,7 @@ import java.util.Stack;
* Furthermore the meaning of certain <code>Expressions</code> differs
* depending on the enclosing elements or the inner elements have to be
* simply discarded.</p>
- *
+ *
* <p>To cope with this state dependant nature the <code>ScanEngine</code>
* contains a state machine which is programmed statically (no adjustments are
* needed, all <code>ScanEngine</code> engines use the same setup). The
@@ -83,7 +83,7 @@ import java.util.Stack;
* the current state and then the event method is called in the new current
* state. The last step allows the state instance to do something meaningful
* to the object tree.</p>
- *
+ *
* <p>The state machine knows the concept of returning to the previous
* state. This is done using a stack of states which is popped every
* time a call to <code>writeStatement</code>, <code>writeExpression</code>
@@ -93,7 +93,7 @@ import java.util.Stack;
* <code>ScanEngine</code> itself to decide when an expression or statement
* ended. This can only be done in case of {@link #writeObject} calls because
* they are not nested.</p>
- *
+ *
* <p>When the XML persistence mechanism reaches an object twice (and more)
* it should generate an XML element using the "idref" attribute and add
* an "id" attribute to its first instantiation. This complicates things a bit
@@ -106,12 +106,12 @@ import java.util.Stack;
* instance is stored in the <code>ScanEngine</code> and gets cleared whenever
* the {@link #flush} method is called. This method also writes the currently
* built object tree and generates the XML representation.</p>
- *
+ *
* @author Robert Schuster (robertschuster@fsfe.org)
*/
public class ScanEngine
{
-
+
/** Change this to true to let the ScanEngine print state transition
* information.
*/
@@ -145,7 +145,7 @@ public class ScanEngine
/** Stores the relationship between objects and their {@link ObjectId} instance.
*/
IdentityHashMap objects = new IdentityHashMap();
-
+
public ScanEngine(OutputStream os)
{
// TODO: Provide another Writer implementation (e.g. one that does not use
@@ -182,7 +182,7 @@ public class ScanEngine
"newObj0");
conf = register("newObj0", new GenericScannerState(root));
conf.setDefaultSuccessor("ignoreAll");
-
+
// Simply use the start state to encode method invocations inside of
// objects.
conf.putSuccessor(ScannerState.TRANSITION_METHOD_INVOCATION, "start");
@@ -203,14 +203,14 @@ public class ScanEngine
conf.putSuccessor(ScannerState.TRANSITION_CLASS_RESOLUTION, "ignoreAll");
conf.putSuccessor(ScannerState.TRANSITION_PRIMITIVE_INSTANTIATION,
"ignoreAll");
-
+
// Get here when a value is set in the array.
register("newOArrayGet",
conf = new GenericScannerState(root));
-
+
conf.putSuccessor(ScannerState.TRANSITION_PRIMITIVE_INSTANTIATION,
"newOArrayGet_ignoreFirstInteger");
-
+
// "newArrayGet_ignoreFirstInteger" is set up mostly identical like the "start"
// state. Otherwise things would not behave the same when done inside
// arrays.
@@ -223,21 +223,21 @@ public class ScanEngine
"newPrimitiveArray");
conf.putSuccessor(ScannerState.TRANSITION_OBJECT_ARRAY_INSTANTIATION,
"newObjectArray");
-
+
conf = register("newOArrayGet_ignoreFirstInteger",
new GenericScannerState(root, 1));
-
+
// In non-int primitive arrays class resolutions can happen
// but they should be ignored.
conf.putSuccessor(ScannerState.TRANSITION_CLASS_RESOLUTION, "ignoreAll");
-
+
// Spurious object and string references occur when setting array
// elements. This suppresses them.
conf.putSuccessor(ScannerState.TRANSITION_PRIMITIVE_INSTANTIATION,
"ignoreAll");
conf.putSuccessor(ScannerState.TRANSITION_OBJECT_REFERENCE, "ignoreAll");
conf.putSuccessor(ScannerState.TRANSITION_STRING_REFERENCE, "ignoreAll");
-
+
conf.setDefaultSuccessor("start");
// Primitive arrays use the ARRAY_SET transition to create setting the
@@ -252,11 +252,11 @@ public class ScanEngine
conf.putSuccessor(ScannerState.TRANSITION_CLASS_RESOLUTION, "ignoreAll");
conf.putSuccessor(ScannerState.TRANSITION_PRIMITIVE_INSTANTIATION,
"ignoreAll");
-
+
conf = register("newPArraySet", new GenericScannerState(root));
conf.putSuccessor(ScannerState.TRANSITION_PRIMITIVE_INSTANTIATION,
"newPArraySet_ignoreFirstInteger");
-
+
// Primitive arrays ignore all kinds of non-primitive object information.
conf.putSuccessor(ScannerState.TRANSITION_OBJECT_REFERENCE,
"ignoreAll");
@@ -271,11 +271,11 @@ public class ScanEngine
conf = register("newPArraySet_ignoreFirstInteger",
new GenericScannerState(root, 1));
-
+
// In non-int primitive arrays class resolutions can happen
// but they should be ignored.
conf.putSuccessor(ScannerState.TRANSITION_CLASS_RESOLUTION, "ignoreAll");
-
+
// Spurious object and string references occur when setting array
// elements. This suppresses them.
conf.putSuccessor(ScannerState.TRANSITION_PRIMITIVE_INSTANTIATION,
@@ -287,7 +287,7 @@ public class ScanEngine
}
/** Registers a <code>ScannerState</code> under a certain name.
- *
+ *
* @param name Name of the state
* @param state The <code>ScannerState</code> instance.
* @return The second argument.
@@ -295,26 +295,26 @@ public class ScanEngine
private ScannerState register(String name, ScannerState state)
{
state.init(name);
-
+
states.put(name, state);
return state;
}
-
+
/** Generates or returns an id for the given object which can be activated
* later if the object is suitable.
- *
+ *
* <p>Objects are unsuitable if they are an instance of a primitive wrapper
* or String.</p>
- *
- * @param value The object to retrieve an id for.
+ *
+ * @param value The object to retrieve an id for.
* @return The id for the object or <code>null</code>.
*/
private ObjectId retrieveId(Object value)
{
Class valueClass = value.getClass();
ObjectId id = null;
-
+
// Although multiple accesses to Class objects are not handled
// through ids we generate one for them, too. This allows us to detect
// second time references to such objects in the writeObject method
@@ -329,13 +329,13 @@ public class ScanEngine
objects.put(value, id);
}
}
-
+
return id;
}
/** Scans the argument and calls one of event methods. See
* the introduction of this class for details.
- *
+ *
* @param expr The expression to serialize.
*/
public void writeExpression(Expression expr)
@@ -344,7 +344,7 @@ public class ScanEngine
Object[] args = expr.getArguments();
Object target = expr.getTarget();
Object value = null;
-
+
try
{
value = expr.getValue();
@@ -366,9 +366,9 @@ public class ScanEngine
if (methodName.equals("newInstance"))
{
id = retrieveId(value);
-
+
Class ct = (Class) args[0];
-
+
if (ct.isPrimitive() || ct == Boolean.class || ct == Byte.class
|| ct == Short.class || ct == Integer.class || ct == Long.class
|| ct == Float.class || ct == Double.class)
@@ -379,7 +379,7 @@ public class ScanEngine
objectArrayInstantiation(ct.getName(),
args[1].toString(),
id);
-
+
return;
}
else if (methodName.equals("get"))
@@ -398,7 +398,7 @@ public class ScanEngine
objectReference(id);
end();
}
-
+
return;
}
else if (methodName.equals("set"))
@@ -407,7 +407,7 @@ public class ScanEngine
return;
}
}
-
+
id = retrieveId(value);
if (target instanceof Class)
@@ -517,7 +517,7 @@ public class ScanEngine
/** Scans the argument and calls one of event methods. See
* the introduction of this class for details.
- *
+ *
* @param stmt The statement to serialize.
*/
public void writeStatement(Statement stmt)
@@ -553,7 +553,7 @@ public class ScanEngine
/** Scans the argument and calls one of event methods. See
* the introduction of this class for details.
- *
+ *
* @param o The object to serialize.
*/
public boolean writeObject(Object o)
@@ -585,9 +585,9 @@ public class ScanEngine
end();
return false;
}
-
+
// If our object has a corresponding ObjectId instance
- // then generate an objectReference. This will
+ // then generate an objectReference. This will
// initialize the id (= brings it in the "used" state)
// when this is the first referal.
objectReference(id);
@@ -622,10 +622,10 @@ public class ScanEngine
/**
* Does a transition from one state to another using the given event.
- *
+ *
* <p>This involves saving the current state, retrieving it's
* successor and setting it as the current state.</p>
- *
+ *
* @param transition One of {@link ScannerStates]'s transition constants.
*/
private void transition(int transition)
@@ -633,7 +633,7 @@ public class ScanEngine
parents.push(current);
String stateName = current.getSuccessor(transition);
-
+
if (DEBUG)
{
System.err.println("from state: " + current.getName() + "\n\troute: "
@@ -641,9 +641,9 @@ public class ScanEngine
+ "\n\t\tto state: "
+ stateName);
}
-
+
ScannerState newState = (ScannerState) states.get(stateName);
-
+
newState.enter(new Context(current.getName(), current.getCalls()));
assert (newState != null) : "State '" + stateName + "' was not defined.";
@@ -655,7 +655,7 @@ public class ScanEngine
*
* <p>More details about this method can be found in this
* class' introduction.</p>
- *
+ *
* @param methodName The name of the method which is called.
*/
void methodInvocation(String methodName)
@@ -669,7 +669,7 @@ public class ScanEngine
*
* <p>More details about this method can be found in this
* class' introduction.</p>
- *
+ *
* @param methodName The name of the method which is called.
* @param className The name of the class in which the method is called.
*/
@@ -684,7 +684,7 @@ public class ScanEngine
*
* <p>More details about this method can be found in this
* class' introduction.</p>
- *
+ *
* @param fieldName The name of the field whose value is retrieved.
* @param className The name of the class in which the method is called.
*/
@@ -699,7 +699,7 @@ public class ScanEngine
*
* <p>More details about this method can be found in this
* class' introduction.</p>
- *
+ *
* @param className The name of the class in which the method is called.
*/
void classResolution(String className)
@@ -713,7 +713,7 @@ public class ScanEngine
*
* <p>More details about this method can be found in this
* class' introduction.</p>
- *
+ *
* @param className The name of the class in which the method is called.
* @param objectId An ObjectId instance which can be activated later.
*/
@@ -728,7 +728,7 @@ public class ScanEngine
*
* <p>More details about this method can be found in this
* class' introduction.</p>
- *
+ *
* @param primitiveName One of "boolean, "byte", "short", "int", "long"
* , "float" or "double"
* @param valueAsString The value of the primitive as a String.
@@ -744,7 +744,7 @@ public class ScanEngine
*
* <p>More details about this method can be found in this
* class' introduction.</p>
- *
+ *
* @param arrayClassName The array's class name.
* @param objectId An ObjectId instance which can be activated later.
* @param lengthAsString The array's length as String.
@@ -761,7 +761,7 @@ public class ScanEngine
*
* <p>More details about this method can be found in this
* class' introduction.</p>
- *
+ *
* @param arrayClassName The array's class name.
* @param objectId An ObjectId instance which can be activated later.
* @param lengthAsString The array's length as String.
@@ -773,12 +773,12 @@ public class ScanEngine
current.objectArrayInstantiation(arrayClassName, lengthAsString, objectId);
}
-
+
/** Event method that denotes the setting of a value in an array.
*
* <p>More details about this method can be found in this
* class' introduction.</p>
- *
+ *
* @param indexAsString The index to as a String.
*/
void arraySet(String indexAsString)
@@ -792,7 +792,7 @@ public class ScanEngine
*
* <p>More details about this method can be found in this
* class' introduction.</p>
- *
+ *
* @param indexAsString The index to as a String.
*/
void arrayGet(String indexAsString)
@@ -836,7 +836,7 @@ public class ScanEngine
}
/** Event method that denotes a string.
- *
+ *
* @param string The string that should be written.
*/
void stringReference(String string)
@@ -847,7 +847,7 @@ public class ScanEngine
}
/** Event method that denotes a reference to an existing object.
- *
+ *
* @param id The ObjectId to be used.
*/
void objectReference(ObjectId id)
diff --git a/gnu/java/beans/encoder/ScannerState.java b/gnu/java/beans/encoder/ScannerState.java
index 888478a8e..14d63056e 100644
--- a/gnu/java/beans/encoder/ScannerState.java
+++ b/gnu/java/beans/encoder/ScannerState.java
@@ -42,12 +42,12 @@ import java.util.HashMap;
/** <p>Provides the infrastructure for the state machine and the transition
* mechanism.</p>
- *
+ *
* <p>Each states knows a set of successor. There can be one successor for
* every transition variant. Furthermore a state knows about a default
* successor which is taken when there is no special setup for a
* transition.</p>
- *
+ *
* @author Robert Schuster (robertschuster@fsfe.org)
*
*/
@@ -105,42 +105,42 @@ public abstract class ScannerState
* transition->successor's state name.
*/
HashMap transitions = new HashMap();
-
+
int calls;
-
+
Context context;
-
+
String name;
-
+
final void init(String newName)
{
assert (name == null);
-
+
name = newName;
}
-
+
final String getName()
{
return name;
}
-
+
final void enter(Context ctx)
{
calls++;
context = ctx;
-
+
enterImpl(ctx);
}
-
+
protected void enterImpl(Context ctx)
{
}
-
+
final Context context()
{
return context;
}
-
+
final int getCalls()
{
return calls;
@@ -148,10 +148,10 @@ public abstract class ScannerState
/**
* <p>Stores a successor's state name for a certain transition.</p>
- *
+ *
* <p>This method is only used at the configuration time of the state
* machine.</p>
- *
+ *
* @param transition One of the transition constants.
* @param stateName The state name of the successor.
*/
@@ -165,10 +165,10 @@ public abstract class ScannerState
/** <p>Retrieves a the state name of a successor for the given transition
* constant.</p>
- *
+ *
* <p>Returns the default successor's state name if no special setup was
* prepared.</p>
- *
+ *
* @param transition One of the transition constants.
* @return The state name of the successor.
*/
@@ -181,7 +181,7 @@ public abstract class ScannerState
/**
* Sets the name for the default successor state.
- *
+ *
* @param newDefaultSuccessor The default successor's state name.
*/
final void setDefaultSuccessor(String newDefaultSuccessor)
@@ -203,7 +203,7 @@ public abstract class ScannerState
String valueAsString);
abstract void objectArrayInstantiation(String arrayClassName, String lengthAsString, ObjectId objectId);
-
+
abstract void primitiveArrayInstantiation(String arrayClassName, String lengthAsString, ObjectId objectId);
abstract void arraySet(String indexAsString);
@@ -222,7 +222,7 @@ public abstract class ScannerState
/**
* <p>A special event that does not provoke a direct transition.</p>
- *
+ *
* <p>Instead the transition is done by the <code>ScanEngine</code>: It goes
* back to the previous state and just uses this method to inform the state
* about this happening.</p>
@@ -232,5 +232,5 @@ public abstract class ScannerState
void enter()
{
}
-
+
}
diff --git a/gnu/java/beans/encoder/StAXWriter.java b/gnu/java/beans/encoder/StAXWriter.java
index fdb5f7d45..da88c5361 100644
--- a/gnu/java/beans/encoder/StAXWriter.java
+++ b/gnu/java/beans/encoder/StAXWriter.java
@@ -45,7 +45,7 @@ import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamWriter;
/** A {@link Writer} implementation based on the StAX API.
- *
+ *
* @author Robert Schuster (robertschuster@fsfe.org)
*
*/
@@ -54,7 +54,7 @@ public class StAXWriter implements Writer
XMLStreamWriter writer;
int indent = 0;
-
+
public StAXWriter(OutputStream os)
{
try
@@ -71,7 +71,7 @@ public class StAXWriter implements Writer
}
}
-
+
public void flush()
{
if (writer != null)
@@ -138,7 +138,7 @@ public class StAXWriter implements Writer
}
}
-
+
public void writeEndNoChildren()
{
try
diff --git a/gnu/java/beans/encoder/Writer.java b/gnu/java/beans/encoder/Writer.java
index 57203d23e..e08c786d8 100644
--- a/gnu/java/beans/encoder/Writer.java
+++ b/gnu/java/beans/encoder/Writer.java
@@ -40,20 +40,20 @@ package gnu.java.beans.encoder;
/** A <code>Writer</code> represents a simplified interface to an XML
* writer that is used for the XML persistence mechanism.
- *
+ *
* <p>Its sole purpose is to allow multiple backends which may remove
* the need to have certain APIs in the classpath. Eg. it is possible
* to write a stripped down XML Writer that does not rely on SAX, StAX
* or DOM APIs.</p>
- *
+ *
* <p>The caller may assume that every action is done immediately. However
* it is possible that the underlying implementation uses buffering streams.
* To make sure the data is written call the {@link flush} method.</p>
- *
+ *
* <p>The <code>Writer</code> implementation should care about the formatting
* of the XML stream making it possible to generate three types of formats using
* a special method invocation chain.</p>
- *
+ *
* <p>Write
* <code>
* &lt;element/&gt;
@@ -61,13 +61,13 @@ package gnu.java.beans.encoder;
* by issuing <code>write("element", true)</code> (or any of the other
* write-variants that allows specifying the <code>isEmpty</code> argument)
* and <code>writeEnd(true)</code>.</p>
- *
+ *
* <p>Write
* <code>
* &lt;element&gt;body&lt;/element&gt;
* </code>
* by issuing <code>writeNoChildren("element", "body")</code> and <code>writeNoChildrenEnd()</code>.</p>
- *
+ *
* <p>
* Write
* <code>
@@ -80,7 +80,7 @@ package gnu.java.beans.encoder;
* by issuing <code>write("element", false)</code> (or any of the other
* write-variants that allows specifying the <code>isEmpty</code> argument)
* and <code>writeEnd(false)</code>.</p>
- *
+ *
* <p>Note: It is important that the values of <code>isEmpty</code> and
* <code>wasEmpty</code> match. Otherwise strange things might happen to
* the layout.</p>
@@ -90,40 +90,40 @@ package gnu.java.beans.encoder;
*/
public interface Writer
{
- // TODO: This interface's design is not the best. Feel free to
+ // TODO: This interface's design is not the best. Feel free to
// improve it as you like.
/** Writes the XML preamble. */
void writePreamble();
/** Writes the end of an XML tag.
- *
+ *
* <p>If your tag has not generated any body text or child
* elements provide <code>true</code> as the argument to generate
- * more space efficient variant of the tag.>/p>
- *
+ * more space efficient variant of the tag.>/p>
+ *
* @param wasEmpty Whether the tag was empty or not.
*/
void writeEnd(boolean wasEmpty);
- /** Writes an XML tag without any attributes.
- *
+ /** Writes an XML tag without any attributes.
+ *
* @param tagName The name of the tag to write.
* @param empty Whether the element has child elements.
*/
void write(String tagName, boolean empty);
/** Writes an XML tag with one attribute name and value.
- *
+ *
* @param tagName The name of the tag to write.
- * @param attributeName The name of attribute.
+ * @param attributeName The name of attribute.
* @param attributeValue The attribute's value.
* @param empty Whether the element has child elements.
*/
void write(String tagName, String attributeName, String attributeValue, boolean empty);
/** Writes an XML tag with multiple attributes and a body text.
- *
+ *
* @param tagName The name of the tag to write.
* @param value The element's body content.
* @param attributeNames A set of attribute names.
@@ -134,7 +134,7 @@ public interface Writer
String[] attributeValues, boolean empty);
/** Writes an XML tag with multiple attributes without a body text.
- *
+ *
* @param tagName The name of the tag to write.
* @param attributeNames A set of attribute names.
* @param attributeValues A set of attribute values.
@@ -144,7 +144,7 @@ public interface Writer
/** Writes an XML tag with no attributes but with a body text
* that may have child elements.
- *
+ *
* @param tagName The name of the tag to write.
* @param value The element's body content.
*/
@@ -152,14 +152,14 @@ public interface Writer
/** Writes an XML tag with no attributes but with a body text
* that does not have child elements.
- *
+ *
* @param tagName The name of the tag to write.
* @param value The element's body content.
*/
void writeNoChildren(String tagName, String value);
-
+
/** Writes the end of an XML tag that has no child elements.
- *
+ *
* <p>Must be used in combination with {@link writeNoChildren} only.</p>
*/
void writeEndNoChildren();
diff --git a/gnu/java/beans/encoder/elements/ArrayInstantiation.java b/gnu/java/beans/encoder/elements/ArrayInstantiation.java
index a9aef89c7..51e00c361 100644
--- a/gnu/java/beans/encoder/elements/ArrayInstantiation.java
+++ b/gnu/java/beans/encoder/elements/ArrayInstantiation.java
@@ -42,7 +42,7 @@ import gnu.java.beans.encoder.ObjectId;
import gnu.java.beans.encoder.Writer;
/** Generates an XML element denoting the instantiation of an array.
- *
+ *
* @author Robert Schuster (robertschuster@fsfe.org)
*
*/
diff --git a/gnu/java/beans/encoder/elements/Array_Get.java b/gnu/java/beans/encoder/elements/Array_Get.java
index ca2ce0fa6..912ecebb5 100644
--- a/gnu/java/beans/encoder/elements/Array_Get.java
+++ b/gnu/java/beans/encoder/elements/Array_Get.java
@@ -42,7 +42,7 @@ import gnu.java.beans.encoder.Writer;
/**
* Generates an XML element denoting the retrieval of an array value.
- *
+ *
* @author Robert Schuster (robertschuster@fsfe.org)
*/
public class Array_Get extends Element
diff --git a/gnu/java/beans/encoder/elements/ClassResolution.java b/gnu/java/beans/encoder/elements/ClassResolution.java
index 8e640d183..cb736d5c0 100644
--- a/gnu/java/beans/encoder/elements/ClassResolution.java
+++ b/gnu/java/beans/encoder/elements/ClassResolution.java
@@ -41,7 +41,7 @@ package gnu.java.beans.encoder.elements;
import gnu.java.beans.encoder.Writer;
/** Generates an XML element denoting the resolution of a class.
- *
+ *
* @author Robert Schuster (robertschuster@fsfe.org)
*
*/
@@ -58,7 +58,7 @@ public class ClassResolution extends Element
{
writer.writeNoChildren("class", className);
}
-
+
public void writeEnd(Writer writer)
{
writer.writeEndNoChildren();
diff --git a/gnu/java/beans/encoder/elements/Element.java b/gnu/java/beans/encoder/elements/Element.java
index 5681d2b76..a8c0ecdf7 100644
--- a/gnu/java/beans/encoder/elements/Element.java
+++ b/gnu/java/beans/encoder/elements/Element.java
@@ -45,11 +45,11 @@ import gnu.java.beans.encoder.ObjectId;
import gnu.java.beans.encoder.Writer;
/** <code>Element</code> is the base class for the object tree elements.
- *
+ *
* <p>It provides the neccessary infrastructure every element subclass
* needs in order to interact with the {@link gnu.java.beans.encoder.Root}
* class.</p>
- *
+ *
* @author Robert Schuster (robertschuster@fsfe.org)
*/
public abstract class Element
@@ -58,100 +58,100 @@ public abstract class Element
* Stores the child elements.
*/
private LinkedList children = new LinkedList();
-
+
/**
* An optional ObjectId instance which is needed for certain subclasses
* only.
*/
private ObjectId objectId;
-
+
/** Sets an {@link gnu.java.beans.encoder.ObjectId} instance in this
* <code>Element</code>.
- *
+ *
* <p>This can only be done once.</p>
- *
+ *
* @param objectId An ObjectId instance.
*/
public final void initId(ObjectId objectId)
{
assert (this.objectId == null);
assert (objectId != null);
-
+
this.objectId = objectId;
}
/** Adds a child element to this <code>Element</code>.
- *
+ *
* @param elem The new child.
*/
public final void addChild(Element elem)
{
children.add(elem);
}
-
+
/** Removes the child element added last.
*/
public final void removeLast()
{
children.removeLast();
}
-
+
/** Provides access to the child elements via an iterator.
- *
+ *
* @return An iterator for the child elements.
*/
public final Iterator iterator(){
return children.iterator();
}
-
+
/** Clears all the stored child elements.
- *
+ *
*/
public final void clear()
{
- children.clear();
+ children.clear();
}
-
+
/** Returns whether this element contains child elements.
- *
+ *
* <p>This method is useful to decide which formatting variant
* for the XML element can be chosen.</p>
- *
+ *
* @return Whether the element has child elements.
*/
public final boolean isEmpty()
{
- return children.isEmpty();
+ return children.isEmpty();
}
-
+
/** Retrieves the element's {@link gnu.java.beans.encoder.ObjectId} instance
* if it has one.
- *
+ *
* @return The ObjectId instance or <code>null</code>.
*/
public final ObjectId getId()
{
return objectId;
}
-
+
/** Writes the opening XML tag.
- *
+ *
* @param writer The writer to be used for XML writing.
*/
public abstract void writeStart(Writer writer);
-
+
/** Writes the closing XML tag.
- *
+ *
* <p>By default this does <code>writer.writeEnd(children.isEmpty())</code>.
* Override if neccessary, for example when using the
* {@link gnu.java.beans.encoder.Writer#writeNoChildren}</code> method
- * variants.
- *
+ * variants.
+ *
* @param writer The writer to be used for XML writing.
*/
public void writeEnd(Writer writer)
{
writer.writeEnd(children.isEmpty());
}
-
+
}
diff --git a/gnu/java/beans/encoder/elements/List_Get.java b/gnu/java/beans/encoder/elements/List_Get.java
index e73afa8e9..c14ab91f9 100644
--- a/gnu/java/beans/encoder/elements/List_Get.java
+++ b/gnu/java/beans/encoder/elements/List_Get.java
@@ -41,7 +41,7 @@ package gnu.java.beans.encoder.elements;
import gnu.java.beans.encoder.Writer;
/** Generates an XML element denoting the retrieval of a list's element.
- *
+ *
* @author Robert Schuster (robertschuster@fsfe.org)
*
*/
@@ -52,5 +52,5 @@ public class List_Get extends Element
{
writer.write("object", "get");
}
-
+
}
diff --git a/gnu/java/beans/encoder/elements/List_Set.java b/gnu/java/beans/encoder/elements/List_Set.java
index 03c73fd20..3e7cca628 100644
--- a/gnu/java/beans/encoder/elements/List_Set.java
+++ b/gnu/java/beans/encoder/elements/List_Set.java
@@ -41,7 +41,7 @@ package gnu.java.beans.encoder.elements;
import gnu.java.beans.encoder.Writer;
/** Generates an XML element denoting the setting of a list's element.
- *
+ *
* @author Robert Schuster (robertschuster@fsfe.org)
*
*/
@@ -52,5 +52,5 @@ public class List_Set extends Element
{
writer.write("object", "set");
}
-
+
}
diff --git a/gnu/java/beans/encoder/elements/MethodInvocation.java b/gnu/java/beans/encoder/elements/MethodInvocation.java
index d5b317496..1de5bb62d 100644
--- a/gnu/java/beans/encoder/elements/MethodInvocation.java
+++ b/gnu/java/beans/encoder/elements/MethodInvocation.java
@@ -41,22 +41,22 @@ package gnu.java.beans.encoder.elements;
import gnu.java.beans.encoder.Writer;
/** Generates an XML element denoting a non-static method call.
- *
+ *
* @author Robert Schuster (robertschuster@fsfe.org)
*
*/
public class MethodInvocation extends Element
{
final String methodName;
-
+
public MethodInvocation(String newMethodName)
{
methodName = newMethodName;
}
-
+
public void writeStart(Writer writer)
{
writer.write("void", "method", methodName, isEmpty());
}
-
+
}
diff --git a/gnu/java/beans/encoder/elements/NullObject.java b/gnu/java/beans/encoder/elements/NullObject.java
index 599c4d85f..211e2a74b 100644
--- a/gnu/java/beans/encoder/elements/NullObject.java
+++ b/gnu/java/beans/encoder/elements/NullObject.java
@@ -41,7 +41,7 @@ package gnu.java.beans.encoder.elements;
import gnu.java.beans.encoder.Writer;
/** Generates an XML element denoting the <code>null</code> value.
- *
+ *
* @author Robert Schuster (robertschuster@fsfe.org)
*
*/
diff --git a/gnu/java/beans/encoder/elements/ObjectInstantiation.java b/gnu/java/beans/encoder/elements/ObjectInstantiation.java
index 692227d59..98614809f 100644
--- a/gnu/java/beans/encoder/elements/ObjectInstantiation.java
+++ b/gnu/java/beans/encoder/elements/ObjectInstantiation.java
@@ -42,7 +42,7 @@ import gnu.java.beans.encoder.ObjectId;
import gnu.java.beans.encoder.Writer;
/** Generates an XML element denoting the instantiation of an object.
- *
+ *
* @author Robert Schuster (robertschuster@fsfe.org)
*
*/
diff --git a/gnu/java/beans/encoder/elements/ObjectReference.java b/gnu/java/beans/encoder/elements/ObjectReference.java
index a44c2ee60..13a597a58 100644
--- a/gnu/java/beans/encoder/elements/ObjectReference.java
+++ b/gnu/java/beans/encoder/elements/ObjectReference.java
@@ -42,7 +42,7 @@ import gnu.java.beans.encoder.ObjectId;
import gnu.java.beans.encoder.Writer;
/** Generates an XML element denoting referencing an existing object.
- *
+ *
* @author Robert Schuster (robertschuster@fsfe.org)
*
*/
@@ -53,7 +53,7 @@ public class ObjectReference extends Element
public ObjectReference(ObjectId newId)
{
id = newId;
-
+
// Initializing the Id here is making sure it gets
// actually used. This step modifies the Id instance
// in other elements.
@@ -64,5 +64,5 @@ public class ObjectReference extends Element
{
writer.write("object", "idref", id.toString(), isEmpty());
}
-
+
}
diff --git a/gnu/java/beans/encoder/elements/PrimitiveInstantiation.java b/gnu/java/beans/encoder/elements/PrimitiveInstantiation.java
index db08edbf8..ae34b9dad 100644
--- a/gnu/java/beans/encoder/elements/PrimitiveInstantiation.java
+++ b/gnu/java/beans/encoder/elements/PrimitiveInstantiation.java
@@ -41,7 +41,7 @@ package gnu.java.beans.encoder.elements;
import gnu.java.beans.encoder.Writer;
/** Generates an XML element denoting a primitive data value.
- *
+ *
* @author Robert Schuster (robertschuster@fsfe.org)
*
*/
diff --git a/gnu/java/beans/encoder/elements/StaticFieldAccess.java b/gnu/java/beans/encoder/elements/StaticFieldAccess.java
index 7ed935d49..7fcbf5203 100644
--- a/gnu/java/beans/encoder/elements/StaticFieldAccess.java
+++ b/gnu/java/beans/encoder/elements/StaticFieldAccess.java
@@ -41,7 +41,7 @@ package gnu.java.beans.encoder.elements;
import gnu.java.beans.encoder.Writer;
/** Generates an XML element denoting a static method call.
- *
+ *
* @author Robert Schuster (robertschuster@fsfe.org)
*
*/
diff --git a/gnu/java/beans/encoder/elements/StaticMethodInvocation.java b/gnu/java/beans/encoder/elements/StaticMethodInvocation.java
index 40c46a534..92d49dc41 100644
--- a/gnu/java/beans/encoder/elements/StaticMethodInvocation.java
+++ b/gnu/java/beans/encoder/elements/StaticMethodInvocation.java
@@ -42,26 +42,26 @@ package gnu.java.beans.encoder.elements;
import gnu.java.beans.encoder.Writer;
/**
- *
+ *
* @author Robert Schuster (robertschuster@fsfe.org)
*
*/
public class StaticMethodInvocation extends Element
{
final String className;
-
+
final String methodName;
-
+
public StaticMethodInvocation(String newClassName, String newMethodName)
{
className = newClassName;
methodName = newMethodName;
}
-
+
public void writeStart(Writer writer)
{
writer.write("void", new String[] { "class", "method" },
new String[] { className, methodName }, isEmpty());
}
-
+
}
diff --git a/gnu/java/beans/encoder/elements/StringReference.java b/gnu/java/beans/encoder/elements/StringReference.java
index c368e6528..7e6787da3 100644
--- a/gnu/java/beans/encoder/elements/StringReference.java
+++ b/gnu/java/beans/encoder/elements/StringReference.java
@@ -54,7 +54,7 @@ public class StringReference extends Element
{
writer.writeNoChildren("string", string);
}
-
+
public void writeEnd(Writer writer)
{
writer.writeEndNoChildren();
diff --git a/gnu/java/io/ASN1ParsingException.java b/gnu/java/io/ASN1ParsingException.java
index 5d2c64ab5..9cf98abd3 100644
--- a/gnu/java/io/ASN1ParsingException.java
+++ b/gnu/java/io/ASN1ParsingException.java
@@ -7,7 +7,7 @@ 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
@@ -44,13 +44,13 @@ package gnu.java.io;
public class ASN1ParsingException extends java.io.IOException
{
- public ASN1ParsingException()
- {
- super();
- }
+ public ASN1ParsingException()
+ {
+ super();
+ }
- public ASN1ParsingException(String msg)
- {
- super(msg);
- }
+ public ASN1ParsingException(String msg)
+ {
+ super(msg);
+ }
}
diff --git a/gnu/java/io/Base64InputStream.java b/gnu/java/io/Base64InputStream.java
index 1f5d220db..1105b6022 100644
--- a/gnu/java/io/Base64InputStream.java
+++ b/gnu/java/io/Base64InputStream.java
@@ -7,7 +7,7 @@ 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
@@ -57,7 +57,7 @@ public class Base64InputStream extends FilterInputStream
// ------------------------------------------------------------------------
/** Base-64 digits. */
- private static final String BASE_64 =
+ private static final String BASE_64 =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
/** Base-64 padding character. */
diff --git a/gnu/java/io/ClassLoaderObjectInputStream.java b/gnu/java/io/ClassLoaderObjectInputStream.java
index 238ab26b1..e3f3d4c42 100644
--- a/gnu/java/io/ClassLoaderObjectInputStream.java
+++ b/gnu/java/io/ClassLoaderObjectInputStream.java
@@ -7,7 +7,7 @@ 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
@@ -52,22 +52,22 @@ import java.io.StreamCorruptedException;
*/
public class ClassLoaderObjectInputStream extends ObjectInputStream {
- ClassLoader myClassLoader;
+ ClassLoader myClassLoader;
- /** Create the new ClassLoaderObjectInputStream.
- * @param in the InputStream to read the Objects from.
- * @param myClassLoader the ClassLoader to load classes
- * with.
- */
- public ClassLoaderObjectInputStream(InputStream in, ClassLoader myClassLoader) throws IOException,StreamCorruptedException {
- super(in);
- this.myClassLoader = myClassLoader;
- }
+ /** Create the new ClassLoaderObjectInputStream.
+ * @param in the InputStream to read the Objects from.
+ * @param myClassLoader the ClassLoader to load classes
+ * with.
+ */
+ public ClassLoaderObjectInputStream(InputStream in, ClassLoader myClassLoader) throws IOException,StreamCorruptedException {
+ super(in);
+ this.myClassLoader = myClassLoader;
+ }
- /** Overriden method to use the loadClass() method from
- * the ClassLoader.
- */
- public Class resolveClass(String name) throws IOException, ClassNotFoundException {
- return myClassLoader.loadClass(name);
- }
+ /** Overriden method to use the loadClass() method from
+ * the ClassLoader.
+ */
+ public Class resolveClass(String name) throws IOException, ClassNotFoundException {
+ return myClassLoader.loadClass(name);
+ }
}
diff --git a/gnu/java/io/NullOutputStream.java b/gnu/java/io/NullOutputStream.java
index 526bd26e8..603a2d3dd 100644
--- a/gnu/java/io/NullOutputStream.java
+++ b/gnu/java/io/NullOutputStream.java
@@ -7,7 +7,7 @@ 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
diff --git a/gnu/java/io/ObjectIdentityMap2Int.java b/gnu/java/io/ObjectIdentityMap2Int.java
index 08f089d79..ed62e8381 100644
--- a/gnu/java/io/ObjectIdentityMap2Int.java
+++ b/gnu/java/io/ObjectIdentityMap2Int.java
@@ -7,7 +7,7 @@ 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
@@ -50,7 +50,7 @@ package gnu.java.io;
* @author Fridtjof Siebert (siebert@aicas.com)
*/
public class ObjectIdentityMap2Int
-{
+{
/**
@@ -58,7 +58,7 @@ public class ObjectIdentityMap2Int
* prime number since the delta used for conflict resulution must
* not have any common divisors with the length.
*/
- private static final int[] PRIMES = {
+ private static final int[] PRIMES = {
0x1f,
0x3d,
0x7f,
@@ -93,7 +93,7 @@ public class ObjectIdentityMap2Int
*/
private static final Object NIL = new Object();
-
+
/**
* The objects in this map:
*
@@ -118,13 +118,13 @@ public class ObjectIdentityMap2Int
* invariant
* size < limit
*/
- private int size = 0;
+ private int size = 0;
/**
* The index in primes of the size of the tables.
*/
- private int cap = 0;
+ private int cap = 0;
/**
@@ -133,7 +133,7 @@ public class ObjectIdentityMap2Int
* invariant
* limit = PRIMES[cap] / 4 * 3;
*/
- private int limit = 0;
+ private int limit = 0;
/**
@@ -148,7 +148,7 @@ public class ObjectIdentityMap2Int
/**
* Helper function to alloc the object and int array for the given
* capacity. Set limit, reset size to 0.
- *
+ *
* No elements will be stored in the newly allocated arrays.
*
* @param c the capacity: this is an index in PRIMES, PRIMES[c]
@@ -161,8 +161,8 @@ public class ObjectIdentityMap2Int
*/
private void alloc(int c)
{
- if (c >= PRIMES.length)
- throw new InternalError("Hash table size overflow");
+ if (c >= PRIMES.length)
+ throw new InternalError("Hash table size overflow");
cap = c;
int len = PRIMES[c];
@@ -170,7 +170,7 @@ public class ObjectIdentityMap2Int
intTable = new int[len];
limit = len / 4 * 3;
- size = 0;
+ size = 0;
}
@@ -180,7 +180,7 @@ public class ObjectIdentityMap2Int
* ensures
* (get(o) == i);
*
- * @param o object reference or null that is to be mapped.
+ * @param o object reference or null that is to be mapped.
*
* @param i the integer id to be associated with o
*
@@ -189,9 +189,9 @@ public class ObjectIdentityMap2Int
* @throws InternalError if hash tables has grown to more then
* 0x7fffffff entries (ie., size >= 0x7fffffff*3/4).
*/
- public void put(Object o, int i)
+ public void put(Object o, int i)
{
- if (i < 0)
+ if (i < 0)
throw new IllegalArgumentException("int argument must be postive: "+i);
o = (o == null) ? NIL : o;
@@ -200,8 +200,8 @@ public class ObjectIdentityMap2Int
intTable[s] = i;
if (objectTable[s] == null)
{
- objectTable[s] = o;
- size++;
+ objectTable[s] = o;
+ size++;
if (size >= limit)
{
rehash();
@@ -219,14 +219,14 @@ public class ObjectIdentityMap2Int
*
* @param o an object, must not be null.
*
- * @return an index of o
+ * @return an index of o
*/
private int slot(Object o)
{
Object[] ot = objectTable;
int hc = System.identityHashCode(o);
int len = ot.length;
- int result = hc % len;
+ int result = hc % len;
result = result < 0 ? -result : result;
int delta = 16 - (hc & 15);
Object existing = ot[result];
@@ -249,9 +249,9 @@ public class ObjectIdentityMap2Int
* ensure
* (cap == \old cap+1);
*/
- private void rehash()
+ private void rehash()
{
- Object[] ot = objectTable;
+ Object[] ot = objectTable;
int [] it = intTable;
alloc(cap + 1);
@@ -268,7 +268,7 @@ public class ObjectIdentityMap2Int
* @return the corresponding integer id for o or -1 if o has not
* been put into this map.
*/
- public int get(Object o)
+ public int get(Object o)
{
o = (o == null) ? NIL : o;
int s = slot(o);
@@ -281,10 +281,10 @@ public class ObjectIdentityMap2Int
* ensures
* ((size == 0) && \forall Object o: get(o) == -1)
*/
- public void clear()
+ public void clear()
{
- Object[] ot = objectTable;
- size = 0;
+ Object[] ot = objectTable;
+ size = 0;
for (int i = 0; i < ot.length; i++)
ot[i] = null;
}
diff --git a/gnu/java/io/ObjectIdentityWrapper.java b/gnu/java/io/ObjectIdentityWrapper.java
index 6db2e3a52..53c9943de 100644
--- a/gnu/java/io/ObjectIdentityWrapper.java
+++ b/gnu/java/io/ObjectIdentityWrapper.java
@@ -8,7 +8,7 @@ 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
diff --git a/gnu/java/io/PlatformHelper.java b/gnu/java/io/PlatformHelper.java
index 96231e1be..545241110 100644
--- a/gnu/java/io/PlatformHelper.java
+++ b/gnu/java/io/PlatformHelper.java
@@ -7,7 +7,7 @@ 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
@@ -52,7 +52,7 @@ public class PlatformHelper
public static final char pathSeparatorChar = pathSeparator.charAt(0);
/**
- * On most platforms 260 is equal or greater than a max path value,
+ * On most platforms 260 is equal or greater than a max path value,
* so we can set the initial buffer size of StringBuffer to half of this value
* to improve performance.
*/
@@ -106,7 +106,7 @@ public class PlatformHelper
}
/**
- * This routine removes from input param "path" the tail separator if it exists,
+ * This routine removes from input param "path" the tail separator if it exists,
* and return the remain part.
*/
public static final String removeTailSeparator(String path)
@@ -118,7 +118,7 @@ public class PlatformHelper
}
/**
- * This routine returns last index of separator in input param "path",
+ * This routine returns last index of separator in input param "path",
* and return it.
*/
public static final int lastIndexOfSeparator(String path)
diff --git a/gnu/java/lang/CPStringBuilder.java b/gnu/java/lang/CPStringBuilder.java
index 27e7d2cc7..f42629d46 100644
--- a/gnu/java/lang/CPStringBuilder.java
+++ b/gnu/java/lang/CPStringBuilder.java
@@ -215,13 +215,13 @@ public final class CPStringBuilder
/* If the StringBuffer's value just grew, then we know that
value is newly allocated and the region between count and
newLength is filled with '\0'. */
- count = newLength;
+ count = newLength;
}
else
{
- /* The StringBuffer's value doesn't need to grow. However,
- we should clear out any cruft that may exist. */
- while (count < newLength)
+ /* The StringBuffer's value doesn't need to grow. However,
+ we should clear out any cruft that may exist. */
+ while (count < newLength)
value[count++] = '\0';
}
}
@@ -290,7 +290,7 @@ public final class CPStringBuilder
* @see System#arraycopy(Object, int, Object, int, int)
*/
public void getChars(int srcOffset, int srcEnd,
- char[] dst, int dstOffset)
+ char[] dst, int dstOffset)
{
if (srcOffset < 0 || srcEnd > count || srcEnd < srcOffset)
throw new StringIndexOutOfBoundsException();
@@ -362,10 +362,10 @@ public final class CPStringBuilder
return append("null");
synchronized (stringBuffer)
{
- int len = stringBuffer.length();
- ensureCapacity(count + len);
- stringBuffer.getChars(0, len, value, count);
- count += len;
+ int len = stringBuffer.length();
+ ensureCapacity(count + len);
+ stringBuffer.getChars(0, len, value, count);
+ count += len;
}
return this;
}
@@ -466,9 +466,9 @@ public final class CPStringBuilder
return append("null");
if (end - start > 0)
{
- ensureCapacity(count + end - start);
- for (; start < end; ++start)
- value[count++] = seq.charAt(start);
+ ensureCapacity(count + end - start);
+ for (; start < end; ++start)
+ value[count++] = seq.charAt(start);
}
return this;
}
@@ -979,23 +979,23 @@ public final class CPStringBuilder
int count = 0;
while (start < end)
{
- char base = value[start];
- if (base < Character.MIN_HIGH_SURROGATE
- || base > Character.MAX_HIGH_SURROGATE
- || start == end
- || start == count
- || value[start + 1] < Character.MIN_LOW_SURROGATE
- || value[start + 1] > Character.MAX_LOW_SURROGATE)
- {
- // Nothing.
- }
- else
- {
- // Surrogate pair.
- ++start;
- }
- ++start;
- ++count;
+ char base = value[start];
+ if (base < Character.MIN_HIGH_SURROGATE
+ || base > Character.MAX_HIGH_SURROGATE
+ || start == end
+ || start == count
+ || value[start + 1] < Character.MIN_LOW_SURROGATE
+ || value[start + 1] > Character.MAX_LOW_SURROGATE)
+ {
+ // Nothing.
+ }
+ else
+ {
+ // Surrogate pair.
+ ++start;
+ }
+ ++start;
+ ++count;
}
return count;
}
@@ -1015,22 +1015,22 @@ public final class CPStringBuilder
{
while (codePoints > 0)
{
- char base = value[start];
- if (base < Character.MIN_HIGH_SURROGATE
- || base > Character.MAX_HIGH_SURROGATE
- || start == count
- || value[start + 1] < Character.MIN_LOW_SURROGATE
- || value[start + 1] > Character.MAX_LOW_SURROGATE)
- {
- // Nothing.
- }
- else
- {
- // Surrogate pair.
- ++start;
- }
- ++start;
- --codePoints;
+ char base = value[start];
+ if (base < Character.MIN_HIGH_SURROGATE
+ || base > Character.MAX_HIGH_SURROGATE
+ || start == count
+ || value[start + 1] < Character.MIN_LOW_SURROGATE
+ || value[start + 1] > Character.MAX_LOW_SURROGATE)
+ {
+ // Nothing.
+ }
+ else
+ {
+ // Surrogate pair.
+ ++start;
+ }
+ ++start;
+ --codePoints;
}
return start;
}
@@ -1040,7 +1040,7 @@ public final class CPStringBuilder
* ensure that an expensive growing operation will not occur until either
* <code>minimumCapacity</code> is reached or the array has been allocated.
* The buffer is grown to either <code>minimumCapacity * 2</code>, if
- * the array has been allocated or the larger of <code>minimumCapacity</code> and
+ * the array has been allocated or the larger of <code>minimumCapacity</code> and
* <code>capacity() * 2 + 2</code>, if it is not already large enough.
*
* @param minimumCapacity the new capacity
@@ -1050,14 +1050,14 @@ public final class CPStringBuilder
{
if (allocated || minimumCapacity > value.length)
{
- if (minimumCapacity > value.length)
- {
- int max = value.length * 2 + 2;
- minimumCapacity = (minimumCapacity < max ? max : minimumCapacity);
- }
- else
- minimumCapacity *= 2;
- allocateArray(minimumCapacity);
+ if (minimumCapacity > value.length)
+ {
+ int max = value.length * 2 + 2;
+ minimumCapacity = (minimumCapacity < max ? max : minimumCapacity);
+ }
+ else
+ minimumCapacity *= 2;
+ allocateArray(minimumCapacity);
}
}
@@ -1076,7 +1076,7 @@ public final class CPStringBuilder
value = nb;
allocated = false;
}
-
+
/**
* Get the length of the <code>String</code> this <code>StringBuilder</code>
* would create. Not to be confused with the <em>capacity</em> of the
diff --git a/gnu/java/lang/CharData.java b/gnu/java/lang/CharData.java
index a84d94da2..cb33035e6 100644
--- a/gnu/java/lang/CharData.java
+++ b/gnu/java/lang/CharData.java
@@ -58,7 +58,7 @@ package gnu.java.lang;
* attribute tables are much smaller than 0xffff entries; as many characters
* in Unicode share common attributes. Numbers that are too large to fit
* into NUM_VALUE as 16 bit chars are stored in LARGENUMS and a number N is
- * stored in NUM_VALUE such that (-N - 3) is the offset into LARGENUMS for
+ * stored in NUM_VALUE such that (-N - 3) is the offset into LARGENUMS for
* the particular character. The DIRECTION table also contains a field for
* detecting characters with multi-character uppercase expansions.
* Next, there is a listing for <code>TITLE</code> exceptions (most characters
@@ -81,7 +81,7 @@ public interface CharData
/**
* The character shift amount to look up the block offset. In other words,
- * <code>(char) (BLOCKS.value[ch >> SHIFT[p]] + ch)</code> is the index
+ * <code>(char) (BLOCKS.value[ch >> SHIFT[p]] + ch)</code> is the index
* where <code>ch</code> is described in <code>DATA</code> if <code>ch</code>
* is in Unicode plane <code>p</code>. Note that <code>p</code> is simply
* the integer division of ch and 0x10000.
diff --git a/gnu/java/lang/InstrumentationImpl.java b/gnu/java/lang/InstrumentationImpl.java
index 2425b35c8..a601baf55 100644
--- a/gnu/java/lang/InstrumentationImpl.java
+++ b/gnu/java/lang/InstrumentationImpl.java
@@ -66,7 +66,7 @@ public final class InstrumentationImpl implements Instrumentation
private ArrayList<ClassFileTransformer> transformers =
new ArrayList<ClassFileTransformer>();
-
+
InstrumentationImpl()
{
}
@@ -76,7 +76,7 @@ public final class InstrumentationImpl implements Instrumentation
* to the instrumentation. Each time a class is defined
* or redefined, the <code>transform</code> method of the
* <code>transformer</code> object is called.
- *
+ *
* @param transformer the transformer to add
* @throws NullPointerException if transformer is null
*/
@@ -89,11 +89,11 @@ public final class InstrumentationImpl implements Instrumentation
transformers.add(transformer);
}
}
-
+
/**
* Removes the given transformer from the set of transformers
* this Instrumentation object has.
- *
+ *
* @param transformer the transformer to remove
* @return true if the transformer was found and removed, false if
* the transformer was not found
@@ -103,8 +103,8 @@ public final class InstrumentationImpl implements Instrumentation
{
if (transformer == null)
throw new NullPointerException();
-
- boolean result;
+
+ boolean result;
synchronized (transformers)
{
result = transformers.remove(transformer);
@@ -114,22 +114,22 @@ public final class InstrumentationImpl implements Instrumentation
/**
* Returns if the current JVM supports class redefinition
- *
+ *
* @return true if the current JVM supports class redefinition
*/
public boolean isRedefineClassesSupported()
{
return VMInstrumentationImpl.isRedefineClassesSupported();
}
-
+
/**
* Redefine classes present in the definitions array, with
* the corresponding class files.
*
* @param definitions an array of classes to redefine
- *
- * @throws ClassNotFoundException if a class cannot be found
- * @throws UnmodifiableClassException if a class cannot be modified
+ *
+ * @throws ClassNotFoundException if a class cannot be found
+ * @throws UnmodifiableClassException if a class cannot be modified
* @throws UnsupportedOperationException if the JVM does not support
* redefinition or the redefinition made unsupported changes
* @throws ClassFormatError if a class file is not valid
@@ -139,7 +139,7 @@ public final class InstrumentationImpl implements Instrumentation
* are unsupported
* @throws ClassCircularityError if circularity occured with the new
* classes
- * @throws LinkageError if a linkage error occurs
+ * @throws LinkageError if a linkage error occurs
* @throws NullPointerException if the definitions array is null, or any
* of its element
*
@@ -153,14 +153,14 @@ public final class InstrumentationImpl implements Instrumentation
{
if (!isRedefineClassesSupported())
throw new UnsupportedOperationException();
-
+
VMInstrumentationImpl.redefineClasses(this, definitions);
}
/**
* Get all the classes loaded by the JVM.
- *
+ *
* @return an array containing all the classes loaded by the JVM. The array
* is empty if no class is loaded.
*/
@@ -171,9 +171,9 @@ public final class InstrumentationImpl implements Instrumentation
/**
* Get all the classes loaded by a given class loader
- *
+ *
* @param loader the loader
- *
+ *
* @return an array containing all the classes loaded by the given loader.
* The array is empty if no class was loaded by the loader.
*/
@@ -184,7 +184,7 @@ public final class InstrumentationImpl implements Instrumentation
/**
* Get the size of an object.
- *
+ *
* @param objectToSize the object
* @return the size of the object
* @throws NullPointerException if objectToSize is null.
@@ -207,12 +207,12 @@ public final class InstrumentationImpl implements Instrumentation
* @param protectionDomain the protection domain of the class being defined
* or redefined
* @param classfileBuffer the input byte buffer in class file format
- *
+ *
* @return the new class file
*/
public byte[] callTransformers(ClassLoader loader, String className,
- Class<?> classBeingRedefined, ProtectionDomain protectionDomain,
- byte[] classfileBuffer)
+ Class<?> classBeingRedefined, ProtectionDomain protectionDomain,
+ byte[] classfileBuffer)
{
byte[] newBuffer = null;
byte[] oldBuffer = classfileBuffer;
@@ -227,13 +227,13 @@ public final class InstrumentationImpl implements Instrumentation
{
newBuffer = current.transform(loader, className,
classBeingRedefined, protectionDomain, oldBuffer);
- }
- catch (IllegalClassFormatException ignored)
- {
+ }
+ catch (IllegalClassFormatException ignored)
+ {
//IGNORED
- }
+ }
if (newBuffer != null)
- oldBuffer = newBuffer;
+ oldBuffer = newBuffer;
}
}
return oldBuffer;
diff --git a/gnu/java/lang/MainThread.java b/gnu/java/lang/MainThread.java
index 7ad70cd7c..a72956421 100644
--- a/gnu/java/lang/MainThread.java
+++ b/gnu/java/lang/MainThread.java
@@ -8,7 +8,7 @@ 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
@@ -58,7 +58,7 @@ public class MainThread
throws ClassNotFoundException, NoSuchMethodException
{
Class found = Class.forName(classname, true,
- ClassLoader.getSystemClassLoader());
+ ClassLoader.getSystemClassLoader());
Class[] argTypes = new Class[1];
argTypes[0] = args.getClass();
mainMethod = found.getMethod("main", argTypes);
@@ -69,15 +69,15 @@ public class MainThread
{
try
{
- mainMethod.invoke(null,(Object) args);
+ mainMethod.invoke(null,(Object) args);
}
catch(IllegalAccessException e)
{
- // Ignore.
+ // Ignore.
}
catch(InvocationTargetException e)
{
- // Ignore.
+ // Ignore.
}
}
}
diff --git a/gnu/java/lang/management/BeanImpl.java b/gnu/java/lang/management/BeanImpl.java
index a651e3548..a7c2357b6 100644
--- a/gnu/java/lang/management/BeanImpl.java
+++ b/gnu/java/lang/management/BeanImpl.java
@@ -116,66 +116,66 @@ public class BeanImpl
return;
try
{
- MBeanAttributeInfo[] oldA = info.getAttributes();
- OpenMBeanAttributeInfo[] attribs =
- new OpenMBeanAttributeInfoSupport[oldA.length];
- for (int a = 0; a < oldA.length; ++a)
- {
- OpenMBeanParameterInfo param = Translator.translate(oldA[a].getType());
- if (param.getMinValue() == null)
- {
- Object[] lv;
- if (param.getLegalValues() == null)
- lv = null;
- else
- lv = param.getLegalValues().toArray();
- attribs[a] = new OpenMBeanAttributeInfoSupport(oldA[a].getName(),
- oldA[a].getDescription(),
- ((OpenType<Object>)
- param.getOpenType()),
- oldA[a].isReadable(),
- oldA[a].isWritable(),
- oldA[a].isIs(),
- param.getDefaultValue(),
- lv);
- }
- else
- attribs[a] = new OpenMBeanAttributeInfoSupport(oldA[a].getName(),
- oldA[a].getDescription(),
- ((OpenType<Object>)
- param.getOpenType()),
- oldA[a].isReadable(),
- oldA[a].isWritable(),
- oldA[a].isIs(),
- param.getDefaultValue(),
- ((Comparable<Object>)
- param.getMinValue()),
- ((Comparable<Object>)
- param.getMaxValue()));
- }
- MBeanConstructorInfo[] oldC = info.getConstructors();
- OpenMBeanConstructorInfo[] cons = new OpenMBeanConstructorInfoSupport[oldC.length];
- for (int a = 0; a < oldC.length; ++a)
- cons[a] =
- new OpenMBeanConstructorInfoSupport(oldC[a].getName(),
- oldC[a].getDescription(),
- translateSignature(oldC[a].getSignature()));
- MBeanOperationInfo[] oldO = info.getOperations();
- OpenMBeanOperationInfo[] ops = new OpenMBeanOperationInfoSupport[oldO.length];
- for (int a = 0; a < oldO.length; ++a)
- ops[a] =
- new OpenMBeanOperationInfoSupport(oldO[a].getName(),
- oldO[a].getDescription(),
- translateSignature(oldO[a].getSignature()),
- Translator.translate(oldO[a].getReturnType()).getOpenType(),
- oldO[a].getImpact());
- openInfo = new OpenMBeanInfoSupport(info.getClassName(), info.getDescription(),
- attribs, cons, ops, info.getNotifications());
+ MBeanAttributeInfo[] oldA = info.getAttributes();
+ OpenMBeanAttributeInfo[] attribs =
+ new OpenMBeanAttributeInfoSupport[oldA.length];
+ for (int a = 0; a < oldA.length; ++a)
+ {
+ OpenMBeanParameterInfo param = Translator.translate(oldA[a].getType());
+ if (param.getMinValue() == null)
+ {
+ Object[] lv;
+ if (param.getLegalValues() == null)
+ lv = null;
+ else
+ lv = param.getLegalValues().toArray();
+ attribs[a] = new OpenMBeanAttributeInfoSupport(oldA[a].getName(),
+ oldA[a].getDescription(),
+ ((OpenType<Object>)
+ param.getOpenType()),
+ oldA[a].isReadable(),
+ oldA[a].isWritable(),
+ oldA[a].isIs(),
+ param.getDefaultValue(),
+ lv);
+ }
+ else
+ attribs[a] = new OpenMBeanAttributeInfoSupport(oldA[a].getName(),
+ oldA[a].getDescription(),
+ ((OpenType<Object>)
+ param.getOpenType()),
+ oldA[a].isReadable(),
+ oldA[a].isWritable(),
+ oldA[a].isIs(),
+ param.getDefaultValue(),
+ ((Comparable<Object>)
+ param.getMinValue()),
+ ((Comparable<Object>)
+ param.getMaxValue()));
+ }
+ MBeanConstructorInfo[] oldC = info.getConstructors();
+ OpenMBeanConstructorInfo[] cons = new OpenMBeanConstructorInfoSupport[oldC.length];
+ for (int a = 0; a < oldC.length; ++a)
+ cons[a] =
+ new OpenMBeanConstructorInfoSupport(oldC[a].getName(),
+ oldC[a].getDescription(),
+ translateSignature(oldC[a].getSignature()));
+ MBeanOperationInfo[] oldO = info.getOperations();
+ OpenMBeanOperationInfo[] ops = new OpenMBeanOperationInfoSupport[oldO.length];
+ for (int a = 0; a < oldO.length; ++a)
+ ops[a] =
+ new OpenMBeanOperationInfoSupport(oldO[a].getName(),
+ oldO[a].getDescription(),
+ translateSignature(oldO[a].getSignature()),
+ Translator.translate(oldO[a].getReturnType()).getOpenType(),
+ oldO[a].getImpact());
+ openInfo = new OpenMBeanInfoSupport(info.getClassName(), info.getDescription(),
+ attribs, cons, ops, info.getNotifications());
}
catch (OpenDataException e)
{
- throw (InternalError) (new InternalError("A problem occurred creating the open type " +
- "descriptors.").initCause(e));
+ throw (InternalError) (new InternalError("A problem occurred creating the open type " +
+ "descriptors.").initCause(e));
}
}
@@ -195,7 +195,7 @@ public class BeanImpl
public Object getAttribute(String attribute)
throws AttributeNotFoundException, MBeanException,
- ReflectionException
+ ReflectionException
{
Object value = super.getAttribute(attribute);
if (value instanceof Enum)
@@ -207,60 +207,60 @@ public class BeanImpl
String[] allowedTypes = OpenType.ALLOWED_CLASSNAMES;
for (int a = 0; a < allowedTypes.length; ++a)
if (cName.equals(allowedTypes[a]))
- return value;
+ return value;
OpenMBeanInfo info = (OpenMBeanInfo) getMBeanInfo();
MBeanAttributeInfo[] attribs =
(MBeanAttributeInfo[]) info.getAttributes();
OpenType type = null;
for (int a = 0; a < attribs.length; ++a)
if (attribs[a].getName().equals(attribute))
- type = ((OpenMBeanAttributeInfo) attribs[a]).getOpenType();
+ type = ((OpenMBeanAttributeInfo) attribs[a]).getOpenType();
if (value instanceof List)
{
- try
- {
- Class e =
- Class.forName(((ArrayType) type).getElementOpenType().getClassName());
- List l = (List) value;
- Object[] array = (Object[]) Array.newInstance(e, l.size());
- return l.toArray(array);
- }
- catch (ClassNotFoundException e)
- {
- throw (InternalError) (new InternalError("The class of the list " +
- "element type could not " +
- "be created").initCause(e));
- }
+ try
+ {
+ Class e =
+ Class.forName(((ArrayType) type).getElementOpenType().getClassName());
+ List l = (List) value;
+ Object[] array = (Object[]) Array.newInstance(e, l.size());
+ return l.toArray(array);
+ }
+ catch (ClassNotFoundException e)
+ {
+ throw (InternalError) (new InternalError("The class of the list " +
+ "element type could not " +
+ "be created").initCause(e));
+ }
}
if (value instanceof Map)
{
- TabularType ttype = (TabularType) type;
- TabularData data = new TabularDataSupport(ttype);
- Iterator it = ((Map) value).entrySet().iterator();
- while (it.hasNext())
- {
- Map.Entry entry = (Map.Entry) it.next();
- try
- {
- data.put(new CompositeDataSupport(ttype.getRowType(),
- new String[] {
- "key",
- "value"
- },
- new Object[] {
- entry.getKey(),
- entry.getValue()
- }));
- }
- catch (OpenDataException e)
- {
- throw (InternalError) (new InternalError("A problem occurred " +
- "converting the map " +
- "to a composite data " +
- "structure.").initCause(e));
- }
- }
- return data;
+ TabularType ttype = (TabularType) type;
+ TabularData data = new TabularDataSupport(ttype);
+ Iterator it = ((Map) value).entrySet().iterator();
+ while (it.hasNext())
+ {
+ Map.Entry entry = (Map.Entry) it.next();
+ try
+ {
+ data.put(new CompositeDataSupport(ttype.getRowType(),
+ new String[] {
+ "key",
+ "value"
+ },
+ new Object[] {
+ entry.getKey(),
+ entry.getValue()
+ }));
+ }
+ catch (OpenDataException e)
+ {
+ throw (InternalError) (new InternalError("A problem occurred " +
+ "converting the map " +
+ "to a composite data " +
+ "structure.").initCause(e));
+ }
+ }
+ return data;
}
CompositeType cType = (CompositeType) type;
Set names = cType.keySet();
@@ -268,51 +268,51 @@ public class BeanImpl
List values = new ArrayList(names.size());
while (it.hasNext())
{
- String field = (String) it.next();
- Method getter = null;
- try
- {
- getter = vClass.getMethod("get" + field);
- }
- catch (NoSuchMethodException e)
- {
- /* Ignored; the type tells us it's there. */
- }
- try
- {
- values.add(getter.invoke(value));
- }
- catch (IllegalAccessException e)
- {
- throw new ReflectionException(e, "Failed to retrieve " + field);
- }
- catch (IllegalArgumentException e)
- {
- throw new ReflectionException(e, "Failed to retrieve " + field);
- }
- catch (InvocationTargetException e)
- {
- throw new MBeanException((Exception) e.getCause(),
- "The getter of " + field +
- " threw an exception");
- }
+ String field = (String) it.next();
+ Method getter = null;
+ try
+ {
+ getter = vClass.getMethod("get" + field);
+ }
+ catch (NoSuchMethodException e)
+ {
+ /* Ignored; the type tells us it's there. */
+ }
+ try
+ {
+ values.add(getter.invoke(value));
+ }
+ catch (IllegalAccessException e)
+ {
+ throw new ReflectionException(e, "Failed to retrieve " + field);
+ }
+ catch (IllegalArgumentException e)
+ {
+ throw new ReflectionException(e, "Failed to retrieve " + field);
+ }
+ catch (InvocationTargetException e)
+ {
+ throw new MBeanException((Exception) e.getCause(),
+ "The getter of " + field +
+ " threw an exception");
+ }
}
try
{
- return new CompositeDataSupport(cType,
- (String[])
- names.toArray(new String[names.size()]),
- values.toArray());
+ return new CompositeDataSupport(cType,
+ (String[])
+ names.toArray(new String[names.size()]),
+ values.toArray());
}
catch (OpenDataException e)
{
- throw (InternalError) (new InternalError("A problem occurred " +
- "converting the value " +
- "to a composite data " +
- "structure.").initCause(e));
+ throw (InternalError) (new InternalError("A problem occurred " +
+ "converting the value " +
+ "to a composite data " +
+ "structure.").initCause(e));
}
}
-
+
protected MBeanInfo getCachedMBeanInfo()
{
return (MBeanInfo) openInfo;
@@ -322,15 +322,15 @@ public class BeanImpl
* Override this method so as to prevent the description of a constructor's
* parameter being @code{null}. Open MBeans can not have @code{null} descriptions,
* but one will occur as the names of parameters aren't stored for reflection.
- *
+ *
* @param constructor the constructor whose parameter needs describing.
* @param parameter the parameter to be described.
* @param sequenceNo the number of the parameter to describe.
* @return a description of the constructor's parameter.
*/
protected String getDescription(MBeanConstructorInfo constructor,
- MBeanParameterInfo parameter,
- int sequenceNo)
+ MBeanParameterInfo parameter,
+ int sequenceNo)
{
String desc = parameter.getDescription();
if (desc == null)
@@ -343,15 +343,15 @@ public class BeanImpl
* Override this method so as to prevent the description of an operation's
* parameter being @code{null}. Open MBeans can not have @code{null} descriptions,
* but one will occur as the names of parameters aren't stored for reflection.
- *
+ *
* @param operation the operation whose parameter needs describing.
* @param parameter the parameter to be described.
* @param sequenceNo the number of the parameter to describe.
* @return a description of the operation's parameter.
*/
protected String getDescription(MBeanOperationInfo operation,
- MBeanParameterInfo parameter,
- int sequenceNo)
+ MBeanParameterInfo parameter,
+ int sequenceNo)
{
String desc = parameter.getDescription();
if (desc == null)
@@ -364,15 +364,15 @@ public class BeanImpl
* Override this method so as to prevent the name of a constructor's
* parameter being @code{null}. Open MBeans can not have @code{null} names,
* but one will occur as the names of parameters aren't stored for reflection.
- *
+ *
* @param constructor the constructor whose parameter needs a name.
* @param parameter the parameter to be named.
* @param sequenceNo the number of the parameter to name.
* @return a description of the constructor's parameter.
*/
protected String getParameterName(MBeanConstructorInfo constructor,
- MBeanParameterInfo parameter,
- int sequenceNo)
+ MBeanParameterInfo parameter,
+ int sequenceNo)
{
String name = parameter.getName();
if (name == null)
@@ -385,15 +385,15 @@ public class BeanImpl
* Override this method so as to prevent the name of an operation's
* parameter being @code{null}. Open MBeans can not have @code{null} names,
* but one will occur as the names of parameters aren't stored for reflection.
- *
+ *
* @param operation the operation whose parameter needs a name.
* @param parameter the parameter to be named.
* @param sequenceNo the number of the parameter to name.
* @return a description of the operation's parameter.
*/
protected String getParameterName(MBeanOperationInfo operation,
- MBeanParameterInfo parameter,
- int sequenceNo)
+ MBeanParameterInfo parameter,
+ int sequenceNo)
{
String name = parameter.getName();
if (name == null)
@@ -414,31 +414,31 @@ public class BeanImpl
OpenMBeanParameterInfo[] sig = new OpenMBeanParameterInfoSupport[oldS.length];
for (int a = 0; a < oldS.length; ++a)
{
- OpenMBeanParameterInfo param = Translator.translate(oldS[a].getType());
- if (param.getMinValue() == null)
- {
- Object[] lv;
- if (param.getLegalValues() == null)
- lv = null;
- else
- lv = param.getLegalValues().toArray();
- sig[a] = new OpenMBeanParameterInfoSupport(oldS[a].getName(),
- oldS[a].getDescription(),
- ((OpenType<Object>)
- param.getOpenType()),
- param.getDefaultValue(),
- lv);
- }
- else
- sig[a] = new OpenMBeanParameterInfoSupport(oldS[a].getName(),
- oldS[a].getDescription(),
- ((OpenType<Object>)
- param.getOpenType()),
- param.getDefaultValue(),
- ((Comparable<Object>)
- param.getMinValue()),
- ((Comparable<Object>)
- param.getMaxValue()));
+ OpenMBeanParameterInfo param = Translator.translate(oldS[a].getType());
+ if (param.getMinValue() == null)
+ {
+ Object[] lv;
+ if (param.getLegalValues() == null)
+ lv = null;
+ else
+ lv = param.getLegalValues().toArray();
+ sig[a] = new OpenMBeanParameterInfoSupport(oldS[a].getName(),
+ oldS[a].getDescription(),
+ ((OpenType<Object>)
+ param.getOpenType()),
+ param.getDefaultValue(),
+ lv);
+ }
+ else
+ sig[a] = new OpenMBeanParameterInfoSupport(oldS[a].getName(),
+ oldS[a].getDescription(),
+ ((OpenType<Object>)
+ param.getOpenType()),
+ param.getDefaultValue(),
+ ((Comparable<Object>)
+ param.getMinValue()),
+ ((Comparable<Object>)
+ param.getMaxValue()));
}
return sig;
}
diff --git a/gnu/java/lang/management/ClassLoadingMXBeanImpl.java b/gnu/java/lang/management/ClassLoadingMXBeanImpl.java
index 92e68ae76..d98a39633 100644
--- a/gnu/java/lang/management/ClassLoadingMXBeanImpl.java
+++ b/gnu/java/lang/management/ClassLoadingMXBeanImpl.java
@@ -42,7 +42,7 @@ import java.lang.management.ClassLoadingMXBean;
import javax.management.NotCompliantMBeanException;
/**
- * Provides access to information about the class loading
+ * Provides access to information about the class loading
* behaviour of the current invocation of the virtual
* machine. Instances of this bean are obtained by calling
* {@link ManagementFactory#getClassLoadingMXBean()}.
@@ -96,4 +96,3 @@ public final class ClassLoadingMXBeanImpl
}
}
-
diff --git a/gnu/java/lang/management/CompilationMXBeanImpl.java b/gnu/java/lang/management/CompilationMXBeanImpl.java
index b3ad898b5..1b77edf5a 100644
--- a/gnu/java/lang/management/CompilationMXBeanImpl.java
+++ b/gnu/java/lang/management/CompilationMXBeanImpl.java
@@ -44,7 +44,7 @@ import java.lang.management.CompilationMXBean;
import javax.management.NotCompliantMBeanException;
/**
- * Provides access to information about the JIT
+ * Provides access to information about the JIT
* compiler of the virtual machine, if one exists.
* Instances of this bean are obtained by calling
* {@link ManagementFactory#getCompilationMXBean()},
@@ -66,7 +66,7 @@ public final class CompilationMXBeanImpl
/**
* Constant for compilation time support.
*/
- private static final String COMPILATION_TIME_SUPPORT =
+ private static final String COMPILATION_TIME_SUPPORT =
"gnu.java.lang.management.CompilationTimeSupport";
/**
@@ -87,7 +87,7 @@ public final class CompilationMXBeanImpl
{
return SystemProperties.getProperty(COMPILER_NAME);
}
-
+
public boolean isCompilationTimeMonitoringSupported()
{
return SystemProperties.getProperty(COMPILATION_TIME_SUPPORT) != null;
@@ -99,7 +99,7 @@ public final class CompilationMXBeanImpl
return VMCompilationMXBeanImpl.getTotalCompilationTime();
else
throw new UnsupportedOperationException("Compilation time monitoring "
- + "is not supported");
+ + "is not supported");
}
}
diff --git a/gnu/java/lang/management/GarbageCollectorMXBeanImpl.java b/gnu/java/lang/management/GarbageCollectorMXBeanImpl.java
index b752e6b86..7a2d762fa 100644
--- a/gnu/java/lang/management/GarbageCollectorMXBeanImpl.java
+++ b/gnu/java/lang/management/GarbageCollectorMXBeanImpl.java
@@ -42,7 +42,7 @@ import java.lang.management.GarbageCollectorMXBean;
import javax.management.NotCompliantMBeanException;
/**
- * Provides access to information about one of the garbage
+ * Provides access to information about one of the garbage
* collectors used by the current invocation of the
* virtual machine. An instance of this bean for each garbage
* collector is obtained by calling
diff --git a/gnu/java/lang/management/MemoryMXBeanImpl.java b/gnu/java/lang/management/MemoryMXBeanImpl.java
index 1e6c63afc..10e6522f1 100644
--- a/gnu/java/lang/management/MemoryMXBeanImpl.java
+++ b/gnu/java/lang/management/MemoryMXBeanImpl.java
@@ -63,7 +63,7 @@ import javax.management.openmbean.OpenType;
import javax.management.openmbean.SimpleType;
/**
- * Provides access to information about the memory
+ * Provides access to information about the memory
* management of the current invocation of the virtual
* machine. Instances of this bean are obtained by calling
* {@link ManagementFactory#getMemoryMXBean()}.
@@ -88,39 +88,39 @@ public final class MemoryMXBeanImpl
{
try
{
- CompositeType usageType =
- new CompositeType(MemoryUsage.class.getName(),
- "Describes the usage levels of a pool",
- new String[] { "init", "used",
- "committed", "max"
- },
- new String[] { "Initial level",
- "Used level",
- "Committed level",
- "Maximum level"
- },
- new OpenType[] {
- SimpleType.LONG, SimpleType.LONG,
- SimpleType.LONG, SimpleType.LONG
- });
- CompositeType notifType =
- new CompositeType(MemoryNotificationInfo.class.getName(),
- "Provides the notification info on memory usage",
- new String[] { "poolName", "usage", "count" },
- new String[] { "Name of the memory pool",
- "Usage level of the memory pool",
- "Number of times the threshold " +
- "has been crossed"
- },
- new OpenType[] {
- SimpleType.STRING, usageType, SimpleType.LONG
- });
- }
- catch (OpenDataException e)
- {
- throw new IllegalStateException("Something went wrong in creating " +
- "the composite data types.", e);
- }
+ CompositeType usageType =
+ new CompositeType(MemoryUsage.class.getName(),
+ "Describes the usage levels of a pool",
+ new String[] { "init", "used",
+ "committed", "max"
+ },
+ new String[] { "Initial level",
+ "Used level",
+ "Committed level",
+ "Maximum level"
+ },
+ new OpenType[] {
+ SimpleType.LONG, SimpleType.LONG,
+ SimpleType.LONG, SimpleType.LONG
+ });
+ CompositeType notifType =
+ new CompositeType(MemoryNotificationInfo.class.getName(),
+ "Provides the notification info on memory usage",
+ new String[] { "poolName", "usage", "count" },
+ new String[] { "Name of the memory pool",
+ "Usage level of the memory pool",
+ "Number of times the threshold " +
+ "has been crossed"
+ },
+ new OpenType[] {
+ SimpleType.STRING, usageType, SimpleType.LONG
+ });
+ }
+ catch (OpenDataException e)
+ {
+ throw new IllegalStateException("Something went wrong in creating " +
+ "the composite data types.", e);
+ }
}
/**
@@ -171,8 +171,8 @@ public final class MemoryMXBeanImpl
}
public void addNotificationListener(NotificationListener listener,
- NotificationFilter filter,
- Object passback)
+ NotificationFilter filter,
+ Object passback)
{
if (listener == null)
throw new IllegalArgumentException("Null listener added to bean.");
@@ -183,13 +183,13 @@ public final class MemoryMXBeanImpl
{
return new MBeanNotificationInfo[]
{
- new MBeanNotificationInfo(new String[]
- {
- MemoryNotificationInfo.MEMORY_COLLECTION_THRESHOLD_EXCEEDED,
- MemoryNotificationInfo.MEMORY_THRESHOLD_EXCEEDED
- },
- Notification.class.getName(),
- "Memory Usage Notifications")
+ new MBeanNotificationInfo(new String[]
+ {
+ MemoryNotificationInfo.MEMORY_COLLECTION_THRESHOLD_EXCEEDED,
+ MemoryNotificationInfo.MEMORY_THRESHOLD_EXCEEDED
+ },
+ Notification.class.getName(),
+ "Memory Usage Notifications")
};
}
@@ -200,82 +200,82 @@ public final class MemoryMXBeanImpl
boolean foundOne = false;
while (it.hasNext())
{
- ListenerData data = (ListenerData) it.next();
- if (data.getListener() == listener)
- {
- it.remove();
- foundOne = true;
- }
+ ListenerData data = (ListenerData) it.next();
+ if (data.getListener() == listener)
+ {
+ it.remove();
+ foundOne = true;
+ }
}
if (!foundOne)
throw new ListenerNotFoundException("The specified listener, " + listener +
- "is not registered with this bean.");
+ "is not registered with this bean.");
}
public void removeNotificationListener(NotificationListener listener,
- NotificationFilter filter,
- Object passback)
+ NotificationFilter filter,
+ Object passback)
throws ListenerNotFoundException
{
if (!(listeners.remove(new ListenerData(listener, filter, passback))))
{
- throw new ListenerNotFoundException("The specified listener, " + listener +
- " with filter " + filter +
- "and passback " + passback +
- ", is not registered with this bean.");
+ throw new ListenerNotFoundException("The specified listener, " + listener +
+ " with filter " + filter +
+ "and passback " + passback +
+ ", is not registered with this bean.");
}
}
void fireNotification(String type, String poolName, long init, long used,
- long committed, long max, long count)
+ long committed, long max, long count)
{
Notification notif = new Notification(type, this, notificationCount);
MemoryUsage usage = new MemoryUsage(init, used, committed, max);
CompositeData data;
try
{
- data = new CompositeDataSupport(notifType,
- new String[] {
- "poolName", "usage", "count"
- },
- new Object[] {
- poolName, usage, Long.valueOf(count)
- });
+ data = new CompositeDataSupport(notifType,
+ new String[] {
+ "poolName", "usage", "count"
+ },
+ new Object[] {
+ poolName, usage, Long.valueOf(count)
+ });
}
catch (OpenDataException e)
{
- throw new IllegalStateException("Something went wrong in creating " +
- "the composite data instance.", e);
+ throw new IllegalStateException("Something went wrong in creating " +
+ "the composite data instance.", e);
}
notif.setUserData(data);
Iterator it = listeners.iterator();
while (it.hasNext())
{
- ListenerData ldata = (ListenerData) it.next();
- NotificationFilter filter = ldata.getFilter();
- if (filter == null || filter.isNotificationEnabled(notif))
- ldata.getListener().handleNotification(notif, ldata.getPassback());
+ ListenerData ldata = (ListenerData) it.next();
+ NotificationFilter filter = ldata.getFilter();
+ if (filter == null || filter.isNotificationEnabled(notif))
+ ldata.getListener().handleNotification(notif, ldata.getPassback());
}
++notificationCount;
}
void fireThresholdExceededNotification(String poolName, long init,
- long used, long committed,
- long max, long count)
+ long used, long committed,
+ long max, long count)
{
fireNotification(MemoryNotificationInfo.MEMORY_THRESHOLD_EXCEEDED,
- poolName, init, used, committed, max, count);
+ poolName, init, used, committed, max, count);
}
void fireCollectionThresholdExceededNotification(String poolName,
- long init,
- long used,
- long committed,
- long max,
- long count)
+ long init,
+ long used,
+ long committed,
+ long max,
+ long count)
{
fireNotification(MemoryNotificationInfo.MEMORY_COLLECTION_THRESHOLD_EXCEEDED,
- poolName, init, used, committed, max, count);
+ poolName, init, used, committed, max, count);
}
}
diff --git a/gnu/java/lang/management/MemoryManagerMXBeanImpl.java b/gnu/java/lang/management/MemoryManagerMXBeanImpl.java
index 5766af9cc..51d0ed972 100644
--- a/gnu/java/lang/management/MemoryManagerMXBeanImpl.java
+++ b/gnu/java/lang/management/MemoryManagerMXBeanImpl.java
@@ -42,7 +42,7 @@ import java.lang.management.MemoryManagerMXBean;
import javax.management.NotCompliantMBeanException;
/**
- * Provides access to information about one of the memory
+ * Provides access to information about one of the memory
* managers used by the current invocation of the
* virtual machine. An instance of this bean for each memory
* manager is obtained by calling
diff --git a/gnu/java/lang/management/MemoryPoolMXBeanImpl.java b/gnu/java/lang/management/MemoryPoolMXBeanImpl.java
index e314ca164..d92e6703f 100644
--- a/gnu/java/lang/management/MemoryPoolMXBeanImpl.java
+++ b/gnu/java/lang/management/MemoryPoolMXBeanImpl.java
@@ -46,7 +46,7 @@ import java.lang.management.MemoryUsage;
import javax.management.NotCompliantMBeanException;
/**
- * Provides access to information about one of the memory
+ * Provides access to information about one of the memory
* resources or pools used by the current invocation of the
* virtual machine. An instance of this bean for each memory
* pool is obtained by calling
@@ -68,13 +68,13 @@ public final class MemoryPoolMXBeanImpl
/**
* Constant for collection usage threshold.
*/
- private static final String COLLECTION_USAGE_THRESHOLD =
+ private static final String COLLECTION_USAGE_THRESHOLD =
"gnu.java.lang.management.CollectionUsageThresholdSupport";
/**
* Constant for thread time support.
*/
- private static final String USAGE_THRESHOLD =
+ private static final String USAGE_THRESHOLD =
"gnu.java.lang.management.UsageThresholdSupport";
/**
@@ -104,7 +104,7 @@ public final class MemoryPoolMXBeanImpl
return VMMemoryPoolMXBeanImpl.getCollectionUsageThreshold(name);
else
throw new UnsupportedOperationException("A collection usage "+
- "threshold is not supported.");
+ "threshold is not supported.");
}
public long getCollectionUsageThresholdCount()
@@ -113,7 +113,7 @@ public final class MemoryPoolMXBeanImpl
return VMMemoryPoolMXBeanImpl.getCollectionUsageThresholdCount(name);
else
throw new UnsupportedOperationException("A collection usage "+
- "threshold is not supported.");
+ "threshold is not supported.");
}
public String[] getMemoryManagerNames()
@@ -136,7 +136,7 @@ public final class MemoryPoolMXBeanImpl
public MemoryType getType()
{
- return
+ return
MemoryType.valueOf(VMMemoryPoolMXBeanImpl.getType(name));
}
@@ -154,7 +154,7 @@ public final class MemoryPoolMXBeanImpl
return VMMemoryPoolMXBeanImpl.getUsageThreshold(name);
else
throw new UnsupportedOperationException("A usage threshold " +
- "is not supported.");
+ "is not supported.");
}
public long getUsageThresholdCount()
@@ -163,7 +163,7 @@ public final class MemoryPoolMXBeanImpl
return VMMemoryPoolMXBeanImpl.getUsageThresholdCount(name);
else
throw new UnsupportedOperationException("A usage threshold " +
- "is not supported.");
+ "is not supported.");
}
public boolean isCollectionUsageThresholdExceeded()
@@ -202,12 +202,12 @@ public final class MemoryPoolMXBeanImpl
checkControlPermissions();
if (threshold < 0)
throw new IllegalArgumentException("Threshold of " + threshold +
- "is less than zero.");
+ "is less than zero.");
if (isCollectionUsageThresholdSupported())
VMMemoryPoolMXBeanImpl.setCollectionUsageThreshold(name, threshold);
else
throw new UnsupportedOperationException("A collection usage "+
- "threshold is not supported.");
+ "threshold is not supported.");
}
public void setUsageThreshold(long threshold)
@@ -215,13 +215,12 @@ public final class MemoryPoolMXBeanImpl
checkControlPermissions();
if (threshold < 0)
throw new IllegalArgumentException("Threshold of " + threshold +
- "is less than zero.");
+ "is less than zero.");
if (isUsageThresholdSupported())
VMMemoryPoolMXBeanImpl.setUsageThreshold(name, threshold);
else
throw new UnsupportedOperationException("A usage threshold " +
- "is not supported.");
+ "is not supported.");
}
}
-
diff --git a/gnu/java/lang/management/OperatingSystemMXBeanImpl.java b/gnu/java/lang/management/OperatingSystemMXBeanImpl.java
index 07fb7bf03..7f5a9586c 100644
--- a/gnu/java/lang/management/OperatingSystemMXBeanImpl.java
+++ b/gnu/java/lang/management/OperatingSystemMXBeanImpl.java
@@ -43,7 +43,7 @@ import javax.management.NotCompliantMBeanException;
/**
* Provides access to information about the underlying operating
- * system.
+ * system.
*
* @author Andrew John Hughes (gnu_andrew@member.fsf.org)
* @since 1.5
@@ -91,5 +91,5 @@ public final class OperatingSystemMXBeanImpl
{
return System.getProperty("os.version");
}
-
+
}
diff --git a/gnu/java/lang/management/RuntimeMXBeanImpl.java b/gnu/java/lang/management/RuntimeMXBeanImpl.java
index e3ebd162e..8db943bb6 100644
--- a/gnu/java/lang/management/RuntimeMXBeanImpl.java
+++ b/gnu/java/lang/management/RuntimeMXBeanImpl.java
@@ -92,8 +92,8 @@ public final class RuntimeMXBeanImpl
return bootClassPath;
else
throw
- new UnsupportedOperationException("Retrieving the boot " +
- "classpath is not supported.");
+ new UnsupportedOperationException("Retrieving the boot " +
+ "classpath is not supported.");
}
public String getClassPath()
@@ -151,16 +151,16 @@ public final class RuntimeMXBeanImpl
Iterator entries = props.entrySet().iterator();
while (entries.hasNext())
{
- Map.Entry next = (Map.Entry) entries.next();
- Object key = next.getKey();
- Object value = next.getValue();
- if (key instanceof String &&
- value instanceof String)
- map.put(key, value);
+ Map.Entry next = (Map.Entry) entries.next();
+ Object key = next.getKey();
+ Object value = next.getValue();
+ if (key instanceof String &&
+ value instanceof String)
+ map.put(key, value);
}
return map;
}
-
+
public long getUptime()
{
return new Date().getTime() - getStartTime();
@@ -185,11 +185,11 @@ public final class RuntimeMXBeanImpl
{
if (bootClassPath == null)
{
- bootClassPath = SystemProperties.getProperty(JAVA_BOOT_CLASS_PATH);
- if (bootClassPath == null)
- bootClassPath = SystemProperties.getProperty(SUN_BOOT_CLASS_PATH);
- if (bootClassPath == null)
- bootClassPathSupported = false;
+ bootClassPath = SystemProperties.getProperty(JAVA_BOOT_CLASS_PATH);
+ if (bootClassPath == null)
+ bootClassPath = SystemProperties.getProperty(SUN_BOOT_CLASS_PATH);
+ if (bootClassPath == null)
+ bootClassPathSupported = false;
}
return bootClassPathSupported;
}
diff --git a/gnu/java/lang/management/ThreadMXBeanImpl.java b/gnu/java/lang/management/ThreadMXBeanImpl.java
index 5d0282301..97040997b 100644
--- a/gnu/java/lang/management/ThreadMXBeanImpl.java
+++ b/gnu/java/lang/management/ThreadMXBeanImpl.java
@@ -45,7 +45,7 @@ import java.lang.management.ThreadMXBean;
import javax.management.NotCompliantMBeanException;
/**
- * Provides access to information about the threads
+ * Provides access to information about the threads
* of the virtual machine. An instance of this bean is
* obtained by calling
* {@link ManagementFactory#getThreadMXBean()}.
@@ -63,25 +63,25 @@ public final class ThreadMXBeanImpl
/**
* Constant for current thread time support.
*/
- private static final String CURRENT_THREAD_TIME_SUPPORT =
+ private static final String CURRENT_THREAD_TIME_SUPPORT =
"gnu.java.lang.management.CurrentThreadTimeSupport";
/**
* Constant for thread time support.
*/
- private static final String THREAD_TIME_SUPPORT =
+ private static final String THREAD_TIME_SUPPORT =
"gnu.java.lang.management.ThreadTimeSupport";
/**
* Constant for thread contention support.
*/
- private static final String CONTENTION_SUPPORT =
+ private static final String CONTENTION_SUPPORT =
"gnu.java.lang.management.ThreadContentionSupport";
/**
* Constant for initial value of thread time support.
*/
- private static final String TIME_ENABLED =
+ private static final String TIME_ENABLED =
"gnu.java.lang.management.ThreadTimeInitallyEnabled";
/**
@@ -125,10 +125,10 @@ public final class ThreadMXBeanImpl
}
public ThreadInfo[] dumpAllThreads(boolean lockedMonitors,
- boolean lockedSynchronizers)
+ boolean lockedSynchronizers)
{
return getThreadInfo(getAllThreadIds(), lockedMonitors,
- lockedSynchronizers);
+ lockedSynchronizers);
}
public long[] findDeadlockedThreads()
@@ -136,8 +136,8 @@ public final class ThreadMXBeanImpl
checkMonitorPermissions();
if (!isSynchronizerUsageSupported())
throw new UnsupportedOperationException("Ownable synchronizer usage " +
- "monitoring is not provided " +
- "by this VM.");
+ "monitoring is not provided " +
+ "by this VM.");
return VMThreadMXBeanImpl.findDeadlockedThreads();
}
@@ -157,7 +157,7 @@ public final class ThreadMXBeanImpl
{
if (!isCurrentThreadCpuTimeSupported())
throw new UnsupportedOperationException("Current thread CPU " +
- "time not supported.");
+ "time not supported.");
if (!timeEnabled)
return -1;
return VMThreadMXBeanImpl.getCurrentThreadCpuTime();
@@ -167,7 +167,7 @@ public final class ThreadMXBeanImpl
{
if (!isCurrentThreadCpuTimeSupported())
throw new UnsupportedOperationException("Current thread user " +
- "time not supported.");
+ "time not supported.");
if (!timeEnabled)
return -1;
return VMThreadMXBeanImpl.getCurrentThreadUserTime();
@@ -192,7 +192,7 @@ public final class ThreadMXBeanImpl
{
if (!isThreadCpuTimeSupported())
throw new UnsupportedOperationException("Thread CPU time not " +
- "supported.");
+ "supported.");
if (id <= 0)
throw new IllegalArgumentException("Invalid thread id: " + id);
if (!timeEnabled)
@@ -228,32 +228,32 @@ public final class ThreadMXBeanImpl
ThreadInfo[] infos = new ThreadInfo[ids.length];
for (int a = 0; a < ids.length; ++a)
{
- if (ids[a] <= 0)
- throw new IllegalArgumentException("Invalid thread id " + a +
- ": " + ids[a]);
- infos[a] = VMThreadMXBeanImpl.getThreadInfoForId(ids[a], maxDepth);
+ if (ids[a] <= 0)
+ throw new IllegalArgumentException("Invalid thread id " + a +
+ ": " + ids[a]);
+ infos[a] = VMThreadMXBeanImpl.getThreadInfoForId(ids[a], maxDepth);
}
return infos;
}
public ThreadInfo[] getThreadInfo(long[] ids, boolean lockedMonitors,
- boolean lockedSynchronizers)
+ boolean lockedSynchronizers)
{
checkMonitorPermissions();
if (lockedMonitors && !isObjectMonitorUsageSupported())
throw new UnsupportedOperationException("Monitor usage monitoring is " +
- "not provided by this VM.");
+ "not provided by this VM.");
if (lockedSynchronizers && !isSynchronizerUsageSupported())
throw new UnsupportedOperationException("Ownable synchronizer usage " +
- "monitoring is not provided " +
- "by this VM.");
+ "monitoring is not provided " +
+ "by this VM.");
ThreadInfo[] infos = getThreadInfo(ids, Integer.MAX_VALUE);
if (lockedMonitors)
for (ThreadInfo info : infos)
- VMThreadMXBeanImpl.getMonitorInfo(info);
+ VMThreadMXBeanImpl.getMonitorInfo(info);
if (lockedSynchronizers)
for (ThreadInfo info : infos)
- VMThreadMXBeanImpl.getLockInfo(info);
+ VMThreadMXBeanImpl.getLockInfo(info);
return infos;
}
@@ -261,7 +261,7 @@ public final class ThreadMXBeanImpl
{
if (!isThreadCpuTimeSupported())
throw new UnsupportedOperationException("Thread user time not " +
- "supported.");
+ "supported.");
if (id <= 0)
throw new IllegalArgumentException("Invalid thread id: " + id);
if (!timeEnabled)
@@ -297,7 +297,7 @@ public final class ThreadMXBeanImpl
return contentionEnabled;
else
throw new UnsupportedOperationException("Contention monitoring " +
- "not supported.");
+ "not supported.");
}
public boolean isThreadContentionMonitoringSupported()
@@ -308,13 +308,13 @@ public final class ThreadMXBeanImpl
public boolean isThreadCpuTimeEnabled()
{
if (isThreadCpuTimeSupported() ||
- isCurrentThreadCpuTimeSupported())
+ isCurrentThreadCpuTimeSupported())
return timeEnabled;
else
throw new UnsupportedOperationException("Thread time not " +
- "supported.");
+ "supported.");
}
-
+
public boolean isThreadCpuTimeSupported()
{
return SystemProperties.getProperty(THREAD_TIME_SUPPORT) != null;
@@ -325,7 +325,7 @@ public final class ThreadMXBeanImpl
checkControlPermissions();
VMThreadMXBeanImpl.resetPeakThreadCount();
}
-
+
public void setThreadContentionMonitoringEnabled(boolean enable)
{
checkControlPermissions();
@@ -333,19 +333,18 @@ public final class ThreadMXBeanImpl
contentionEnabled = enable;
else
throw new UnsupportedOperationException("Contention monitoring " +
- "not supported.");
- }
-
+ "not supported.");
+ }
+
public void setThreadCpuTimeEnabled(boolean enable)
{
checkControlPermissions();
if (isThreadCpuTimeSupported() ||
- isCurrentThreadCpuTimeSupported())
+ isCurrentThreadCpuTimeSupported())
timeEnabled = enable;
else
throw new UnsupportedOperationException("Thread time not " +
- "supported.");
+ "supported.");
}
}
-
diff --git a/gnu/java/lang/reflect/TypeSignature.java b/gnu/java/lang/reflect/TypeSignature.java
index 612058dbf..c0a3ab0a5 100644
--- a/gnu/java/lang/reflect/TypeSignature.java
+++ b/gnu/java/lang/reflect/TypeSignature.java
@@ -176,7 +176,7 @@ public class TypeSignature
* @see #getClassForEncoding(String, boolean)
*/
public static Class getClassForEncoding(String type_code, boolean descriptor,
- ClassLoader loader)
+ ClassLoader loader)
throws ClassNotFoundException
{
if (descriptor)
diff --git a/gnu/java/locale/LocaleHelper.java b/gnu/java/locale/LocaleHelper.java
index f3aabbdd9..8b108768d 100644
--- a/gnu/java/locale/LocaleHelper.java
+++ b/gnu/java/locale/LocaleHelper.java
@@ -85,7 +85,7 @@ public class LocaleHelper
int uscore = variant.indexOf('_');
if (uscore != -1)
return new Locale(language, country,
- variant.substring(0, uscore));
+ variant.substring(0, uscore));
if (!variant.isEmpty())
return new Locale(language, country, "");
if (!country.isEmpty())
@@ -95,7 +95,7 @@ public class LocaleHelper
/**
* Return an array of all the locales for which there is a
- * {@link Collator} instance. A new array is returned each time.
+ * {@link Collator} instance. A new array is returned each time.
*/
public static Locale[] getCollatorLocales()
{
@@ -145,4 +145,3 @@ public class LocaleHelper
return LocaleData.localeNames[n];
}
}
-
diff --git a/gnu/java/math/Fixed.java b/gnu/java/math/Fixed.java
index ed4150b10..6b210deda 100644
--- a/gnu/java/math/Fixed.java
+++ b/gnu/java/math/Fixed.java
@@ -45,7 +45,7 @@ public final class Fixed
{
/**
- * Private constructor to avoid instantiation.
+ * Private constructor to avoid instantiation.
*/
private Fixed()
{
@@ -138,7 +138,7 @@ public final class Fixed
/**
* Returns the fixed point value <code>a</code> with <code>n</code> digits
* as float.
- *
+ *
* @param n the number of digits
* @param a the fixed point value
*
@@ -152,7 +152,7 @@ public final class Fixed
/**
* Returns the fixed point value <code>a</code> with <code>n</code> digits
* as double.
- *
+ *
* @param n the number of digits
* @param a the fixed point value
*
@@ -194,7 +194,7 @@ public final class Fixed
/**
* Returns the integer value of the specified fixed point value
* <code>a</code>. This simply cuts of the digits (== floor(a)).
- *
+ *
* @param n the number of digits
* @param a the fixed point value
*
diff --git a/gnu/java/math/GMP.java b/gnu/java/math/GMP.java
index 6fb49363d..4df790a40 100644
--- a/gnu/java/math/GMP.java
+++ b/gnu/java/math/GMP.java
@@ -7,7 +7,7 @@ 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
@@ -47,11 +47,11 @@ public final class GMP
{
private Pointer native_ptr;
private int refCount = 1;
-
+
public GMP()
{
super();
-
+
natInitialize();
}
@@ -59,30 +59,30 @@ public final class GMP
{
refCount++;
}
-
+
private synchronized void releaseRef()
{
refCount--;
if (refCount == 0)
{
- natFinalize();
- native_ptr = null;
+ natFinalize();
+ native_ptr = null;
}
}
-
+
protected void finalize()
{
releaseRef();
}
-
-
+
+
public void fromByteArray(byte[] v)
{
acquireRef();
natFromByteArray(v);
releaseRef();
}
-
+
public void fromBI(GMP x)
{
acquireRef();
@@ -91,14 +91,14 @@ public final class GMP
x.releaseRef();
releaseRef();
}
-
+
public void fromLong(long n)
{
acquireRef();
natFromLong(n);
releaseRef();
}
-
+
public int fromString(String s, int rdx)
{
acquireRef();
@@ -106,14 +106,14 @@ public final class GMP
releaseRef();
return result;
}
-
+
public void fromSignedMagnitude(byte[] m, boolean isNegative)
{
acquireRef();
natFromSignedMagnitude(m, isNegative);
releaseRef();
}
-
+
public String toString(int b)
{
acquireRef();
@@ -121,14 +121,14 @@ public final class GMP
releaseRef();
return result;
}
-
+
public void toByteArray(byte[] r)
{
acquireRef();
natToByteArray(r);
releaseRef();
}
-
+
public double doubleValue()
{
acquireRef();
@@ -136,7 +136,7 @@ public final class GMP
releaseRef();
return result;
}
-
+
public int absIntValue()
{
acquireRef();
@@ -144,7 +144,7 @@ public final class GMP
releaseRef();
return result;
}
-
+
public int compare(GMP x)
{
acquireRef();
@@ -154,7 +154,7 @@ public final class GMP
releaseRef();
return result;
}
-
+
public void add(GMP x, GMP r)
{
acquireRef();
@@ -165,7 +165,7 @@ public final class GMP
x.releaseRef();
releaseRef();
}
-
+
public void subtract(GMP x, GMP r)
{
acquireRef();
@@ -176,7 +176,7 @@ public final class GMP
x.releaseRef();
releaseRef();
}
-
+
public void multiply(GMP x, GMP r)
{
acquireRef();
@@ -187,7 +187,7 @@ public final class GMP
x.releaseRef();
releaseRef();
}
-
+
public void quotient(GMP x, GMP r)
{
acquireRef();
@@ -198,7 +198,7 @@ public final class GMP
x.releaseRef();
releaseRef();
}
-
+
public void remainder(GMP x, GMP r)
{
acquireRef();
@@ -209,7 +209,7 @@ public final class GMP
x.releaseRef();
releaseRef();
}
-
+
public void quotientAndRemainder(GMP x, GMP q, GMP r)
{
acquireRef();
@@ -222,7 +222,7 @@ public final class GMP
x.releaseRef();
releaseRef();
}
-
+
public void modulo(GMP x, GMP r)
{
acquireRef();
@@ -233,7 +233,7 @@ public final class GMP
x.releaseRef();
releaseRef();
}
-
+
public void pow(int n, GMP r)
{
acquireRef();
@@ -242,7 +242,7 @@ public final class GMP
r.releaseRef();
releaseRef();
}
-
+
public void modPow(GMP e, GMP m, GMP r)
{
acquireRef();
@@ -255,7 +255,7 @@ public final class GMP
e.releaseRef();
releaseRef();
}
-
+
public void modInverse(GMP m, GMP r)
{
acquireRef();
@@ -277,7 +277,7 @@ public final class GMP
x.releaseRef();
releaseRef();
}
-
+
public void shiftLeft(int n, GMP r)
{
acquireRef();
@@ -286,7 +286,7 @@ public final class GMP
r.releaseRef();
releaseRef();
}
-
+
public void shiftRight(int n, GMP r)
{
acquireRef();
@@ -295,7 +295,7 @@ public final class GMP
r.releaseRef();
releaseRef();
}
-
+
public void abs(GMP r)
{
acquireRef();
@@ -304,7 +304,7 @@ public final class GMP
r.releaseRef();
releaseRef();
}
-
+
public void negate(GMP r)
{
acquireRef();
@@ -313,7 +313,7 @@ public final class GMP
r.releaseRef();
releaseRef();
}
-
+
public int bitLength()
{
acquireRef();
@@ -321,7 +321,7 @@ public final class GMP
releaseRef();
return result;
}
-
+
public int bitCount()
{
acquireRef();
@@ -329,7 +329,7 @@ public final class GMP
releaseRef();
return result;
}
-
+
public void and(GMP x, GMP r)
{
acquireRef();
@@ -340,7 +340,7 @@ public final class GMP
x.releaseRef();
releaseRef();
}
-
+
public void or(GMP x, GMP r)
{
acquireRef();
@@ -351,7 +351,7 @@ public final class GMP
x.releaseRef();
releaseRef();
}
-
+
public void xor(GMP x, GMP r)
{
acquireRef();
@@ -362,7 +362,7 @@ public final class GMP
x.releaseRef();
releaseRef();
}
-
+
public void andNot(GMP x, GMP r)
{
acquireRef();
@@ -373,7 +373,7 @@ public final class GMP
x.releaseRef();
releaseRef();
}
-
+
public void not(GMP r)
{
acquireRef();
@@ -382,7 +382,7 @@ public final class GMP
r.releaseRef();
releaseRef();
}
-
+
public void flipBit(int n, GMP r)
{
acquireRef();
@@ -399,7 +399,7 @@ public final class GMP
releaseRef();
return result;
}
-
+
public void setBit(int n, boolean setIt, GMP r)
{
acquireRef();
@@ -408,7 +408,7 @@ public final class GMP
r.releaseRef();
releaseRef();
}
-
+
public int testPrimality(int certainty)
{
acquireRef();
@@ -416,7 +416,7 @@ public final class GMP
releaseRef();
return result;
}
-
+
public int lowestSetBit()
{
acquireRef();
@@ -424,25 +424,25 @@ public final class GMP
releaseRef();
return result;
}
-
+
// Native methods .........................................................
-
+
public static native void natInitializeLibrary();
-
+
private native void natInitialize();
private native void natFinalize();
-
+
private native void natFromLong(long n);
private native void natFromBI(Pointer x);
private native void natFromByteArray(byte[] v);
private native int natFromString(String s, int rdx);
private native void natFromSignedMagnitude(byte[] m, boolean isNegative);
-
+
private native String natToString(int base);
private native void natToByteArray(byte[] r);
private native int natAbsIntValue();
private native double natDoubleValue();
-
+
private native int natCompare(Pointer y);
private native void natAdd(Pointer x, Pointer r);
private native void natSubtract(Pointer x, Pointer r);
diff --git a/gnu/java/math/MPN.java b/gnu/java/math/MPN.java
index 05491bb7e..9143ef03b 100644
--- a/gnu/java/math/MPN.java
+++ b/gnu/java/math/MPN.java
@@ -7,7 +7,7 @@ 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
@@ -59,9 +59,9 @@ public class MPN
long carry = (long) y & 0xffffffffL;
for (int i = 0; i < size; i++)
{
- carry += ((long) x[i] & 0xffffffffL);
- dest[i] = (int) carry;
- carry >>= 32;
+ carry += ((long) x[i] & 0xffffffffL);
+ dest[i] = (int) carry;
+ carry >>= 32;
}
return (int) carry;
}
@@ -77,10 +77,10 @@ public class MPN
long carry = 0;
for (int i = 0; i < len; i++)
{
- carry += ((long) x[i] & 0xffffffffL)
- + ((long) y[i] & 0xffffffffL);
- dest[i] = (int) carry;
- carry >>>= 32;
+ carry += ((long) x[i] & 0xffffffffL)
+ + ((long) y[i] & 0xffffffffL);
+ dest[i] = (int) carry;
+ carry >>>= 32;
}
return (int) carry;
}
@@ -96,15 +96,15 @@ public class MPN
int cy = 0;
for (int i = 0; i < size; i++)
{
- int y = Y[i];
- int x = X[i];
- y += cy; /* add previous carry to subtrahend */
- // Invert the high-order bit, because: (unsigned) X > (unsigned) Y
- // iff: (int) (X^0x80000000) > (int) (Y^0x80000000).
- cy = (y^0x80000000) < (cy^0x80000000) ? 1 : 0;
- y = x - y;
- cy += (y^0x80000000) > (x ^ 0x80000000) ? 1 : 0;
- dest[i] = y;
+ int y = Y[i];
+ int x = X[i];
+ y += cy; /* add previous carry to subtrahend */
+ // Invert the high-order bit, because: (unsigned) X > (unsigned) Y
+ // iff: (int) (X^0x80000000) > (int) (Y^0x80000000).
+ cy = (y^0x80000000) < (cy^0x80000000) ? 1 : 0;
+ y = x - y;
+ cy += (y^0x80000000) > (x ^ 0x80000000) ? 1 : 0;
+ dest[i] = y;
}
return cy;
}
@@ -142,23 +142,23 @@ public class MPN
* This function is basically the same gmp's mpn_mul. */
public static void mul (int[] dest,
- int[] x, int xlen,
- int[] y, int ylen)
+ int[] x, int xlen,
+ int[] y, int ylen)
{
dest[xlen] = MPN.mul_1 (dest, x, xlen, y[0]);
for (int i = 1; i < ylen; i++)
{
- long yword = (long) y[i] & 0xffffffffL;
- long carry = 0;
- for (int j = 0; j < xlen; j++)
- {
- carry += ((long) x[j] & 0xffffffffL) * yword
- + ((long) dest[i+j] & 0xffffffffL);
- dest[i+j] = (int) carry;
- carry >>>= 32;
- }
- dest[i+xlen] = (int) carry;
+ long yword = (long) y[i] & 0xffffffffL;
+ long carry = 0;
+ for (int j = 0; j < xlen; j++)
+ {
+ carry += ((long) x[j] & 0xffffffffL) * yword
+ + ((long) dest[i+j] & 0xffffffffL);
+ dest[i+j] = (int) carry;
+ carry >>>= 32;
+ }
+ dest[i+xlen] = (int) carry;
}
}
@@ -174,71 +174,71 @@ public class MPN
long a0 = N & 0xffffffffL;
if (D >= 0)
{
- if (a1 < ((D - a1 - (a0 >>> 31)) & 0xffffffffL))
- {
- /* dividend, divisor, and quotient are nonnegative */
- q = N / D;
- r = N % D;
- }
- else
- {
- /* Compute c1*2^32 + c0 = a1*2^32 + a0 - 2^31*d */
- long c = N - ((long) D << 31);
- /* Divide (c1*2^32 + c0) by d */
- q = c / D;
- r = c % D;
- /* Add 2^31 to quotient */
- q += 1 << 31;
- }
+ if (a1 < ((D - a1 - (a0 >>> 31)) & 0xffffffffL))
+ {
+ /* dividend, divisor, and quotient are nonnegative */
+ q = N / D;
+ r = N % D;
+ }
+ else
+ {
+ /* Compute c1*2^32 + c0 = a1*2^32 + a0 - 2^31*d */
+ long c = N - ((long) D << 31);
+ /* Divide (c1*2^32 + c0) by d */
+ q = c / D;
+ r = c % D;
+ /* Add 2^31 to quotient */
+ q += 1 << 31;
+ }
}
else
{
- long b1 = D >>> 1; /* d/2, between 2^30 and 2^31 - 1 */
- //long c1 = (a1 >> 1); /* A/2 */
- //int c0 = (a1 << 31) + (a0 >> 1);
- long c = N >>> 1;
- if (a1 < b1 || (a1 >> 1) < b1)
- {
- if (a1 < b1)
- {
- q = c / b1;
- r = c % b1;
- }
- else /* c1 < b1, so 2^31 <= (A/2)/b1 < 2^32 */
- {
- c = ~(c - (b1 << 32));
- q = c / b1; /* (A/2) / (d/2) */
- r = c % b1;
- q = (~q) & 0xffffffffL; /* (A/2)/b1 */
- r = (b1 - 1) - r; /* r < b1 => new r >= 0 */
- }
- r = 2 * r + (a0 & 1);
- if ((D & 1) != 0)
- {
- if (r >= q) {
- r = r - q;
- } else if (q - r <= ((long) D & 0xffffffffL)) {
+ long b1 = D >>> 1; /* d/2, between 2^30 and 2^31 - 1 */
+ //long c1 = (a1 >> 1); /* A/2 */
+ //int c0 = (a1 << 31) + (a0 >> 1);
+ long c = N >>> 1;
+ if (a1 < b1 || (a1 >> 1) < b1)
+ {
+ if (a1 < b1)
+ {
+ q = c / b1;
+ r = c % b1;
+ }
+ else /* c1 < b1, so 2^31 <= (A/2)/b1 < 2^32 */
+ {
+ c = ~(c - (b1 << 32));
+ q = c / b1; /* (A/2) / (d/2) */
+ r = c % b1;
+ q = (~q) & 0xffffffffL; /* (A/2)/b1 */
+ r = (b1 - 1) - r; /* r < b1 => new r >= 0 */
+ }
+ r = 2 * r + (a0 & 1);
+ if ((D & 1) != 0)
+ {
+ if (r >= q) {
+ r = r - q;
+ } else if (q - r <= ((long) D & 0xffffffffL)) {
r = r - q + D;
- q -= 1;
- } else {
+ q -= 1;
+ } else {
r = r - q + D + D;
- q -= 2;
- }
- }
- }
- else /* Implies c1 = b1 */
- { /* Hence a1 = d - 1 = 2*b1 - 1 */
- if (a0 >= ((long)(-D) & 0xffffffffL))
- {
- q = -1;
- r = a0 + D;
- }
- else
- {
- q = -2;
- r = a0 + D + D;
- }
- }
+ q -= 2;
+ }
+ }
+ }
+ else /* Implies c1 = b1 */
+ { /* Hence a1 = d - 1 = 2*b1 - 1 */
+ if (a0 >= ((long)(-D) & 0xffffffffL))
+ {
+ q = -1;
+ r = a0 + D;
+ }
+ else
+ {
+ q = -2;
+ r = a0 + D + D;
+ }
+ }
}
return (r << 32) | (q & 0xFFFFFFFFl);
@@ -251,7 +251,7 @@ public class MPN
*/
public static int divmod_1 (int[] quotient, int[] dividend,
- int len, int divisor)
+ int len, int divisor)
{
int i = len - 1;
long r = dividend[i];
@@ -259,16 +259,16 @@ public class MPN
r = 0;
else
{
- quotient[i--] = 0;
- r <<= 32;
+ quotient[i--] = 0;
+ r <<= 32;
}
for (; i >= 0; i--)
{
- int n0 = dividend[i];
- r = (r & ~0xffffffffL) | (n0 & 0xffffffffL);
- r = udiv_qrnnd (r, divisor);
- quotient[i] = (int) r;
+ int n0 = dividend[i];
+ r = (r & ~0xffffffffL) | (n0 & 0xffffffffL);
+ r = udiv_qrnnd (r, divisor);
+ quotient[i] = (int) r;
}
return (int)(r >> 32);
}
@@ -285,19 +285,19 @@ public class MPN
int j = 0;
do
{
- long prod = ((long) x[j] & 0xffffffffL) * yl;
- int prod_low = (int) prod;
- int prod_high = (int) (prod >> 32);
- prod_low += carry;
- // Invert the high-order bit, because: (unsigned) X > (unsigned) Y
- // iff: (int) (X^0x80000000) > (int) (Y^0x80000000).
- carry = ((prod_low ^ 0x80000000) < (carry ^ 0x80000000) ? 1 : 0)
- + prod_high;
- int x_j = dest[offset+j];
- prod_low = x_j - prod_low;
- if ((prod_low ^ 0x80000000) > (x_j ^ 0x80000000))
- carry++;
- dest[offset+j] = prod_low;
+ long prod = ((long) x[j] & 0xffffffffL) * yl;
+ int prod_low = (int) prod;
+ int prod_high = (int) (prod >> 32);
+ prod_low += carry;
+ // Invert the high-order bit, because: (unsigned) X > (unsigned) Y
+ // iff: (int) (X^0x80000000) > (int) (Y^0x80000000).
+ carry = ((prod_low ^ 0x80000000) < (carry ^ 0x80000000) ? 1 : 0)
+ + prod_high;
+ int x_j = dest[offset+j];
+ prod_low = x_j - prod_low;
+ if ((prod_low ^ 0x80000000) > (x_j ^ 0x80000000))
+ carry++;
+ dest[offset+j] = prod_low;
}
while (++j < len);
return carry;
@@ -328,37 +328,37 @@ public class MPN
int j = nx;
do
{ // loop over digits of quotient
- // Knuth's j == our nx-j.
- // Knuth's u[j:j+n] == our zds[j:j-ny].
- int qhat; // treated as unsigned
- if (zds[j]==y[ny-1])
- qhat = -1; // 0xffffffff
- else
- {
- long w = (((long)(zds[j])) << 32) + ((long)zds[j-1] & 0xffffffffL);
- qhat = (int) udiv_qrnnd (w, y[ny-1]);
- }
- if (qhat != 0)
- {
- int borrow = submul_1 (zds, j - ny, y, ny, qhat);
- int save = zds[j];
- long num = ((long)save&0xffffffffL) - ((long)borrow&0xffffffffL);
+ // Knuth's j == our nx-j.
+ // Knuth's u[j:j+n] == our zds[j:j-ny].
+ int qhat; // treated as unsigned
+ if (zds[j]==y[ny-1])
+ qhat = -1; // 0xffffffff
+ else
+ {
+ long w = (((long)(zds[j])) << 32) + ((long)zds[j-1] & 0xffffffffL);
+ qhat = (int) udiv_qrnnd (w, y[ny-1]);
+ }
+ if (qhat != 0)
+ {
+ int borrow = submul_1 (zds, j - ny, y, ny, qhat);
+ int save = zds[j];
+ long num = ((long)save&0xffffffffL) - ((long)borrow&0xffffffffL);
while (num != 0)
- {
- qhat--;
- long carry = 0;
- for (int i = 0; i < ny; i++)
- {
- carry += ((long) zds[j-ny+i] & 0xffffffffL)
- + ((long) y[i] & 0xffffffffL);
- zds[j-ny+i] = (int) carry;
- carry >>>= 32;
- }
- zds[j] += carry;
- num = carry - 1;
- }
- }
- zds[j] = qhat;
+ {
+ qhat--;
+ long carry = 0;
+ for (int i = 0; i < ny; i++)
+ {
+ carry += ((long) zds[j-ny+i] & 0xffffffffL)
+ + ((long) y[i] & 0xffffffffL);
+ zds[j-ny+i] = (int) carry;
+ carry >>>= 32;
+ }
+ zds[j] += carry;
+ num = carry - 1;
+ }
+ }
+ zds[j] = qhat;
} while (--j >= ny);
}
@@ -372,19 +372,19 @@ public class MPN
{
if (radix < 10)
{
- if (radix < 8)
- {
- if (radix <= 2)
- return 32;
- else if (radix == 3)
- return 20;
- else if (radix == 4)
- return 16;
- else
- return 18 - radix;
- }
- else
- return 10;
+ if (radix < 8)
+ {
+ if (radix <= 2)
+ return 32;
+ else if (radix == 3)
+ return 20;
+ else if (radix == 4)
+ return 16;
+ else
+ return 18 - radix;
+ }
+ else
+ return 10;
}
else if (radix < 12)
return 9;
@@ -410,9 +410,9 @@ public class MPN
for (int k = 16; k > 0; k = k >> 1) {
int j = i >>> k;
if (j == 0)
- count += k;
+ count += k;
else
- i = j;
+ i = j;
}
return count;
}
@@ -422,61 +422,61 @@ public class MPN
int size = 0;
if ((base & (base - 1)) == 0)
{
- // The base is a power of 2. Read the input string from
- // least to most significant character/digit. */
-
- int next_bitpos = 0;
- int bits_per_indigit = 0;
- for (int i = base; (i >>= 1) != 0; ) bits_per_indigit++;
- int res_digit = 0;
-
- for (int i = str_len; --i >= 0; )
- {
- int inp_digit = str[i];
- res_digit |= inp_digit << next_bitpos;
- next_bitpos += bits_per_indigit;
- if (next_bitpos >= 32)
- {
- dest[size++] = res_digit;
- next_bitpos -= 32;
- res_digit = inp_digit >> (bits_per_indigit - next_bitpos);
- }
- }
-
- if (res_digit != 0)
- dest[size++] = res_digit;
+ // The base is a power of 2. Read the input string from
+ // least to most significant character/digit. */
+
+ int next_bitpos = 0;
+ int bits_per_indigit = 0;
+ for (int i = base; (i >>= 1) != 0; ) bits_per_indigit++;
+ int res_digit = 0;
+
+ for (int i = str_len; --i >= 0; )
+ {
+ int inp_digit = str[i];
+ res_digit |= inp_digit << next_bitpos;
+ next_bitpos += bits_per_indigit;
+ if (next_bitpos >= 32)
+ {
+ dest[size++] = res_digit;
+ next_bitpos -= 32;
+ res_digit = inp_digit >> (bits_per_indigit - next_bitpos);
+ }
+ }
+
+ if (res_digit != 0)
+ dest[size++] = res_digit;
}
else
{
- // General case. The base is not a power of 2.
- int indigits_per_limb = MPN.chars_per_word (base);
- int str_pos = 0;
-
- while (str_pos < str_len)
- {
- int chunk = str_len - str_pos;
- if (chunk > indigits_per_limb)
- chunk = indigits_per_limb;
- int res_digit = str[str_pos++];
- int big_base = base;
-
- while (--chunk > 0)
- {
- res_digit = res_digit * base + str[str_pos++];
- big_base *= base;
- }
-
- int cy_limb;
- if (size == 0)
- cy_limb = res_digit;
- else
- {
- cy_limb = MPN.mul_1 (dest, dest, size, big_base);
- cy_limb += MPN.add_1 (dest, dest, size, res_digit);
- }
- if (cy_limb != 0)
- dest[size++] = cy_limb;
- }
+ // General case. The base is not a power of 2.
+ int indigits_per_limb = MPN.chars_per_word (base);
+ int str_pos = 0;
+
+ while (str_pos < str_len)
+ {
+ int chunk = str_len - str_pos;
+ if (chunk > indigits_per_limb)
+ chunk = indigits_per_limb;
+ int res_digit = str[str_pos++];
+ int big_base = base;
+
+ while (--chunk > 0)
+ {
+ res_digit = res_digit * base + str[str_pos++];
+ big_base *= base;
+ }
+
+ int cy_limb;
+ if (size == 0)
+ cy_limb = res_digit;
+ else
+ {
+ cy_limb = MPN.mul_1 (dest, dest, size, big_base);
+ cy_limb += MPN.add_1 (dest, dest, size, res_digit);
+ }
+ if (cy_limb != 0)
+ dest[size++] = cy_limb;
+ }
}
return size;
}
@@ -489,22 +489,22 @@ public class MPN
{
while (--size >= 0)
{
- int x_word = x[size];
- int y_word = y[size];
- if (x_word != y_word)
- {
- // Invert the high-order bit, because:
- // (unsigned) X > (unsigned) Y iff
- // (int) (X^0x80000000) > (int) (Y^0x80000000).
- return (x_word ^ 0x80000000) > (y_word ^0x80000000) ? 1 : -1;
- }
+ int x_word = x[size];
+ int y_word = y[size];
+ if (x_word != y_word)
+ {
+ // Invert the high-order bit, because:
+ // (unsigned) X > (unsigned) Y iff
+ // (int) (X^0x80000000) > (int) (Y^0x80000000).
+ return (x_word ^ 0x80000000) > (y_word ^0x80000000) ? 1 : -1;
+ }
}
return 0;
}
/**
* Compare x[0:xlen-1] with y[0:ylen-1], treating them as unsigned integers.
- *
+ *
* @return -1, 0, or 1 depending on if x&lt;y, x==y, or x&gt;y.
*/
public static int cmp (int[] x, int xlen, int[] y, int ylen)
@@ -521,7 +521,7 @@ public class MPN
* Assumes: 0 &lt; count &lt; 32
*/
public static int rshift (int[] dest, int[] x, int x_start,
- int len, int count)
+ int len, int count)
{
int count_2 = 32 - count;
int low_word = x[x_start];
@@ -529,9 +529,9 @@ public class MPN
int i = 1;
for (; i < len; i++)
{
- int high_word = x[x_start+i];
- dest[i-1] = (low_word >>> count) | (high_word << count_2);
- low_word = high_word;
+ int high_word = x[x_start+i];
+ dest[i-1] = (low_word >>> count) | (high_word << count_2);
+ low_word = high_word;
}
dest[i-1] = low_word >>> count;
return retval;
@@ -546,13 +546,13 @@ public class MPN
* Same as rshift, but handles count==0 (and has no return value).
*/
public static void rshift0 (int[] dest, int[] x, int x_start,
- int len, int count)
+ int len, int count)
{
if (count > 0)
rshift(dest, x, x_start, len, count);
else
for (int i = 0; i < len; i++)
- dest[i] = x[i + x_start];
+ dest[i] = x[i + x_start];
}
/** Return the long-truncated value of right shifting.
@@ -571,10 +571,10 @@ public class MPN
int w1 = wordno >= len ? sign : x[wordno];
if (count != 0)
{
- wordno++;
- int w2 = wordno >= len ? sign : x[wordno];
- w0 = (w0 >>> count) | (w1 << (32-count));
- w1 = (w1 >>> count) | (w2 << (32-count));
+ wordno++;
+ int w2 = wordno >= len ? sign : x[wordno];
+ w0 = (w0 >>> count) | (w1 << (32-count));
+ w1 = (w1 >>> count) | (w2 << (32-count));
}
return ((long)w1 << 32) | ((long)w0 & 0xffffffffL);
}
@@ -587,7 +587,7 @@ public class MPN
*/
public static int lshift (int[] dest, int d_offset,
- int[] x, int len, int count)
+ int[] x, int len, int count)
{
int count_2 = 32 - count;
int i = len - 1;
@@ -596,9 +596,9 @@ public class MPN
d_offset++;
while (--i >= 0)
{
- int low_word = x[i];
- dest[d_offset+i] = (high_word << count) | (low_word >>> count_2);
- high_word = low_word;
+ int low_word = x[i];
+ dest[d_offset+i] = (high_word << count) | (low_word >>> count_2);
+ high_word = low_word;
}
dest[d_offset+i] = high_word << count;
return retval;
@@ -611,13 +611,13 @@ public class MPN
int i = 0;
while ((word & 0xF) == 0)
{
- word >>= 4;
- i += 4;
+ word >>= 4;
+ i += 4;
}
if ((word & 3) == 0)
{
- word >>= 2;
- i += 2;
+ word >>= 2;
+ i += 2;
}
if ((word & 1) == 0)
i += 1;
@@ -630,8 +630,8 @@ public class MPN
{
for (int i = 0; ; i++)
{
- if (words[i] != 0)
- return 32 * i + findLowestBit (words[i]);
+ if (words[i] != 0)
+ return 32 * i + findLowestBit (words[i]);
}
}
@@ -646,12 +646,12 @@ public class MPN
// Find sh such that both x and y are divisible by 2**sh.
for (i = 0; ; i++)
{
- word = x[i] | y[i];
- if (word != 0)
- {
- // Must terminate, since x and y are non-zero.
- break;
- }
+ word = x[i] | y[i];
+ if (word != 0)
+ {
+ // Must terminate, since x and y are non-zero.
+ break;
+ }
}
int initShiftWords = i;
int initShiftBits = findLowestBit (word);
@@ -666,69 +666,69 @@ public class MPN
int[] other_arg; /* The other one can be even or odd. */
if ((x[0] & 1) != 0)
{
- odd_arg = x;
- other_arg = y;
+ odd_arg = x;
+ other_arg = y;
}
else
{
- odd_arg = y;
- other_arg = x;
+ odd_arg = y;
+ other_arg = x;
}
for (;;)
{
- // Shift other_arg until it is odd; this doesn't
- // affect the gcd, since we divide by 2**k, which does not
- // divide odd_arg.
- for (i = 0; other_arg[i] == 0; ) i++;
- if (i > 0)
- {
- int j;
- for (j = 0; j < len-i; j++)
- other_arg[j] = other_arg[j+i];
- for ( ; j < len; j++)
- other_arg[j] = 0;
- }
- i = findLowestBit(other_arg[0]);
- if (i > 0)
- MPN.rshift (other_arg, other_arg, 0, len, i);
-
- // Now both odd_arg and other_arg are odd.
-
- // Subtract the smaller from the larger.
- // This does not change the result, since gcd(a-b,b)==gcd(a,b).
- i = MPN.cmp(odd_arg, other_arg, len);
- if (i == 0)
- break;
- if (i > 0)
- { // odd_arg > other_arg
- MPN.sub_n (odd_arg, odd_arg, other_arg, len);
- // Now odd_arg is even, so swap with other_arg;
- int[] tmp = odd_arg; odd_arg = other_arg; other_arg = tmp;
- }
- else
- { // other_arg > odd_arg
- MPN.sub_n (other_arg, other_arg, odd_arg, len);
- }
- while (odd_arg[len-1] == 0 && other_arg[len-1] == 0)
- len--;
+ // Shift other_arg until it is odd; this doesn't
+ // affect the gcd, since we divide by 2**k, which does not
+ // divide odd_arg.
+ for (i = 0; other_arg[i] == 0; ) i++;
+ if (i > 0)
+ {
+ int j;
+ for (j = 0; j < len-i; j++)
+ other_arg[j] = other_arg[j+i];
+ for ( ; j < len; j++)
+ other_arg[j] = 0;
+ }
+ i = findLowestBit(other_arg[0]);
+ if (i > 0)
+ MPN.rshift (other_arg, other_arg, 0, len, i);
+
+ // Now both odd_arg and other_arg are odd.
+
+ // Subtract the smaller from the larger.
+ // This does not change the result, since gcd(a-b,b)==gcd(a,b).
+ i = MPN.cmp(odd_arg, other_arg, len);
+ if (i == 0)
+ break;
+ if (i > 0)
+ { // odd_arg > other_arg
+ MPN.sub_n (odd_arg, odd_arg, other_arg, len);
+ // Now odd_arg is even, so swap with other_arg;
+ int[] tmp = odd_arg; odd_arg = other_arg; other_arg = tmp;
+ }
+ else
+ { // other_arg > odd_arg
+ MPN.sub_n (other_arg, other_arg, odd_arg, len);
+ }
+ while (odd_arg[len-1] == 0 && other_arg[len-1] == 0)
+ len--;
}
if (initShiftWords + initShiftBits > 0)
{
- if (initShiftBits > 0)
- {
- int sh_out = MPN.lshift (x, initShiftWords, x, len, initShiftBits);
- if (sh_out != 0)
- x[(len++)+initShiftWords] = sh_out;
- }
- else
- {
- for (i = len; --i >= 0;)
- x[i+initShiftWords] = x[i];
- }
- for (i = initShiftWords; --i >= 0; )
- x[i] = 0;
- len += initShiftWords;
+ if (initShiftBits > 0)
+ {
+ int sh_out = MPN.lshift (x, initShiftWords, x, len, initShiftBits);
+ if (sh_out != 0)
+ x[(len++)+initShiftWords] = sh_out;
+ }
+ else
+ {
+ for (i = len; --i >= 0;)
+ x[i+initShiftWords] = x[i];
+ }
+ for (i = initShiftWords; --i >= 0; )
+ x[i] = 0;
+ len += initShiftWords;
}
return len;
}
@@ -761,9 +761,9 @@ public class MPN
ps.print('(');
for (int i = 0; i < len; i++)
{
- if (i > 0)
- ps.print (' ');
- ps.print ("#x" + Long.toString ((long) x[i] & 0xffffffffL, 16));
+ if (i > 0)
+ ps.print (' ');
+ ps.print ("#x" + Long.toString ((long) x[i] & 0xffffffffL, 16));
}
ps.print(')');
}
diff --git a/gnu/java/net/CRLFInputStream.java b/gnu/java/net/CRLFInputStream.java
index ac3482679..5e394ae2c 100644
--- a/gnu/java/net/CRLFInputStream.java
+++ b/gnu/java/net/CRLFInputStream.java
@@ -7,7 +7,7 @@ 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
@@ -64,7 +64,7 @@ public class CRLFInputStream
* The underlying input stream.
*/
protected InputStream in;
-
+
private boolean doReset;
/**
@@ -100,7 +100,7 @@ public class CRLFInputStream
}
return c;
}
-
+
/**
* Reads up to b.length bytes of data from this input stream into
* an array of bytes.
@@ -176,4 +176,3 @@ public class CRLFInputStream
}
}
-
diff --git a/gnu/java/net/CRLFOutputStream.java b/gnu/java/net/CRLFOutputStream.java
index f27e0f218..0e9428373 100644
--- a/gnu/java/net/CRLFOutputStream.java
+++ b/gnu/java/net/CRLFOutputStream.java
@@ -7,7 +7,7 @@ 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
@@ -43,7 +43,7 @@ import java.io.IOException;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
-/**
+/**
* An output stream that filters LFs into CR/LF pairs.
*
* @author Chris Burdess (dog@gnu.org)
@@ -105,7 +105,7 @@ public class CRLFOutputStream
}
last = ch;
}
-
+
/**
* Writes a byte array to the underlying stream.
* @exception IOException if an I/O error occurred
@@ -150,7 +150,7 @@ public class CRLFOutputStream
out.write (b, d, len - d);
}
}
-
+
/**
* Writes the specified ASCII string to the underlying stream.
* @exception IOException if an I/O error occurred
@@ -180,4 +180,3 @@ public class CRLFOutputStream
out.write(CRLF, 0, 2);
}
}
-
diff --git a/gnu/java/net/DefaultContentHandlerFactory.java b/gnu/java/net/DefaultContentHandlerFactory.java
index e3d1b8e5a..1d113b935 100644
--- a/gnu/java/net/DefaultContentHandlerFactory.java
+++ b/gnu/java/net/DefaultContentHandlerFactory.java
@@ -7,7 +7,7 @@ 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
@@ -49,7 +49,7 @@ import java.util.HashSet;
class ImageHandler extends ContentHandler
{
static ImageHandler instance = new ImageHandler();
-
+
public Object getContent(URLConnection urlc) throws IOException
{
// FIXME: implement using ImageIO
@@ -80,7 +80,7 @@ public class DefaultContentHandlerFactory implements ContentHandlerFactory
"image/x-xbitmap",
"image/x-xpixmap"
};
-
+
private static HashSet<String> imageTypes
= new HashSet<String>(Arrays.asList(known_image_types));
diff --git a/gnu/java/net/DefaultProxySelector.java b/gnu/java/net/DefaultProxySelector.java
index 31f861e87..f0215a054 100644
--- a/gnu/java/net/DefaultProxySelector.java
+++ b/gnu/java/net/DefaultProxySelector.java
@@ -7,7 +7,7 @@ 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
@@ -50,13 +50,13 @@ public final class DefaultProxySelector
extends ProxySelector
{
private static final List<Proxy> proxies = new ArrayList<Proxy>();
-
+
static
{
// The default proxy selector supports only direct connections.
proxies.add(Proxy.NO_PROXY);
}
-
+
public DefaultProxySelector()
{
// Do nothing by default.
@@ -69,7 +69,7 @@ public final class DefaultProxySelector
// Do nothing by default.
}
-
+
public List<Proxy> select(URI uri)
{
if (uri == null)
diff --git a/gnu/java/net/EmptyX509TrustManager.java b/gnu/java/net/EmptyX509TrustManager.java
index b8faf41ad..466b49ef8 100644
--- a/gnu/java/net/EmptyX509TrustManager.java
+++ b/gnu/java/net/EmptyX509TrustManager.java
@@ -7,7 +7,7 @@ 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
@@ -67,4 +67,3 @@ public class EmptyX509TrustManager
return new X509Certificate[0];
}
}
-
diff --git a/gnu/java/net/GetLocalHostAction.java b/gnu/java/net/GetLocalHostAction.java
index fa7601555..1e18877de 100644
--- a/gnu/java/net/GetLocalHostAction.java
+++ b/gnu/java/net/GetLocalHostAction.java
@@ -7,7 +7,7 @@ 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
@@ -62,4 +62,3 @@ public class GetLocalHostAction
}
}
}
-
diff --git a/gnu/java/net/HeaderFieldHelper.java b/gnu/java/net/HeaderFieldHelper.java
index a8d13ce15..ca3b9d2dd 100644
--- a/gnu/java/net/HeaderFieldHelper.java
+++ b/gnu/java/net/HeaderFieldHelper.java
@@ -1,4 +1,4 @@
-/* HeaderFieldHelper.java -- Helps manage headers fields
+/* HeaderFieldHelper.java -- Helps manage headers fields
Copyright (C) 1998, 2003 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -7,7 +7,7 @@ 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
@@ -105,12 +105,12 @@ public class HeaderFieldHelper
try
{
- value = headerFieldValues.elementAt(headerFieldKeys.indexOf(key));
+ value = headerFieldValues.elementAt(headerFieldKeys.indexOf(key));
}
catch (ArrayIndexOutOfBoundsException e)
{
}
-
+
return value;
}
@@ -121,8 +121,8 @@ public class HeaderFieldHelper
for (int index = 0; index < max; index++)
{
- headers.put(headerFieldKeys.elementAt(index),
- headerFieldValues.elementAt(index));
+ headers.put(headerFieldKeys.elementAt(index),
+ headerFieldValues.elementAt(index));
}
return headers;
@@ -134,4 +134,3 @@ public class HeaderFieldHelper
}
} // class HeaderFieldHelper
-
diff --git a/gnu/java/net/IndexListParser.java b/gnu/java/net/IndexListParser.java
index 2d90ceb64..bf274b172 100644
--- a/gnu/java/net/IndexListParser.java
+++ b/gnu/java/net/IndexListParser.java
@@ -1,4 +1,4 @@
-/* IndexListParser.java --
+/* IndexListParser.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -47,11 +47,11 @@ import java.util.Set;
import java.util.jar.JarFile;
/**
- * The INDEX.LIST file contains sections each separated by a blank line.
+ * The INDEX.LIST file contains sections each separated by a blank line.
* Each section defines the content of a jar, with a
* header defining the jar file path name, followed by a list of paths.
* The jar file paths are relative to the codebase of the root jar.
- *
+ *
Specification
index file : version-info blankline section*
version-info : JarIndex-Version: version-number
@@ -60,7 +60,7 @@ import java.util.jar.JarFile;
body : header name*
header : char+.jar newline
name : char+ newline
-
+
* @author langel at redhat dot com
*/
public class IndexListParser
@@ -73,10 +73,10 @@ public class IndexListParser
// This is intentionally kept in insertion order.
LinkedHashMap<URL, Set<String>> prefixes
= new LinkedHashMap<URL, Set<String>>();
-
+
/**
* Parses the given jarfile's INDEX.LIST file if it exists.
- *
+ *
* @param jarfile - the given jar file
* @param baseJarURL - the codebase of the jar file
* @param baseURL - the base url for the headers
@@ -90,13 +90,13 @@ public class IndexListParser
{
BufferedReader br = new BufferedReader(new InputStreamReader(new URL(baseJarURL,
JAR_INDEX_FILE).openStream()));
-
+
// Must start with version info
String line = br.readLine();
if (!line.startsWith(JAR_INDEX_VERSION_KEY))
return;
versionNumber = Double.parseDouble(line.substring(JAR_INDEX_VERSION_KEY.length()).trim());
-
+
// Blank line must be next
line = br.readLine();
if (! "".equals(line))
@@ -104,13 +104,13 @@ public class IndexListParser
clearAll();
return;
}
-
+
// May contain sections.
while ((line = br.readLine()) != null)
{
URL jarURL = new URL(baseURL, line);
HashSet<String> values = new HashSet<String>();
-
+
// Read the names in the section.
while ((line = br.readLine()) != null)
{
@@ -138,7 +138,7 @@ public class IndexListParser
clearAll();
}
}
-
+
/**
* Clears all the variables. This is called when parsing fails.
*/
@@ -147,33 +147,33 @@ public class IndexListParser
versionNumber = 0;
prefixes = null;
}
-
+
/**
* Gets the version info for the file.
- *
+ *
* @return the version info.
*/
public String getVersionInfo()
{
return JAR_INDEX_VERSION_KEY + getVersionNumber();
}
-
+
/**
* Gets the version number of the file.
- *
+ *
* @return the version number.
*/
public double getVersionNumber()
{
return versionNumber;
}
-
+
/**
* Gets the map of all the headers found in the file.
* The keys in the map are URLs of jars. The values in the map
* are Sets of package prefixes (and top-level file names), as
* specifed in INDEX.LIST.
- *
+ *
* @return an map of all the headers, or null if no INDEX.LIST was found
*/
public LinkedHashMap<URL, Set<String>> getHeaders()
diff --git a/gnu/java/net/LineInputStream.java b/gnu/java/net/LineInputStream.java
index da307dbdd..8bd4b69cd 100644
--- a/gnu/java/net/LineInputStream.java
+++ b/gnu/java/net/LineInputStream.java
@@ -7,7 +7,7 @@ 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
@@ -56,7 +56,7 @@ public class LineInputStream
* The underlying input stream.
*/
protected InputStream in;
-
+
/*
* Line buffer.
*/
@@ -112,7 +112,7 @@ public class LineInputStream
{
return in.read(buf);
}
-
+
public int read(byte[] buf, int off, int len)
throws IOException
{
@@ -221,4 +221,3 @@ public class LineInputStream
return -1;
}
}
-
diff --git a/gnu/java/net/PlainDatagramSocketImpl.java b/gnu/java/net/PlainDatagramSocketImpl.java
index a84525e18..639c9ff55 100644
--- a/gnu/java/net/PlainDatagramSocketImpl.java
+++ b/gnu/java/net/PlainDatagramSocketImpl.java
@@ -7,7 +7,7 @@ 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
@@ -69,19 +69,19 @@ import java.nio.ByteBuffer;
public final class PlainDatagramSocketImpl extends DatagramSocketImpl
{
private final VMChannel channel;
-
+
/**
* The platform-specific socket implementation.
*/
private final VMPlainSocketImpl impl;
-
+
/**
- * Lock object to serialize threads wanting to receive
+ * Lock object to serialize threads wanting to receive
*/
private final Object RECEIVE_LOCK = new Object();
-
+
/**
- * Lock object to serialize threads wanting to send
+ * Lock object to serialize threads wanting to send
*/
private final Object SEND_LOCK = new Object();
@@ -99,7 +99,7 @@ public final class PlainDatagramSocketImpl extends DatagramSocketImpl
synchronized (this)
{
if (channel.getState().isValid())
- close();
+ close();
}
super.finalize();
}*/
diff --git a/gnu/java/net/PlainSocketImpl.java b/gnu/java/net/PlainSocketImpl.java
index 5bda0a5e9..72db53186 100644
--- a/gnu/java/net/PlainSocketImpl.java
+++ b/gnu/java/net/PlainSocketImpl.java
@@ -8,7 +8,7 @@ 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
@@ -93,13 +93,13 @@ public class PlainSocketImpl extends SocketImpl
* is being invoked on this socket.
*/
private boolean inChannelOperation;
-
+
/**
* The socket channel we use for IO operation. Package-private for
* use by inner classes.
*/
SocketChannelImpl channel;
-
+
/**
* Indicates whether we should ignore whether any associated
* channel is set to non-blocking mode. Certain operations
@@ -111,7 +111,7 @@ public class PlainSocketImpl extends SocketImpl
{
return inChannelOperation;
}
-
+
/**
* Sets our indicator of whether an I/O operation is being
* initiated by a channel.
@@ -120,7 +120,7 @@ public class PlainSocketImpl extends SocketImpl
{
inChannelOperation = b;
}
-
+
/**
* Default do nothing constructor.
*/
@@ -149,7 +149,7 @@ public class PlainSocketImpl extends SocketImpl
case SO_BROADCAST:
case SO_KEEPALIVE:
case SO_OOBINLINE:
- case TCP_NODELAY:
+ case TCP_NODELAY:
case IP_TOS:
case SO_RCVBUF:
case SO_SNDBUF:
@@ -188,7 +188,7 @@ public class PlainSocketImpl extends SocketImpl
throw se;
}
}
-
+
// This filters options which are invalid for TCP.
switch (optionId)
{
@@ -197,7 +197,7 @@ public class PlainSocketImpl extends SocketImpl
case SO_BROADCAST:
case SO_KEEPALIVE:
case SO_OOBINLINE:
- case TCP_NODELAY:
+ case TCP_NODELAY:
case IP_TOS:
case SO_RCVBUF:
case SO_SNDBUF:
@@ -207,7 +207,7 @@ public class PlainSocketImpl extends SocketImpl
default:
throw new SocketException("Unrecognized TCP option: " + optionId);
}
-
+
}
public void shutdownInput() throws IOException
@@ -281,10 +281,10 @@ public class PlainSocketImpl extends SocketImpl
boolean connected = channel.connect(address, timeout);
if (!connected)
throw new SocketTimeoutException("connect timed out");
-
+
// Using the given SocketAddress is important to preserve
// hostnames given by the caller.
- InetSocketAddress addr = (InetSocketAddress) address;
+ InetSocketAddress addr = (InetSocketAddress) address;
this.address = addr.getAddress();
this.port = addr.getPort();
}
@@ -314,7 +314,7 @@ public class PlainSocketImpl extends SocketImpl
* number, additional connections will be refused.
*
* @param queuelen The length of the pending connection queue
- *
+ *
* @throws IOException If an error occurs
*/
protected synchronized void listen(int queuelen)
@@ -324,7 +324,7 @@ public class PlainSocketImpl extends SocketImpl
}
/**
- * Accepts a new connection on this socket and returns in in the
+ * Accepts a new connection on this socket and returns in in the
* passed in SocketImpl.
*
* @param impl The SocketImpl object to accept this connection.
@@ -349,7 +349,7 @@ public class PlainSocketImpl extends SocketImpl
/**
* Returns the number of bytes that the caller can read from this socket
- * without blocking.
+ * without blocking.
*
* @return the number of readable bytes before blocking
*
@@ -377,7 +377,7 @@ public class PlainSocketImpl extends SocketImpl
{
if (impl.getState().isValid())
impl.close();
-
+
address = null;
port = -1;
}
@@ -418,7 +418,7 @@ public class PlainSocketImpl extends SocketImpl
return out;
}
-
+
public VMChannel getVMChannel()
{
if (channel == null)
@@ -433,7 +433,7 @@ public class PlainSocketImpl extends SocketImpl
{
if (channel == null)
return null;
-
+
try
{
InetSocketAddress remote = channel.getVMChannel().getPeerAddress();
@@ -444,7 +444,7 @@ public class PlainSocketImpl extends SocketImpl
// was created by the native layer (this preserves exact hostnames).
if (address != null)
return address;
-
+
return remote.getAddress();
}
catch (IOException ioe)
@@ -472,7 +472,7 @@ public class PlainSocketImpl extends SocketImpl
return -1;
}
}
-
+
public InetSocketAddress getLocalAddress()
{
if (channel == null)
@@ -494,7 +494,7 @@ public class PlainSocketImpl extends SocketImpl
{
if (channel == null)
return -1;
-
+
try
{
InetSocketAddress remote = channel.getVMChannel().getPeerAddress();
@@ -509,7 +509,7 @@ public class PlainSocketImpl extends SocketImpl
}
/**
- * This class contains an implementation of <code>InputStream</code> for
+ * This class contains an implementation of <code>InputStream</code> for
* sockets. It in an internal only class used by <code>PlainSocketImpl</code>.
*
* @author Nic Ferrier <nferrier@tapsellferrier.co.uk>
@@ -536,7 +536,7 @@ public class PlainSocketImpl extends SocketImpl
}
/**
- * Reads the next byte of data and returns it as an int.
+ * Reads the next byte of data and returns it as an int.
*
* @return The byte read (as an int) or -1 if end of stream);
*
@@ -599,8 +599,8 @@ public class PlainSocketImpl extends SocketImpl
}
/**
- * This class is used internally by <code>PlainSocketImpl</code> to be the
- * <code>OutputStream</code> subclass returned by its
+ * This class is used internally by <code>PlainSocketImpl</code> to be the
+ * <code>OutputStream</code> subclass returned by its
* <code>getOutputStream method</code>. It expects only to be used in that
* context.
*
@@ -623,7 +623,7 @@ public class PlainSocketImpl extends SocketImpl
/**
* Writes a byte (passed in as an int) to the given output stream
- *
+ *
* @param b The byte to write
*
* @exception IOException If an error occurs
diff --git a/gnu/java/net/loader/FileResource.java b/gnu/java/net/loader/FileResource.java
index 8071bbf91..471584023 100644
--- a/gnu/java/net/loader/FileResource.java
+++ b/gnu/java/net/loader/FileResource.java
@@ -79,4 +79,4 @@ public final class FileResource extends Resource
throw ie;
}
}
-} \ No newline at end of file
+}
diff --git a/gnu/java/net/loader/FileURLLoader.java b/gnu/java/net/loader/FileURLLoader.java
index 39d33a4e4..58b6dcf05 100644
--- a/gnu/java/net/loader/FileURLLoader.java
+++ b/gnu/java/net/loader/FileURLLoader.java
@@ -66,7 +66,7 @@ public final class FileURLLoader extends URLLoader
/** get resource with the name "name" in the file url */
public Resource getResource(String name)
{
- try
+ try
{
// Make sure that all components in name are valid by walking through
// them
@@ -91,7 +91,7 @@ public final class FileURLLoader extends URLLoader
* directory or a non directory component (plain file, symbolic link, ...).
* An empty or null path is valid. Pathnames components are separated by
* <code>File.separatorChar</code>
- *
+ *
* @param resourceFileName the name to be checked for validity.
* @return the canonical file pointed by the resourceFileName or null if the
* walking failed
@@ -108,30 +108,30 @@ public final class FileURLLoader extends URLLoader
for (int i = 0; i < tokenCount - 1; i++)
{
String currentToken = stringTokenizer.nextToken();
-
+
// If we are at the root directory and trying to go up, the walking is
// finished with an error
if ("..".equals(currentToken) && currentFile.equals(dir))
return null;
-
+
currentFile = new File(currentFile, currentToken);
// If the current file doesn't exist or is not a directory, the walking is
// finished with an error
if (! (currentFile.exists() && currentFile.isDirectory()))
return null;
-
+
}
-
+
// Treat the last token differently, if it exists, because it does not need
// to be a directory
if (tokenCount > 0)
{
String currentToken = stringTokenizer.nextToken();
-
+
if ("..".equals(currentToken) && currentFile.equals(dir))
return null;
-
+
currentFile = new File(currentFile, currentToken);
// If the current file doesn't exist, the walking is
@@ -139,7 +139,7 @@ public final class FileURLLoader extends URLLoader
if (! currentFile.exists())
return null;
}
-
+
return currentFile.getCanonicalFile();
}
-} \ No newline at end of file
+}
diff --git a/gnu/java/net/loader/JarURLLoader.java b/gnu/java/net/loader/JarURLLoader.java
index 40194be79..6f06ad3b2 100644
--- a/gnu/java/net/loader/JarURLLoader.java
+++ b/gnu/java/net/loader/JarURLLoader.java
@@ -83,7 +83,7 @@ public final class JarURLLoader extends URLLoader
{
jarfile =
((JarURLConnection) baseJarURL.openConnection()).getJarFile();
-
+
Manifest manifest;
Attributes attributes;
String classPathString;
@@ -124,12 +124,12 @@ public final class JarURLLoader extends URLLoader
else if ((manifest = jarfile.getManifest()) != null
&& (attributes = manifest.getMainAttributes()) != null
&& ((classPathString
- = attributes.getValue(Attributes.Name.CLASS_PATH))
+ = attributes.getValue(Attributes.Name.CLASS_PATH))
!= null))
{
this.classPath = new ArrayList<URLLoader>();
StringTokenizer st = new StringTokenizer(classPathString, " ");
- while (st.hasMoreElements ())
+ while (st.hasMoreElements ())
{
String e = st.nextToken ();
try
diff --git a/gnu/java/net/loader/JarURLResource.java b/gnu/java/net/loader/JarURLResource.java
index a9db5ce0b..1dec92fd3 100644
--- a/gnu/java/net/loader/JarURLResource.java
+++ b/gnu/java/net/loader/JarURLResource.java
@@ -91,4 +91,4 @@ public final class JarURLResource extends Resource
throw ie;
}
}
-} \ No newline at end of file
+}
diff --git a/gnu/java/net/loader/RemoteResource.java b/gnu/java/net/loader/RemoteResource.java
index f18031581..dc33b6636 100644
--- a/gnu/java/net/loader/RemoteResource.java
+++ b/gnu/java/net/loader/RemoteResource.java
@@ -75,4 +75,4 @@ public final class RemoteResource extends Resource
{
return url;
}
-} \ No newline at end of file
+}
diff --git a/gnu/java/net/loader/RemoteURLLoader.java b/gnu/java/net/loader/RemoteURLLoader.java
index f044740fa..81ef34f9e 100644
--- a/gnu/java/net/loader/RemoteURLLoader.java
+++ b/gnu/java/net/loader/RemoteURLLoader.java
@@ -98,4 +98,4 @@ public final class RemoteURLLoader extends URLLoader
return null;
}
}
-} \ No newline at end of file
+}
diff --git a/gnu/java/net/loader/Resource.java b/gnu/java/net/loader/Resource.java
index e367a3388..53720b039 100644
--- a/gnu/java/net/loader/Resource.java
+++ b/gnu/java/net/loader/Resource.java
@@ -107,4 +107,4 @@ public abstract class Resource
* this resource can be loaded.
*/
public abstract InputStream getInputStream() throws IOException;
-} \ No newline at end of file
+}
diff --git a/gnu/java/net/loader/URLLoader.java b/gnu/java/net/loader/URLLoader.java
index 5b9b6748b..337564f6a 100644
--- a/gnu/java/net/loader/URLLoader.java
+++ b/gnu/java/net/loader/URLLoader.java
@@ -145,4 +145,4 @@ public abstract class URLLoader
{
return null;
}
-} \ No newline at end of file
+}
diff --git a/gnu/java/net/protocol/file/Connection.java b/gnu/java/net/protocol/file/Connection.java
index 04278d46a..80155af0d 100644
--- a/gnu/java/net/protocol/file/Connection.java
+++ b/gnu/java/net/protocol/file/Connection.java
@@ -7,7 +7,7 @@ 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
@@ -89,7 +89,7 @@ public class Connection extends URLConnection
SystemProperties.getProperty("line.separator");
}
-
+
/**
* This is a File object for this connection
*/
@@ -109,7 +109,7 @@ public class Connection extends URLConnection
* OutputStream if we are writing to the file
*/
private OutputStream outputStream;
-
+
/**
* FilePermission to read the file
*/
@@ -124,7 +124,7 @@ public class Connection extends URLConnection
permission = new FilePermission(getURL().getFile(), DEFAULT_PERMISSION);
}
-
+
/**
* Unquote "%" + hex quotes characters
*
@@ -146,38 +146,38 @@ public class Connection extends URLConnection
int pos = 0;
for (int i = 0; i < str.length(); i++)
{
- char c = str.charAt(i);
- if (c == '%')
- {
- if (i + 2 >= str.length())
- throw new MalformedURLException(str + " : Invalid quoted character");
- int hi = Character.digit(str.charAt(++i), 16);
- int lo = Character.digit(str.charAt(++i), 16);
- if (lo < 0 || hi < 0)
- throw new MalformedURLException(str + " : Invalid quoted character");
- buf[pos++] = (byte) (hi * 16 + lo);
- }
- else if (c > 127) {
- try {
- byte [] c_as_bytes = Character.toString(c).getBytes("utf-8");
- final int c_length = c_as_bytes.length;
- System.arraycopy(c_as_bytes, 0, buf, pos, c_length);
- pos += c_length;
- }
- catch (java.io.UnsupportedEncodingException x2) {
- throw (Error) new InternalError().initCause(x2);
- }
- }
- else
- buf[pos++] = (byte) c;
+ char c = str.charAt(i);
+ if (c == '%')
+ {
+ if (i + 2 >= str.length())
+ throw new MalformedURLException(str + " : Invalid quoted character");
+ int hi = Character.digit(str.charAt(++i), 16);
+ int lo = Character.digit(str.charAt(++i), 16);
+ if (lo < 0 || hi < 0)
+ throw new MalformedURLException(str + " : Invalid quoted character");
+ buf[pos++] = (byte) (hi * 16 + lo);
+ }
+ else if (c > 127) {
+ try {
+ byte [] c_as_bytes = Character.toString(c).getBytes("utf-8");
+ final int c_length = c_as_bytes.length;
+ System.arraycopy(c_as_bytes, 0, buf, pos, c_length);
+ pos += c_length;
+ }
+ catch (java.io.UnsupportedEncodingException x2) {
+ throw (Error) new InternalError().initCause(x2);
+ }
+ }
+ else
+ buf[pos++] = (byte) c;
}
try
{
- return new String(buf, 0, pos, "utf-8");
+ return new String(buf, 0, pos, "utf-8");
}
catch (java.io.UnsupportedEncodingException x2)
{
- throw (Error) new InternalError().initCause(x2);
+ throw (Error) new InternalError().initCause(x2);
}
}
@@ -189,30 +189,30 @@ public class Connection extends URLConnection
// Call is ignored if already connected.
if (connected)
return;
-
+
// If not connected, then file needs to be openned.
file = new File (unquote(getURL().getFile()));
if (! file.isDirectory())
{
- if (doInput)
- inputStream = new BufferedInputStream(new FileInputStream(file));
-
- if (doOutput)
- outputStream = new BufferedOutputStream(new FileOutputStream(file));
+ if (doInput)
+ inputStream = new BufferedInputStream(new FileInputStream(file));
+
+ if (doOutput)
+ outputStream = new BufferedOutputStream(new FileOutputStream(file));
}
else
{
- if (doInput)
- {
+ if (doInput)
+ {
inputStream = new ByteArrayInputStream(getDirectoryListing());
- }
+ }
- if (doOutput)
- throw new ProtocolException
- ("file: protocol does not support output on directories");
+ if (doOutput)
+ throw new ProtocolException
+ ("file: protocol does not support output on directories");
}
-
+
connected = true;
}
@@ -228,9 +228,9 @@ public class Connection extends URLConnection
ByteArrayOutputStream sink = new ByteArrayOutputStream();
// NB uses default character encoding for this system
Writer writer = new OutputStreamWriter(sink);
-
+
String[] files = file.list();
-
+
for (int i = 0; i < files.length; i++)
{
writer.write(files[i]);
@@ -239,9 +239,9 @@ public class Connection extends URLConnection
directoryListing = sink.toByteArray();
}
- return directoryListing;
+ return directoryListing;
}
-
+
/**
* Opens the file for reading and returns a stream for it.
*
@@ -254,10 +254,10 @@ public class Connection extends URLConnection
{
if (!doInput)
throw new ProtocolException("Can't open InputStream if doInput is false");
-
+
if (!connected)
connect();
-
+
return inputStream;
}
@@ -273,11 +273,11 @@ public class Connection extends URLConnection
{
if (!doOutput)
throw new
- ProtocolException("Can't open OutputStream if doOutput is false");
+ ProtocolException("Can't open OutputStream if doOutput is false");
if (!connected)
connect();
-
+
return outputStream;
}
@@ -290,30 +290,30 @@ public class Connection extends URLConnection
{
try
{
- if (!connected)
- connect();
+ if (!connected)
+ connect();
- return file.lastModified();
+ return file.lastModified();
}
catch (IOException e)
{
- return -1;
+ return -1;
}
}
-
+
/**
- * Get an http-style header field. Just handle a few common ones.
+ * Get an http-style header field. Just handle a few common ones.
*/
public String getHeaderField(String field)
{
try
{
- if (!connected)
- connect();
+ if (!connected)
+ connect();
- if (field.equals("content-type"))
+ if (field.equals("content-type"))
return guessContentTypeFromName(file.getName());
- else if (field.equals("content-length"))
+ else if (field.equals("content-length"))
{
if (file.isDirectory())
{
@@ -321,14 +321,14 @@ public class Connection extends URLConnection
}
return Long.toString(file.length());
}
- else if (field.equals("last-modified"))
- {
- synchronized (StaticData.dateFormat)
- {
- return StaticData.dateFormat.format(
+ else if (field.equals("last-modified"))
+ {
+ synchronized (StaticData.dateFormat)
+ {
+ return StaticData.dateFormat.format(
new Date(file.lastModified()));
- }
- }
+ }
+ }
}
catch (IOException e)
{
@@ -346,21 +346,21 @@ public class Connection extends URLConnection
{
try
{
- if (!connected)
- connect();
-
+ if (!connected)
+ connect();
+
if (file.isDirectory())
{
return getDirectoryListing().length;
}
- return (int) file.length();
+ return (int) file.length();
}
catch (IOException e)
{
- return -1;
+ return -1;
}
}
-
+
/**
* This method returns a <code>Permission</code> object representing the
* permissions required to access this URL. This method returns a
diff --git a/gnu/java/net/protocol/file/Handler.java b/gnu/java/net/protocol/file/Handler.java
index fc560491d..58ebe4c46 100644
--- a/gnu/java/net/protocol/file/Handler.java
+++ b/gnu/java/net/protocol/file/Handler.java
@@ -76,14 +76,14 @@ public class Handler extends URLStreamHandler
String host = url.getHost();
if ((host != null) && (! host.equals("")))
{
- // Reset the protocol (and implicitly the handler) for this URL.
- // Then have the URL attempt the connection again, as it will
- // get the changed handler the next time around.
- // If the ftp protocol handler is not installed, an
- // exception will be thrown from the new openConnection() call.
- setURL (url, "ftp", url.getHost(), url.getPort(), url.getFile(),
- url.getRef());
- return url.openConnection();
+ // Reset the protocol (and implicitly the handler) for this URL.
+ // Then have the URL attempt the connection again, as it will
+ // get the changed handler the next time around.
+ // If the ftp protocol handler is not installed, an
+ // exception will be thrown from the new openConnection() call.
+ setURL (url, "ftp", url.getHost(), url.getPort(), url.getFile(),
+ url.getRef());
+ return url.openConnection();
}
return new Connection(url);
diff --git a/gnu/java/net/protocol/ftp/ActiveModeDTP.java b/gnu/java/net/protocol/ftp/ActiveModeDTP.java
index aa3c412b6..1ed31b830 100644
--- a/gnu/java/net/protocol/ftp/ActiveModeDTP.java
+++ b/gnu/java/net/protocol/ftp/ActiveModeDTP.java
@@ -7,7 +7,7 @@ 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
@@ -128,7 +128,7 @@ final class ActiveModeDTP
}
acceptThread = null;
}
-
+
/**
* Returns an input stream from which a remote file can be read.
*/
@@ -213,7 +213,7 @@ final class ActiveModeDTP
transferComplete();
return inProgress;
}
-
+
public void transferComplete()
{
if (socket == null)
@@ -247,6 +247,5 @@ final class ActiveModeDTP
}
}
}
-
-}
+}
diff --git a/gnu/java/net/protocol/ftp/BlockInputStream.java b/gnu/java/net/protocol/ftp/BlockInputStream.java
index 63897f1d6..09915e7ff 100644
--- a/gnu/java/net/protocol/ftp/BlockInputStream.java
+++ b/gnu/java/net/protocol/ftp/BlockInputStream.java
@@ -7,7 +7,7 @@ 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
@@ -147,4 +147,3 @@ class BlockInputStream
}
}
-
diff --git a/gnu/java/net/protocol/ftp/BlockOutputStream.java b/gnu/java/net/protocol/ftp/BlockOutputStream.java
index 85481c95b..d181f9dec 100644
--- a/gnu/java/net/protocol/ftp/BlockOutputStream.java
+++ b/gnu/java/net/protocol/ftp/BlockOutputStream.java
@@ -7,7 +7,7 @@ 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
@@ -108,4 +108,3 @@ class BlockOutputStream
}
}
-
diff --git a/gnu/java/net/protocol/ftp/CompressedInputStream.java b/gnu/java/net/protocol/ftp/CompressedInputStream.java
index f2e65b7d3..638d780e6 100644
--- a/gnu/java/net/protocol/ftp/CompressedInputStream.java
+++ b/gnu/java/net/protocol/ftp/CompressedInputStream.java
@@ -7,7 +7,7 @@ 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
@@ -133,13 +133,13 @@ class CompressedInputStream
n--;
return c;
}
-
+
public int read(byte[] buf)
throws IOException
{
return read(buf, 0, buf.length);
}
-
+
public int read(byte[] buf, int off, int len)
throws IOException
{
@@ -186,7 +186,7 @@ class CompressedInputStream
return l;
*/
}
-
+
/**
* Reads the block header.
*/
@@ -212,4 +212,3 @@ class CompressedInputStream
}
}
-
diff --git a/gnu/java/net/protocol/ftp/CompressedOutputStream.java b/gnu/java/net/protocol/ftp/CompressedOutputStream.java
index b960fb3af..ec3aef930 100644
--- a/gnu/java/net/protocol/ftp/CompressedOutputStream.java
+++ b/gnu/java/net/protocol/ftp/CompressedOutputStream.java
@@ -7,7 +7,7 @@ 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
@@ -57,7 +57,7 @@ class CompressedOutputStream
{
super(dtp, out);
}
-
+
/**
* Just one byte cannot be compressed.
* It takes 5 bytes to transmit - hardly very compressed!
@@ -190,7 +190,7 @@ class CompressedOutputStream
System.arraycopy(buf, 0, ret, 3, pos);
return ret;
}
-
+
int flush_compressed(byte[] buf, int pos, int count, byte c)
{
buf[pos++] = (byte) (0x80 | count);
@@ -225,4 +225,3 @@ class CompressedOutputStream
}
}
-
diff --git a/gnu/java/net/protocol/ftp/DTP.java b/gnu/java/net/protocol/ftp/DTP.java
index 25580af40..9ba4b7c6c 100644
--- a/gnu/java/net/protocol/ftp/DTP.java
+++ b/gnu/java/net/protocol/ftp/DTP.java
@@ -7,7 +7,7 @@ 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
@@ -89,4 +89,3 @@ interface DTP
void transferComplete();
}
-
diff --git a/gnu/java/net/protocol/ftp/DTPInputStream.java b/gnu/java/net/protocol/ftp/DTPInputStream.java
index 363a5590f..7280b0133 100644
--- a/gnu/java/net/protocol/ftp/DTPInputStream.java
+++ b/gnu/java/net/protocol/ftp/DTPInputStream.java
@@ -7,7 +7,7 @@ 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
@@ -74,7 +74,7 @@ abstract class DTPInputStream
{
transferComplete = flag;
}
-
+
/**
* Notifies the controlling DTP that this stream has completed transfer.
*/
@@ -85,4 +85,3 @@ abstract class DTPInputStream
}
}
-
diff --git a/gnu/java/net/protocol/ftp/DTPOutputStream.java b/gnu/java/net/protocol/ftp/DTPOutputStream.java
index 83f0be1e3..105c6f095 100644
--- a/gnu/java/net/protocol/ftp/DTPOutputStream.java
+++ b/gnu/java/net/protocol/ftp/DTPOutputStream.java
@@ -7,7 +7,7 @@ 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
diff --git a/gnu/java/net/protocol/ftp/FTPConnection.java b/gnu/java/net/protocol/ftp/FTPConnection.java
index 98e8a868d..4e253fcb9 100644
--- a/gnu/java/net/protocol/ftp/FTPConnection.java
+++ b/gnu/java/net/protocol/ftp/FTPConnection.java
@@ -7,7 +7,7 @@ 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
@@ -125,7 +125,7 @@ public class FTPConnection
protected static final String STAT = "STAT";
protected static final String HELP = "HELP";
protected static final String NOOP = "NOOP";
-
+
protected static final String AUTH = "AUTH";
protected static final String PBSZ = "PBSZ";
protected static final String PROT = "PROT";
@@ -211,7 +211,7 @@ public class FTPConnection
{
this(hostname, -1, 0, 0, false);
}
-
+
/**
* Creates a new connection to the server.
* @param hostname the hostname of the server to connect to
@@ -242,7 +242,7 @@ public class FTPConnection
{
port = FTP_PORT;
}
-
+
// Set up socket
socket = new Socket();
InetSocketAddress address = new InetSocketAddress(hostname, port);
@@ -258,7 +258,7 @@ public class FTPConnection
{
socket.setSoTimeout(timeout);
}
-
+
InputStream in = socket.getInputStream();
in = new BufferedInputStream(in);
in = new CRLFInputStream(in);
@@ -266,7 +266,7 @@ public class FTPConnection
OutputStream out = socket.getOutputStream();
out = new BufferedOutputStream(out);
this.out = new CRLFOutputStream(out);
-
+
// Read greeting
FTPResponse response = getResponse();
switch (response.getCode())
@@ -277,7 +277,7 @@ public class FTPConnection
throw new FTPException(response);
}
}
-
+
/**
* Authenticate using the specified username and password.
* If the username suffices for the server, the password will not be used
@@ -331,7 +331,7 @@ public class FTPConnection
{
return starttls(confidential, new EmptyX509TrustManager());
}
-
+
/**
* Negotiates TLS over the current connection.
* See IETF draft-murray-auth-ftp-ssl-15.txt for details.
@@ -351,7 +351,7 @@ public class FTPConnection
TrustManager[] trust = new TrustManager[] { tm };
context.init(null, trust, null);
SSLSocketFactory factory = context.getSocketFactory();
-
+
send(AUTH + ' ' + TLS);
FTPResponse response = getResponse();
switch (response.getCode())
@@ -367,7 +367,7 @@ public class FTPConnection
default:
throw new FTPException(response);
}
-
+
String hostname = socket.getInetAddress().getHostName();
int port = socket.getPort();
SSLSocket ss =
@@ -403,7 +403,7 @@ public class FTPConnection
default:
throw new FTPException(response);
}
-
+
if (confidential)
{
// Set up streams
@@ -422,7 +422,7 @@ public class FTPConnection
return false;
}
}
-
+
/**
* Changes directory to the specified path.
* @param path an absolute or relative pathname
@@ -447,7 +447,7 @@ public class FTPConnection
throw new FTPException(response);
}
}
-
+
/**
* Changes directory to the parent of the current working directory.
* @return true on success, false otherwise
@@ -521,7 +521,7 @@ public class FTPConnection
{
}
}
-
+
/**
* Initialise the data transfer process.
*/
@@ -533,7 +533,7 @@ public class FTPConnection
dtp.complete();
dtp = null;
}
-
+
InetAddress localhost = socket.getLocalAddress();
if (passive)
{
@@ -568,7 +568,7 @@ public class FTPConnection
{
c = message.charAt((++end) + 1);
}
-
+
String address =
message.substring(start, mid1).replace(',', '.');
int port_hi =
@@ -576,7 +576,7 @@ public class FTPConnection
int port_lo =
Integer.parseInt(message.substring(mid2 + 1, end + 1));
int port = (port_hi << 8) | port_lo;
-
+
/*System.out.println("Entering passive mode: " + address +
":" + port);*/
dtp = new PassiveModeDTP(address, port, localhost,
@@ -621,7 +621,7 @@ public class FTPConnection
}
}
}
-
+
// Send PORT command
CPStringBuilder buf = new CPStringBuilder(PORT);
buf.append(' ');
@@ -657,7 +657,7 @@ public class FTPConnection
}
dtp.setTransferMode(transferMode);
}
-
+
/**
* Set passive mode.
* @param flag true if we should use passive mode, false otherwise
@@ -671,7 +671,7 @@ public class FTPConnection
initialiseDTP();
}
}
-
+
/**
* Returns the current representation type of the transfer data.
* @return TYPE_ASCII, TYPE_EBCDIC, or TYPE_BINARY
@@ -809,7 +809,7 @@ public class FTPConnection
throw new FTPException(response);
}
}
-
+
/**
* Retrieves the specified file.
* @param filename the filename of the file to retrieve
@@ -849,7 +849,7 @@ public class FTPConnection
throw new FTPException(response);
}
}
-
+
/**
* Returns a stream for uploading a file.
* If a file with the same filename already exists on the server, it will
@@ -903,7 +903,7 @@ public class FTPConnection
throw new FTPException(response);
}
}
-
+
/**
* This command may be required by some servers to reserve sufficient
* storage to accommodate the new file to be transferred.
@@ -926,7 +926,7 @@ public class FTPConnection
throw new FTPException(response);
}
}
-
+
/**
* Renames a file.
* @param oldName the current name of the file
@@ -963,7 +963,7 @@ public class FTPConnection
throw new FTPException(response);
}
}
-
+
/**
* Aborts the transfer in progress.
* @return true if a transfer was in progress, false otherwise
@@ -993,7 +993,7 @@ public class FTPConnection
throw new FTPException(response);
}
}
-
+
/**
* Causes the file specified to be deleted at the server site.
* @param filename the file to delete
@@ -1015,7 +1015,7 @@ public class FTPConnection
throw new FTPException(response);
}
}
-
+
/**
* Causes the directory specified to be deleted.
* This may be an absolute or relative pathname.
@@ -1059,7 +1059,7 @@ public class FTPConnection
throw new FTPException(response);
}
}
-
+
/**
* Returns the current working directory.
*/
@@ -1097,7 +1097,7 @@ public class FTPConnection
throw new FTPException(response);
}
}
-
+
/**
* Returns a listing of information about the specified pathname.
* If the pathname specifies a directory or other group of files, the
@@ -1133,7 +1133,7 @@ public class FTPConnection
throw new FTPException(response);
}
}
-
+
/**
* Returns a directory listing. The pathname should specify a
* directory or other system-specific file group descriptor; a null
@@ -1179,7 +1179,7 @@ public class FTPConnection
throw new FTPException(response);
}
}
-
+
/**
* Returns the type of operating system at the server.
*/
@@ -1205,7 +1205,7 @@ public class FTPConnection
throw new FTPException(response);
}
}
-
+
/**
* Does nothing.
* This method can be used to ensure that the connection does not time
@@ -1316,7 +1316,7 @@ public class FTPConnection
throw new ProtocolException(line);
}
}
-
+
/*
* Parses the 3-digit numeric code at the beginning of the given line.
* Returns -1 on failure.
@@ -1350,4 +1350,3 @@ public class FTPConnection
}
}
-
diff --git a/gnu/java/net/protocol/ftp/FTPException.java b/gnu/java/net/protocol/ftp/FTPException.java
index 14ad3813f..1a7fcb85d 100644
--- a/gnu/java/net/protocol/ftp/FTPException.java
+++ b/gnu/java/net/protocol/ftp/FTPException.java
@@ -7,7 +7,7 @@ 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
@@ -63,7 +63,7 @@ public class FTPException
super(response.getMessage());
this.response = response;
}
-
+
/**
* Returns the response that provoked this exception.
*/
@@ -73,4 +73,3 @@ public class FTPException
}
}
-
diff --git a/gnu/java/net/protocol/ftp/FTPResponse.java b/gnu/java/net/protocol/ftp/FTPResponse.java
index ec72c732c..2620f0d70 100644
--- a/gnu/java/net/protocol/ftp/FTPResponse.java
+++ b/gnu/java/net/protocol/ftp/FTPResponse.java
@@ -7,7 +7,7 @@ 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
@@ -109,4 +109,3 @@ public final class FTPResponse
}
}
-
diff --git a/gnu/java/net/protocol/ftp/FTPURLConnection.java b/gnu/java/net/protocol/ftp/FTPURLConnection.java
index cfad5a7c1..8cc1fafd1 100644
--- a/gnu/java/net/protocol/ftp/FTPURLConnection.java
+++ b/gnu/java/net/protocol/ftp/FTPURLConnection.java
@@ -7,7 +7,7 @@ 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
@@ -137,7 +137,7 @@ public class FTPURLConnection
connection.setTransferMode(transferMode);
}
}
-
+
/**
* This connection supports doInput.
*/
@@ -153,7 +153,7 @@ public class FTPURLConnection
{
doOutput = dooutput;
}
-
+
/**
* Returns an input stream that reads from this open connection.
*/
@@ -174,7 +174,7 @@ public class FTPURLConnection
return this.new ClosingInputStream(connection.retrieve(path));
}
}
-
+
/**
* Returns an output stream that writes to this connection.
*/
@@ -252,7 +252,7 @@ public class FTPURLConnection
l.add(value);
map.put(key, l);
}
-
+
public void setRequestProperty(String key, String value)
{
if (connected)
@@ -351,7 +351,7 @@ public class FTPURLConnection
super.close();
connection.logout();
}
-
+
}
class ClosingOutputStream
@@ -369,8 +369,7 @@ public class FTPURLConnection
super.close();
connection.logout();
}
-
+
}
}
-
diff --git a/gnu/java/net/protocol/ftp/Handler.java b/gnu/java/net/protocol/ftp/Handler.java
index 88491b3c1..7638b6664 100644
--- a/gnu/java/net/protocol/ftp/Handler.java
+++ b/gnu/java/net/protocol/ftp/Handler.java
@@ -7,7 +7,7 @@ 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
@@ -67,4 +67,3 @@ public class Handler
}
}
-
diff --git a/gnu/java/net/protocol/ftp/PassiveModeDTP.java b/gnu/java/net/protocol/ftp/PassiveModeDTP.java
index 6f4fd6341..a74346c74 100644
--- a/gnu/java/net/protocol/ftp/PassiveModeDTP.java
+++ b/gnu/java/net/protocol/ftp/PassiveModeDTP.java
@@ -7,7 +7,7 @@ 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
@@ -118,7 +118,7 @@ final class PassiveModeDTP
in.setTransferComplete(false);
return in;
}
-
+
/**
* Returns an output stream to which a local file can be written for
* upload.
@@ -147,12 +147,12 @@ final class PassiveModeDTP
out.setTransferComplete(false);
return out;
}
-
+
public void setTransferMode(int mode)
{
transferMode = mode;
}
-
+
public void complete()
{
completed = true;
@@ -198,4 +198,3 @@ final class PassiveModeDTP
}
}
-
diff --git a/gnu/java/net/protocol/ftp/StreamInputStream.java b/gnu/java/net/protocol/ftp/StreamInputStream.java
index 93eee4e19..beee14bcb 100644
--- a/gnu/java/net/protocol/ftp/StreamInputStream.java
+++ b/gnu/java/net/protocol/ftp/StreamInputStream.java
@@ -7,7 +7,7 @@ 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
@@ -54,7 +54,7 @@ class StreamInputStream
{
super(dtp, in);
}
-
+
public int read()
throws IOException
{
@@ -92,4 +92,3 @@ class StreamInputStream
}
}
-
diff --git a/gnu/java/net/protocol/ftp/StreamOutputStream.java b/gnu/java/net/protocol/ftp/StreamOutputStream.java
index a6e28ece3..2df1a87d8 100644
--- a/gnu/java/net/protocol/ftp/StreamOutputStream.java
+++ b/gnu/java/net/protocol/ftp/StreamOutputStream.java
@@ -7,7 +7,7 @@ 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
@@ -54,7 +54,7 @@ class StreamOutputStream
{
super(dtp, out);
}
-
+
public void write(int c)
throws IOException
{
@@ -70,7 +70,7 @@ class StreamOutputStream
{
write(b, 0, b.length);
}
-
+
public void write(byte[] b, int off, int len)
throws IOException
{
@@ -80,6 +80,5 @@ class StreamOutputStream
}
out.write(b, off, len);
}
-
-}
+}
diff --git a/gnu/java/net/protocol/http/Authenticator.java b/gnu/java/net/protocol/http/Authenticator.java
index 0d7c98819..b4ee41e11 100644
--- a/gnu/java/net/protocol/http/Authenticator.java
+++ b/gnu/java/net/protocol/http/Authenticator.java
@@ -7,7 +7,7 @@ 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
@@ -54,6 +54,5 @@ public interface Authenticator
* unsuccessful attempt
*/
Credentials getCredentials(String realm, int attempt);
-
-}
+}
diff --git a/gnu/java/net/protocol/http/ByteArrayRequestBodyWriter.java b/gnu/java/net/protocol/http/ByteArrayRequestBodyWriter.java
index 35ad2bccf..22a33ccd3 100644
--- a/gnu/java/net/protocol/http/ByteArrayRequestBodyWriter.java
+++ b/gnu/java/net/protocol/http/ByteArrayRequestBodyWriter.java
@@ -7,7 +7,7 @@ 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
@@ -102,6 +102,5 @@ public class ByteArrayRequestBodyWriter
}
return len;
}
-
-}
+}
diff --git a/gnu/java/net/protocol/http/ChunkedInputStream.java b/gnu/java/net/protocol/http/ChunkedInputStream.java
index 8a30e51db..33df0df95 100644
--- a/gnu/java/net/protocol/http/ChunkedInputStream.java
+++ b/gnu/java/net/protocol/http/ChunkedInputStream.java
@@ -7,7 +7,7 @@ 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
@@ -158,15 +158,15 @@ public class ChunkedInputStream
}
else
{
- int canRead = Math.min(size - count, length);
- int len = in.read(buffer, offset, canRead);
- if (len == -1)
- {
- // This is an error condition but it isn't clear what we
- // should do with it.
- eof = true;
- return -1;
- }
+ int canRead = Math.min(size - count, length);
+ int len = in.read(buffer, offset, canRead);
+ if (len == -1)
+ {
+ // This is an error condition but it isn't clear what we
+ // should do with it.
+ eof = true;
+ return -1;
+ }
count += len;
if (count == size)
{
@@ -205,20 +205,19 @@ public class ChunkedInputStream
{
if (meta)
return 0;
-
+
return Math.min(in.available(), size - count);
}
/**
* This method closes the ChunkedInputStream by closing the underlying
* InputStream.
- *
+ *
* @exception IOException If an error occurs
*/
public void close() throws IOException
{
in.close();
}
-
-}
+}
diff --git a/gnu/java/net/protocol/http/Cookie.java b/gnu/java/net/protocol/http/Cookie.java
index 4482a121e..122a23f79 100644
--- a/gnu/java/net/protocol/http/Cookie.java
+++ b/gnu/java/net/protocol/http/Cookie.java
@@ -7,7 +7,7 @@ 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
@@ -138,7 +138,7 @@ public class Cookie
{
return toString(true, true);
}
-
+
public String toString(boolean showPath, boolean showDomain)
{
CPStringBuilder buf = new CPStringBuilder();
@@ -159,4 +159,3 @@ public class Cookie
}
}
-
diff --git a/gnu/java/net/protocol/http/CookieManager.java b/gnu/java/net/protocol/http/CookieManager.java
index cc1225c49..da3686689 100644
--- a/gnu/java/net/protocol/http/CookieManager.java
+++ b/gnu/java/net/protocol/http/CookieManager.java
@@ -7,7 +7,7 @@ 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
@@ -61,5 +61,5 @@ public interface CookieManager
* @param path the path to access
*/
Cookie[] getCookies(String host, boolean secure, String path);
-
+
}
diff --git a/gnu/java/net/protocol/http/Credentials.java b/gnu/java/net/protocol/http/Credentials.java
index 9e5fcd172..f95b4b53c 100644
--- a/gnu/java/net/protocol/http/Credentials.java
+++ b/gnu/java/net/protocol/http/Credentials.java
@@ -7,7 +7,7 @@ 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
@@ -83,6 +83,5 @@ public class Credentials
{
return password;
}
-
-}
+}
diff --git a/gnu/java/net/protocol/http/HTTPConnection.java b/gnu/java/net/protocol/http/HTTPConnection.java
index 44b1a608a..b96bf4c54 100644
--- a/gnu/java/net/protocol/http/HTTPConnection.java
+++ b/gnu/java/net/protocol/http/HTTPConnection.java
@@ -7,7 +7,7 @@ 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
@@ -201,7 +201,7 @@ public class HTTPConnection
this(hostname, secure ? HTTPS_PORT : HTTP_PORT, secure,
connectionTimeout, timeout);
}
-
+
/**
* Creates a new HTTP connection on the specified port.
* @param hostname the name of the host to connect to
@@ -222,7 +222,7 @@ public class HTTPConnection
{
this(hostname, port, secure, 0, 0);
}
-
+
/**
* Creates a new HTTP or HTTPS connection on the specified port.
* @param hostname the name of the host to connect to
@@ -239,7 +239,7 @@ public class HTTPConnection
{
if (connectionTimeout < 0 || timeout < 0)
throw new IllegalArgumentException();
-
+
this.hostname = hostname;
this.port = port;
this.secure = secure;
@@ -477,8 +477,8 @@ public class HTTPConnection
*/
synchronized HTTPConnection get(String host,
int port,
- boolean secure,
- int connectionTimeout, int timeout)
+ boolean secure,
+ int connectionTimeout, int timeout)
{
String ttl =
SystemProperties.getProperty("classpath.net.http.keepAliveTTL");
@@ -510,7 +510,7 @@ public class HTTPConnection
}
HTTPConnection c = null;
-
+
ListIterator it = connectionPool.listIterator(0);
while (it.hasNext())
{
@@ -584,7 +584,7 @@ public class HTTPConnection
}
}
}
-
+
/**
* The number of times this HTTPConnection has be used via keep-alive.
*/
@@ -618,7 +618,7 @@ public class HTTPConnection
{
useCount++;
pool.put(this);
-
+
}
else
{
@@ -878,7 +878,7 @@ public class HTTPConnection
}
// -- Events --
-
+
void addHandshakeCompletedListener(HandshakeCompletedListener l)
{
synchronized (handshakeCompletedListeners)
@@ -895,4 +895,3 @@ public class HTTPConnection
}
}
-
diff --git a/gnu/java/net/protocol/http/HTTPDateFormat.java b/gnu/java/net/protocol/http/HTTPDateFormat.java
index 2f59e4318..743f8e8e2 100644
--- a/gnu/java/net/protocol/http/HTTPDateFormat.java
+++ b/gnu/java/net/protocol/http/HTTPDateFormat.java
@@ -7,7 +7,7 @@ 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
@@ -145,7 +145,7 @@ public class HTTPDateFormat
// Get time offset in minutes
int zoneOffset =(calendar.get(Calendar.ZONE_OFFSET) +
calendar.get(Calendar.DST_OFFSET)) / 60000;
-
+
// Apply + or - appropriately
if (zoneOffset < 0)
{
@@ -156,7 +156,7 @@ public class HTTPDateFormat
{
buf.append('+');
}
-
+
// Set the 2 2-char fields as specified above
int tzhours = zoneOffset / 60;
buf.append(Character.forDigit(tzhours / 10, 10));
@@ -340,14 +340,14 @@ public class HTTPDateFormat
}
second = Integer.parseInt(text.substring(start, end));
}
-
+
calendar.set(Calendar.YEAR, year);
calendar.set(Calendar.MONTH, month);
calendar.set(Calendar.DAY_OF_MONTH, date);
calendar.set(Calendar.HOUR, hour);
calendar.set(Calendar.MINUTE, minute);
calendar.set(Calendar.SECOND, second);
-
+
if (end != len)
{
// Timezone
@@ -380,7 +380,7 @@ public class HTTPDateFormat
}
}
pos.setIndex(end);
-
+
return calendar.getTime();
}
catch (NumberFormatException e)
@@ -400,7 +400,7 @@ public class HTTPDateFormat
{
pos++;
}
- return pos;
+ return pos;
}
private int skipNonWhitespace(String text, int pos)
@@ -409,7 +409,7 @@ public class HTTPDateFormat
{
pos++;
}
- return pos;
+ return pos;
}
private int skipTo(String text, int pos, char c)
@@ -418,7 +418,7 @@ public class HTTPDateFormat
{
pos++;
}
- return pos;
+ return pos;
}
/**
@@ -438,4 +438,3 @@ public class HTTPDateFormat
}
}
-
diff --git a/gnu/java/net/protocol/http/HTTPURLConnection.java b/gnu/java/net/protocol/http/HTTPURLConnection.java
index b31f42669..9ba5c4793 100644
--- a/gnu/java/net/protocol/http/HTTPURLConnection.java
+++ b/gnu/java/net/protocol/http/HTTPURLConnection.java
@@ -7,7 +7,7 @@ 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
@@ -151,7 +151,7 @@ public class HTTPURLConnection
}
final Credentials creds = (username == null) ? null :
new Credentials (username, password);
-
+
if ("POST".equals(method))
{
String contentType = requestHeaders.getValue("Content-Type");
@@ -241,113 +241,113 @@ public class HTTPURLConnection
throw ioe;
}
}
-
+
if (response.isRedirect() && getInstanceFollowRedirects())
{
- // Read the response body, if there is one. If the
- // redirect points us back at the same server, we will use
- // the cached connection, so we must make sure there is no
- // pending data in it.
+ // Read the response body, if there is one. If the
+ // redirect points us back at the same server, we will use
+ // the cached connection, so we must make sure there is no
+ // pending data in it.
InputStream body = response.getBody();
- if (body != null)
- {
- byte[] ignore = new byte[1024];
- while (true)
- {
- int n = body.read(ignore, 0, ignore.length);
- if (n == -1)
- break;
- }
- }
+ if (body != null)
+ {
+ byte[] ignore = new byte[1024];
+ while (true)
+ {
+ int n = body.read(ignore, 0, ignore.length);
+ if (n == -1)
+ break;
+ }
+ }
// Follow redirect
String location = response.getHeader("Location");
- if (location != null)
- {
- String connectionUri = connection.getURI();
- int start = connectionUri.length();
- if (location.startsWith(connectionUri) &&
- location.charAt(start) == '/')
- {
- file = location.substring(start);
- retry = true;
- }
- else if (location.startsWith("http:"))
- {
- connection.close();
- connection = null;
- secure = false;
- start = 7;
- int end = location.indexOf('/', start);
+ if (location != null)
+ {
+ String connectionUri = connection.getURI();
+ int start = connectionUri.length();
+ if (location.startsWith(connectionUri) &&
+ location.charAt(start) == '/')
+ {
+ file = location.substring(start);
+ retry = true;
+ }
+ else if (location.startsWith("http:"))
+ {
+ connection.close();
+ connection = null;
+ secure = false;
+ start = 7;
+ int end = location.indexOf('/', start);
if (end == -1)
end = location.length();
- host = location.substring(start, end);
- int ci = host.lastIndexOf(':');
- if (ci != -1)
- {
- port = Integer.parseInt(host.substring (ci + 1));
- host = host.substring(0, ci);
- }
- else
- {
- port = HTTPConnection.HTTP_PORT;
- }
- file = location.substring(end);
- retry = true;
- }
- else if (location.startsWith("https:"))
- {
- connection.close();
- connection = null;
- secure = true;
- start = 8;
- int end = location.indexOf('/', start);
+ host = location.substring(start, end);
+ int ci = host.lastIndexOf(':');
+ if (ci != -1)
+ {
+ port = Integer.parseInt(host.substring (ci + 1));
+ host = host.substring(0, ci);
+ }
+ else
+ {
+ port = HTTPConnection.HTTP_PORT;
+ }
+ file = location.substring(end);
+ retry = true;
+ }
+ else if (location.startsWith("https:"))
+ {
+ connection.close();
+ connection = null;
+ secure = true;
+ start = 8;
+ int end = location.indexOf('/', start);
if (end == -1)
end = location.length();
- host = location.substring(start, end);
- int ci = host.lastIndexOf(':');
- if (ci != -1)
- {
- port = Integer.parseInt(host.substring (ci + 1));
- host = host.substring(0, ci);
- }
- else
- {
- port = HTTPConnection.HTTPS_PORT;
- }
- file = location.substring(end);
- retry = true;
- }
- else if (location.length() > 0)
- {
- // Malformed absolute URI, treat as file part of URI
- if (location.charAt(0) == '/')
- {
- // Absolute path
- file = location;
- }
- else
- {
- // Relative path
- int lsi = file.lastIndexOf('/');
- file = (lsi == -1) ? "/" : file.substring(0, lsi + 1);
- file += location;
- }
- retry = true;
- }
- }
+ host = location.substring(start, end);
+ int ci = host.lastIndexOf(':');
+ if (ci != -1)
+ {
+ port = Integer.parseInt(host.substring (ci + 1));
+ host = host.substring(0, ci);
+ }
+ else
+ {
+ port = HTTPConnection.HTTPS_PORT;
+ }
+ file = location.substring(end);
+ retry = true;
+ }
+ else if (location.length() > 0)
+ {
+ // Malformed absolute URI, treat as file part of URI
+ if (location.charAt(0) == '/')
+ {
+ // Absolute path
+ file = location;
+ }
+ else
+ {
+ // Relative path
+ int lsi = file.lastIndexOf('/');
+ file = (lsi == -1) ? "/" : file.substring(0, lsi + 1);
+ file += location;
+ }
+ retry = true;
+ }
+ }
}
else
{
responseSink = response.getBody();
-
+
if (response.isError())
- errorSink = responseSink;
+ errorSink = responseSink;
}
}
while (retry);
connected = true;
- }
+ }
/**
* Returns a connection, from the pool if necessary.
@@ -425,7 +425,7 @@ public class HTTPURLConnection
}
public String getRequestProperty(String key)
- {
+ {
return requestHeaders.getValue(key);
}
@@ -433,7 +433,7 @@ public class HTTPURLConnection
{
if (connected)
throw new IllegalStateException("Already connected");
-
+
Map<String, List<String>> m = requestHeaders.getAsMap();
return Collections.unmodifiableMap(m);
}
@@ -441,7 +441,7 @@ public class HTTPURLConnection
public void setRequestProperty(String key, String value)
{
super.setRequestProperty(key, value);
-
+
requestHeaders.put(key, value);
}
@@ -477,9 +477,9 @@ public class HTTPURLConnection
}
return requestSink;
}
-
+
// -- Response --
-
+
public InputStream getInputStream()
throws IOException
{
@@ -491,17 +491,17 @@ public class HTTPURLConnection
{
throw new ProtocolException("doInput is false");
}
-
+
if (response.isError())
{
int code = response.getCode();
if (code == 404 || code == 410)
throw new FileNotFoundException(url.toString());
-
+
throw new IOException("Server returned HTTP response code " + code
+ " for URL " + url.toString());
}
-
+
return responseSink;
}
@@ -535,7 +535,7 @@ public class HTTPURLConnection
" " + response.getCode() +
" " + response.getMessage();
}
-
+
public String getHeaderField(int index)
{
if (!connected)
@@ -641,7 +641,7 @@ public class HTTPURLConnection
}
return handshakeEvent.getCipherSuite();
}
-
+
public Certificate[] getLocalCertificates()
{
if (!connected)
@@ -681,14 +681,13 @@ public class HTTPURLConnection
super.setReadTimeout(timeout);
if (connection == null)
return;
- try
+ try
{
- connection.getSocket().setSoTimeout(timeout);
- }
+ connection.getSocket().setSoTimeout(timeout);
+ }
catch (IOException se)
{
- // Ignore socket exceptions.
+ // Ignore socket exceptions.
}
}
}
-
diff --git a/gnu/java/net/protocol/http/Handler.java b/gnu/java/net/protocol/http/Handler.java
index 640542513..30810321d 100644
--- a/gnu/java/net/protocol/http/Handler.java
+++ b/gnu/java/net/protocol/http/Handler.java
@@ -7,7 +7,7 @@ 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
@@ -70,4 +70,3 @@ public class Handler
}
}
-
diff --git a/gnu/java/net/protocol/http/Headers.java b/gnu/java/net/protocol/http/Headers.java
index 690a0c65b..faf5eb195 100644
--- a/gnu/java/net/protocol/http/Headers.java
+++ b/gnu/java/net/protocol/http/Headers.java
@@ -7,7 +7,7 @@ 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
@@ -71,7 +71,7 @@ class Headers implements Iterable<Headers.HeaderElement>
*/
private final ArrayList<HeaderElement> headers
= new ArrayList<HeaderElement>();
-
+
/**
* The HTTP dateformat used to parse date header fields.
*/
@@ -111,11 +111,11 @@ class Headers implements Iterable<Headers.HeaderElement>
{
return headers.iterator();
}
-
+
/**
* Returns the value of the specified header as a string. If
* multiple values are present, the last one is returned.
- *
+ *
* @param header the header name (case insensitive search)
* @return The header value or <code>null</code> if not found.
*/
@@ -135,7 +135,7 @@ class Headers implements Iterable<Headers.HeaderElement>
/**
* Returns the value of the specified header as an integer. If
* multiple values are present, the last one is returned.
- *
+ *
* @param header the header name (case insensitive search)
* @return The header value or <code>-1</code> if not present or
* not an integer value.
@@ -161,7 +161,7 @@ class Headers implements Iterable<Headers.HeaderElement>
/**
* Returns the value of the specified header as a long. If
* multiple values are present, the last one is returned.
- *
+ *
* @param header the header name (case insensitive search)
* @return The header value or <code>-1</code> if not present or
* not a long value.
@@ -187,7 +187,7 @@ class Headers implements Iterable<Headers.HeaderElement>
/**
* Returns the value of the specified header as a date. If
* multiple values are present, the last one is returned.
- *
+ *
* @param header the header name (case insensitive search)
* @return The header value or <code>null</code> if not present or
* not a date value.
@@ -212,7 +212,7 @@ class Headers implements Iterable<Headers.HeaderElement>
/**
* Add a header to this set of headers. If there is an existing
* header with the same name it's value is replaced with the new value.
- * If multiple headers of the same name exist only the last one's value
+ * If multiple headers of the same name exist only the last one's value
* is replaced.
*
* @param name the header name
@@ -221,7 +221,7 @@ class Headers implements Iterable<Headers.HeaderElement>
* @see #addValue(String, String)
*/
public void put(String name, String value)
- {
+ {
for (int i = headers.size() - 1; i >= 0; i--)
{
HeaderElement e = headers.get(i);
@@ -231,14 +231,14 @@ class Headers implements Iterable<Headers.HeaderElement>
return;
}
}
-
+
// nothing was replaced so add it as new HeaderElement
addValue(name, value);
}
-
+
/**
- * Add all headers from a set of headers to this set. Any existing header
- * with the same (case insensitive) name as one of the new headers will
+ * Add all headers from a set of headers to this set. Any existing header
+ * with the same (case insensitive) name as one of the new headers will
* be overridden.
*
* @param o the headers to be added
@@ -280,7 +280,7 @@ class Headers implements Iterable<Headers.HeaderElement>
{
LineInputStream lin = (in instanceof LineInputStream) ?
(LineInputStream) in : new LineInputStream(in);
-
+
String name = null;
CPStringBuilder value = new CPStringBuilder();
while (true)
@@ -307,9 +307,9 @@ class Headers implements Iterable<Headers.HeaderElement>
if (c1 == ' ' || c1 == '\t')
{
// Continuation
- int last = len - 1;
- if (line.charAt(last) != '\r')
- ++last;
+ int last = len - 1;
+ if (line.charAt(last) != '\r')
+ ++last;
value.append(line.substring(0, last));
}
else
@@ -318,7 +318,7 @@ class Headers implements Iterable<Headers.HeaderElement>
{
addValue(name, value.toString());
}
-
+
int di = line.indexOf(':');
name = line.substring(0, di);
value.setLength(0);
@@ -327,14 +327,14 @@ class Headers implements Iterable<Headers.HeaderElement>
di++;
}
while (di < len && line.charAt(di) == ' ');
- int last = len - 1;
- if (line.charAt(last) != '\r')
- ++last;
+ int last = len - 1;
+ if (line.charAt(last) != '\r')
+ ++last;
value.append(line.substring(di, last));
}
}
}
-
+
/**
* Add a header to this set of headers. If there is an existing
@@ -352,12 +352,12 @@ class Headers implements Iterable<Headers.HeaderElement>
/**
* Get a new Map containing all the headers. The keys of the Map
- * are Strings (the header names). The headers will be included
+ * are Strings (the header names). The headers will be included
* case-sensitive in the map so that querying must be done with the
* correct case of the needed header name. The values of the Map are
* unmodifiable Lists containing Strings (the header values).
*
- * <p>
+ * <p>
* The returned map is modifiable. Changing it will not effect this
* collection of Headers in any way.</p>
*
@@ -387,7 +387,7 @@ class Headers implements Iterable<Headers.HeaderElement>
}
return m;
}
-
+
/**
* Get the name of the Nth header.
*
@@ -401,7 +401,7 @@ class Headers implements Iterable<Headers.HeaderElement>
{
if (i >= headers.size() || i < 0)
return null;
-
+
return headers.get(i).name;
}
@@ -418,7 +418,7 @@ class Headers implements Iterable<Headers.HeaderElement>
{
if (i >= headers.size() || i < 0)
return null;
-
+
return headers.get(i).value;
}
}
diff --git a/gnu/java/net/protocol/http/Request.java b/gnu/java/net/protocol/http/Request.java
index 88e2fd077..534213eed 100644
--- a/gnu/java/net/protocol/http/Request.java
+++ b/gnu/java/net/protocol/http/Request.java
@@ -7,7 +7,7 @@ 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
@@ -280,14 +280,14 @@ public class Request
setHeader("Content-Length", Integer.toString(contentLength));
}
}
-
+
try
{
// Loop while authentication fails or continue
do
{
retry = false;
-
+
// Get socket output and input streams
OutputStream out = connection.getOutputStream();
@@ -314,7 +314,7 @@ public class Request
byte[] buffer = new byte[4096];
int len;
int count = 0;
-
+
requestBodyWriter.reset();
do
{
@@ -372,13 +372,13 @@ public class Request
}
return response;
}
-
+
Response readResponse(InputStream in)
throws IOException
{
String line;
int len;
-
+
// Read response status line
LineInputStream lis = new LineInputStream(in);
@@ -414,7 +414,7 @@ public class Request
responseHeaders.parse(lis);
notifyHeaderHandlers(responseHeaders);
InputStream body = null;
-
+
switch (code)
{
case 100:
@@ -459,7 +459,7 @@ public class Request
throws IOException
{
long contentLength = -1;
-
+
// Persistent connections are the default in HTTP/1.1
boolean doClose = "close".equalsIgnoreCase(getHeader("Connection")) ||
"close".equalsIgnoreCase(responseHeaders.getValue("Connection")) ||
@@ -475,9 +475,9 @@ public class Request
else if ("chunked".equalsIgnoreCase(transferCoding))
{
in = new LimitedLengthInputStream(in, -1, false, connection, doClose);
-
+
in = new ChunkedInputStream(in, responseHeaders);
- }
+ }
else
{
contentLength = responseHeaders.getLongValue("Content-Length");
@@ -505,9 +505,9 @@ public class Request
throw new ProtocolException("Unsupported Content-Encoding: " +
contentCoding);
}
- // Remove the Content-Encoding header because the content is
- // no longer compressed.
- responseHeaders.remove("Content-Encoding");
+ // Remove the Content-Encoding header because the content is
+ // no longer compressed.
+ responseHeaders.remove("Content-Encoding");
}
return in;
}
@@ -551,7 +551,7 @@ public class Request
{
MessageDigest md5 = MessageDigest.getInstance("MD5");
final byte[] COLON = { 0x3a };
-
+
// Calculate H(A1)
md5.reset();
md5.update(username.getBytes("US-ASCII"));
@@ -572,7 +572,7 @@ public class Request
ha1 = md5.digest();
}
String ha1Hex = toHexString(ha1);
-
+
// Calculate H(A2)
md5.reset();
md5.update(method.getBytes("US-ASCII"));
@@ -586,7 +586,7 @@ public class Request
}
byte[] ha2 = md5.digest();
String ha2Hex = toHexString(ha2);
-
+
// Calculate response
md5.reset();
md5.update(ha1Hex.getBytes("US-ASCII"));
@@ -606,8 +606,8 @@ public class Request
md5.update(COLON);
md5.update(ha2Hex.getBytes("US-ASCII"));
String digestResponse = toHexString(md5.digest());
-
- String authorization = scheme +
+
+ String authorization = scheme +
" username=\"" + username + "\"" +
" realm=\"" + realm + "\"" +
" nonce=\"" + nonce + "\"" +
@@ -652,7 +652,7 @@ public class Request
buf.setLength(0);
}
else if (c != ',' || (i <(len - 1) && text.charAt(i + 1) != ' '))
- {
+ {
buf.append(c);
}
}
@@ -855,4 +855,3 @@ public class Request
}
}
-
diff --git a/gnu/java/net/protocol/http/RequestBodyWriter.java b/gnu/java/net/protocol/http/RequestBodyWriter.java
index 05d98ebb8..aa5b78a54 100644
--- a/gnu/java/net/protocol/http/RequestBodyWriter.java
+++ b/gnu/java/net/protocol/http/RequestBodyWriter.java
@@ -7,7 +7,7 @@ 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
@@ -64,6 +64,5 @@ public interface RequestBodyWriter
* @return the number of bytes written
*/
int write(byte[] buffer);
-
-}
+}
diff --git a/gnu/java/net/protocol/http/Response.java b/gnu/java/net/protocol/http/Response.java
index 76fac9344..084cf75fa 100644
--- a/gnu/java/net/protocol/http/Response.java
+++ b/gnu/java/net/protocol/http/Response.java
@@ -7,7 +7,7 @@ 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
@@ -61,7 +61,7 @@ public class Response
/**
* The HTTP status code of the response.
- */
+ */
protected final int code;
/**
@@ -114,7 +114,7 @@ public class Response
/**
* Returns the HTTP status code of the response.
* @see #code
- */
+ */
public int getCode()
{
return code;
@@ -188,22 +188,22 @@ public class Response
{
return headers.getDateValue(name);
}
-
+
/**
* Tests whether this response indicates a redirection.
- *
+ *
* @return <code>true</code> if, <code>false</code> otherwise.
*/
public boolean isRedirect()
{
return (code != 304 && getCodeClass() == 3);
}
-
+
/**
* Tests whether this response indicates an error.
* Errors are the response codes <code>4xx</code> - Client error and
* <code>5xx</code> - Server error.
- *
+ *
* @return <code>true</code> if, <code>false</code> otherwise.
*/
public boolean isError()
@@ -221,4 +221,3 @@ public class Response
return body;
}
}
-
diff --git a/gnu/java/net/protocol/http/ResponseHeaderHandler.java b/gnu/java/net/protocol/http/ResponseHeaderHandler.java
index 4c5261da1..ca863440e 100644
--- a/gnu/java/net/protocol/http/ResponseHeaderHandler.java
+++ b/gnu/java/net/protocol/http/ResponseHeaderHandler.java
@@ -7,7 +7,7 @@ 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
@@ -52,6 +52,5 @@ public interface ResponseHeaderHandler
* Sets the value for the header associated with this handler.
*/
void setValue(String value);
-
-}
+}
diff --git a/gnu/java/net/protocol/http/SimpleCookieManager.java b/gnu/java/net/protocol/http/SimpleCookieManager.java
index fe05ba09e..f08204769 100644
--- a/gnu/java/net/protocol/http/SimpleCookieManager.java
+++ b/gnu/java/net/protocol/http/SimpleCookieManager.java
@@ -7,7 +7,7 @@ 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
@@ -133,6 +133,5 @@ public class SimpleCookieManager
}
}
}
-
-}
+}
diff --git a/gnu/java/net/protocol/https/Handler.java b/gnu/java/net/protocol/https/Handler.java
index 2b1375170..dbb619905 100644
--- a/gnu/java/net/protocol/https/Handler.java
+++ b/gnu/java/net/protocol/https/Handler.java
@@ -7,7 +7,7 @@ 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
@@ -73,4 +73,3 @@ public class Handler
}
}
-
diff --git a/gnu/java/net/protocol/jar/Connection.java b/gnu/java/net/protocol/jar/Connection.java
index 386aacef6..85d27bfc9 100644
--- a/gnu/java/net/protocol/jar/Connection.java
+++ b/gnu/java/net/protocol/jar/Connection.java
@@ -7,7 +7,7 @@ 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
@@ -73,13 +73,13 @@ public final class Connection extends JarURLConnection
private JarFile jar_file;
private JarEntry jar_entry;
private URL jar_url;
-
+
public static class JarFileCache
{
private static Hashtable<URL, JarFile> cache
= new Hashtable<URL, JarFile>();
private static final int READBUFSIZE = 4*1024;
-
+
public static synchronized JarFile get (URL url, boolean useCaches)
throws IOException
{
@@ -92,31 +92,31 @@ public final class Connection extends JarURLConnection
}
if ("file".equals (url.getProtocol()))
- {
- String fn = url.getFile();
- fn = gnu.java.net.protocol.file.Connection.unquote(fn);
- File f = new File (fn);
- jf = new JarFile (f, true, ZipFile.OPEN_READ);
- }
+ {
+ String fn = url.getFile();
+ fn = gnu.java.net.protocol.file.Connection.unquote(fn);
+ File f = new File (fn);
+ jf = new JarFile (f, true, ZipFile.OPEN_READ);
+ }
else
- {
- URLConnection urlconn = url.openConnection();
- InputStream is = urlconn.getInputStream();
- byte[] buf = new byte [READBUFSIZE];
- File f = File.createTempFile ("cache", "jar");
- FileOutputStream fos = new FileOutputStream (f);
- int len = 0;
-
- while ((len = is.read (buf)) != -1)
- {
- fos.write (buf, 0, len);
- }
-
- fos.close();
- // Always verify the Manifest, open read only and delete when done.
- jf = new JarFile (f, true,
- ZipFile.OPEN_READ | ZipFile.OPEN_DELETE);
- }
+ {
+ URLConnection urlconn = url.openConnection();
+ InputStream is = urlconn.getInputStream();
+ byte[] buf = new byte [READBUFSIZE];
+ File f = File.createTempFile ("cache", "jar");
+ FileOutputStream fos = new FileOutputStream (f);
+ int len = 0;
+
+ while ((len = is.read (buf)) != -1)
+ {
+ fos.write (buf, 0, len);
+ }
+
+ fos.close();
+ // Always verify the Manifest, open read only and delete when done.
+ jf = new JarFile (f, true,
+ ZipFile.OPEN_READ | ZipFile.OPEN_DELETE);
+ }
if (useCaches)
cache.put (url, jf);
@@ -140,7 +140,7 @@ public final class Connection extends JarURLConnection
jar_url = getJarFileURL();
jar_file = JarFileCache.get (jar_url, useCaches);
String entry_name = getEntryName();
-
+
if (entry_name != null
&& !entry_name.equals (""))
{
@@ -160,7 +160,7 @@ public final class Connection extends JarURLConnection
if (! doInput)
throw new ProtocolException("Can't open InputStream if doInput is false");
-
+
return jar_file.getInputStream (jar_entry);
}
@@ -179,26 +179,26 @@ public final class Connection extends JarURLConnection
{
try
{
- if (!connected)
- connect();
+ if (!connected)
+ connect();
- if (field.equals("content-type"))
+ if (field.equals("content-type"))
return guessContentTypeFromName(getJarEntry().getName());
- else if (field.equals("content-length"))
+ else if (field.equals("content-length"))
return Long.toString(getJarEntry().getSize());
- else if (field.equals("last-modified"))
- {
- // Both creating and manipulating dateFormat need synchronization.
- synchronized (Connection.class)
- {
- if (dateFormat == null)
- dateFormat = new SimpleDateFormat
- ("EEE, dd MMM yyyy hh:mm:ss 'GMT'",
- new Locale ("En", "Us", "Unix"));
-
- return dateFormat.format(new Date(getJarEntry().getTime()));
- }
- }
+ else if (field.equals("last-modified"))
+ {
+ // Both creating and manipulating dateFormat need synchronization.
+ synchronized (Connection.class)
+ {
+ if (dateFormat == null)
+ dateFormat = new SimpleDateFormat
+ ("EEE, dd MMM yyyy hh:mm:ss 'GMT'",
+ new Locale ("En", "Us", "Unix"));
+
+ return dateFormat.format(new Date(getJarEntry().getTime()));
+ }
+ }
}
catch (IOException e)
{
@@ -222,11 +222,11 @@ public final class Connection extends JarURLConnection
try
{
- return getJarEntry().getTime();
+ return getJarEntry().getTime();
}
catch (IOException e)
{
- return -1;
+ return -1;
}
}
}
diff --git a/gnu/java/net/protocol/jar/Handler.java b/gnu/java/net/protocol/jar/Handler.java
index 66f0fb6d9..7d6103e93 100644
--- a/gnu/java/net/protocol/jar/Handler.java
+++ b/gnu/java/net/protocol/jar/Handler.java
@@ -7,7 +7,7 @@ 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
@@ -91,34 +91,34 @@ public class Handler extends URLStreamHandler
// strategy when we encounter an error in parsing is to return without
// doing anything.
String file = url.getFile();
-
+
if (!file.equals(""))
{ //has context url
- url_string = url_string.substring (start, end);
+ url_string = url_string.substring (start, end);
if (url_string.startsWith("/"))
{ //url string is an absolute path
int idx = file.lastIndexOf ("!/");
-
- if (idx < 0)
- throw new URLParseError("no !/ in spec");
-
- file = file.substring (0, idx + 1) + url_string;
+
+ if (idx < 0)
+ throw new URLParseError("no !/ in spec");
+
+ file = file.substring (0, idx + 1) + url_string;
}
else if (url_string.length() > 0)
{
int idx = file.lastIndexOf ("/");
if (idx == -1) //context path is weird
- file = "/" + url_string;
+ file = "/" + url_string;
else if (idx == (file.length() - 1))
//just concatenate two parts
file = file + url_string;
else
- // according to Java API Documentation, here is a little different
+ // according to Java API Documentation, here is a little different
// with URLStreamHandler.parseURL
// but JDK seems doesn't handle it well
file = file.substring(0, idx + 1) + url_string;
}
-
+
setURL (url, "jar", url.getHost(), url.getPort(), flat(file), null);
return;
}
@@ -130,7 +130,7 @@ public class Handler extends URLStreamHandler
return;
if (start > url_string.length())
return;
-
+
// Skip remains of protocol
url_string = url_string.substring (start, end);
@@ -140,16 +140,16 @@ public class Handler extends URLStreamHandler
try
{
- new URL(url_string.substring (0, jar_stop));
+ new URL(url_string.substring (0, jar_stop));
}
catch (MalformedURLException e)
{
- throw new URLParseError("invalid inner URL: " + e.getMessage());
+ throw new URLParseError("invalid inner URL: " + e.getMessage());
}
-
+
if (!url.getProtocol().equals ("jar") )
throw new URLParseError("unexpected protocol " + url.getProtocol());
-
+
setURL (url, "jar", url.getHost(), url.getPort(), url_string, null);
}
@@ -170,16 +170,16 @@ public class Handler extends URLStreamHandler
StringTokenizer st = new StringTokenizer(jar_path, "/");
while (st.hasMoreTokens())
{
- String token = st.nextToken();
+ String token = st.nextToken();
if (token.equals("."))
continue;
else if (token.equals(".."))
- {
- if (! tokens.isEmpty())
- tokens.remove(tokens.size() - 1);
- }
- else
- tokens.add(token);
+ {
+ if (! tokens.isEmpty())
+ tokens.remove(tokens.size() - 1);
+ }
+ else
+ tokens.add(token);
}
CPStringBuilder path = new CPStringBuilder(url_string.length());
@@ -203,8 +203,8 @@ public class Handler extends URLStreamHandler
String ref = url.getRef();
// return "jar:" + file;
- // Performance!!:
- // Do the concatenation manually to avoid resize StringBuffer's
+ // Performance!!:
+ // Do the concatenation manually to avoid resize StringBuffer's
// internal buffer. The length of ref is not taken into consideration
// as it's a rare path.
CPStringBuilder sb = new CPStringBuilder (file.length() + 5);
diff --git a/gnu/java/nio/ChannelInputStream.java b/gnu/java/nio/ChannelInputStream.java
index f56536d65..5cad678c6 100644
--- a/gnu/java/nio/ChannelInputStream.java
+++ b/gnu/java/nio/ChannelInputStream.java
@@ -1,4 +1,4 @@
-/* ChannelInputStream.java --
+/* ChannelInputStream.java --
Copyright (C) 2003 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -51,11 +51,11 @@ import java.nio.channels.SelectableChannel;
public final class ChannelInputStream extends InputStream
{
private ReadableByteChannel ch;
-
+
public ChannelInputStream (ReadableByteChannel ch)
{
super();
-
+
this.ch = ch;
}
@@ -72,9 +72,9 @@ public final class ChannelInputStream extends InputStream
public int read() throws IOException
{
if (ch instanceof SelectableChannel
- && (! ((SelectableChannel) ch).isBlocking()))
+ && (! ((SelectableChannel) ch).isBlocking()))
throw new IllegalBlockingModeException();
-
+
ByteBuffer buffer = ByteBuffer.allocate(1);
int result = ch.read(buffer);
diff --git a/gnu/java/nio/ChannelOutputStream.java b/gnu/java/nio/ChannelOutputStream.java
index 08323eace..606f3775d 100644
--- a/gnu/java/nio/ChannelOutputStream.java
+++ b/gnu/java/nio/ChannelOutputStream.java
@@ -1,4 +1,4 @@
-/* ChannelOutputStream.java --
+/* ChannelOutputStream.java --
Copyright (C) 2003 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -49,11 +49,11 @@ import java.nio.channels.WritableByteChannel;
public final class ChannelOutputStream extends OutputStream
{
private WritableByteChannel ch;
-
+
public ChannelOutputStream (WritableByteChannel ch)
{
super();
-
+
this.ch = ch;
}
diff --git a/gnu/java/nio/ChannelReader.java b/gnu/java/nio/ChannelReader.java
index 1e7372d2e..3c1456a36 100644
--- a/gnu/java/nio/ChannelReader.java
+++ b/gnu/java/nio/ChannelReader.java
@@ -1,4 +1,4 @@
-/* ChannelReader.java --
+/* ChannelReader.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -50,11 +50,11 @@ import java.nio.charset.CodingErrorAction;
/**
* A Reader implementation that works using a ReadableByteChannel and a
* CharsetDecoder.
- *
+ *
* <p>
* This is a bridge between NIO <-> IO character decoding.
* </p>
- *
+ *
* @author Robert Schuster
*/
public class ChannelReader extends Reader
@@ -97,36 +97,36 @@ public class ChannelReader extends Reader
// I declared channel being null meaning that the reader is closed.
if (!channel.isOpen())
throw new IOException("Reader was already closed.");
-
+
// I declared decoder being null meaning that there is no more data to read
// and convert.
if (decoder == null)
return -1;
-
+
// Stores the amount of character being read. It -1 so that if no conversion
// occured the caller will see this as an 'end of file'.
int sum = -1;
-
+
// Copies any characters which may be left from the last invocation into the
// destination array.
if (charBuffer.remaining() > 0)
{
sum = Math.min(count, charBuffer.remaining());
charBuffer.get(buf, offset, sum);
-
+
// Updates the control variables according to the latest copy operation.
offset += sum;
count -= sum;
}
-
+
// Copies the character which have not been put in the destination array to
// the beginning. If data is actually copied count will be 0. If no data is
// copied count is >0 and we can now convert some more characters.
charBuffer.compact();
-
+
int converted = 0;
boolean last = false;
-
+
while (count != 0)
{
// Tries to convert some bytes (Which will intentionally fail in the
@@ -139,7 +139,7 @@ public class ChannelReader extends Reader
// unmappable.
result.throwException();
}
-
+
// Marks that we should end this loop regardless whether the caller
// wants more chars or not, when this was the last conversion.
if (last)
@@ -149,11 +149,11 @@ public class ChannelReader extends Reader
else if (result.isUnderflow())
{
// We need more bytes to do the conversion.
-
+
// Copies the not yet converted bytes to the beginning making it
// being able to receive more bytes.
byteBuffer.compact();
-
+
// Reads in another bunch of bytes for being converted.
if (channel.read(byteBuffer) == -1)
{
@@ -162,42 +162,42 @@ public class ChannelReader extends Reader
// done in the next loop iteration.
last = true;
}
-
+
// Prepares the byteBuffer for the next character conversion run.
byteBuffer.flip();
}
-
+
// Prepares the charBuffer for being drained.
charBuffer.flip();
-
+
converted = Math.min(count, charBuffer.remaining());
charBuffer.get(buf, offset, converted);
-
+
// Copies characters which have not yet being copied into the char-Array
// to the beginning making it possible to read them later (If data is
// really copied here, then the caller has received enough characters so
// far.).
charBuffer.compact();
-
+
// Updates the control variables according to the latest copy operation.
offset += converted;
count -= converted;
-
+
// Updates the amount of transferred characters.
sum += converted;
-
+
if (decoder == null)
{
break;
}
-
+
// Now that more characters have been transfered we let the loop decide
// what to do next.
}
-
+
// Makes the charBuffer ready for reading on the next invocation.
charBuffer.flip();
-
+
return sum;
}
}
diff --git a/gnu/java/nio/ChannelWriter.java b/gnu/java/nio/ChannelWriter.java
index 8e533ccbf..2441fb395 100644
--- a/gnu/java/nio/ChannelWriter.java
+++ b/gnu/java/nio/ChannelWriter.java
@@ -117,7 +117,7 @@ public class ChannelWriter
{
if (enc == null)
throw new IOException("writer already closed");
-
+
byteBuffer.clear();
charBuffer.flip();
CoderResult res = enc.encode(charBuffer, byteBuffer, true);
@@ -173,7 +173,7 @@ public class ChannelWriter
break;
}
lastLen = len;
-
+
// Convert.
byteBuffer.clear();
CoderResult res = enc.encode(charBuffer, byteBuffer, false);
diff --git a/gnu/java/nio/DatagramChannelImpl.java b/gnu/java/nio/DatagramChannelImpl.java
index ea8c863e3..1132796dd 100644
--- a/gnu/java/nio/DatagramChannelImpl.java
+++ b/gnu/java/nio/DatagramChannelImpl.java
@@ -1,4 +1,4 @@
-/* DatagramChannelImpl.java --
+/* DatagramChannelImpl.java --
Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -57,7 +57,7 @@ public final class DatagramChannelImpl extends DatagramChannel
{
private NIODatagramSocket socket;
private VMChannel channel;
-
+
/**
* Indicates whether this channel initiated whatever operation
* is being invoked on our datagram socket.
@@ -85,7 +85,7 @@ public final class DatagramChannelImpl extends DatagramChannel
{
return inChannelOperation;
}
-
+
/**
* Sets our indicator of whether we are initiating an I/O operation
* on our socket.
@@ -94,18 +94,18 @@ public final class DatagramChannelImpl extends DatagramChannel
{
inChannelOperation = b;
}
-
+
public DatagramSocket socket ()
{
return socket;
}
-
+
protected void implCloseSelectableChannel ()
throws IOException
{
channel.close();
}
-
+
protected void implConfigureBlocking (boolean blocking)
throws IOException
{
@@ -117,7 +117,7 @@ public final class DatagramChannelImpl extends DatagramChannel
{
if (!isOpen())
throw new ClosedChannelException();
-
+
try
{
channel.connect((InetSocketAddress) remote, 0);
@@ -128,14 +128,14 @@ public final class DatagramChannelImpl extends DatagramChannel
}
return this;
}
-
+
public DatagramChannel disconnect ()
throws IOException
{
channel.disconnect();
return this;
}
-
+
public boolean isConnected()
{
try
@@ -147,13 +147,13 @@ public final class DatagramChannelImpl extends DatagramChannel
return false;
}
}
-
+
public int write (ByteBuffer src)
throws IOException
{
if (!isConnected ())
throw new NotYetConnectedException ();
-
+
return channel.write(src);
}
@@ -180,32 +180,32 @@ public final class DatagramChannelImpl extends DatagramChannel
{
if (!isConnected ())
throw new NotYetConnectedException ();
-
+
return channel.read(dst);
}
-
+
public long read (ByteBuffer[] dsts, int offset, int length)
throws IOException
{
if (!isConnected())
throw new NotYetConnectedException();
-
+
if ((offset < 0)
|| (offset > dsts.length)
|| (length < 0)
|| (length > (dsts.length - offset)))
throw new IndexOutOfBoundsException();
-
+
/* Likewise, see the comment int write above. */
return channel.readScattering(dsts, offset, length);
}
-
+
public SocketAddress receive (ByteBuffer dst)
throws IOException
{
if (!isOpen())
throw new ClosedChannelException();
-
+
try
{
begin();
@@ -216,23 +216,23 @@ public final class DatagramChannelImpl extends DatagramChannel
end(true);
}
}
-
+
public int send (ByteBuffer src, SocketAddress target)
throws IOException
{
if (!isOpen())
throw new ClosedChannelException();
-
+
if (!(target instanceof InetSocketAddress))
throw new IOException("can only send to inet socket addresses");
-
+
InetSocketAddress dst = (InetSocketAddress) target;
if (dst.isUnresolved())
throw new IOException("Target address not resolved");
return channel.send(src, dst);
}
-
+
public VMChannel getVMChannel()
{
return channel;
diff --git a/gnu/java/nio/DatagramChannelSelectionKey.java b/gnu/java/nio/DatagramChannelSelectionKey.java
index f192e5002..93837f341 100644
--- a/gnu/java/nio/DatagramChannelSelectionKey.java
+++ b/gnu/java/nio/DatagramChannelSelectionKey.java
@@ -1,4 +1,4 @@
-/* DatagramChannelSelectionKey.java --
+/* DatagramChannelSelectionKey.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/gnu/java/nio/EpollSelectionKeyImpl.java b/gnu/java/nio/EpollSelectionKeyImpl.java
index 11113f397..c0b7720e3 100644
--- a/gnu/java/nio/EpollSelectionKeyImpl.java
+++ b/gnu/java/nio/EpollSelectionKeyImpl.java
@@ -58,7 +58,7 @@ public class EpollSelectionKeyImpl extends AbstractSelectionKey
int key;
boolean valid;
boolean cancelled;
-
+
EpollSelectionKeyImpl(EpollSelectorImpl selector,
SelectableChannel channel, int fd)
{
diff --git a/gnu/java/nio/EpollSelectorImpl.java b/gnu/java/nio/EpollSelectorImpl.java
index 2b3c9bbb1..f74b087c2 100644
--- a/gnu/java/nio/EpollSelectorImpl.java
+++ b/gnu/java/nio/EpollSelectorImpl.java
@@ -65,20 +65,20 @@ public class EpollSelectorImpl extends AbstractSelector
// XXX is this reasonable? Does it matter?
private static final int DEFAULT_EPOLL_SIZE = 128;
private static final int sizeof_struct_epoll_event;
-
+
private static final int OP_ACCEPT = SelectionKey.OP_ACCEPT;
private static final int OP_CONNECT = SelectionKey.OP_CONNECT;
private static final int OP_READ = SelectionKey.OP_READ;
private static final int OP_WRITE = SelectionKey.OP_WRITE;
-
+
/** our epoll file descriptor. */
private int epoll_fd;
-
+
private final HashMap keys;
private Set selectedKeys;
private Thread waitingThread;
private ByteBuffer events;
-
+
private static final int INITIAL_CAPACITY;
private static final int MAX_DOUBLING_CAPACITY;
private static final int CAPACITY_INCREMENT;
@@ -87,17 +87,17 @@ public class EpollSelectorImpl extends AbstractSelector
{
if (Configuration.INIT_LOAD_LIBRARY)
System.loadLibrary("javanio");
-
+
if (epoll_supported())
sizeof_struct_epoll_event = sizeof_struct();
else
sizeof_struct_epoll_event = -1;
-
+
INITIAL_CAPACITY = 64 * sizeof_struct_epoll_event;
MAX_DOUBLING_CAPACITY = 1024 * sizeof_struct_epoll_event;
CAPACITY_INCREMENT = 128 * sizeof_struct_epoll_event;
}
-
+
public EpollSelectorImpl(SelectorProvider provider)
throws IOException
{
@@ -135,7 +135,7 @@ public class EpollSelectorImpl extends AbstractSelector
throw new IllegalArgumentException("invalid timeout");
return doSelect((int) timeout);
}
-
+
private int doSelect(int timeout) throws IOException
{
synchronized (keys)
@@ -152,7 +152,7 @@ public class EpollSelectorImpl extends AbstractSelector
it.remove();
deregister(key);
}
-
+
// Clear out closed channels. The fds are removed from the epoll
// fd when closed, so there is no need to remove them manually.
for (Iterator it = keys.values().iterator(); it.hasNext(); )
@@ -165,7 +165,7 @@ public class EpollSelectorImpl extends AbstractSelector
it.remove();
}
}
-
+
// Don't bother if we have nothing to select.
if (keys.isEmpty())
return 0;
@@ -183,7 +183,7 @@ public class EpollSelectorImpl extends AbstractSelector
waitingThread = null;
end();
}
-
+
HashSet s = new HashSet(ret);
for (int i = 0; i < ret; i++)
{
@@ -197,9 +197,9 @@ public class EpollSelectorImpl extends AbstractSelector
key.selectedOps = selected_ops(b) & key.interestOps;
s.add(key);
}
-
+
reallocateBuffer();
-
+
selectedKeys = s;
return ret;
}
@@ -239,7 +239,7 @@ public class EpollSelectorImpl extends AbstractSelector
}
return this;
}
-
+
/* (non-Javadoc)
* @see java.nio.channels.spi.AbstractSelector#implCloseSelector()
*/
@@ -275,7 +275,7 @@ public class EpollSelectorImpl extends AbstractSelector
result.key = System.identityHashCode(result);
epoll_add(epoll_fd, result.fd, ops);
keys.put(Integer.valueOf(native_fd), result);
- reallocateBuffer();
+ reallocateBuffer();
return result;
}
}
@@ -284,7 +284,7 @@ public class EpollSelectorImpl extends AbstractSelector
throw new IllegalArgumentException(ioe);
}
}
-
+
private void reallocateBuffer()
{
// Ensure we have enough space for all potential events that may be
@@ -301,18 +301,18 @@ public class EpollSelectorImpl extends AbstractSelector
// Ensure that the events buffer is not too large, given the number of
// events registered.
else if (events.capacity() > keys.size() * sizeof_struct_epoll_event * 2 + 1
- && events.capacity() > INITIAL_CAPACITY)
+ && events.capacity() > INITIAL_CAPACITY)
{
int cap = events.capacity() >>> 1;
events = ByteBuffer.allocateDirect(cap);
}
}
-
+
void epoll_modify(EpollSelectionKeyImpl key, int ops) throws IOException
{
epoll_modify(epoll_fd, key.fd, ops);
}
-
+
/**
* Tell if epoll is supported by this system, and support was compiled in.
*
@@ -327,8 +327,8 @@ public class EpollSelectorImpl extends AbstractSelector
* @return The size of `struct epoll_event'.
*/
private static native int sizeof_struct();
-
-
+
+
/**
* Open a new epoll file descriptor.
*
@@ -337,7 +337,7 @@ public class EpollSelectorImpl extends AbstractSelector
* @throws IOException If allocating a new epoll descriptor fails.
*/
private static native int epoll_create(int size) throws IOException;
-
+
/**
* Add a file descriptor to this selector.
*
@@ -347,7 +347,7 @@ public class EpollSelectorImpl extends AbstractSelector
*/
private static native void epoll_add(int efd, int fd, int ops)
throws IOException;
-
+
/**
* Modify the interest ops of the key selecting for the given FD.
*
@@ -358,7 +358,7 @@ public class EpollSelectorImpl extends AbstractSelector
*/
private static native void epoll_modify(int efd, int fd, int ops)
throws IOException;
-
+
/**
* Remove a file descriptor from this selector.
*
@@ -367,7 +367,7 @@ public class EpollSelectorImpl extends AbstractSelector
* @throws IOException
*/
private static native void epoll_delete(int efd, int fd) throws IOException;
-
+
/**
* Select events.
*
@@ -380,7 +380,7 @@ public class EpollSelectorImpl extends AbstractSelector
*/
private static native int epoll_wait(int efd, ByteBuffer state, int n, int timeout)
throws IOException;
-
+
/**
* Fetch the fd value from a selected struct epoll_event.
*
@@ -388,7 +388,7 @@ public class EpollSelectorImpl extends AbstractSelector
* @return The fd value.
*/
private static native int selected_fd(ByteBuffer struct);
-
+
/**
* Fetch the enabled operations from a selected struct epoll_event.
*
diff --git a/gnu/java/nio/FileChannelImpl.java b/gnu/java/nio/FileChannelImpl.java
index d4a374b4a..c17227d3d 100644
--- a/gnu/java/nio/FileChannelImpl.java
+++ b/gnu/java/nio/FileChannelImpl.java
@@ -1,4 +1,4 @@
-/* FileChannelImpl.java --
+/* FileChannelImpl.java --
Copyright (C) 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -58,7 +58,7 @@ import java.nio.channels.WritableByteChannel;
/**
* This file is not user visible !
* But alas, Java does not have a concept of friendly packages
- * so this class is public.
+ * so this class is public.
* Instances of this class are created by invoking getChannel
* Upon a Input/Output/RandomAccessFile object.
*/
@@ -86,7 +86,7 @@ public final class FileChannelImpl extends FileChannel
{
System.loadLibrary("javanio");
}
-
+
//init();
FileChannelImpl ch = null;
@@ -99,7 +99,7 @@ public final class FileChannelImpl extends FileChannel
throw new Error(ioe);
}
in = ch;
-
+
ch = null;
try
{
@@ -110,11 +110,11 @@ public final class FileChannelImpl extends FileChannel
throw new Error(ioe);
}
out = ch;
-
+
ch = null;
try
{
- ch = new FileChannelImpl(VMChannel.getStderr(), WRITE);
+ ch = new FileChannelImpl(VMChannel.getStderr(), WRITE);
}
catch (IOException ioe)
{
@@ -154,16 +154,16 @@ public final class FileChannelImpl extends FileChannel
// to avoid race condition.
if (file.isDirectory())
{
- try
- {
- close();
- }
- catch (IOException e)
- {
- /* ignore it */
- }
-
- throw new FileNotFoundException(description + " is a directory");
+ try
+ {
+ close();
+ }
+ catch (IOException e)
+ {
+ /* ignore it */
+ }
+
+ throw new FileNotFoundException(description + " is a directory");
}
}
@@ -202,7 +202,7 @@ public final class FileChannelImpl extends FileChannel
{
ch.truncate(size);
}
-
+
public void unlock(long pos, long len) throws IOException
{
ch.unlock(pos, len);
@@ -212,7 +212,7 @@ public final class FileChannelImpl extends FileChannel
{
return ch.size();
}
-
+
protected void implCloseChannel() throws IOException
{
ch.close();
@@ -241,7 +241,7 @@ public final class FileChannelImpl extends FileChannel
position (position);
int result = read(dst);
position (oldPosition);
-
+
return result;
}
@@ -260,7 +260,7 @@ public final class FileChannelImpl extends FileChannel
{
return ch.write(src);
}
-
+
public int write (ByteBuffer src, long position)
throws IOException
{
@@ -269,7 +269,7 @@ public final class FileChannelImpl extends FileChannel
if (!isOpen ())
throw new ClosedChannelException ();
-
+
if ((mode & WRITE) == 0)
throw new NonWritableChannelException ();
@@ -280,7 +280,7 @@ public final class FileChannelImpl extends FileChannel
seek (position);
result = write(src);
seek (oldPosition);
-
+
return result;
}
@@ -296,30 +296,30 @@ public final class FileChannelImpl extends FileChannel
}
public MappedByteBuffer map (FileChannel.MapMode mode,
- long position, long size)
+ long position, long size)
throws IOException
{
char nmode = 0;
if (mode == MapMode.READ_ONLY)
{
- nmode = 'r';
- if ((this.mode & READ) == 0)
- throw new NonReadableChannelException();
+ nmode = 'r';
+ if ((this.mode & READ) == 0)
+ throw new NonReadableChannelException();
}
else if (mode == MapMode.READ_WRITE || mode == MapMode.PRIVATE)
{
- nmode = mode == MapMode.READ_WRITE ? '+' : 'c';
- if ((this.mode & WRITE) != WRITE)
- throw new NonWritableChannelException();
- if ((this.mode & READ) != READ)
- throw new NonReadableChannelException();
+ nmode = mode == MapMode.READ_WRITE ? '+' : 'c';
+ if ((this.mode & WRITE) != WRITE)
+ throw new NonWritableChannelException();
+ if ((this.mode & READ) != READ)
+ throw new NonReadableChannelException();
}
else
throw new IllegalArgumentException ("mode: " + mode);
-
+
if (position < 0 || size < 0 || size > Integer.MAX_VALUE)
throw new IllegalArgumentException ("position: " + position
- + ", size: " + size);
+ + ", size: " + size);
return ch.map(nmode, position, (int) size);
}
@@ -335,99 +335,99 @@ public final class FileChannelImpl extends FileChannel
}
// like transferTo, but with a count of less than 2Gbytes
- private int smallTransferTo (long position, int count,
- WritableByteChannel target)
+ private int smallTransferTo (long position, int count,
+ WritableByteChannel target)
throws IOException
{
ByteBuffer buffer;
try
{
- // Try to use a mapped buffer if we can. If this fails for
- // any reason we'll fall back to using a ByteBuffer.
- buffer = map (MapMode.READ_ONLY, position, count);
+ // Try to use a mapped buffer if we can. If this fails for
+ // any reason we'll fall back to using a ByteBuffer.
+ buffer = map (MapMode.READ_ONLY, position, count);
}
catch (IOException e)
{
- buffer = ByteBuffer.allocate (count);
- read (buffer, position);
- buffer.flip();
+ buffer = ByteBuffer.allocate (count);
+ read (buffer, position);
+ buffer.flip();
}
return target.write (buffer);
}
- public long transferTo (long position, long count,
- WritableByteChannel target)
+ public long transferTo (long position, long count,
+ WritableByteChannel target)
throws IOException
{
if (position < 0
|| count < 0)
throw new IllegalArgumentException ("position: " + position
- + ", count: " + count);
+ + ", count: " + count);
if (!isOpen ())
throw new ClosedChannelException ();
if ((mode & READ) == 0)
throw new NonReadableChannelException ();
-
+
final int pageSize = 65536;
long total = 0;
while (count > 0)
{
- int transferred
- = smallTransferTo (position, (int)Math.min (count, pageSize),
- target);
- if (transferred < 0)
- break;
- total += transferred;
- position += transferred;
- count -= transferred;
+ int transferred
+ = smallTransferTo (position, (int)Math.min (count, pageSize),
+ target);
+ if (transferred < 0)
+ break;
+ total += transferred;
+ position += transferred;
+ count -= transferred;
}
return total;
}
// like transferFrom, but with a count of less than 2Gbytes
- private int smallTransferFrom (ReadableByteChannel src, long position,
- int count)
+ private int smallTransferFrom (ReadableByteChannel src, long position,
+ int count)
throws IOException
{
ByteBuffer buffer = null;
if (src instanceof FileChannel)
{
- try
- {
- // Try to use a mapped buffer if we can. If this fails
- // for any reason we'll fall back to using a ByteBuffer.
- buffer = ((FileChannel)src).map (MapMode.READ_ONLY, position,
- count);
- }
- catch (IOException e)
- {
- }
+ try
+ {
+ // Try to use a mapped buffer if we can. If this fails
+ // for any reason we'll fall back to using a ByteBuffer.
+ buffer = ((FileChannel)src).map (MapMode.READ_ONLY, position,
+ count);
+ }
+ catch (IOException e)
+ {
+ }
}
if (buffer == null)
{
- buffer = ByteBuffer.allocate (count);
- src.read (buffer);
- buffer.flip();
+ buffer = ByteBuffer.allocate (count);
+ src.read (buffer);
+ buffer.flip();
}
return write (buffer, position);
}
- public long transferFrom (ReadableByteChannel src, long position,
- long count)
+ public long transferFrom (ReadableByteChannel src, long position,
+ long count)
throws IOException
{
if (position < 0
|| count < 0)
throw new IllegalArgumentException ("position: " + position
- + ", count: " + count);
+ + ", count: " + count);
if (!isOpen ())
throw new ClosedChannelException ();
@@ -440,13 +440,13 @@ public final class FileChannelImpl extends FileChannel
while (count > 0)
{
- int transferred = smallTransferFrom (src, position,
- (int)Math.min (count, pageSize));
- if (transferred < 0)
- break;
- total += transferred;
- position += transferred;
- count -= transferred;
+ int transferred = smallTransferFrom (src, position,
+ (int)Math.min (count, pageSize));
+ if (transferred < 0)
+ break;
+ total += transferred;
+ position += transferred;
+ count -= transferred;
}
return total;
@@ -459,14 +459,14 @@ public final class FileChannelImpl extends FileChannel
if (position < 0
|| size < 0)
throw new IllegalArgumentException ("position: " + position
- + ", size: " + size);
+ + ", size: " + size);
if (!isOpen ())
throw new ClosedChannelException();
if (shared && ((mode & READ) == 0))
throw new NonReadableChannelException();
-
+
if (!shared && ((mode & WRITE) == 0))
throw new NonWritableChannelException();
}
@@ -479,19 +479,19 @@ public final class FileChannelImpl extends FileChannel
boolean completed = false;
try
{
- begin();
- boolean lockable = ch.lock(position, size, shared, false);
- completed = true;
- return (lockable
- ? new FileLockImpl(this, position, size, shared)
- : null);
+ begin();
+ boolean lockable = ch.lock(position, size, shared, false);
+ completed = true;
+ return (lockable
+ ? new FileLockImpl(this, position, size, shared)
+ : null);
}
finally
{
- end(completed);
+ end(completed);
}
}
-
+
public FileLock lock (long position, long size, boolean shared)
throws IOException
{
@@ -500,15 +500,15 @@ public final class FileChannelImpl extends FileChannel
boolean completed = false;
try
{
- boolean lockable = ch.lock(position, size, shared, true);
- completed = true;
- return (lockable
- ? new FileLockImpl(this, position, size, shared)
- : null);
+ boolean lockable = ch.lock(position, size, shared, true);
+ completed = true;
+ return (lockable
+ ? new FileLockImpl(this, position, size, shared)
+ : null);
}
finally
{
- end(completed);
+ end(completed);
}
}
@@ -520,7 +520,7 @@ public final class FileChannelImpl extends FileChannel
return implPosition ();
}
-
+
public FileChannel position (long newPosition)
throws IOException
{
@@ -535,7 +535,7 @@ public final class FileChannelImpl extends FileChannel
seek (newPosition);
return this;
}
-
+
public FileChannel truncate (long size)
throws IOException
{
@@ -557,9 +557,9 @@ public final class FileChannelImpl extends FileChannel
public String toString()
{
return (super.toString()
- + "[ fd: " + ch.getState()
- + "; mode: " + Integer.toOctalString(mode)
- + "; " + description + " ]");
+ + "[ fd: " + ch.getState()
+ + "; mode: " + Integer.toOctalString(mode)
+ + "; " + description + " ]");
}
/**
diff --git a/gnu/java/nio/FileLockImpl.java b/gnu/java/nio/FileLockImpl.java
index 768906ce9..e714ea358 100644
--- a/gnu/java/nio/FileLockImpl.java
+++ b/gnu/java/nio/FileLockImpl.java
@@ -69,14 +69,14 @@ public final class FileLockImpl extends FileLock
{
try
{
- release();
+ release();
}
catch (IOException e)
{
- // Ignore this.
+ // Ignore this.
}
}
-
+
/**
* Whether or not this lock is valid, false when channel is closed or
* release has been explicitly called.
@@ -95,8 +95,8 @@ public final class FileLockImpl extends FileLock
{
if (isValid())
{
- valid = false;
- ((FileChannelImpl) channel()).unlock(position(), size());
+ valid = false;
+ ((FileChannelImpl) channel()).unlock(position(), size());
}
}
}
diff --git a/gnu/java/nio/InputStreamChannel.java b/gnu/java/nio/InputStreamChannel.java
index a3dffe245..9bdfe3238 100644
--- a/gnu/java/nio/InputStreamChannel.java
+++ b/gnu/java/nio/InputStreamChannel.java
@@ -1,4 +1,4 @@
-/* InputStreamChannel.java --
+/* InputStreamChannel.java --
Copyright (C) 2003 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -51,7 +51,7 @@ public final class InputStreamChannel implements ReadableByteChannel
{
private boolean closed = false;
private InputStream in;
-
+
public InputStreamChannel (InputStream in)
{
super();
@@ -76,7 +76,7 @@ public final class InputStreamChannel implements ReadableByteChannel
{
if (!isOpen())
throw new ClosedChannelException();
-
+
byte[] buffer = new byte [dst.remaining()];
int readBytes = in.read (buffer);
diff --git a/gnu/java/nio/KqueueSelectionKeyImpl.java b/gnu/java/nio/KqueueSelectionKeyImpl.java
index 11b37cadb..9fe6b6613 100644
--- a/gnu/java/nio/KqueueSelectionKeyImpl.java
+++ b/gnu/java/nio/KqueueSelectionKeyImpl.java
@@ -57,12 +57,12 @@ public class KqueueSelectionKeyImpl extends AbstractSelectionKey
/** The selector we were created for. */
private final KqueueSelectorImpl selector;
-
+
/** The channel we are attached to. */
private final SelectableChannel channel;
-
+
private final VMChannelOwner natChannel;
-
+
public KqueueSelectionKeyImpl(KqueueSelectorImpl selector,
SelectableChannel channel)
{
@@ -101,7 +101,7 @@ public class KqueueSelectionKeyImpl extends AbstractSelectionKey
throw new IllegalStateException("key is invalid");
if ((ops & ~channel.validOps()) != 0)
throw new IllegalArgumentException("channel does not support all operations");
-
+
selector.setInterestOps(this, ops);
return this;
}
@@ -123,7 +123,7 @@ public class KqueueSelectionKeyImpl extends AbstractSelectionKey
{
return selector;
}
-
+
public String toString()
{
if (!isValid())
@@ -140,12 +140,12 @@ public class KqueueSelectionKeyImpl extends AbstractSelectionKey
+ ((readyOps & OP_WRITE) != 0 ? " OP_WRITE" : "")
+ " } ]";
}
-
+
public int hashCode()
{
return fd;
}
-
+
public boolean equals(Object o)
{
if (!(o instanceof KqueueSelectionKeyImpl))
@@ -153,8 +153,8 @@ public class KqueueSelectionKeyImpl extends AbstractSelectionKey
KqueueSelectionKeyImpl that = (KqueueSelectionKeyImpl) o;
return that.fd == this.fd && that.channel.equals(this.channel);
}
-
-
+
+
boolean isReadActive()
{
return (activeOps & (OP_READ | OP_ACCEPT)) != 0;
@@ -164,17 +164,17 @@ public class KqueueSelectionKeyImpl extends AbstractSelectionKey
{
return (interestOps & (OP_READ | OP_ACCEPT)) != 0;
}
-
+
boolean isWriteActive()
{
return (activeOps & (OP_WRITE | OP_CONNECT)) != 0;
}
-
+
boolean isWriteInterested()
{
return (interestOps & (OP_WRITE | OP_CONNECT)) != 0;
}
-
+
boolean needCommitRead()
{
return isReadActive() == (!isReadInterested());
diff --git a/gnu/java/nio/KqueueSelectorImpl.java b/gnu/java/nio/KqueueSelectorImpl.java
index 34ca1dc59..e696c0d72 100644
--- a/gnu/java/nio/KqueueSelectorImpl.java
+++ b/gnu/java/nio/KqueueSelectorImpl.java
@@ -70,7 +70,7 @@ public class KqueueSelectorImpl extends AbstractSelector
private static final int MAX_DOUBLING_CAPACITY = 16384;
private static final int CAP_INCREMENT = 1024;
private static final int INITIAL_CAPACITY;
-
+
static
{
try
@@ -88,7 +88,7 @@ public class KqueueSelectorImpl extends AbstractSelector
_sizeof_struct_kevent = -1;
INITIAL_CAPACITY = 16 * _sizeof_struct_kevent;
}
-
+
/**
* Tell if kqueue-based selectors are supported on this system.
*
@@ -96,15 +96,15 @@ public class KqueueSelectorImpl extends AbstractSelector
* compiled in to Classpath.
*/
public static native boolean kqueue_supported();
-
+
/* Our native file descriptor. */
private int kq;
-
+
private HashMap/*<Integer,KqueueSelectionKeyImpl>*/ keys;
private HashSet/*<KqueueSelectionKeyImpl>*/ selected;
private Thread blockedThread;
private ByteBuffer events;
-
+
private static final int OP_ACCEPT = SelectionKey.OP_ACCEPT;
private static final int OP_CONNECT = SelectionKey.OP_CONNECT;
private static final int OP_READ = SelectionKey.OP_READ;
@@ -160,7 +160,7 @@ public class KqueueSelectorImpl extends AbstractSelector
{
if (!isOpen())
throw new ClosedSelectorException();
-
+
return selected;
}
@@ -181,20 +181,20 @@ public class KqueueSelectorImpl extends AbstractSelector
blockedThread.interrupt();
return this;
}
-
+
public String toString()
{
return super.toString() + " [ fd: " + kq + " ]";
}
-
+
public boolean equals(Object o)
{
if (!(o instanceof KqueueSelectorImpl))
return false;
-
+
return ((KqueueSelectorImpl) o).kq == kq;
}
-
+
int doSelect(long timeout) throws IOException
{
Set cancelled = cancelledKeys();
@@ -207,7 +207,7 @@ public class KqueueSelectorImpl extends AbstractSelector
KqueueSelectionKeyImpl key = (KqueueSelectionKeyImpl) it.next();
key.interestOps = 0;
}
-
+
int events_size = (2 * _sizeof_struct_kevent) * keys.size();
int num_events = 0;
@@ -215,7 +215,7 @@ public class KqueueSelectorImpl extends AbstractSelector
{
Map.Entry e = (Map.Entry) it.next();
KqueueSelectionKeyImpl key = (KqueueSelectionKeyImpl) e.getValue();
-
+
SelectableChannel ch = key.channel();
if (ch instanceof VMChannelOwner)
{
@@ -226,7 +226,7 @@ public class KqueueSelectorImpl extends AbstractSelector
continue;
}
}
-
+
// If this key is registering a read filter, add it to the buffer.
if (key.needCommitRead())
{
@@ -235,7 +235,7 @@ public class KqueueSelectorImpl extends AbstractSelector
key.activeOps & (OP_READ | OP_ACCEPT), key.key);
num_events++;
}
-
+
// If this key is registering a write filter, add it to the buffer.
if (key.needCommitWrite())
{
@@ -271,7 +271,7 @@ public class KqueueSelectorImpl extends AbstractSelector
//System.out.println("dump of keys selected:");
//dump_selection_keys((ByteBuffer) events.duplicate().limit(n * _sizeof_struct_kevent));
-
+
// Commit the operations we've just added in the call to kevent.
for (Iterator it = keys.values().iterator(); it.hasNext(); )
{
@@ -288,7 +288,7 @@ public class KqueueSelectorImpl extends AbstractSelector
int y = fetch_key(events.slice());
KqueueSelectionKeyImpl key =
(KqueueSelectionKeyImpl) keys.get(new Integer(y));
-
+
if (key == null)
{
System.out.println("WARNING! no key found for selected key " + y);
@@ -301,7 +301,7 @@ public class KqueueSelectorImpl extends AbstractSelector
key.readyOps = ready_ops(events.slice(), key.interestOps);
selected.add(key);
}
-
+
// Finally, remove the cancelled keys.
for (Iterator it = cancelled.iterator(); it.hasNext(); )
{
@@ -317,7 +317,7 @@ public class KqueueSelectorImpl extends AbstractSelector
}
}
}
-
+
protected SelectionKey register(AbstractSelectableChannel channel,
int interestOps,
Object attachment)
@@ -336,7 +336,7 @@ public class KqueueSelectorImpl extends AbstractSelector
{
throw new IllegalArgumentException("channel is closed or invalid");
}
-
+
KqueueSelectionKeyImpl result = new KqueueSelectionKeyImpl(this, channel);
result.interestOps = interestOps;
result.attach(attachment);
@@ -351,7 +351,7 @@ public class KqueueSelectorImpl extends AbstractSelector
}
return result;
}
-
+
void setInterestOps(KqueueSelectionKeyImpl key, int ops)
{
synchronized (keys)
@@ -359,11 +359,11 @@ public class KqueueSelectorImpl extends AbstractSelector
key.interestOps = ops;
}
}
-
+
/**
* Reallocate the events buffer. This is the destination buffer for
* events returned by kevent. This method will:
- *
+ *
* * Grow the buffer if there is insufficent space for all registered
* events.
* * Shrink the buffer if it is more than twice the size needed.
@@ -380,7 +380,7 @@ public class KqueueSelectorImpl extends AbstractSelector
cap += CAP_INCREMENT;
else
cap = cap << 1;
-
+
events = ByteBuffer.allocateDirect(cap);
}
else if (events.capacity() > 4 * (_sizeof_struct_kevent) * keys.size() + 1
@@ -392,12 +392,12 @@ public class KqueueSelectorImpl extends AbstractSelector
}
}
}
-
+
//synchronized void updateOps(KqueueSelectionKeyImpl key, int interestOps)
//{
// updateOps(key, interestOps, 0, false);
//}
-
+
/*void updateOps(KqueueSelectionKeyImpl key, int interestOps,
int activeOps, int fd)
{
@@ -437,25 +437,25 @@ public class KqueueSelectorImpl extends AbstractSelector
+ " }");
}
}
-
+
/**
* Return the size of a <code>struct kevent</code> on this system.
*
* @return The size of <code>struct kevent</code>.
*/
private static native int sizeof_struct_kevent();
-
+
/**
* Opens a kqueue descriptor.
- *
+ *
* @return The new kqueue descriptor.
* @throws IOException If opening fails.
*/
private static native int implOpen() throws IOException;
-
+
/**
* Closes the kqueue file descriptor.
- *
+ *
* @param kq The kqueue file descriptor.
* @throws IOException
*/
@@ -474,7 +474,7 @@ public class KqueueSelectorImpl extends AbstractSelector
*/
private static native void kevent_set(ByteBuffer nstate, int i, int fd,
int interestOps, int activeOps, int key);
-
+
/**
* Poll for events. The source events are stored in <code>events</code>,
* which is also where polled events will be placed.
@@ -490,7 +490,7 @@ public class KqueueSelectorImpl extends AbstractSelector
*/
private static native int kevent(int kq, ByteBuffer events, int nevents,
int nout, long timeout);
-
+
/**
* Fetch a polled key from a native state buffer. For each kevent key we
* create, we put the native state info (one or more <code>struct
@@ -503,7 +503,7 @@ public class KqueueSelectorImpl extends AbstractSelector
* @return The key object.
*/
private static native int fetch_key(ByteBuffer nstate);
-
+
/**
* Fetch the ready ops of the associated native state. That is, this
* inspects the first argument as a <code>struct kevent</code>, looking
@@ -516,7 +516,7 @@ public class KqueueSelectorImpl extends AbstractSelector
* @return The bit set representing the ready operations.
*/
private static native int ready_ops(ByteBuffer nstate, int interestOps);
-
+
/**
* Check if kevent returned EV_EOF for a selection key.
*
diff --git a/gnu/java/nio/NIODatagramSocket.java b/gnu/java/nio/NIODatagramSocket.java
index f23236eca..b0c7b2dc2 100644
--- a/gnu/java/nio/NIODatagramSocket.java
+++ b/gnu/java/nio/NIODatagramSocket.java
@@ -1,4 +1,4 @@
-/* NIODatagramSocket.java --
+/* NIODatagramSocket.java --
Copyright (C) 2003 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -50,7 +50,7 @@ public final class NIODatagramSocket extends DatagramSocket
{
private PlainDatagramSocketImpl impl;
private DatagramChannelImpl channel;
-
+
public NIODatagramSocket (PlainDatagramSocketImpl impl,
DatagramChannelImpl channel)
{
diff --git a/gnu/java/nio/NIOServerSocket.java b/gnu/java/nio/NIOServerSocket.java
index fc4d0dbe0..5dbda6b00 100644
--- a/gnu/java/nio/NIOServerSocket.java
+++ b/gnu/java/nio/NIOServerSocket.java
@@ -1,4 +1,4 @@
-/* NIOServerSocket.java --
+/* NIOServerSocket.java --
Copyright (C) 2003, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -55,7 +55,7 @@ import java.security.PrivilegedExceptionAction;
public final class NIOServerSocket extends ServerSocket
{
private ServerSocketChannelImpl channel;
-
+
protected NIOServerSocket (ServerSocketChannelImpl channel)
throws IOException
{
@@ -67,24 +67,24 @@ public final class NIOServerSocket extends ServerSocket
{
try
{
- final Object t = this;
- final Method method = ServerSocket.class.getDeclaredMethod("getImpl", new Class[0]);
- method.setAccessible(true);
- PrivilegedExceptionAction action = new PrivilegedExceptionAction()
- {
- public Object run() throws Exception
- {
- return method.invoke(t, new Object[0]);
- }
- };
- return (PlainSocketImpl) AccessController.doPrivileged(action);
+ final Object t = this;
+ final Method method = ServerSocket.class.getDeclaredMethod("getImpl", new Class[0]);
+ method.setAccessible(true);
+ PrivilegedExceptionAction action = new PrivilegedExceptionAction()
+ {
+ public Object run() throws Exception
+ {
+ return method.invoke(t, new Object[0]);
+ }
+ };
+ return (PlainSocketImpl) AccessController.doPrivileged(action);
}
catch (Exception e)
{
- // This should never happen.
- Error error = new InternalError("unable to invoke method ServerSocket.getImpl()");
- error.initCause(e);
- throw error;
+ // This should never happen.
+ Error error = new InternalError("unable to invoke method ServerSocket.getImpl()");
+ error.initCause(e);
+ throw error;
}
}
diff --git a/gnu/java/nio/NIOSocket.java b/gnu/java/nio/NIOSocket.java
index 87574e491..a421e019a 100644
--- a/gnu/java/nio/NIOSocket.java
+++ b/gnu/java/nio/NIOSocket.java
@@ -1,4 +1,4 @@
-/* NIOSocket.java --
+/* NIOSocket.java --
Copyright (C) 2003 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -48,7 +48,7 @@ import java.nio.channels.SocketChannel;
public final class NIOSocket extends Socket
{
private SocketChannelImpl channel;
-
+
protected NIOSocket (SocketChannelImpl channel)
throws IOException
{
@@ -66,12 +66,12 @@ public final class NIOSocket extends Socket
// this.impl = channel.getPlainSocketImpl();
// this.channel = channel;
//}
-
+
public final SocketChannel getChannel()
{
return channel;
}
-
+
public boolean isConnected()
{
return channel.isConnected();
diff --git a/gnu/java/nio/NIOSocketImpl.java b/gnu/java/nio/NIOSocketImpl.java
index 4b26561a2..15cc07dc8 100644
--- a/gnu/java/nio/NIOSocketImpl.java
+++ b/gnu/java/nio/NIOSocketImpl.java
@@ -50,7 +50,7 @@ public class NIOSocketImpl extends PlainSocketImpl
{
private final SocketChannelImpl channel;
-
+
NIOSocketImpl(SocketChannelImpl channel) throws IOException
{
this.channel = channel;
diff --git a/gnu/java/nio/OutputStreamChannel.java b/gnu/java/nio/OutputStreamChannel.java
index 8167426b0..ac2e7888d 100644
--- a/gnu/java/nio/OutputStreamChannel.java
+++ b/gnu/java/nio/OutputStreamChannel.java
@@ -1,4 +1,4 @@
-/* OutputStreamChannel.java --
+/* OutputStreamChannel.java --
Copyright (C) 2003 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -51,11 +51,11 @@ public final class OutputStreamChannel implements WritableByteChannel
{
private boolean closed = false;
private OutputStream out;
-
+
public OutputStreamChannel (OutputStream out)
{
super();
-
+
this.out = out;
}
@@ -72,12 +72,12 @@ public final class OutputStreamChannel implements WritableByteChannel
{
return !closed;
}
-
+
public int write (ByteBuffer src) throws IOException
{
if (!isOpen())
throw new ClosedChannelException();
-
+
int len = src.remaining();
byte[] buffer = new byte [len];
src.get (buffer);
diff --git a/gnu/java/nio/PipeImpl.java b/gnu/java/nio/PipeImpl.java
index 8a95b9622..143af1a24 100644
--- a/gnu/java/nio/PipeImpl.java
+++ b/gnu/java/nio/PipeImpl.java
@@ -1,4 +1,4 @@
-/* PipeImpl.java --
+/* PipeImpl.java --
Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -49,7 +49,7 @@ class PipeImpl extends Pipe
implements VMChannelOwner
{
private VMChannel vmch;
-
+
public SourceChannelImpl (SelectorProvider selectorProvider,
VMChannel channel)
{
@@ -82,18 +82,18 @@ class PipeImpl extends Pipe
}
public final synchronized long read (ByteBuffer[] srcs, int offset,
- int len)
+ int len)
throws IOException
{
if (offset < 0
- || offset > srcs.length
- || len < 0
- || len > srcs.length - offset)
- throw new IndexOutOfBoundsException();
+ || offset > srcs.length
+ || len < 0
+ || len > srcs.length - offset)
+ throw new IndexOutOfBoundsException();
return vmch.readScattering(srcs, offset, len);
}
-
+
public VMChannel getVMChannel()
{
return vmch;
@@ -104,7 +104,7 @@ class PipeImpl extends Pipe
implements VMChannelOwner
{
private VMChannel vmch;
-
+
public SinkChannelImpl (SelectorProvider selectorProvider,
VMChannel channel)
{
@@ -140,14 +140,14 @@ class PipeImpl extends Pipe
throws IOException
{
if (offset < 0
- || offset > srcs.length
- || len < 0
- || len > srcs.length - offset)
- throw new IndexOutOfBoundsException();
-
+ || offset > srcs.length
+ || len < 0
+ || len > srcs.length - offset)
+ throw new IndexOutOfBoundsException();
+
return vmch.writeGathering(srcs, offset, len);
}
-
+
public VMChannel getVMChannel()
{
return vmch;
@@ -156,7 +156,7 @@ class PipeImpl extends Pipe
private SinkChannelImpl sink;
private SourceChannelImpl source;
-
+
public PipeImpl (SelectorProvider provider)
throws IOException
{
diff --git a/gnu/java/nio/SelectionKeyImpl.java b/gnu/java/nio/SelectionKeyImpl.java
index c927f3196..a26ff8726 100644
--- a/gnu/java/nio/SelectionKeyImpl.java
+++ b/gnu/java/nio/SelectionKeyImpl.java
@@ -1,4 +1,4 @@
-/* SelectionKeyImpl.java --
+/* SelectionKeyImpl.java --
Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -65,7 +65,7 @@ public abstract class SelectionKeyImpl extends AbstractSelectionKey
{
if (!isValid())
throw new CancelledKeyException();
-
+
return readyOps;
}
@@ -73,7 +73,7 @@ public abstract class SelectionKeyImpl extends AbstractSelectionKey
{
if (!isValid())
throw new CancelledKeyException();
-
+
readyOps = ops;
return this;
}
@@ -82,10 +82,10 @@ public abstract class SelectionKeyImpl extends AbstractSelectionKey
{
if (!isValid())
throw new CancelledKeyException();
-
+
synchronized (impl.selectedKeys())
{
- return interestOps;
+ return interestOps;
}
}
@@ -96,11 +96,11 @@ public abstract class SelectionKeyImpl extends AbstractSelectionKey
synchronized (impl.selectedKeys())
{
- interestOps = ops;
+ interestOps = ops;
}
return this;
}
-
+
public Selector selector ()
{
return impl;
diff --git a/gnu/java/nio/SelectorImpl.java b/gnu/java/nio/SelectorImpl.java
index c08478c99..21238f20f 100644
--- a/gnu/java/nio/SelectorImpl.java
+++ b/gnu/java/nio/SelectorImpl.java
@@ -1,4 +1,4 @@
-/* SelectorImpl.java --
+/* SelectorImpl.java --
Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -62,12 +62,12 @@ public class SelectorImpl extends AbstractSelector
* selectThread and unhandledWakeup fields.
*/
private Object selectThreadMutex = new Object ();
-
+
/**
* Any thread that's currently blocked in a select operation.
*/
private Thread selectThread;
-
+
/**
* Indicates whether we have an unhandled wakeup call. This can
* be due to either wakeup() triggering a thread interruption while
@@ -82,7 +82,7 @@ public class SelectorImpl extends AbstractSelector
public SelectorImpl (SelectorProvider provider)
{
super (provider);
-
+
keys = new HashSet<SelectionKey> ();
selected = new HashSet<SelectionKey> ();
}
@@ -97,7 +97,7 @@ public class SelectorImpl extends AbstractSelector
{
// Cancel any pending select operation.
wakeup();
-
+
synchronized (keys)
{
synchronized (selected)
@@ -117,7 +117,7 @@ public class SelectorImpl extends AbstractSelector
return Collections.unmodifiableSet (keys);
}
-
+
public final int selectNow()
throws IOException
{
@@ -174,7 +174,7 @@ public class SelectorImpl extends AbstractSelector
{
if (!isOpen())
throw new ClosedSelectorException();
-
+
synchronized (keys)
{
synchronized (selected)
@@ -199,7 +199,7 @@ public class SelectorImpl extends AbstractSelector
// FIXME: Not sure from the spec at what point we should
// return "immediately". Is it here or immediately upon
// entry to this function?
-
+
// NOTE: There's a possibility of another thread calling
// wakeup() immediately after our thread releases
// selectThreadMutex's monitor here, in which case we'll
@@ -285,18 +285,18 @@ public class SelectorImpl extends AbstractSelector
// Set new ready write ops
for (int i = 0; i < write.length; i++)
{
- if (key.getNativeFD() == write[i])
- {
- if (key.channel() instanceof SocketChannel)
- {
- if (((SocketChannel) key.channel ()).isConnected ())
- ops = ops | SelectionKey.OP_WRITE;
- else
- ops = ops | SelectionKey.OP_CONNECT;
- }
- else
- ops = ops | SelectionKey.OP_WRITE;
- }
+ if (key.getNativeFD() == write[i])
+ {
+ if (key.channel() instanceof SocketChannel)
+ {
+ if (((SocketChannel) key.channel ()).isConnected ())
+ ops = ops | SelectionKey.OP_WRITE;
+ else
+ ops = ops | SelectionKey.OP_CONNECT;
+ }
+ else
+ ops = ops | SelectionKey.OP_WRITE;
+ }
}
// FIXME: We dont handle exceptional file descriptors yet.
@@ -311,12 +311,12 @@ public class SelectorImpl extends AbstractSelector
key.readyOps (key.interestOps () & ops);
}
deregisterCancelledKeys();
-
+
return result;
}
}
}
-
+
public final Set<SelectionKey> selectedKeys()
{
if (!isOpen())
@@ -332,19 +332,19 @@ public class SelectorImpl extends AbstractSelector
// do the reverse under the covers: wakeup triggers a thread
// interrupt followed by a subsequent reset of the thread's
// interrupt status within select().
-
+
// First, acquire the monitor of the object regulating
// access to our selectThread and unhandledWakeup fields.
synchronized (selectThreadMutex)
{
unhandledWakeup = true;
-
+
// Interrupt any thread which is currently blocked in
// a select operation.
if (selectThread != null)
selectThread.interrupt ();
}
-
+
return this;
}
@@ -372,7 +372,7 @@ public class SelectorImpl extends AbstractSelector
Object att)
{
SelectionKeyImpl result;
-
+
if (ch instanceof SocketChannelImpl)
result = new SocketChannelSelectionKey (ch, this);
else if (ch instanceof DatagramChannelImpl)
@@ -388,8 +388,8 @@ public class SelectorImpl extends AbstractSelector
{
keys.add (result);
- result.interestOps (ops);
- result.attach (att);
+ result.interestOps (ops);
+ result.attach (att);
}
return result;
diff --git a/gnu/java/nio/SelectorProviderImpl.java b/gnu/java/nio/SelectorProviderImpl.java
index 0c509b985..a205bbd61 100644
--- a/gnu/java/nio/SelectorProviderImpl.java
+++ b/gnu/java/nio/SelectorProviderImpl.java
@@ -1,4 +1,4 @@
-/* SelectorProviderImpl.java --
+/* SelectorProviderImpl.java --
Copyright (C) 2002, 2003 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -54,7 +54,7 @@ public class SelectorProviderImpl extends SelectorProvider
private static final String SELECTOR_IMPL_EPOLL = "epoll";
private static final String SELECTOR_IMPL = "gnu.java.nio.selectorImpl";
private static boolean epoll_failed = false;
-
+
public SelectorProviderImpl ()
{
}
@@ -70,7 +70,7 @@ public class SelectorProviderImpl extends SelectorProvider
{
return new PipeImpl (this);
}
-
+
public AbstractSelector openSelector ()
throws IOException
{
diff --git a/gnu/java/nio/ServerSocketChannelImpl.java b/gnu/java/nio/ServerSocketChannelImpl.java
index 0128661e5..567fc90c7 100644
--- a/gnu/java/nio/ServerSocketChannelImpl.java
+++ b/gnu/java/nio/ServerSocketChannelImpl.java
@@ -1,4 +1,4 @@
-/* ServerSocketChannelImpl.java --
+/* ServerSocketChannelImpl.java --
Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -97,7 +97,7 @@ public final class ServerSocketChannelImpl extends ServerSocketChannel
throw new NotYetBoundException();
boolean completed = false;
-
+
try
{
begin();
@@ -120,7 +120,7 @@ public final class ServerSocketChannelImpl extends ServerSocketChannel
{
return serverSocket;
}
-
+
public VMChannel getVMChannel()
{
return channel;
diff --git a/gnu/java/nio/ServerSocketChannelSelectionKey.java b/gnu/java/nio/ServerSocketChannelSelectionKey.java
index 5b510cb6f..a4b2891a2 100644
--- a/gnu/java/nio/ServerSocketChannelSelectionKey.java
+++ b/gnu/java/nio/ServerSocketChannelSelectionKey.java
@@ -1,4 +1,4 @@
-/* ServerSocketChannelSelectionKey.java --
+/* ServerSocketChannelSelectionKey.java --
Copyright (C) 2003 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/gnu/java/nio/SocketChannelImpl.java b/gnu/java/nio/SocketChannelImpl.java
index 9564592e0..0bb378c64 100644
--- a/gnu/java/nio/SocketChannelImpl.java
+++ b/gnu/java/nio/SocketChannelImpl.java
@@ -1,4 +1,4 @@
-/* SocketChannelImpl.java --
+/* SocketChannelImpl.java --
Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -62,7 +62,7 @@ public final class SocketChannelImpl extends SocketChannel
private boolean connectionPending;
private boolean connected;
private InetSocketAddress connectAddress;
-
+
public SocketChannelImpl(boolean create) throws IOException
{
// XXX consider adding security check; this is used by
@@ -74,7 +74,7 @@ public final class SocketChannelImpl extends SocketChannel
{
this(new SelectorProviderImpl(), channel, false);
}
-
+
SocketChannelImpl(SelectorProvider provider) throws IOException
{
this(provider, true);
@@ -85,7 +85,7 @@ public final class SocketChannelImpl extends SocketChannel
{
this(provider, new VMChannel(), create);
}
-
+
SocketChannelImpl(SelectorProvider provider, VMChannel channel, boolean create)
throws IOException
{
@@ -96,7 +96,7 @@ public final class SocketChannelImpl extends SocketChannel
socket = new NIOSocket(this);
configureBlocking(true);
}
-
+
/*SocketChannelImpl (SelectorProvider provider,
NIOSocket socket)
throws IOException
@@ -133,18 +133,18 @@ public final class SocketChannelImpl extends SocketChannel
protected void implConfigureBlocking (boolean blocking) throws IOException
{
channel.setBlocking(blocking);
- }
+ }
public boolean connect (SocketAddress remote) throws IOException
{
return connect(remote, 0);
}
-
+
public boolean connect (SocketAddress remote, int timeout) throws IOException
{
if (!isOpen())
throw new ClosedChannelException();
-
+
if (isConnected())
throw new AlreadyConnectedException();
@@ -153,12 +153,12 @@ public final class SocketChannelImpl extends SocketChannel
if (!(remote instanceof InetSocketAddress))
throw new UnsupportedAddressTypeException();
-
+
connectAddress = (InetSocketAddress) remote;
if (connectAddress.isUnresolved())
throw new UnresolvedAddressException();
-
+
connected = channel.connect(connectAddress, timeout);
connectionPending = !connected;
return connected;
@@ -176,10 +176,10 @@ public final class SocketChannelImpl extends SocketChannel
connectionPending = false;
return true;
}
-
+
if (!connectionPending)
throw new NoConnectionPendingException();
-
+
return false;
}
@@ -200,12 +200,12 @@ public final class SocketChannelImpl extends SocketChannel
return false;
}
}
-
+
public boolean isConnectionPending ()
{
return connectionPending;
}
-
+
public Socket socket ()
{
return socket;
@@ -215,25 +215,25 @@ public final class SocketChannelImpl extends SocketChannel
{
if (!isConnected())
throw new NotYetConnectedException();
-
+
return channel.read(dst);
}
-
+
public long read (ByteBuffer[] dsts, int offset, int length)
throws IOException
{
if (!isConnected())
throw new NotYetConnectedException();
-
+
if ((offset < 0)
|| (offset > dsts.length)
|| (length < 0)
|| (length > (dsts.length - offset)))
throw new IndexOutOfBoundsException();
-
+
return channel.readScattering(dsts, offset, length);
}
-
+
public int write(ByteBuffer src) throws IOException
{
if (!isConnected())
@@ -247,7 +247,7 @@ public final class SocketChannelImpl extends SocketChannel
{
if (!isConnected())
throw new NotYetConnectedException();
-
+
if ((offset < 0)
|| (offset > srcs.length)
|| (length < 0)
@@ -256,7 +256,7 @@ public final class SocketChannelImpl extends SocketChannel
return channel.writeGathering(srcs, offset, length);
}
-
+
public VMChannel getVMChannel()
{
// XXX security check?
diff --git a/gnu/java/nio/SocketChannelSelectionKey.java b/gnu/java/nio/SocketChannelSelectionKey.java
index 9ceebdec9..100368995 100644
--- a/gnu/java/nio/SocketChannelSelectionKey.java
+++ b/gnu/java/nio/SocketChannelSelectionKey.java
@@ -1,4 +1,4 @@
-/* SocketChannelSelectionKey.java --
+/* SocketChannelSelectionKey.java --
Copyright (C) 2003 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -49,7 +49,7 @@ public final class SocketChannelSelectionKey
{
super (channel, selector);
}
-
+
// FIXME don't use file descriptor integers
public int getNativeFD()
{
diff --git a/gnu/java/nio/SocketChannelSelectionKeyImpl.java b/gnu/java/nio/SocketChannelSelectionKeyImpl.java
index 7557e28c4..786aa361e 100644
--- a/gnu/java/nio/SocketChannelSelectionKeyImpl.java
+++ b/gnu/java/nio/SocketChannelSelectionKeyImpl.java
@@ -49,7 +49,7 @@ public class SocketChannelSelectionKeyImpl extends SelectionKeyImpl
{
SocketChannelImpl ch;
-
+
/**
* @param ch
* @param impl
diff --git a/gnu/java/nio/VMChannelOwner.java b/gnu/java/nio/VMChannelOwner.java
index 363dea2b2..87cbc1e94 100644
--- a/gnu/java/nio/VMChannelOwner.java
+++ b/gnu/java/nio/VMChannelOwner.java
@@ -50,7 +50,7 @@ interface VMChannelOwner
{
/**
* Return the underlying platform-specific Channel instance.
- *
+ *
* @return The platform channel object.
*/
VMChannel getVMChannel();
diff --git a/gnu/java/nio/charset/ByteCharset.java b/gnu/java/nio/charset/ByteCharset.java
index 043c804b7..60d06fc4b 100644
--- a/gnu/java/nio/charset/ByteCharset.java
+++ b/gnu/java/nio/charset/ByteCharset.java
@@ -47,10 +47,10 @@ import java.nio.charset.CoderResult;
/**
* A generic encoding framework for single-byte encodings, utilizing a look-up
* table.
- *
+ *
* This replaces the gnu.java.io.EncoderEightBitLookup class, created by Aron
* Renn.
- *
+ *
* @author Sven de Marothy
* @modified Ian Rogers
*/
@@ -96,7 +96,7 @@ abstract class ByteCharset extends Charset
{
/** Lookup of byte to char mappings */
private final char[] lookup;
-
+
/** Helper to decode loops */
private final ByteDecodeLoopHelper helper = new ByteDecodeLoopHelper()
{
@@ -109,7 +109,7 @@ abstract class ByteCharset extends Charset
return lookup[(int) (b & 0xFF)];
}
};
-
+
// Package-private to avoid a trampoline constructor.
Decoder(ByteCharset cs)
{
@@ -127,7 +127,7 @@ abstract class ByteCharset extends Charset
{
/** Lookup of char to byte mappings */
private final byte[] lookup;
-
+
/** Helper to encode loops */
private final ByteEncodeLoopHelper helper = new ByteEncodeLoopHelper()
{
@@ -140,7 +140,7 @@ abstract class ByteCharset extends Charset
return lookup[c];
}
};
-
+
// Package-private to avoid a trampoline constructor.
Encoder(ByteCharset cs)
{
diff --git a/gnu/java/nio/charset/ByteDecodeLoopHelper.java b/gnu/java/nio/charset/ByteDecodeLoopHelper.java
index a1eb5e206..76dc20913 100644
--- a/gnu/java/nio/charset/ByteDecodeLoopHelper.java
+++ b/gnu/java/nio/charset/ByteDecodeLoopHelper.java
@@ -43,7 +43,7 @@ import java.nio.charset.CoderResult;
/**
* Helper class to deal with decoding loops that read a byte at a time
- *
+ *
* @author Ian Rogers
*/
public abstract class ByteDecodeLoopHelper
@@ -61,7 +61,7 @@ public abstract class ByteDecodeLoopHelper
/**
* Encodes one or more characters into one or more bytes, mapping each
* character to only one byte
- *
+ *
* @param in character buffer to read from
* @param out byte buffer to write to
* @return the result state of the encoder
@@ -120,7 +120,7 @@ public abstract class ByteDecodeLoopHelper
int outRemaining = out.remaining();
CoderResult result;
- bailOut:
+ bailOut:
if (inRemaining <= outRemaining)
{
for (int i = 0; i < inRemaining; i++)
@@ -131,7 +131,7 @@ public abstract class ByteDecodeLoopHelper
{
inPos--;
result = CoderResult.unmappableForLength(1);
- break bailOut;
+ break bailOut;
}
char c = mapToChar(b);
outArray[outPos] = c;
@@ -149,7 +149,7 @@ public abstract class ByteDecodeLoopHelper
{
inPos--;
result = CoderResult.unmappableForLength(1);
- break bailOut;
+ break bailOut;
}
char c = mapToChar(b);
outArray[outPos] = c;
diff --git a/gnu/java/nio/charset/ByteEncodeLoopHelper.java b/gnu/java/nio/charset/ByteEncodeLoopHelper.java
index b1a4f10da..60e6d9bb0 100644
--- a/gnu/java/nio/charset/ByteEncodeLoopHelper.java
+++ b/gnu/java/nio/charset/ByteEncodeLoopHelper.java
@@ -43,7 +43,7 @@ import java.nio.charset.CoderResult;
/**
* Helper class to deal with encoding loops that write a byte at a time
- *
+ *
* @author Ian Rogers
*/
public abstract class ByteEncodeLoopHelper
@@ -62,7 +62,7 @@ public abstract class ByteEncodeLoopHelper
/**
* Encodes one or more characters into one or more bytes, mapping each
* character to only one byte
- *
+ *
* @param in character buffer to read from
* @param out byte buffer to write to
* @return the result state of the encoder
@@ -121,7 +121,7 @@ public abstract class ByteEncodeLoopHelper
int outRemaining = out.remaining();
CoderResult result;
- bailOut:
+ bailOut:
if (inRemaining <= outRemaining)
{
for (int i = 0; i < inRemaining; i++)
diff --git a/gnu/java/nio/charset/Cp424.java b/gnu/java/nio/charset/Cp424.java
index 44e1eba4f..14915bf47 100644
--- a/gnu/java/nio/charset/Cp424.java
+++ b/gnu/java/nio/charset/Cp424.java
@@ -45,38 +45,38 @@ public final class Cp424 extends ByteCharset
*/
private static final char[] lookup =
{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x009C, 0x0009, 0x0086, 0x007F,
- 0x0097, 0x008D, 0x008E, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x009D, 0x0085, 0x0008, 0x0087,
- 0x0018, 0x0019, 0x0092, 0x008F, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x000A, 0x0017, 0x001B,
- 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x0005, 0x0006, 0x0007,
- 0x0090, 0x0091, 0x0016, 0x0093, 0x0094, 0x0095, 0x0096, 0x0004,
- 0x0098, 0x0099, 0x009A, 0x009B, 0x0014, 0x0015, 0x009E, 0x001A,
- 0x0020, 0x05D0, 0x05D1, 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6,
- 0x05D7, 0x05D8, 0x00A2, 0x002E, 0x003C, 0x0028, 0x002B, 0x007C,
- 0x0026, 0x05D9, 0x05DA, 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF,
- 0x05E0, 0x05E1, 0x0021, 0x0024, 0x002A, 0x0029, 0x003B, 0x00AC,
- 0x002D, 0x002F, 0x05E2, 0x05E3, 0x05E4, 0x05E5, 0x05E6, 0x05E7,
- 0x05E8, 0x05E9, 0x00A6, 0x002C, 0x0025, 0x005F, 0x003E, 0x003F,
- NONE, 0x05EA, NONE, NONE, 0x00A0, NONE, NONE, NONE,
- 0x2017, 0x0060, 0x003A, 0x0023, 0x0040, 0x0027, 0x003D, 0x0022,
- NONE, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x00AB, 0x00BB, NONE, NONE, NONE, 0x00B1,
- 0x00B0, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F, 0x0070,
- 0x0071, 0x0072, NONE, NONE, NONE, 0x00B8, NONE, 0x00A4,
- 0x00B5, 0x007E, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078,
- 0x0079, 0x007A, NONE, NONE, NONE, NONE, NONE, 0x00AE,
- 0x005E, 0x00A3, 0x00A5, 0x00B7, 0x00A9, 0x00A7, 0x00B6, 0x00BC,
- 0x00BD, 0x00BE, 0x005B, 0x005D, 0x00AF, 0x00A8, 0x00B4, 0x00D7,
- 0x007B, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x00AD, NONE, NONE, NONE, NONE, NONE,
- 0x007D, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F, 0x0050,
- 0x0051, 0x0052, 0x00B9, NONE, NONE, NONE, NONE, NONE,
- 0x005C, 0x00F7, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058,
- 0x0059, 0x005A, 0x00B2, NONE, NONE, NONE, NONE, NONE,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x00B3, NONE, NONE, NONE, NONE, 0x009F
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x009C, 0x0009, 0x0086, 0x007F,
+ 0x0097, 0x008D, 0x008E, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x009D, 0x0085, 0x0008, 0x0087,
+ 0x0018, 0x0019, 0x0092, 0x008F, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x000A, 0x0017, 0x001B,
+ 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x0005, 0x0006, 0x0007,
+ 0x0090, 0x0091, 0x0016, 0x0093, 0x0094, 0x0095, 0x0096, 0x0004,
+ 0x0098, 0x0099, 0x009A, 0x009B, 0x0014, 0x0015, 0x009E, 0x001A,
+ 0x0020, 0x05D0, 0x05D1, 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6,
+ 0x05D7, 0x05D8, 0x00A2, 0x002E, 0x003C, 0x0028, 0x002B, 0x007C,
+ 0x0026, 0x05D9, 0x05DA, 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF,
+ 0x05E0, 0x05E1, 0x0021, 0x0024, 0x002A, 0x0029, 0x003B, 0x00AC,
+ 0x002D, 0x002F, 0x05E2, 0x05E3, 0x05E4, 0x05E5, 0x05E6, 0x05E7,
+ 0x05E8, 0x05E9, 0x00A6, 0x002C, 0x0025, 0x005F, 0x003E, 0x003F,
+ NONE, 0x05EA, NONE, NONE, 0x00A0, NONE, NONE, NONE,
+ 0x2017, 0x0060, 0x003A, 0x0023, 0x0040, 0x0027, 0x003D, 0x0022,
+ NONE, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+ 0x0068, 0x0069, 0x00AB, 0x00BB, NONE, NONE, NONE, 0x00B1,
+ 0x00B0, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F, 0x0070,
+ 0x0071, 0x0072, NONE, NONE, NONE, 0x00B8, NONE, 0x00A4,
+ 0x00B5, 0x007E, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078,
+ 0x0079, 0x007A, NONE, NONE, NONE, NONE, NONE, 0x00AE,
+ 0x005E, 0x00A3, 0x00A5, 0x00B7, 0x00A9, 0x00A7, 0x00B6, 0x00BC,
+ 0x00BD, 0x00BE, 0x005B, 0x005D, 0x00AF, 0x00A8, 0x00B4, 0x00D7,
+ 0x007B, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
+ 0x0048, 0x0049, 0x00AD, NONE, NONE, NONE, NONE, NONE,
+ 0x007D, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F, 0x0050,
+ 0x0051, 0x0052, 0x00B9, NONE, NONE, NONE, NONE, NONE,
+ 0x005C, 0x00F7, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058,
+ 0x0059, 0x005A, 0x00B2, NONE, NONE, NONE, NONE, NONE,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+ 0x0038, 0x0039, 0x00B3, NONE, NONE, NONE, NONE, 0x009F
};
public Cp424() {
diff --git a/gnu/java/nio/charset/Cp437.java b/gnu/java/nio/charset/Cp437.java
index e38a48257..f60c3add2 100644
--- a/gnu/java/nio/charset/Cp437.java
+++ b/gnu/java/nio/charset/Cp437.java
@@ -43,40 +43,40 @@ public final class Cp437 extends ByteCharset
/**
* This is the lookup table for this encoding
*/
- private static final char[] lookup =
+ private static final char[] lookup =
{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7,
- 0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x00EC, 0x00C4, 0x00C5,
- 0x00C9, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00F2, 0x00FB, 0x00F9,
- 0x00FF, 0x00D6, 0x00DC, 0x00A2, 0x00A3, 0x00A5, 0x20A7, 0x0192,
- 0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00F1, 0x00D1, 0x00AA, 0x00BA,
- 0x00BF, 0x2310, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00BB,
- 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556,
- 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510,
- 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F,
- 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567,
- 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B,
- 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580,
- 0x03B1, 0x00DF, 0x0393, 0x03C0, 0x03A3, 0x03C3, 0x00B5, 0x03C4,
- 0x03A6, 0x0398, 0x03A9, 0x03B4, 0x221E, 0x03C6, 0x03B5, 0x2229,
- 0x2261, 0x00B1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00F7, 0x2248,
- 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+ 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+ 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
+ 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+ 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
+ 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
+ 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+ 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+ 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7,
+ 0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x00EC, 0x00C4, 0x00C5,
+ 0x00C9, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00F2, 0x00FB, 0x00F9,
+ 0x00FF, 0x00D6, 0x00DC, 0x00A2, 0x00A3, 0x00A5, 0x20A7, 0x0192,
+ 0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00F1, 0x00D1, 0x00AA, 0x00BA,
+ 0x00BF, 0x2310, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00BB,
+ 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556,
+ 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510,
+ 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F,
+ 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567,
+ 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B,
+ 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580,
+ 0x03B1, 0x00DF, 0x0393, 0x03C0, 0x03A3, 0x03C3, 0x00B5, 0x03C4,
+ 0x03A6, 0x0398, 0x03A9, 0x03B4, 0x221E, 0x03C6, 0x03B5, 0x2229,
+ 0x2261, 0x00B1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00F7, 0x2248,
+ 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0
};
public Cp437()
diff --git a/gnu/java/nio/charset/Cp737.java b/gnu/java/nio/charset/Cp737.java
index 2187987ea..5dbd4a463 100644
--- a/gnu/java/nio/charset/Cp737.java
+++ b/gnu/java/nio/charset/Cp737.java
@@ -43,45 +43,45 @@ public final class Cp737 extends ByteCharset
/**
* This is the lookup table for this encoding
*/
- private static final char[] lookup =
+ private static final char[] lookup =
{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x0398,
- 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F, 0x03A0,
- 0x03A1, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7, 0x03A8, 0x03A9,
- 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7, 0x03B8,
- 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF, 0x03C0,
- 0x03C1, 0x03C3, 0x03C2, 0x03C4, 0x03C5, 0x03C6, 0x03C7, 0x03C8,
- 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556,
- 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510,
- 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F,
- 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567,
- 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B,
- 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580,
- 0x03C9, 0x03AC, 0x03AD, 0x03AE, 0x03CA, 0x03AF, 0x03CC, 0x03CD,
- 0x03CB, 0x03CE, 0x0386, 0x0388, 0x0389, 0x038A, 0x038C, 0x038E,
- 0x038F, 0x00B1, 0x2265, 0x2264, 0x03AA, 0x03AB, 0x00F7, 0x2248,
- 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+ 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+ 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
+ 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+ 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
+ 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
+ 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+ 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+ 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x0398,
+ 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F, 0x03A0,
+ 0x03A1, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7, 0x03A8, 0x03A9,
+ 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7, 0x03B8,
+ 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF, 0x03C0,
+ 0x03C1, 0x03C3, 0x03C2, 0x03C4, 0x03C5, 0x03C6, 0x03C7, 0x03C8,
+ 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556,
+ 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510,
+ 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F,
+ 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567,
+ 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B,
+ 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580,
+ 0x03C9, 0x03AC, 0x03AD, 0x03AE, 0x03CA, 0x03AF, 0x03CC, 0x03CD,
+ 0x03CB, 0x03CE, 0x0386, 0x0388, 0x0389, 0x038A, 0x038C, 0x038E,
+ 0x038F, 0x00B1, 0x2265, 0x2264, 0x03AA, 0x03AB, 0x00F7, 0x2248,
+ 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0
};
public Cp737()
{
- super("Cp737", new String[] {}, lookup);
+ super("Cp737", new String[] {}, lookup);
}
} // class Cp737
diff --git a/gnu/java/nio/charset/Cp775.java b/gnu/java/nio/charset/Cp775.java
index f2fba4356..ba3128e30 100644
--- a/gnu/java/nio/charset/Cp775.java
+++ b/gnu/java/nio/charset/Cp775.java
@@ -43,45 +43,45 @@ public final class Cp775 extends ByteCharset
/**
* This is the lookup table for this encoding
*/
- private static final char[] lookup =
+ private static final char[] lookup =
{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x0106, 0x00FC, 0x00E9, 0x0101, 0x00E4, 0x0123, 0x00E5, 0x0107,
- 0x0142, 0x0113, 0x0156, 0x0157, 0x012B, 0x0179, 0x00C4, 0x00C5,
- 0x00C9, 0x00E6, 0x00C6, 0x014D, 0x00F6, 0x0122, 0x00A2, 0x015A,
- 0x015B, 0x00D6, 0x00DC, 0x00F8, 0x00A3, 0x00D8, 0x00D7, 0x00A4,
- 0x0100, 0x012A, 0x00F3, 0x017B, 0x017C, 0x017A, 0x201D, 0x00A6,
- 0x00A9, 0x00AE, 0x00AC, 0x00BD, 0x00BC, 0x0141, 0x00AB, 0x00BB,
- 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x0104, 0x010C, 0x0118,
- 0x0116, 0x2563, 0x2551, 0x2557, 0x255D, 0x012E, 0x0160, 0x2510,
- 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x0172, 0x016A,
- 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x017D,
- 0x0105, 0x010D, 0x0119, 0x0117, 0x012F, 0x0161, 0x0173, 0x016B,
- 0x017E, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580,
- 0x00D3, 0x00DF, 0x014C, 0x0143, 0x00F5, 0x00D5, 0x00B5, 0x0144,
- 0x0136, 0x0137, 0x013B, 0x013C, 0x0146, 0x0112, 0x0145, 0x2019,
- 0x00AD, 0x00B1, 0x201C, 0x00BE, 0x00B6, 0x00A7, 0x00F7, 0x201E,
- 0x00B0, 0x2219, 0x00B7, 0x00B9, 0x00B3, 0x00B2, 0x25A0, 0x00A0
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+ 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+ 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
+ 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+ 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
+ 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
+ 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+ 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+ 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x0106, 0x00FC, 0x00E9, 0x0101, 0x00E4, 0x0123, 0x00E5, 0x0107,
+ 0x0142, 0x0113, 0x0156, 0x0157, 0x012B, 0x0179, 0x00C4, 0x00C5,
+ 0x00C9, 0x00E6, 0x00C6, 0x014D, 0x00F6, 0x0122, 0x00A2, 0x015A,
+ 0x015B, 0x00D6, 0x00DC, 0x00F8, 0x00A3, 0x00D8, 0x00D7, 0x00A4,
+ 0x0100, 0x012A, 0x00F3, 0x017B, 0x017C, 0x017A, 0x201D, 0x00A6,
+ 0x00A9, 0x00AE, 0x00AC, 0x00BD, 0x00BC, 0x0141, 0x00AB, 0x00BB,
+ 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x0104, 0x010C, 0x0118,
+ 0x0116, 0x2563, 0x2551, 0x2557, 0x255D, 0x012E, 0x0160, 0x2510,
+ 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x0172, 0x016A,
+ 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x017D,
+ 0x0105, 0x010D, 0x0119, 0x0117, 0x012F, 0x0161, 0x0173, 0x016B,
+ 0x017E, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580,
+ 0x00D3, 0x00DF, 0x014C, 0x0143, 0x00F5, 0x00D5, 0x00B5, 0x0144,
+ 0x0136, 0x0137, 0x013B, 0x013C, 0x0146, 0x0112, 0x0145, 0x2019,
+ 0x00AD, 0x00B1, 0x201C, 0x00BE, 0x00B6, 0x00A7, 0x00F7, 0x201E,
+ 0x00B0, 0x2219, 0x00B7, 0x00B9, 0x00B3, 0x00B2, 0x25A0, 0x00A0
};
public Cp775()
{
- super("Cp775", new String[] {}, lookup);
+ super("Cp775", new String[] {}, lookup);
}
} // class Cp775
diff --git a/gnu/java/nio/charset/Cp850.java b/gnu/java/nio/charset/Cp850.java
index 48d4fb344..fef468994 100644
--- a/gnu/java/nio/charset/Cp850.java
+++ b/gnu/java/nio/charset/Cp850.java
@@ -43,45 +43,45 @@ public final class Cp850 extends ByteCharset
/**
* This is the lookup table for this encoding
*/
- private static final char[] lookup =
+ private static final char[] lookup =
{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7,
- 0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x00EC, 0x00C4, 0x00C5,
- 0x00C9, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00F2, 0x00FB, 0x00F9,
- 0x00FF, 0x00D6, 0x00DC, 0x00F8, 0x00A3, 0x00D8, 0x00D7, 0x0192,
- 0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00F1, 0x00D1, 0x00AA, 0x00BA,
- 0x00BF, 0x00AE, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00BB,
- 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x00C1, 0x00C2, 0x00C0,
- 0x00A9, 0x2563, 0x2551, 0x2557, 0x255D, 0x00A2, 0x00A5, 0x2510,
- 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x00E3, 0x00C3,
- 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x00A4,
- 0x00F0, 0x00D0, 0x00CA, 0x00CB, 0x00C8, 0x0131, 0x00CD, 0x00CE,
- 0x00CF, 0x2518, 0x250C, 0x2588, 0x2584, 0x00A6, 0x00CC, 0x2580,
- 0x00D3, 0x00DF, 0x00D4, 0x00D2, 0x00F5, 0x00D5, 0x00B5, 0x00FE,
- 0x00DE, 0x00DA, 0x00DB, 0x00D9, 0x00FD, 0x00DD, 0x00AF, 0x00B4,
- 0x00AD, 0x00B1, 0x2017, 0x00BE, 0x00B6, 0x00A7, 0x00F7, 0x00B8,
- 0x00B0, 0x00A8, 0x00B7, 0x00B9, 0x00B3, 0x00B2, 0x25A0, 0x00A0
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+ 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+ 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
+ 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+ 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
+ 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
+ 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+ 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+ 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7,
+ 0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x00EC, 0x00C4, 0x00C5,
+ 0x00C9, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00F2, 0x00FB, 0x00F9,
+ 0x00FF, 0x00D6, 0x00DC, 0x00F8, 0x00A3, 0x00D8, 0x00D7, 0x0192,
+ 0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00F1, 0x00D1, 0x00AA, 0x00BA,
+ 0x00BF, 0x00AE, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00BB,
+ 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x00C1, 0x00C2, 0x00C0,
+ 0x00A9, 0x2563, 0x2551, 0x2557, 0x255D, 0x00A2, 0x00A5, 0x2510,
+ 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x00E3, 0x00C3,
+ 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x00A4,
+ 0x00F0, 0x00D0, 0x00CA, 0x00CB, 0x00C8, 0x0131, 0x00CD, 0x00CE,
+ 0x00CF, 0x2518, 0x250C, 0x2588, 0x2584, 0x00A6, 0x00CC, 0x2580,
+ 0x00D3, 0x00DF, 0x00D4, 0x00D2, 0x00F5, 0x00D5, 0x00B5, 0x00FE,
+ 0x00DE, 0x00DA, 0x00DB, 0x00D9, 0x00FD, 0x00DD, 0x00AF, 0x00B4,
+ 0x00AD, 0x00B1, 0x2017, 0x00BE, 0x00B6, 0x00A7, 0x00F7, 0x00B8,
+ 0x00B0, 0x00A8, 0x00B7, 0x00B9, 0x00B3, 0x00B2, 0x25A0, 0x00A0
};
public Cp850()
{
- super("Cp850", new String[] {}, lookup);
+ super("Cp850", new String[] {}, lookup);
}
} // class Cp850
diff --git a/gnu/java/nio/charset/Cp852.java b/gnu/java/nio/charset/Cp852.java
index c550944b5..eea99610d 100644
--- a/gnu/java/nio/charset/Cp852.java
+++ b/gnu/java/nio/charset/Cp852.java
@@ -43,45 +43,45 @@ public final class Cp852 extends ByteCharset
/**
* This is the lookup table for this encoding
*/
- private static final char[] lookup =
+ private static final char[] lookup =
{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x016F, 0x0107, 0x00E7,
- 0x0142, 0x00EB, 0x0150, 0x0151, 0x00EE, 0x0179, 0x00C4, 0x0106,
- 0x00C9, 0x0139, 0x013A, 0x00F4, 0x00F6, 0x013D, 0x013E, 0x015A,
- 0x015B, 0x00D6, 0x00DC, 0x0164, 0x0165, 0x0141, 0x00D7, 0x010D,
- 0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x0104, 0x0105, 0x017D, 0x017E,
- 0x0118, 0x0119, 0x00AC, 0x017A, 0x010C, 0x015F, 0x00AB, 0x00BB,
- 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x00C1, 0x00C2, 0x011A,
- 0x015E, 0x2563, 0x2551, 0x2557, 0x255D, 0x017B, 0x017C, 0x2510,
- 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x0102, 0x0103,
- 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x00A4,
- 0x0111, 0x0110, 0x010E, 0x00CB, 0x010F, 0x0147, 0x00CD, 0x00CE,
- 0x011B, 0x2518, 0x250C, 0x2588, 0x2584, 0x0162, 0x016E, 0x2580,
- 0x00D3, 0x00DF, 0x00D4, 0x0143, 0x0144, 0x0148, 0x0160, 0x0161,
- 0x0154, 0x00DA, 0x0155, 0x0170, 0x00FD, 0x00DD, 0x0163, 0x00B4,
- 0x00AD, 0x02DD, 0x02DB, 0x02C7, 0x02D8, 0x00A7, 0x00F7, 0x00B8,
- 0x00B0, 0x00A8, 0x02D9, 0x0171, 0x0158, 0x0159, 0x25A0, 0x00A0
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+ 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+ 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
+ 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+ 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
+ 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
+ 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+ 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+ 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x016F, 0x0107, 0x00E7,
+ 0x0142, 0x00EB, 0x0150, 0x0151, 0x00EE, 0x0179, 0x00C4, 0x0106,
+ 0x00C9, 0x0139, 0x013A, 0x00F4, 0x00F6, 0x013D, 0x013E, 0x015A,
+ 0x015B, 0x00D6, 0x00DC, 0x0164, 0x0165, 0x0141, 0x00D7, 0x010D,
+ 0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x0104, 0x0105, 0x017D, 0x017E,
+ 0x0118, 0x0119, 0x00AC, 0x017A, 0x010C, 0x015F, 0x00AB, 0x00BB,
+ 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x00C1, 0x00C2, 0x011A,
+ 0x015E, 0x2563, 0x2551, 0x2557, 0x255D, 0x017B, 0x017C, 0x2510,
+ 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x0102, 0x0103,
+ 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x00A4,
+ 0x0111, 0x0110, 0x010E, 0x00CB, 0x010F, 0x0147, 0x00CD, 0x00CE,
+ 0x011B, 0x2518, 0x250C, 0x2588, 0x2584, 0x0162, 0x016E, 0x2580,
+ 0x00D3, 0x00DF, 0x00D4, 0x0143, 0x0144, 0x0148, 0x0160, 0x0161,
+ 0x0154, 0x00DA, 0x0155, 0x0170, 0x00FD, 0x00DD, 0x0163, 0x00B4,
+ 0x00AD, 0x02DD, 0x02DB, 0x02C7, 0x02D8, 0x00A7, 0x00F7, 0x00B8,
+ 0x00B0, 0x00A8, 0x02D9, 0x0171, 0x0158, 0x0159, 0x25A0, 0x00A0
};
public Cp852()
{
- super("Cp852", new String[] {}, lookup);
+ super("Cp852", new String[] {}, lookup);
}
} // class Cp852
diff --git a/gnu/java/nio/charset/Cp855.java b/gnu/java/nio/charset/Cp855.java
index 141e891b6..d148d32b4 100644
--- a/gnu/java/nio/charset/Cp855.java
+++ b/gnu/java/nio/charset/Cp855.java
@@ -43,45 +43,45 @@ public final class Cp855 extends ByteCharset
/**
* This is the lookup table for this encoding
*/
- private static final char[] lookup =
+ private static final char[] lookup =
{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x0452, 0x0402, 0x0453, 0x0403, 0x0451, 0x0401, 0x0454, 0x0404,
- 0x0455, 0x0405, 0x0456, 0x0406, 0x0457, 0x0407, 0x0458, 0x0408,
- 0x0459, 0x0409, 0x045A, 0x040A, 0x045B, 0x040B, 0x045C, 0x040C,
- 0x045E, 0x040E, 0x045F, 0x040F, 0x044E, 0x042E, 0x044A, 0x042A,
- 0x0430, 0x0410, 0x0431, 0x0411, 0x0446, 0x0426, 0x0434, 0x0414,
- 0x0435, 0x0415, 0x0444, 0x0424, 0x0433, 0x0413, 0x00AB, 0x00BB,
- 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x0445, 0x0425, 0x0438,
- 0x0418, 0x2563, 0x2551, 0x2557, 0x255D, 0x0439, 0x0419, 0x2510,
- 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x043A, 0x041A,
- 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x00A4,
- 0x043B, 0x041B, 0x043C, 0x041C, 0x043D, 0x041D, 0x043E, 0x041E,
- 0x043F, 0x2518, 0x250C, 0x2588, 0x2584, 0x041F, 0x044F, 0x2580,
- 0x042F, 0x0440, 0x0420, 0x0441, 0x0421, 0x0442, 0x0422, 0x0443,
- 0x0423, 0x0436, 0x0416, 0x0432, 0x0412, 0x044C, 0x042C, 0x2116,
- 0x00AD, 0x044B, 0x042B, 0x0437, 0x0417, 0x0448, 0x0428, 0x044D,
- 0x042D, 0x0449, 0x0429, 0x0447, 0x0427, 0x00A7, 0x25A0, 0x00A0
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+ 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+ 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
+ 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+ 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
+ 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
+ 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+ 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+ 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x0452, 0x0402, 0x0453, 0x0403, 0x0451, 0x0401, 0x0454, 0x0404,
+ 0x0455, 0x0405, 0x0456, 0x0406, 0x0457, 0x0407, 0x0458, 0x0408,
+ 0x0459, 0x0409, 0x045A, 0x040A, 0x045B, 0x040B, 0x045C, 0x040C,
+ 0x045E, 0x040E, 0x045F, 0x040F, 0x044E, 0x042E, 0x044A, 0x042A,
+ 0x0430, 0x0410, 0x0431, 0x0411, 0x0446, 0x0426, 0x0434, 0x0414,
+ 0x0435, 0x0415, 0x0444, 0x0424, 0x0433, 0x0413, 0x00AB, 0x00BB,
+ 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x0445, 0x0425, 0x0438,
+ 0x0418, 0x2563, 0x2551, 0x2557, 0x255D, 0x0439, 0x0419, 0x2510,
+ 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x043A, 0x041A,
+ 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x00A4,
+ 0x043B, 0x041B, 0x043C, 0x041C, 0x043D, 0x041D, 0x043E, 0x041E,
+ 0x043F, 0x2518, 0x250C, 0x2588, 0x2584, 0x041F, 0x044F, 0x2580,
+ 0x042F, 0x0440, 0x0420, 0x0441, 0x0421, 0x0442, 0x0422, 0x0443,
+ 0x0423, 0x0436, 0x0416, 0x0432, 0x0412, 0x044C, 0x042C, 0x2116,
+ 0x00AD, 0x044B, 0x042B, 0x0437, 0x0417, 0x0448, 0x0428, 0x044D,
+ 0x042D, 0x0449, 0x0429, 0x0447, 0x0427, 0x00A7, 0x25A0, 0x00A0
};
public Cp855()
{
- super("Cp855", new String[] {"cp-855",}, lookup);
+ super("Cp855", new String[] {"cp-855",}, lookup);
}
} // class Cp855
diff --git a/gnu/java/nio/charset/Cp857.java b/gnu/java/nio/charset/Cp857.java
index b517b0393..0d990ec2c 100644
--- a/gnu/java/nio/charset/Cp857.java
+++ b/gnu/java/nio/charset/Cp857.java
@@ -44,45 +44,45 @@ public final class Cp857 extends ByteCharset
/**
* This is the lookup table for this encoding
*/
- private static final char[] lookup =
+ private static final char[] lookup =
{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7,
- 0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x0131, 0x00C4, 0x00C5,
- 0x00C9, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00F2, 0x00FB, 0x00F9,
- 0x0130, 0x00D6, 0x00DC, 0x00F8, 0x00A3, 0x00D8, 0x015E, 0x015F,
- 0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00F1, 0x00D1, 0x011E, 0x011F,
- 0x00BF, 0x00AE, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00BB,
- 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x00C1, 0x00C2, 0x00C0,
- 0x00A9, 0x2563, 0x2551, 0x2557, 0x255D, 0x00A2, 0x00A5, 0x2510,
- 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x00E3, 0x00C3,
- 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x00A4,
- 0x00BA, 0x00AA, 0x00CA, 0x00CB, 0x00C8, NONE, 0x00CD, 0x00CE,
- 0x00CF, 0x2518, 0x250C, 0x2588, 0x2584, 0x00A6, 0x00CC, 0x2580,
- 0x00D3, 0x00DF, 0x00D4, 0x00D2, 0x00F5, 0x00D5, 0x00B5, NONE,
- 0x00D7, 0x00DA, 0x00DB, 0x00D9, 0x00EC, 0x00FF, 0x00AF, 0x00B4,
- 0x00AD, 0x00B1, NONE, 0x00BE, 0x00B6, 0x00A7, 0x00F7, 0x00B8,
- 0x00B0, 0x00A8, 0x00B7, 0x00B9, 0x00B3, 0x00B2, 0x25A0, 0x00A0
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+ 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+ 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
+ 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+ 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
+ 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
+ 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+ 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+ 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7,
+ 0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x0131, 0x00C4, 0x00C5,
+ 0x00C9, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00F2, 0x00FB, 0x00F9,
+ 0x0130, 0x00D6, 0x00DC, 0x00F8, 0x00A3, 0x00D8, 0x015E, 0x015F,
+ 0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00F1, 0x00D1, 0x011E, 0x011F,
+ 0x00BF, 0x00AE, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00BB,
+ 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x00C1, 0x00C2, 0x00C0,
+ 0x00A9, 0x2563, 0x2551, 0x2557, 0x255D, 0x00A2, 0x00A5, 0x2510,
+ 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x00E3, 0x00C3,
+ 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x00A4,
+ 0x00BA, 0x00AA, 0x00CA, 0x00CB, 0x00C8, NONE, 0x00CD, 0x00CE,
+ 0x00CF, 0x2518, 0x250C, 0x2588, 0x2584, 0x00A6, 0x00CC, 0x2580,
+ 0x00D3, 0x00DF, 0x00D4, 0x00D2, 0x00F5, 0x00D5, 0x00B5, NONE,
+ 0x00D7, 0x00DA, 0x00DB, 0x00D9, 0x00EC, 0x00FF, 0x00AF, 0x00B4,
+ 0x00AD, 0x00B1, NONE, 0x00BE, 0x00B6, 0x00A7, 0x00F7, 0x00B8,
+ 0x00B0, 0x00A8, 0x00B7, 0x00B9, 0x00B3, 0x00B2, 0x25A0, 0x00A0
};
public Cp857()
{
- super("Cp857", new String[] {"cp-857"}, lookup);
+ super("Cp857", new String[] {"cp-857"}, lookup);
}
} // class Cp857
diff --git a/gnu/java/nio/charset/Cp860.java b/gnu/java/nio/charset/Cp860.java
index 58a396446..4e15329ca 100644
--- a/gnu/java/nio/charset/Cp860.java
+++ b/gnu/java/nio/charset/Cp860.java
@@ -44,45 +44,45 @@ public final class Cp860 extends ByteCharset
/**
* This is the lookup table for this encoding
*/
- private static final char[] lookup =
+ private static final char[] lookup =
{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E3, 0x00E0, 0x00C1, 0x00E7,
- 0x00EA, 0x00CA, 0x00E8, 0x00CD, 0x00D4, 0x00EC, 0x00C3, 0x00C2,
- 0x00C9, 0x00C0, 0x00C8, 0x00F4, 0x00F5, 0x00F2, 0x00DA, 0x00F9,
- 0x00CC, 0x00D5, 0x00DC, 0x00A2, 0x00A3, 0x00D9, 0x20A7, 0x00D3,
- 0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00F1, 0x00D1, 0x00AA, 0x00BA,
- 0x00BF, 0x00D2, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00BB,
- 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556,
- 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510,
- 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F,
- 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567,
- 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B,
- 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580,
- 0x03B1, 0x00DF, 0x0393, 0x03C0, 0x03A3, 0x03C3, 0x00B5, 0x03C4,
- 0x03A6, 0x0398, 0x03A9, 0x03B4, 0x221E, 0x03C6, 0x03B5, 0x2229,
- 0x2261, 0x00B1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00F7, 0x2248,
- 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+ 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+ 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
+ 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+ 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
+ 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
+ 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+ 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+ 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E3, 0x00E0, 0x00C1, 0x00E7,
+ 0x00EA, 0x00CA, 0x00E8, 0x00CD, 0x00D4, 0x00EC, 0x00C3, 0x00C2,
+ 0x00C9, 0x00C0, 0x00C8, 0x00F4, 0x00F5, 0x00F2, 0x00DA, 0x00F9,
+ 0x00CC, 0x00D5, 0x00DC, 0x00A2, 0x00A3, 0x00D9, 0x20A7, 0x00D3,
+ 0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00F1, 0x00D1, 0x00AA, 0x00BA,
+ 0x00BF, 0x00D2, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00BB,
+ 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556,
+ 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510,
+ 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F,
+ 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567,
+ 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B,
+ 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580,
+ 0x03B1, 0x00DF, 0x0393, 0x03C0, 0x03A3, 0x03C3, 0x00B5, 0x03C4,
+ 0x03A6, 0x0398, 0x03A9, 0x03B4, 0x221E, 0x03C6, 0x03B5, 0x2229,
+ 0x2261, 0x00B1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00F7, 0x2248,
+ 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0
};
public Cp860()
{
- super("Cp860", new String[] {"cp-860"}, lookup);
+ super("Cp860", new String[] {"cp-860"}, lookup);
}
} // class Cp860
diff --git a/gnu/java/nio/charset/Cp861.java b/gnu/java/nio/charset/Cp861.java
index cf5210d0a..e5a103f67 100644
--- a/gnu/java/nio/charset/Cp861.java
+++ b/gnu/java/nio/charset/Cp861.java
@@ -44,45 +44,45 @@ public final class Cp861 extends ByteCharset
/**
* This is the lookup table for this encoding
*/
- private static final char[] lookup =
+ private static final char[] lookup =
{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7,
- 0x00EA, 0x00EB, 0x00E8, 0x00D0, 0x00F0, 0x00DE, 0x00C4, 0x00C5,
- 0x00C9, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00FE, 0x00FB, 0x00DD,
- 0x00FD, 0x00D6, 0x00DC, 0x00F8, 0x00A3, 0x00D8, 0x20A7, 0x0192,
- 0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00C1, 0x00CD, 0x00D3, 0x00DA,
- 0x00BF, 0x2310, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00BB,
- 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556,
- 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510,
- 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F,
- 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567,
- 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B,
- 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580,
- 0x03B1, 0x00DF, 0x0393, 0x03C0, 0x03A3, 0x03C3, 0x00B5, 0x03C4,
- 0x03A6, 0x0398, 0x03A9, 0x03B4, 0x221E, 0x03C6, 0x03B5, 0x2229,
- 0x2261, 0x00B1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00F7, 0x2248,
- 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+ 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+ 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
+ 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+ 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
+ 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
+ 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+ 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+ 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7,
+ 0x00EA, 0x00EB, 0x00E8, 0x00D0, 0x00F0, 0x00DE, 0x00C4, 0x00C5,
+ 0x00C9, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00FE, 0x00FB, 0x00DD,
+ 0x00FD, 0x00D6, 0x00DC, 0x00F8, 0x00A3, 0x00D8, 0x20A7, 0x0192,
+ 0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00C1, 0x00CD, 0x00D3, 0x00DA,
+ 0x00BF, 0x2310, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00BB,
+ 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556,
+ 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510,
+ 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F,
+ 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567,
+ 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B,
+ 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580,
+ 0x03B1, 0x00DF, 0x0393, 0x03C0, 0x03A3, 0x03C3, 0x00B5, 0x03C4,
+ 0x03A6, 0x0398, 0x03A9, 0x03B4, 0x221E, 0x03C6, 0x03B5, 0x2229,
+ 0x2261, 0x00B1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00F7, 0x2248,
+ 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0
};
public Cp861()
{
- super("Cp861", new String[] {"cp-861"}, lookup);
+ super("Cp861", new String[] {"cp-861"}, lookup);
}
} // class Cp861
diff --git a/gnu/java/nio/charset/Cp862.java b/gnu/java/nio/charset/Cp862.java
index f66118021..873357433 100644
--- a/gnu/java/nio/charset/Cp862.java
+++ b/gnu/java/nio/charset/Cp862.java
@@ -44,45 +44,45 @@ public final class Cp862 extends ByteCharset
/**
* This is the lookup table for this encoding
*/
- private static final char[] lookup =
+ private static final char[] lookup =
{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x05D0, 0x05D1, 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7,
- 0x05D8, 0x05D9, 0x05DA, 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF,
- 0x05E0, 0x05E1, 0x05E2, 0x05E3, 0x05E4, 0x05E5, 0x05E6, 0x05E7,
- 0x05E8, 0x05E9, 0x05EA, 0x00A2, 0x00A3, 0x00A5, 0x20A7, 0x0192,
- 0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00F1, 0x00D1, 0x00AA, 0x00BA,
- 0x00BF, 0x2310, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00BB,
- 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556,
- 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510,
- 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F,
- 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567,
- 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B,
- 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580,
- 0x03B1, 0x00DF, 0x0393, 0x03C0, 0x03A3, 0x03C3, 0x00B5, 0x03C4,
- 0x03A6, 0x0398, 0x03A9, 0x03B4, 0x221E, 0x03C6, 0x03B5, 0x2229,
- 0x2261, 0x00B1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00F7, 0x2248,
- 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+ 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+ 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
+ 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+ 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
+ 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
+ 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+ 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+ 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x05D0, 0x05D1, 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7,
+ 0x05D8, 0x05D9, 0x05DA, 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF,
+ 0x05E0, 0x05E1, 0x05E2, 0x05E3, 0x05E4, 0x05E5, 0x05E6, 0x05E7,
+ 0x05E8, 0x05E9, 0x05EA, 0x00A2, 0x00A3, 0x00A5, 0x20A7, 0x0192,
+ 0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00F1, 0x00D1, 0x00AA, 0x00BA,
+ 0x00BF, 0x2310, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00BB,
+ 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556,
+ 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510,
+ 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F,
+ 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567,
+ 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B,
+ 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580,
+ 0x03B1, 0x00DF, 0x0393, 0x03C0, 0x03A3, 0x03C3, 0x00B5, 0x03C4,
+ 0x03A6, 0x0398, 0x03A9, 0x03B4, 0x221E, 0x03C6, 0x03B5, 0x2229,
+ 0x2261, 0x00B1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00F7, 0x2248,
+ 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0
};
public Cp862()
{
- super("Cp862", new String[] {"Cp-862"}, lookup);
+ super("Cp862", new String[] {"Cp-862"}, lookup);
}
} // class Cp862
diff --git a/gnu/java/nio/charset/Cp863.java b/gnu/java/nio/charset/Cp863.java
index 03850234e..3a86f3e2d 100644
--- a/gnu/java/nio/charset/Cp863.java
+++ b/gnu/java/nio/charset/Cp863.java
@@ -44,45 +44,45 @@ public final class Cp863 extends ByteCharset
/**
* This is the lookup table for this encoding
*/
- private static final char[] lookup =
+ private static final char[] lookup =
{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00C2, 0x00E0, 0x00B6, 0x00E7,
- 0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x2017, 0x00C0, 0x00A7,
- 0x00C9, 0x00C8, 0x00CA, 0x00F4, 0x00CB, 0x00CF, 0x00FB, 0x00F9,
- 0x00A4, 0x00D4, 0x00DC, 0x00A2, 0x00A3, 0x00D9, 0x00DB, 0x0192,
- 0x00A6, 0x00B4, 0x00F3, 0x00FA, 0x00A8, 0x00B8, 0x00B3, 0x00AF,
- 0x00CE, 0x2310, 0x00AC, 0x00BD, 0x00BC, 0x00BE, 0x00AB, 0x00BB,
- 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556,
- 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510,
- 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F,
- 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567,
- 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B,
- 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580,
- 0x03B1, 0x00DF, 0x0393, 0x03C0, 0x03A3, 0x03C3, 0x00B5, 0x03C4,
- 0x03A6, 0x0398, 0x03A9, 0x03B4, 0x221E, 0x03C6, 0x03B5, 0x2229,
- 0x2261, 0x00B1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00F7, 0x2248,
- 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+ 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+ 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
+ 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+ 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
+ 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
+ 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+ 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+ 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00C2, 0x00E0, 0x00B6, 0x00E7,
+ 0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x2017, 0x00C0, 0x00A7,
+ 0x00C9, 0x00C8, 0x00CA, 0x00F4, 0x00CB, 0x00CF, 0x00FB, 0x00F9,
+ 0x00A4, 0x00D4, 0x00DC, 0x00A2, 0x00A3, 0x00D9, 0x00DB, 0x0192,
+ 0x00A6, 0x00B4, 0x00F3, 0x00FA, 0x00A8, 0x00B8, 0x00B3, 0x00AF,
+ 0x00CE, 0x2310, 0x00AC, 0x00BD, 0x00BC, 0x00BE, 0x00AB, 0x00BB,
+ 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556,
+ 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510,
+ 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F,
+ 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567,
+ 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B,
+ 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580,
+ 0x03B1, 0x00DF, 0x0393, 0x03C0, 0x03A3, 0x03C3, 0x00B5, 0x03C4,
+ 0x03A6, 0x0398, 0x03A9, 0x03B4, 0x221E, 0x03C6, 0x03B5, 0x2229,
+ 0x2261, 0x00B1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00F7, 0x2248,
+ 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0
};
public Cp863()
{
- super("Cp863", new String[] {"Cp-863"}, lookup);
+ super("Cp863", new String[] {"Cp-863"}, lookup);
}
} // class Cp863
diff --git a/gnu/java/nio/charset/Cp864.java b/gnu/java/nio/charset/Cp864.java
index 028235dd3..990e3723d 100644
--- a/gnu/java/nio/charset/Cp864.java
+++ b/gnu/java/nio/charset/Cp864.java
@@ -44,45 +44,45 @@ public final class Cp864 extends ByteCharset
/**
* This is the lookup table for this encoding
*/
- private static final char[] lookup =
+ private static final char[] lookup =
{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x066A, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x00B0, 0x00B7, 0x2219, 0x221A, 0x2592, 0x2500, 0x2502, 0x253C,
- 0x2524, 0x252C, 0x251C, 0x2534, 0x2510, 0x250C, 0x2514, 0x2518,
- 0x03B2, 0x221E, 0x03C6, 0x00B1, 0x00BD, 0x00BC, 0x2248, 0x00AB,
- 0x00BB, 0xFEF7, 0xFEF8, NONE, NONE, 0xFEFB, 0xFEFC, NONE,
- 0x00A0, 0x00AD, 0xFE82, 0x00A3, 0x00A4, 0xFE84, NONE, NONE,
- 0xFE8E, 0xFE8F, 0xFE95, 0xFE99, 0x060C, 0xFE9D, 0xFEA1, 0xFEA5,
- 0x0660, 0x0661, 0x0662, 0x0663, 0x0664, 0x0665, 0x0666, 0x0667,
- 0x0668, 0x0669, 0xFED1, 0x061B, 0xFEB1, 0xFEB5, 0xFEB9, 0x061F,
- 0x00A2, 0xFE80, 0xFE81, 0xFE83, 0xFE85, 0xFECA, 0xFE8B, 0xFE8D,
- 0xFE91, 0xFE93, 0xFE97, 0xFE9B, 0xFE9F, 0xFEA3, 0xFEA7, 0xFEA9,
- 0xFEAB, 0xFEAD, 0xFEAF, 0xFEB3, 0xFEB7, 0xFEBB, 0xFEBF, 0xFEC1,
- 0xFEC5, 0xFECB, 0xFECF, 0x00A6, 0x00AC, 0x00F7, 0x00D7, 0xFEC9,
- 0x0640, 0xFED3, 0xFED7, 0xFEDB, 0xFEDF, 0xFEE3, 0xFEE7, 0xFEEB,
- 0xFEED, 0xFEEF, 0xFEF3, 0xFEBD, 0xFECC, 0xFECE, 0xFECD, 0xFEE1,
- 0xFE7D, 0x0651, 0xFEE5, 0xFEE9, 0xFEEC, 0xFEF0, 0xFEF2, 0xFED0,
- 0xFED5, 0xFEF5, 0xFEF6, 0xFEDD, 0xFED9, 0xFEF1, 0x25A0, NONE
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+ 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+ 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x066A, 0x0026, 0x0027,
+ 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+ 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
+ 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
+ 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+ 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+ 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x00B0, 0x00B7, 0x2219, 0x221A, 0x2592, 0x2500, 0x2502, 0x253C,
+ 0x2524, 0x252C, 0x251C, 0x2534, 0x2510, 0x250C, 0x2514, 0x2518,
+ 0x03B2, 0x221E, 0x03C6, 0x00B1, 0x00BD, 0x00BC, 0x2248, 0x00AB,
+ 0x00BB, 0xFEF7, 0xFEF8, NONE, NONE, 0xFEFB, 0xFEFC, NONE,
+ 0x00A0, 0x00AD, 0xFE82, 0x00A3, 0x00A4, 0xFE84, NONE, NONE,
+ 0xFE8E, 0xFE8F, 0xFE95, 0xFE99, 0x060C, 0xFE9D, 0xFEA1, 0xFEA5,
+ 0x0660, 0x0661, 0x0662, 0x0663, 0x0664, 0x0665, 0x0666, 0x0667,
+ 0x0668, 0x0669, 0xFED1, 0x061B, 0xFEB1, 0xFEB5, 0xFEB9, 0x061F,
+ 0x00A2, 0xFE80, 0xFE81, 0xFE83, 0xFE85, 0xFECA, 0xFE8B, 0xFE8D,
+ 0xFE91, 0xFE93, 0xFE97, 0xFE9B, 0xFE9F, 0xFEA3, 0xFEA7, 0xFEA9,
+ 0xFEAB, 0xFEAD, 0xFEAF, 0xFEB3, 0xFEB7, 0xFEBB, 0xFEBF, 0xFEC1,
+ 0xFEC5, 0xFECB, 0xFECF, 0x00A6, 0x00AC, 0x00F7, 0x00D7, 0xFEC9,
+ 0x0640, 0xFED3, 0xFED7, 0xFEDB, 0xFEDF, 0xFEE3, 0xFEE7, 0xFEEB,
+ 0xFEED, 0xFEEF, 0xFEF3, 0xFEBD, 0xFECC, 0xFECE, 0xFECD, 0xFEE1,
+ 0xFE7D, 0x0651, 0xFEE5, 0xFEE9, 0xFEEC, 0xFEF0, 0xFEF2, 0xFED0,
+ 0xFED5, 0xFEF5, 0xFEF6, 0xFEDD, 0xFED9, 0xFEF1, 0x25A0, NONE
};
public Cp864()
{
- super("Cp864", new String[] {"Cp-864"}, lookup);
+ super("Cp864", new String[] {"Cp-864"}, lookup);
}
} // class Cp864
diff --git a/gnu/java/nio/charset/Cp865.java b/gnu/java/nio/charset/Cp865.java
index c723e80c9..a708a8560 100644
--- a/gnu/java/nio/charset/Cp865.java
+++ b/gnu/java/nio/charset/Cp865.java
@@ -44,45 +44,45 @@ public final class Cp865 extends ByteCharset
/**
* This is the lookup table for this encoding
*/
- private static final char[] lookup =
+ private static final char[] lookup =
{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7,
- 0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x00EC, 0x00C4, 0x00C5,
- 0x00C9, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00F2, 0x00FB, 0x00F9,
- 0x00FF, 0x00D6, 0x00DC, 0x00F8, 0x00A3, 0x00D8, 0x20A7, 0x0192,
- 0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00F1, 0x00D1, 0x00AA, 0x00BA,
- 0x00BF, 0x2310, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00A4,
- 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556,
- 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510,
- 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F,
- 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567,
- 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B,
- 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580,
- 0x03B1, 0x00DF, 0x0393, 0x03C0, 0x03A3, 0x03C3, 0x00B5, 0x03C4,
- 0x03A6, 0x0398, 0x03A9, 0x03B4, 0x221E, 0x03C6, 0x03B5, 0x2229,
- 0x2261, 0x00B1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00F7, 0x2248,
- 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+ 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+ 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
+ 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+ 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
+ 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
+ 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+ 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+ 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7,
+ 0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x00EC, 0x00C4, 0x00C5,
+ 0x00C9, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00F2, 0x00FB, 0x00F9,
+ 0x00FF, 0x00D6, 0x00DC, 0x00F8, 0x00A3, 0x00D8, 0x20A7, 0x0192,
+ 0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00F1, 0x00D1, 0x00AA, 0x00BA,
+ 0x00BF, 0x2310, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00A4,
+ 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556,
+ 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510,
+ 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F,
+ 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567,
+ 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B,
+ 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580,
+ 0x03B1, 0x00DF, 0x0393, 0x03C0, 0x03A3, 0x03C3, 0x00B5, 0x03C4,
+ 0x03A6, 0x0398, 0x03A9, 0x03B4, 0x221E, 0x03C6, 0x03B5, 0x2229,
+ 0x2261, 0x00B1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00F7, 0x2248,
+ 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0
};
public Cp865()
{
- super("Cp865", new String[] {"Cp-865"}, lookup);
+ super("Cp865", new String[] {"Cp-865"}, lookup);
}
} // class Cp865
diff --git a/gnu/java/nio/charset/Cp866.java b/gnu/java/nio/charset/Cp866.java
index 103bca7c3..0f3c23044 100644
--- a/gnu/java/nio/charset/Cp866.java
+++ b/gnu/java/nio/charset/Cp866.java
@@ -44,45 +44,45 @@ public final class Cp866 extends ByteCharset
/**
* This is the lookup table for this encoding
*/
- private static final char[] lookup =
+ private static final char[] lookup =
{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417,
- 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F,
- 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427,
- 0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F,
- 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437,
- 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F,
- 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556,
- 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510,
- 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F,
- 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567,
- 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B,
- 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580,
- 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
- 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F,
- 0x0401, 0x0451, 0x0404, 0x0454, 0x0407, 0x0457, 0x040E, 0x045E,
- 0x00B0, 0x2219, 0x00B7, 0x221A, 0x2116, 0x00A4, 0x25A0, 0x00A0
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+ 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+ 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
+ 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+ 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
+ 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
+ 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+ 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+ 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417,
+ 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F,
+ 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427,
+ 0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F,
+ 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437,
+ 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F,
+ 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556,
+ 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510,
+ 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F,
+ 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567,
+ 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B,
+ 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580,
+ 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
+ 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F,
+ 0x0401, 0x0451, 0x0404, 0x0454, 0x0407, 0x0457, 0x040E, 0x045E,
+ 0x00B0, 0x2219, 0x00B7, 0x221A, 0x2116, 0x00A4, 0x25A0, 0x00A0
};
public Cp866()
{
- super("Cp866", new String[] {"cp-866"}, lookup);
+ super("Cp866", new String[] {"cp-866"}, lookup);
}
} // class Cp866
diff --git a/gnu/java/nio/charset/Cp869.java b/gnu/java/nio/charset/Cp869.java
index 0632b3741..091e2e7b4 100644
--- a/gnu/java/nio/charset/Cp869.java
+++ b/gnu/java/nio/charset/Cp869.java
@@ -44,45 +44,45 @@ public final class Cp869 extends ByteCharset
/**
* This is the lookup table for this encoding
*/
- private static final char[] lookup =
+ private static final char[] lookup =
{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- NONE, NONE, NONE, NONE, NONE, NONE, 0x0386, NONE,
- 0x00B7, 0x00AC, 0x00A6, 0x2018, 0x2019, 0x0388, 0x2015, 0x0389,
- 0x038A, 0x03AA, 0x038C, NONE, NONE, 0x038E, 0x03AB, 0x00A9,
- 0x038F, 0x00B2, 0x00B3, 0x03AC, 0x00A3, 0x03AD, 0x03AE, 0x03AF,
- 0x03CA, 0x0390, 0x03CC, 0x03CD, 0x0391, 0x0392, 0x0393, 0x0394,
- 0x0395, 0x0396, 0x0397, 0x00BD, 0x0398, 0x0399, 0x00AB, 0x00BB,
- 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x039A, 0x039B, 0x039C,
- 0x039D, 0x2563, 0x2551, 0x2557, 0x255D, 0x039E, 0x039F, 0x2510,
- 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x03A0, 0x03A1,
- 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x03A3,
- 0x03A4, 0x03A5, 0x03A6, 0x03A7, 0x03A8, 0x03A9, 0x03B1, 0x03B2,
- 0x03B3, 0x2518, 0x250C, 0x2588, 0x2584, 0x03B4, 0x03B5, 0x2580,
- 0x03B6, 0x03B7, 0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD,
- 0x03BE, 0x03BF, 0x03C0, 0x03C1, 0x03C3, 0x03C2, 0x03C4, 0x0384,
- 0x00AD, 0x00B1, 0x03C5, 0x03C6, 0x03C7, 0x00A7, 0x03C8, 0x0385,
- 0x00B0, 0x00A8, 0x03C9, 0x03CB, 0x03B0, 0x03CE, 0x25A0, 0x00A0
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+ 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+ 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
+ 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+ 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
+ 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
+ 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+ 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+ 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ NONE, NONE, NONE, NONE, NONE, NONE, 0x0386, NONE,
+ 0x00B7, 0x00AC, 0x00A6, 0x2018, 0x2019, 0x0388, 0x2015, 0x0389,
+ 0x038A, 0x03AA, 0x038C, NONE, NONE, 0x038E, 0x03AB, 0x00A9,
+ 0x038F, 0x00B2, 0x00B3, 0x03AC, 0x00A3, 0x03AD, 0x03AE, 0x03AF,
+ 0x03CA, 0x0390, 0x03CC, 0x03CD, 0x0391, 0x0392, 0x0393, 0x0394,
+ 0x0395, 0x0396, 0x0397, 0x00BD, 0x0398, 0x0399, 0x00AB, 0x00BB,
+ 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x039A, 0x039B, 0x039C,
+ 0x039D, 0x2563, 0x2551, 0x2557, 0x255D, 0x039E, 0x039F, 0x2510,
+ 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x03A0, 0x03A1,
+ 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x03A3,
+ 0x03A4, 0x03A5, 0x03A6, 0x03A7, 0x03A8, 0x03A9, 0x03B1, 0x03B2,
+ 0x03B3, 0x2518, 0x250C, 0x2588, 0x2584, 0x03B4, 0x03B5, 0x2580,
+ 0x03B6, 0x03B7, 0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD,
+ 0x03BE, 0x03BF, 0x03C0, 0x03C1, 0x03C3, 0x03C2, 0x03C4, 0x0384,
+ 0x00AD, 0x00B1, 0x03C5, 0x03C6, 0x03C7, 0x00A7, 0x03C8, 0x0385,
+ 0x00B0, 0x00A8, 0x03C9, 0x03CB, 0x03B0, 0x03CE, 0x25A0, 0x00A0
};
public Cp869()
{
- super("Cp869", new String[] {"Cp-869"}, lookup);
+ super("Cp869", new String[] {"Cp-869"}, lookup);
}
} // class Cp869
diff --git a/gnu/java/nio/charset/Cp874.java b/gnu/java/nio/charset/Cp874.java
index f6e52c485..d399c723c 100644
--- a/gnu/java/nio/charset/Cp874.java
+++ b/gnu/java/nio/charset/Cp874.java
@@ -43,45 +43,45 @@ public final class Cp874 extends ByteCharset
/**
* This is the lookup table for this encoding
*/
- private static final char[] lookup =
+ private static final char[] lookup =
{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x20AC, NONE, NONE, NONE, NONE, 0x2026, NONE, NONE,
- NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE,
- NONE, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
- NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE,
- 0x00A0, 0x0E01, 0x0E02, 0x0E03, 0x0E04, 0x0E05, 0x0E06, 0x0E07,
- 0x0E08, 0x0E09, 0x0E0A, 0x0E0B, 0x0E0C, 0x0E0D, 0x0E0E, 0x0E0F,
- 0x0E10, 0x0E11, 0x0E12, 0x0E13, 0x0E14, 0x0E15, 0x0E16, 0x0E17,
- 0x0E18, 0x0E19, 0x0E1A, 0x0E1B, 0x0E1C, 0x0E1D, 0x0E1E, 0x0E1F,
- 0x0E20, 0x0E21, 0x0E22, 0x0E23, 0x0E24, 0x0E25, 0x0E26, 0x0E27,
- 0x0E28, 0x0E29, 0x0E2A, 0x0E2B, 0x0E2C, 0x0E2D, 0x0E2E, 0x0E2F,
- 0x0E30, 0x0E31, 0x0E32, 0x0E33, 0x0E34, 0x0E35, 0x0E36, 0x0E37,
- 0x0E38, 0x0E39, 0x0E3A, NONE, NONE, NONE, NONE, 0x0E3F,
- 0x0E40, 0x0E41, 0x0E42, 0x0E43, 0x0E44, 0x0E45, 0x0E46, 0x0E47,
- 0x0E48, 0x0E49, 0x0E4A, 0x0E4B, 0x0E4C, 0x0E4D, 0x0E4E, 0x0E4F,
- 0x0E50, 0x0E51, 0x0E52, 0x0E53, 0x0E54, 0x0E55, 0x0E56, 0x0E57,
- 0x0E58, 0x0E59, 0x0E5A, 0x0E5B, NONE, NONE, NONE, NONE
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+ 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+ 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
+ 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+ 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
+ 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
+ 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+ 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+ 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x20AC, NONE, NONE, NONE, NONE, 0x2026, NONE, NONE,
+ NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE,
+ NONE, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
+ NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE,
+ 0x00A0, 0x0E01, 0x0E02, 0x0E03, 0x0E04, 0x0E05, 0x0E06, 0x0E07,
+ 0x0E08, 0x0E09, 0x0E0A, 0x0E0B, 0x0E0C, 0x0E0D, 0x0E0E, 0x0E0F,
+ 0x0E10, 0x0E11, 0x0E12, 0x0E13, 0x0E14, 0x0E15, 0x0E16, 0x0E17,
+ 0x0E18, 0x0E19, 0x0E1A, 0x0E1B, 0x0E1C, 0x0E1D, 0x0E1E, 0x0E1F,
+ 0x0E20, 0x0E21, 0x0E22, 0x0E23, 0x0E24, 0x0E25, 0x0E26, 0x0E27,
+ 0x0E28, 0x0E29, 0x0E2A, 0x0E2B, 0x0E2C, 0x0E2D, 0x0E2E, 0x0E2F,
+ 0x0E30, 0x0E31, 0x0E32, 0x0E33, 0x0E34, 0x0E35, 0x0E36, 0x0E37,
+ 0x0E38, 0x0E39, 0x0E3A, NONE, NONE, NONE, NONE, 0x0E3F,
+ 0x0E40, 0x0E41, 0x0E42, 0x0E43, 0x0E44, 0x0E45, 0x0E46, 0x0E47,
+ 0x0E48, 0x0E49, 0x0E4A, 0x0E4B, 0x0E4C, 0x0E4D, 0x0E4E, 0x0E4F,
+ 0x0E50, 0x0E51, 0x0E52, 0x0E53, 0x0E54, 0x0E55, 0x0E56, 0x0E57,
+ 0x0E58, 0x0E59, 0x0E5A, 0x0E5B, NONE, NONE, NONE, NONE
};
public Cp874()
{
- super("Cp874", new String[] {}, lookup);
+ super("Cp874", new String[] {}, lookup);
}
} // class Cp874
diff --git a/gnu/java/nio/charset/EncodingHelper.java b/gnu/java/nio/charset/EncodingHelper.java
index 479b6e534..f99818551 100644
--- a/gnu/java/nio/charset/EncodingHelper.java
+++ b/gnu/java/nio/charset/EncodingHelper.java
@@ -7,7 +7,7 @@ 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
@@ -45,7 +45,7 @@ import java.nio.charset.Charset;
import java.io.UnsupportedEncodingException;
/**
- * This class provides some useful utility methods
+ * This class provides some useful utility methods
* for charset encoding for the java.lang and java.io methods.
*
* @author Sven de Marothy
@@ -54,95 +54,95 @@ public class EncodingHelper
{
/**
- * Contains the mapping from java.io canonical names
+ * Contains the mapping from java.io canonical names
* to java.nio canonical names.
*/
private static final HashMap<String,String> canonicalNames;
static {
- canonicalNames = new HashMap<String,String>();
- canonicalNames.put("US-ASCII", "ASCII");
- canonicalNames.put("windows-1250", "Cp1250");
- canonicalNames.put("windows-1251", "Cp1251");
- canonicalNames.put("windows-1252", "Cp1252");
- canonicalNames.put("windows-1253", "Cp1253");
- canonicalNames.put("windows-1254", "Cp1254");
- canonicalNames.put("windows-1257", "Cp1257");
- canonicalNames.put("ISO-8859-1", "ISO8859_1");
- canonicalNames.put("ISO-8859-2", "ISO8859_2");
- canonicalNames.put("ISO-8859-4", "ISO8859_4");
- canonicalNames.put("ISO-8859-5", "ISO8859_5");
- canonicalNames.put("ISO-8859-7", "ISO8859_7");
- canonicalNames.put("ISO-8859-9", "ISO8859_9");
- canonicalNames.put("ISO-8859-13", "ISO8859_13");
- canonicalNames.put("ISO-8859-15", "ISO8859_15");
- canonicalNames.put("KOI8-R", "KOI8_R");
- canonicalNames.put("UTF-8", "UTF8");
- canonicalNames.put("UTF-16BE", "UnicodeBigUnmarked");
- canonicalNames.put("UTF-16LE", "UnicodeLittleUnmarked");
- canonicalNames.put("windows-1255", "Cp1255");
- canonicalNames.put("windows-1256", "Cp1256");
- canonicalNames.put("windows-1258", "Cp1258");
- canonicalNames.put("ISO-8859-3", "ISO8859_3");
- canonicalNames.put("ISO-8859-6", "ISO8859_6");
- canonicalNames.put("ISO-8859-8", "ISO8859_8");
+ canonicalNames = new HashMap<String,String>();
+ canonicalNames.put("US-ASCII", "ASCII");
+ canonicalNames.put("windows-1250", "Cp1250");
+ canonicalNames.put("windows-1251", "Cp1251");
+ canonicalNames.put("windows-1252", "Cp1252");
+ canonicalNames.put("windows-1253", "Cp1253");
+ canonicalNames.put("windows-1254", "Cp1254");
+ canonicalNames.put("windows-1257", "Cp1257");
+ canonicalNames.put("ISO-8859-1", "ISO8859_1");
+ canonicalNames.put("ISO-8859-2", "ISO8859_2");
+ canonicalNames.put("ISO-8859-4", "ISO8859_4");
+ canonicalNames.put("ISO-8859-5", "ISO8859_5");
+ canonicalNames.put("ISO-8859-7", "ISO8859_7");
+ canonicalNames.put("ISO-8859-9", "ISO8859_9");
+ canonicalNames.put("ISO-8859-13", "ISO8859_13");
+ canonicalNames.put("ISO-8859-15", "ISO8859_15");
+ canonicalNames.put("KOI8-R", "KOI8_R");
+ canonicalNames.put("UTF-8", "UTF8");
+ canonicalNames.put("UTF-16BE", "UnicodeBigUnmarked");
+ canonicalNames.put("UTF-16LE", "UnicodeLittleUnmarked");
+ canonicalNames.put("windows-1255", "Cp1255");
+ canonicalNames.put("windows-1256", "Cp1256");
+ canonicalNames.put("windows-1258", "Cp1258");
+ canonicalNames.put("ISO-8859-3", "ISO8859_3");
+ canonicalNames.put("ISO-8859-6", "ISO8859_6");
+ canonicalNames.put("ISO-8859-8", "ISO8859_8");
}
/**
- * Returns the name of the default encoding,
+ * Returns the name of the default encoding,
* falls back on defaults to Latin-1 if there's a problem.
*/
public static String getDefaultEncoding()
{
- try
- {
- return System.getProperty("file.encoding");
- } catch(SecurityException e) {
- } catch(IllegalArgumentException e) {
- }
- // XXX - Throw an error here? For now, default to the 'safe' encoding.
- return "8859_1";
+ try
+ {
+ return System.getProperty("file.encoding");
+ } catch(SecurityException e) {
+ } catch(IllegalArgumentException e) {
+ }
+ // XXX - Throw an error here? For now, default to the 'safe' encoding.
+ return "8859_1";
}
/**
- * Returns the java.io canonical name of a charset given with the
+ * Returns the java.io canonical name of a charset given with the
* java.nio canonical name. If the charset does not have a java.io
* canonical name, the input string is returned.
*/
public static String getOldCanonical(String newCanonical)
{
- String oldCanonical = (String) canonicalNames.get(newCanonical);
- return (oldCanonical != null)?oldCanonical : newCanonical;
+ String oldCanonical = (String) canonicalNames.get(newCanonical);
+ return (oldCanonical != null)?oldCanonical : newCanonical;
}
public static boolean isISOLatin1(String s)
{
- if(s.equals("ISO-8859-1") ||
- s.equals("8859_1") ||
- s.equals("ISO_8859-1") ||
- s.equals("latin1") ||
- s.equals("ISO8859_1") ||
- s.equals("ISO_8859_1"))
- return true;
- return false;
+ if(s.equals("ISO-8859-1") ||
+ s.equals("8859_1") ||
+ s.equals("ISO_8859-1") ||
+ s.equals("latin1") ||
+ s.equals("ISO8859_1") ||
+ s.equals("ISO_8859_1"))
+ return true;
+ return false;
}
/**
- * Gets a charset, throwing the java.io exception and not
+ * Gets a charset, throwing the java.io exception and not
* the java.nio exception if an error occurs.
*/
- public static Charset getCharset(String name)
- throws UnsupportedEncodingException
+ public static Charset getCharset(String name)
+ throws UnsupportedEncodingException
{
- try
+ try
{
return Charset.forName(name);
- }
- catch(IllegalCharsetNameException e)
+ }
+ catch(IllegalCharsetNameException e)
{
throw new UnsupportedEncodingException("Charset "+name+" not found.");
- }
- catch(UnsupportedCharsetException e)
+ }
+ catch(UnsupportedCharsetException e)
{
throw new UnsupportedEncodingException("Charset "+name+" not found.");
}
@@ -159,6 +159,3 @@ public class EncodingHelper
return new UTF_8();
}
}
-
-
-
diff --git a/gnu/java/nio/charset/ISO_8859_1.java b/gnu/java/nio/charset/ISO_8859_1.java
index 19a538d9f..eb7c5ec59 100644
--- a/gnu/java/nio/charset/ISO_8859_1.java
+++ b/gnu/java/nio/charset/ISO_8859_1.java
@@ -1,4 +1,4 @@
-/* ISO_8859_1.java --
+/* ISO_8859_1.java --
Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -58,7 +58,7 @@ final class ISO_8859_1 extends Charset
* http://java.sun.com/j2se/1.5.0/docs/guide/intl/encoding.doc.html
*/
super ("ISO-8859-1", new String[] {
- /* These names are provided by
+ /* These names are provided by
* http://www.iana.org/assignments/character-sets
*/
"iso-ir-100",
@@ -111,7 +111,7 @@ final class ISO_8859_1 extends Charset
return (char)(b & 0xFF);
}
};
-
+
// Package-private to avoid a trampoline constructor.
Decoder (Charset cs)
{
diff --git a/gnu/java/nio/charset/ISO_8859_13.java b/gnu/java/nio/charset/ISO_8859_13.java
index 3bbd42f3b..5e2748974 100644
--- a/gnu/java/nio/charset/ISO_8859_13.java
+++ b/gnu/java/nio/charset/ISO_8859_13.java
@@ -47,57 +47,56 @@ public final class ISO_8859_13 extends ByteCharset
/**
* This is the lookup table for this encoding
*/
- private static final char[] lookup =
+ private static final char[] lookup =
{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
- 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
- 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
- 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
- 0x00A0, 0x201D, 0x00A2, 0x00A3, 0x00A4, 0x201E, 0x00A6, 0x00A7,
- 0x00D8, 0x00A9, 0x0156, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00C6,
- 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x201C, 0x00B5, 0x00B6, 0x00B7,
- 0x00F8, 0x00B9, 0x0157, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00E6,
- 0x0104, 0x012E, 0x0100, 0x0106, 0x00C4, 0x00C5, 0x0118, 0x0112,
- 0x010C, 0x00C9, 0x0179, 0x0116, 0x0122, 0x0136, 0x012A, 0x013B,
- 0x0160, 0x0143, 0x0145, 0x00D3, 0x014C, 0x00D5, 0x00D6, 0x00D7,
- 0x0172, 0x0141, 0x015A, 0x016A, 0x00DC, 0x017B, 0x017D, 0x00DF,
- 0x0105, 0x012F, 0x0101, 0x0107, 0x00E4, 0x00E5, 0x0119, 0x0113,
- 0x010D, 0x00E9, 0x017A, 0x0117, 0x0123, 0x0137, 0x012B, 0x013C,
- 0x0161, 0x0144, 0x0146, 0x00F3, 0x014D, 0x00F5, 0x00F6, 0x00F7,
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+ 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+ 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
+ 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+ 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
+ 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
+ 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+ 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+ 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
+ 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
+ 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
+ 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
+ 0x00A0, 0x201D, 0x00A2, 0x00A3, 0x00A4, 0x201E, 0x00A6, 0x00A7,
+ 0x00D8, 0x00A9, 0x0156, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00C6,
+ 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x201C, 0x00B5, 0x00B6, 0x00B7,
+ 0x00F8, 0x00B9, 0x0157, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00E6,
+ 0x0104, 0x012E, 0x0100, 0x0106, 0x00C4, 0x00C5, 0x0118, 0x0112,
+ 0x010C, 0x00C9, 0x0179, 0x0116, 0x0122, 0x0136, 0x012A, 0x013B,
+ 0x0160, 0x0143, 0x0145, 0x00D3, 0x014C, 0x00D5, 0x00D6, 0x00D7,
+ 0x0172, 0x0141, 0x015A, 0x016A, 0x00DC, 0x017B, 0x017D, 0x00DF,
+ 0x0105, 0x012F, 0x0101, 0x0107, 0x00E4, 0x00E5, 0x0119, 0x0113,
+ 0x010D, 0x00E9, 0x017A, 0x0117, 0x0123, 0x0137, 0x012B, 0x013C,
+ 0x0161, 0x0144, 0x0146, 0x00F3, 0x014D, 0x00F5, 0x00F6, 0x00F7,
0x0173, 0x0142, 0x015B, 0x016B, 0x00FC, 0x017C, 0x017E, 0x2019
- };
+ };
public ISO_8859_13()
{
super("ISO-8859-13", new String[] {
- "ISO8859_13",
- "8859_13",
- "ibm-921_P100-1995",
- "ibm-921",
- "iso_8859_13",
- "iso8859_13",
- "iso-8859-13",
- "8859_13",
- "cp921",
- "921"
+ "ISO8859_13",
+ "8859_13",
+ "ibm-921_P100-1995",
+ "ibm-921",
+ "iso_8859_13",
+ "iso8859_13",
+ "iso-8859-13",
+ "8859_13",
+ "cp921",
+ "921"
}, lookup);
}
-
-} // class ISO_8859_13
+} // class ISO_8859_13
diff --git a/gnu/java/nio/charset/ISO_8859_15.java b/gnu/java/nio/charset/ISO_8859_15.java
index df2265ac5..dc5e9e55a 100644
--- a/gnu/java/nio/charset/ISO_8859_15.java
+++ b/gnu/java/nio/charset/ISO_8859_15.java
@@ -47,64 +47,63 @@ public final class ISO_8859_15 extends ByteCharset
/**
* This is the lookup table for this encoding
*/
- private static final char[] lookup =
+ private static final char[] lookup =
{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
- 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
- 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
- 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
- 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x20AC, 0x00A5, 0x0160, 0x00A7,
- 0x0161, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
- 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x017D, 0x00B5, 0x00B6, 0x00B7,
- 0x017E, 0x00B9, 0x00BA, 0x00BB, 0x0152, 0x0153, 0x0178, 0x00BF,
- 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7,
- 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
- 0x00D0, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7,
- 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF,
- 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7,
- 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
- 0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7,
- 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF
- };
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+ 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+ 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
+ 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+ 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
+ 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
+ 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+ 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+ 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
+ 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
+ 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
+ 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
+ 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x20AC, 0x00A5, 0x0160, 0x00A7,
+ 0x0161, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
+ 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x017D, 0x00B5, 0x00B6, 0x00B7,
+ 0x017E, 0x00B9, 0x00BA, 0x00BB, 0x0152, 0x0153, 0x0178, 0x00BF,
+ 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7,
+ 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
+ 0x00D0, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7,
+ 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF,
+ 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7,
+ 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
+ 0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7,
+ 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF
+ };
public ISO_8859_15()
{
super("ISO-8859-15", new String[] {
- "8859_15",
- "iso8859_15",
- "iso-8859-15",
- "8859-15",
- "latin9",
- "iso_8859_15",
- "ibm-923_P100-1998",
- "ibm-923",
- "Latin-9",
- "l9",
- "latin0",
- "csisolatin0",
- "csisolatin9",
- "iso8859_15_fdis",
- "cp923",
- "923",
- "windows-28605"
+ "8859_15",
+ "iso8859_15",
+ "iso-8859-15",
+ "8859-15",
+ "latin9",
+ "iso_8859_15",
+ "ibm-923_P100-1998",
+ "ibm-923",
+ "Latin-9",
+ "l9",
+ "latin0",
+ "csisolatin0",
+ "csisolatin9",
+ "iso8859_15_fdis",
+ "cp923",
+ "923",
+ "windows-28605"
}, lookup);
}
-
-} // class ISO_8859_15
+} // class ISO_8859_15
diff --git a/gnu/java/nio/charset/ISO_8859_2.java b/gnu/java/nio/charset/ISO_8859_2.java
index dbe2b4dbf..7a086923d 100644
--- a/gnu/java/nio/charset/ISO_8859_2.java
+++ b/gnu/java/nio/charset/ISO_8859_2.java
@@ -48,7 +48,7 @@ public final class ISO_8859_2 extends ByteCharset
* This is the lookup table for this encoding
* Note: ranges 0-1F and 7f-97 aren't defined in the spec file aron used.
*/
- private static final char[] lookup =
+ private static final char[] lookup =
{
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
@@ -82,28 +82,27 @@ public final class ISO_8859_2 extends ByteCharset
0x010D, 0x00E9, 0x0119, 0x00EB, 0x011B, 0x00ED, 0x00EE, 0x010F,
0x0111, 0x0144, 0x0148, 0x00F3, 0x00F4, 0x0151, 0x00F6, 0x00F7,
0x0159, 0x016F, 0x00FA, 0x0171, 0x00FC, 0x00FD, 0x0163, 0x02D9
- };
+ };
public ISO_8859_2()
{
super("ISO-8859-2", new String[] {
- "ISO8859_2",
- "8859_2",
- "ibm-912_P100-1995",
- "ibm-912",
- "iso_8859_2",
- "iso8859_2",
- "iso-8859-2",
- "ISO_8859-2:1987",
- "latin2",
- "csISOLatin2",
- "iso-ir-101",
- "l2",
- "cp912",
- "912",
- "windows-28592"
+ "ISO8859_2",
+ "8859_2",
+ "ibm-912_P100-1995",
+ "ibm-912",
+ "iso_8859_2",
+ "iso8859_2",
+ "iso-8859-2",
+ "ISO_8859-2:1987",
+ "latin2",
+ "csISOLatin2",
+ "iso-ir-101",
+ "l2",
+ "cp912",
+ "912",
+ "windows-28592"
}, lookup);
}
-
-} // class ISO_8859_2
+} // class ISO_8859_2
diff --git a/gnu/java/nio/charset/ISO_8859_3.java b/gnu/java/nio/charset/ISO_8859_3.java
index 567379e7d..a3c1ea692 100644
--- a/gnu/java/nio/charset/ISO_8859_3.java
+++ b/gnu/java/nio/charset/ISO_8859_3.java
@@ -47,62 +47,61 @@ public final class ISO_8859_3 extends ByteCharset
/**
* This is the lookup table for this encoding
*/
- private static final char[] lookup =
+ private static final char[] lookup =
{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
- 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
- 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
- 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
- 0x00A0, 0x0126, 0x02D8, 0x00A3, 0x00A4, NONE, 0x0124, 0x00A7,
- 0x00A8, 0x0130, 0x015E, 0x011E, 0x0134, 0x00AD, NONE, 0x017B,
- 0x00B0, 0x0127, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x0125, 0x00B7,
- 0x00B8, 0x0131, 0x015F, 0x011F, 0x0135, 0x00BD, NONE, 0x017C,
- 0x00C0, 0x00C1, 0x00C2, NONE, 0x00C4, 0x010A, 0x0108, 0x00C7,
- 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
- NONE, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x0120, 0x00D6, 0x00D7,
- 0x011C, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x016C, 0x015C, 0x00DF,
- 0x00E0, 0x00E1, 0x00E2, NONE, 0x00E4, 0x010B, 0x0109, 0x00E7,
- 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
- NONE, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x0121, 0x00F6, 0x00F7,
- 0x011D, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x016D, 0x015D, 0x02D9
- };
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+ 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+ 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
+ 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+ 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
+ 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
+ 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+ 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+ 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
+ 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
+ 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
+ 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
+ 0x00A0, 0x0126, 0x02D8, 0x00A3, 0x00A4, NONE, 0x0124, 0x00A7,
+ 0x00A8, 0x0130, 0x015E, 0x011E, 0x0134, 0x00AD, NONE, 0x017B,
+ 0x00B0, 0x0127, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x0125, 0x00B7,
+ 0x00B8, 0x0131, 0x015F, 0x011F, 0x0135, 0x00BD, NONE, 0x017C,
+ 0x00C0, 0x00C1, 0x00C2, NONE, 0x00C4, 0x010A, 0x0108, 0x00C7,
+ 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
+ NONE, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x0120, 0x00D6, 0x00D7,
+ 0x011C, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x016C, 0x015C, 0x00DF,
+ 0x00E0, 0x00E1, 0x00E2, NONE, 0x00E4, 0x010B, 0x0109, 0x00E7,
+ 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
+ NONE, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x0121, 0x00F6, 0x00F7,
+ 0x011D, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x016D, 0x015D, 0x02D9
+ };
public ISO_8859_3()
{
super("ISO-8859-3", new String[] {
- "ISO8859_3",
- "8859_3",
- "ibm-913_P100-2000",
- "ibm-913",
- "iso_8859_3",
- "iso8859_3",
- "iso-8859-3",
- "ISO_8859-3:1988",
- "latin3",
- "csISOLatin3",
- "iso-ir-109",
- "l3",
- "cp913",
- "913",
- "windows-28593"
+ "ISO8859_3",
+ "8859_3",
+ "ibm-913_P100-2000",
+ "ibm-913",
+ "iso_8859_3",
+ "iso8859_3",
+ "iso-8859-3",
+ "ISO_8859-3:1988",
+ "latin3",
+ "csISOLatin3",
+ "iso-ir-109",
+ "l3",
+ "cp913",
+ "913",
+ "windows-28593"
}, lookup);
}
-
-} // class ISO_8859_3
+} // class ISO_8859_3
diff --git a/gnu/java/nio/charset/ISO_8859_4.java b/gnu/java/nio/charset/ISO_8859_4.java
index ca062278a..3e92dbe64 100644
--- a/gnu/java/nio/charset/ISO_8859_4.java
+++ b/gnu/java/nio/charset/ISO_8859_4.java
@@ -48,7 +48,7 @@ public final class ISO_8859_4 extends ByteCharset
* This is the lookup table for this encoding
* Note: ranges 0-1F and 7f-9f aren't defined in the spec file aron used.
*/
- private static final char[] lookup =
+ private static final char[] lookup =
{
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
@@ -82,28 +82,27 @@ public final class ISO_8859_4 extends ByteCharset
0x010D, 0x00E9, 0x0119, 0x00EB, 0x0117, 0x00ED, 0x00EE, 0x012B,
0x0111, 0x0146, 0x014D, 0x0137, 0x00F4, 0x00F5, 0x00F6, 0x00F7,
0x00F8, 0x0173, 0x00FA, 0x00FB, 0x00FC, 0x0169, 0x016B, 0x02D9
- };
+ };
public ISO_8859_4()
{
super("ISO-8859-4", new String[] {
- "ISO8859_4",
- "8859_4",
- "ibm-914_P100-1995",
- "ibm-914",
- "iso_8859_4",
- "iso8859_4",
- "iso-8859-4",
- "latin4",
- "csISOLatin4",
- "iso-ir-110",
- "ISO_8859-4:1988",
- "l4",
- "cp914",
- "914",
- "windows-28594"
+ "ISO8859_4",
+ "8859_4",
+ "ibm-914_P100-1995",
+ "ibm-914",
+ "iso_8859_4",
+ "iso8859_4",
+ "iso-8859-4",
+ "latin4",
+ "csISOLatin4",
+ "iso-ir-110",
+ "ISO_8859-4:1988",
+ "l4",
+ "cp914",
+ "914",
+ "windows-28594"
}, lookup);
}
-
-} // class ISO_8859_4
+} // class ISO_8859_4
diff --git a/gnu/java/nio/charset/ISO_8859_5.java b/gnu/java/nio/charset/ISO_8859_5.java
index 70496ce49..17d11e077 100644
--- a/gnu/java/nio/charset/ISO_8859_5.java
+++ b/gnu/java/nio/charset/ISO_8859_5.java
@@ -47,61 +47,60 @@ public final class ISO_8859_5 extends ByteCharset
/**
* This is the lookup table for this encoding
*/
- private static final char[] lookup =
+ private static final char[] lookup =
{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
- 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
- 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
- 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
- 0x00A0, 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, 0x0406, 0x0407,
- 0x0408, 0x0409, 0x040A, 0x040B, 0x040C, 0x00AD, 0x040E, 0x040F,
- 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417,
- 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F,
- 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427,
- 0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F,
- 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437,
- 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F,
- 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
- 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F,
- 0x2116, 0x0451, 0x0452, 0x0453, 0x0454, 0x0455, 0x0456, 0x0457,
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+ 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+ 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
+ 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+ 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
+ 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
+ 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+ 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+ 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
+ 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
+ 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
+ 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
+ 0x00A0, 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, 0x0406, 0x0407,
+ 0x0408, 0x0409, 0x040A, 0x040B, 0x040C, 0x00AD, 0x040E, 0x040F,
+ 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417,
+ 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F,
+ 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427,
+ 0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F,
+ 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437,
+ 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F,
+ 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
+ 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F,
+ 0x2116, 0x0451, 0x0452, 0x0453, 0x0454, 0x0455, 0x0456, 0x0457,
0x0458, 0x0459, 0x045A, 0x045B, 0x045C, 0x00A7, 0x045E, 0x045F
- };
+ };
public ISO_8859_5()
{
super("ISO-8859-5", new String[] {
- "ISO8859_5",
- "8859_5",
- "ibm-915_P100-1995",
- "ibm-915",
- "iso_8859_5",
- "iso8859_5",
- "iso-8859-5",
- "cyrillic",
- "csISOLatinCyrillic",
- "iso-ir-144",
- "ISO_8859-5:1988",
- "cp915",
- "915",
- "windows-28595"
+ "ISO8859_5",
+ "8859_5",
+ "ibm-915_P100-1995",
+ "ibm-915",
+ "iso_8859_5",
+ "iso8859_5",
+ "iso-8859-5",
+ "cyrillic",
+ "csISOLatinCyrillic",
+ "iso-ir-144",
+ "ISO_8859-5:1988",
+ "cp915",
+ "915",
+ "windows-28595"
}, lookup);
}
-
-} // class ISO_8859_5
+} // class ISO_8859_5
diff --git a/gnu/java/nio/charset/ISO_8859_6.java b/gnu/java/nio/charset/ISO_8859_6.java
index dc7a9bef8..47dca4e37 100644
--- a/gnu/java/nio/charset/ISO_8859_6.java
+++ b/gnu/java/nio/charset/ISO_8859_6.java
@@ -47,65 +47,64 @@ public final class ISO_8859_6 extends ByteCharset
/**
* This is the lookup table for this encoding
*/
- private static final char[] lookup =
+ private static final char[] lookup =
{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
- 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
- 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
- 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
- 0x00A0, NONE, NONE, NONE, 0x00A4, NONE, NONE, NONE,
- NONE, NONE, NONE, NONE, 0x060C, 0x00AD, NONE, NONE,
- NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE,
- NONE, NONE, NONE, 0x061B, NONE, NONE, NONE, 0x061F,
- NONE, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627,
- 0x0628, 0x0629, 0x062A, 0x062B, 0x062C, 0x062D, 0x062E, 0x062F,
- 0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x0637,
- 0x0638, 0x0639, 0x063A, NONE, NONE, NONE, NONE, NONE,
- 0x0640, 0x0641, 0x0642, 0x0643, 0x0644, 0x0645, 0x0646, 0x0647,
- 0x0648, 0x0649, 0x064A, 0x064B, 0x064C, 0x064D, 0x064E, 0x064F,
- 0x0650, 0x0651, 0x0652, NONE, NONE, NONE, NONE, NONE,
- NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE
- };
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+ 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+ 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
+ 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+ 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
+ 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
+ 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+ 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+ 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
+ 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
+ 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
+ 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
+ 0x00A0, NONE, NONE, NONE, 0x00A4, NONE, NONE, NONE,
+ NONE, NONE, NONE, NONE, 0x060C, 0x00AD, NONE, NONE,
+ NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE,
+ NONE, NONE, NONE, 0x061B, NONE, NONE, NONE, 0x061F,
+ NONE, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627,
+ 0x0628, 0x0629, 0x062A, 0x062B, 0x062C, 0x062D, 0x062E, 0x062F,
+ 0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x0637,
+ 0x0638, 0x0639, 0x063A, NONE, NONE, NONE, NONE, NONE,
+ 0x0640, 0x0641, 0x0642, 0x0643, 0x0644, 0x0645, 0x0646, 0x0647,
+ 0x0648, 0x0649, 0x064A, 0x064B, 0x064C, 0x064D, 0x064E, 0x064F,
+ 0x0650, 0x0651, 0x0652, NONE, NONE, NONE, NONE, NONE,
+ NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE
+ };
public ISO_8859_6()
{
super("ISO-8859-6", new String[] {
- "8859_6",
- "ibm-1089_P100-1995",
- "ibm-1089",
- "iso_8859_6",
- "iso8859_6",
- "iso-8859-6",
- "arabic",
- "csISOLatinArabic",
- "iso-ir-127",
- "ISO_8859-6:1987",
- "ECMA-114",
- "ASMO-708",
- "8859_6",
- "cp1089",
- "1089",
- "windows-28596",
- "ISO-8859-6-I",
- "ISO-8859-6-E"
+ "8859_6",
+ "ibm-1089_P100-1995",
+ "ibm-1089",
+ "iso_8859_6",
+ "iso8859_6",
+ "iso-8859-6",
+ "arabic",
+ "csISOLatinArabic",
+ "iso-ir-127",
+ "ISO_8859-6:1987",
+ "ECMA-114",
+ "ASMO-708",
+ "8859_6",
+ "cp1089",
+ "1089",
+ "windows-28596",
+ "ISO-8859-6-I",
+ "ISO-8859-6-E"
}, lookup);
}
-
-} // class ISO_8859_6
+} // class ISO_8859_6
diff --git a/gnu/java/nio/charset/ISO_8859_7.java b/gnu/java/nio/charset/ISO_8859_7.java
index 195f16094..19428cf8a 100644
--- a/gnu/java/nio/charset/ISO_8859_7.java
+++ b/gnu/java/nio/charset/ISO_8859_7.java
@@ -47,64 +47,63 @@ public final class ISO_8859_7 extends ByteCharset
/**
* This is the lookup table for this encoding
*/
- private static final char[] lookup =
+ private static final char[] lookup =
{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
- 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
- 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
- 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
- 0x00A0, 0x02BD, 0x02BC, 0x00A3, NONE, NONE, 0x00A6, 0x00A7,
- 0x00A8, 0x00A9, NONE, 0x00AB, 0x00AC, 0x00AD, NONE, 0x2015,
- 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x0384, 0x0385, 0x0386, 0x00B7,
- 0x0388, 0x0389, 0x038A, 0x00BB, 0x038C, 0x00BD, 0x038E, 0x038F,
- 0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397,
- 0x0398, 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F,
- 0x03A0, 0x03A1, NONE, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7,
- 0x03A8, 0x03A9, 0x03AA, 0x03AB, 0x03AC, 0x03AD, 0x03AE, 0x03AF,
- 0x03B0, 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7,
- 0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF,
- 0x03C0, 0x03C1, 0x03C2, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7,
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+ 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+ 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
+ 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+ 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
+ 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
+ 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+ 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+ 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
+ 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
+ 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
+ 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
+ 0x00A0, 0x02BD, 0x02BC, 0x00A3, NONE, NONE, 0x00A6, 0x00A7,
+ 0x00A8, 0x00A9, NONE, 0x00AB, 0x00AC, 0x00AD, NONE, 0x2015,
+ 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x0384, 0x0385, 0x0386, 0x00B7,
+ 0x0388, 0x0389, 0x038A, 0x00BB, 0x038C, 0x00BD, 0x038E, 0x038F,
+ 0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397,
+ 0x0398, 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F,
+ 0x03A0, 0x03A1, NONE, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7,
+ 0x03A8, 0x03A9, 0x03AA, 0x03AB, 0x03AC, 0x03AD, 0x03AE, 0x03AF,
+ 0x03B0, 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7,
+ 0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF,
+ 0x03C0, 0x03C1, 0x03C2, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7,
0x03C8, 0x03C9, 0x03CA, 0x03CB, 0x03CC, 0x03CD, 0x03CE, NONE
- };
+ };
public ISO_8859_7()
{
super("ISO-8859-7", new String[] {
- "ISO8859_7",
- "8859_7",
- "ibm-813_P100-1995",
- "ibm-813",
- "iso_8859_7",
- "iso8859_7",
- "iso-8859-7",
- "greek",
- "greek8",
- "ELOT_928",
- "ECMA-118",
- "csISOLatinGreek",
- "iso-ir-126",
- "ISO_8859-7:1987",
- "cp813",
- "813",
- "windows-28597"
+ "ISO8859_7",
+ "8859_7",
+ "ibm-813_P100-1995",
+ "ibm-813",
+ "iso_8859_7",
+ "iso8859_7",
+ "iso-8859-7",
+ "greek",
+ "greek8",
+ "ELOT_928",
+ "ECMA-118",
+ "csISOLatinGreek",
+ "iso-ir-126",
+ "ISO_8859-7:1987",
+ "cp813",
+ "813",
+ "windows-28597"
}, lookup);
}
-
-} // class ISO_8859_7
+} // class ISO_8859_7
diff --git a/gnu/java/nio/charset/ISO_8859_8.java b/gnu/java/nio/charset/ISO_8859_8.java
index b58030f17..fc60d39b5 100644
--- a/gnu/java/nio/charset/ISO_8859_8.java
+++ b/gnu/java/nio/charset/ISO_8859_8.java
@@ -47,63 +47,62 @@ public final class ISO_8859_8 extends ByteCharset
/**
* This is the lookup table for this encoding
*/
- private static final char[] lookup =
+ private static final char[] lookup =
{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
- 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
- 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
- 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
- 0x00A0, NONE, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
- 0x00A8, 0x00A9, 0x00D7, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x203E,
- 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
- 0x00B8, 0x00B9, 0x00F7, 0x00BB, 0x00BC, 0x00BD, 0x00BE, NONE,
- NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE,
- NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE,
- NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE,
- NONE, NONE, NONE, NONE, NONE, NONE, NONE, 0x2017,
- 0x05D0, 0x05D1, 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7,
- 0x05D8, 0x05D9, 0x05DA, 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF,
- 0x05E0, 0x05E1, 0x05E2, 0x05E3, 0x05E4, 0x05E5, 0x05E6, 0x05E7,
- 0x05E8, 0x05E9, 0x05EA, NONE, NONE, NONE, NONE, NONE
- };
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+ 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+ 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
+ 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+ 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
+ 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
+ 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+ 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+ 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
+ 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
+ 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
+ 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
+ 0x00A0, NONE, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
+ 0x00A8, 0x00A9, 0x00D7, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x203E,
+ 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
+ 0x00B8, 0x00B9, 0x00F7, 0x00BB, 0x00BC, 0x00BD, 0x00BE, NONE,
+ NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE,
+ NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE,
+ NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE,
+ NONE, NONE, NONE, NONE, NONE, NONE, NONE, 0x2017,
+ 0x05D0, 0x05D1, 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7,
+ 0x05D8, 0x05D9, 0x05DA, 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF,
+ 0x05E0, 0x05E1, 0x05E2, 0x05E3, 0x05E4, 0x05E5, 0x05E6, 0x05E7,
+ 0x05E8, 0x05E9, 0x05EA, NONE, NONE, NONE, NONE, NONE
+ };
public ISO_8859_8()
{
super("ISO-8859-8", new String[] {
- "ISO8859_8",
- "8859_8",
- "ibm-916_P100-1995",
- "ibm-916",
- "iso_8859_8",
- "iso8859_8",
- "iso-8859-8",
- "hebrew",
- "csISOLatinHebrew",
- "iso-ir-138",
- "ISO_8859-8:1988",
- "ISO-8859-8-I",
- "ISO-8859-8-E",
- "cp916",
- "916",
- "windows-28598"
+ "ISO8859_8",
+ "8859_8",
+ "ibm-916_P100-1995",
+ "ibm-916",
+ "iso_8859_8",
+ "iso8859_8",
+ "iso-8859-8",
+ "hebrew",
+ "csISOLatinHebrew",
+ "iso-ir-138",
+ "ISO_8859-8:1988",
+ "ISO-8859-8-I",
+ "ISO-8859-8-E",
+ "cp916",
+ "916",
+ "windows-28598"
}, lookup);
}
-
-} // class ISO_8859_8
+} // class ISO_8859_8
diff --git a/gnu/java/nio/charset/ISO_8859_9.java b/gnu/java/nio/charset/ISO_8859_9.java
index 83fb5a222..70d987c8f 100644
--- a/gnu/java/nio/charset/ISO_8859_9.java
+++ b/gnu/java/nio/charset/ISO_8859_9.java
@@ -47,63 +47,62 @@ public final class ISO_8859_9 extends ByteCharset
/**
* This is the lookup table for this encoding
*/
- private static final char[] lookup =
+ private static final char[] lookup =
{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
- 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
- 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
- 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
- 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
- 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
- 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
- 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
- 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7,
- 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
- 0x011E, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7,
- 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x0130, 0x015E, 0x00DF,
- 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7,
- 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
- 0x011F, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7,
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+ 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+ 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
+ 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+ 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
+ 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
+ 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+ 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+ 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
+ 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
+ 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
+ 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
+ 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
+ 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
+ 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
+ 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
+ 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7,
+ 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
+ 0x011E, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7,
+ 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x0130, 0x015E, 0x00DF,
+ 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7,
+ 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
+ 0x011F, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7,
0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x0131, 0x015F, 0x00FF
- };
+ };
public ISO_8859_9()
{
super("ISO-8859-9", new String[] {
- "ISO8859_9",
- "8859_9",
- "ibm-920_P100-1995",
- "ibm-920",
- "iso8859_9",
- "iso-8859-9",
- "iso_8859_9",
- "latin5",
- "csISOLatin5",
- "iso-ir-148",
- "ISO_8859-9:1989",
- "l5",
- "cp920",
- "920",
- "windows-28599",
- "ECMA-128"
+ "ISO8859_9",
+ "8859_9",
+ "ibm-920_P100-1995",
+ "ibm-920",
+ "iso8859_9",
+ "iso-8859-9",
+ "iso_8859_9",
+ "latin5",
+ "csISOLatin5",
+ "iso-ir-148",
+ "ISO_8859-9:1989",
+ "l5",
+ "cp920",
+ "920",
+ "windows-28599",
+ "ECMA-128"
}, lookup);
}
-
-} // class ISO_8859_9
+} // class ISO_8859_9
diff --git a/gnu/java/nio/charset/KOI_8.java b/gnu/java/nio/charset/KOI_8.java
index 20eb8b198..f9dc4b1f6 100644
--- a/gnu/java/nio/charset/KOI_8.java
+++ b/gnu/java/nio/charset/KOI_8.java
@@ -47,7 +47,7 @@ public final class KOI_8 extends ByteCharset
/**
* This is the lookup table for this encoding
*/
- private static final char[] lookup =
+ private static final char[] lookup =
{
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
@@ -81,21 +81,20 @@ public final class KOI_8 extends ByteCharset
0x0425, 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E,
0x041F, 0x042F, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412,
0x042C, 0x042B, 0x0417, 0x0428, 0x042D, 0x0429, 0x0427, 0x042A
- };
+ };
public KOI_8()
{
super("KOI8-R", new String[] {
- "KOI8_R",
- "KOI8",
- "KOI-8",
- "KOI_8",
- "koi8-r",
- "koi8r",
- "koi-8-r",
- "koi"
+ "KOI8_R",
+ "KOI8",
+ "KOI-8",
+ "KOI_8",
+ "koi8-r",
+ "koi8r",
+ "koi-8-r",
+ "koi"
}, lookup);
}
-
-} // class KOI_8
+} // class KOI_8
diff --git a/gnu/java/nio/charset/MS874.java b/gnu/java/nio/charset/MS874.java
index f7cf81a25..ed1f7c64f 100644
--- a/gnu/java/nio/charset/MS874.java
+++ b/gnu/java/nio/charset/MS874.java
@@ -43,45 +43,45 @@ public final class MS874 extends ByteCharset
/**
* This is the lookup table for this encoding
*/
- private static final char[] lookup =
+ private static final char[] lookup =
{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x20AC, NONE, NONE, NONE, NONE, 0x2026, NONE, NONE,
- NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE,
- NONE, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
- NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE,
- 0x00A0, 0x0E01, 0x0E02, 0x0E03, 0x0E04, 0x0E05, 0x0E06, 0x0E07,
- 0x0E08, 0x0E09, 0x0E0A, 0x0E0B, 0x0E0C, 0x0E0D, 0x0E0E, 0x0E0F,
- 0x0E10, 0x0E11, 0x0E12, 0x0E13, 0x0E14, 0x0E15, 0x0E16, 0x0E17,
- 0x0E18, 0x0E19, 0x0E1A, 0x0E1B, 0x0E1C, 0x0E1D, 0x0E1E, 0x0E1F,
- 0x0E20, 0x0E21, 0x0E22, 0x0E23, 0x0E24, 0x0E25, 0x0E26, 0x0E27,
- 0x0E28, 0x0E29, 0x0E2A, 0x0E2B, 0x0E2C, 0x0E2D, 0x0E2E, 0x0E2F,
- 0x0E30, 0x0E31, 0x0E32, 0x0E33, 0x0E34, 0x0E35, 0x0E36, 0x0E37,
- 0x0E38, 0x0E39, 0x0E3A, NONE, NONE, NONE, NONE, 0x0E3F,
- 0x0E40, 0x0E41, 0x0E42, 0x0E43, 0x0E44, 0x0E45, 0x0E46, 0x0E47,
- 0x0E48, 0x0E49, 0x0E4A, 0x0E4B, 0x0E4C, 0x0E4D, 0x0E4E, 0x0E4F,
- 0x0E50, 0x0E51, 0x0E52, 0x0E53, 0x0E54, 0x0E55, 0x0E56, 0x0E57,
- 0x0E58, 0x0E59, 0x0E5A, 0x0E5B, NONE, NONE, NONE, NONE
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+ 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+ 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
+ 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+ 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
+ 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
+ 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+ 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+ 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x20AC, NONE, NONE, NONE, NONE, 0x2026, NONE, NONE,
+ NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE,
+ NONE, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
+ NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE,
+ 0x00A0, 0x0E01, 0x0E02, 0x0E03, 0x0E04, 0x0E05, 0x0E06, 0x0E07,
+ 0x0E08, 0x0E09, 0x0E0A, 0x0E0B, 0x0E0C, 0x0E0D, 0x0E0E, 0x0E0F,
+ 0x0E10, 0x0E11, 0x0E12, 0x0E13, 0x0E14, 0x0E15, 0x0E16, 0x0E17,
+ 0x0E18, 0x0E19, 0x0E1A, 0x0E1B, 0x0E1C, 0x0E1D, 0x0E1E, 0x0E1F,
+ 0x0E20, 0x0E21, 0x0E22, 0x0E23, 0x0E24, 0x0E25, 0x0E26, 0x0E27,
+ 0x0E28, 0x0E29, 0x0E2A, 0x0E2B, 0x0E2C, 0x0E2D, 0x0E2E, 0x0E2F,
+ 0x0E30, 0x0E31, 0x0E32, 0x0E33, 0x0E34, 0x0E35, 0x0E36, 0x0E37,
+ 0x0E38, 0x0E39, 0x0E3A, NONE, NONE, NONE, NONE, 0x0E3F,
+ 0x0E40, 0x0E41, 0x0E42, 0x0E43, 0x0E44, 0x0E45, 0x0E46, 0x0E47,
+ 0x0E48, 0x0E49, 0x0E4A, 0x0E4B, 0x0E4C, 0x0E4D, 0x0E4E, 0x0E4F,
+ 0x0E50, 0x0E51, 0x0E52, 0x0E53, 0x0E54, 0x0E55, 0x0E56, 0x0E57,
+ 0x0E58, 0x0E59, 0x0E5A, 0x0E5B, NONE, NONE, NONE, NONE
};
public MS874()
{
- super("MS874", new String[] {}, lookup);
+ super("MS874", new String[] {}, lookup);
}
} // class MS874
diff --git a/gnu/java/nio/charset/MacCentralEurope.java b/gnu/java/nio/charset/MacCentralEurope.java
index ce0854365..ee31a5dad 100644
--- a/gnu/java/nio/charset/MacCentralEurope.java
+++ b/gnu/java/nio/charset/MacCentralEurope.java
@@ -43,45 +43,45 @@ public final class MacCentralEurope extends ByteCharset
/**
* This is the lookup table for this encoding
*/
- private static final char[] lookup =
+ private static final char[] lookup =
{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, NONE,
- 0x00C4, 0x0100, 0x0101, 0x00C9, 0x0104, 0x00D6, 0x00DC, 0x00E1,
- 0x0105, 0x010C, 0x00E4, 0x010D, 0x0106, 0x0107, 0x00E9, 0x0179,
- 0x017A, 0x010E, 0x00ED, 0x010F, 0x0112, 0x0113, 0x0116, 0x00F3,
- 0x0117, 0x00F4, 0x00F6, 0x00F5, 0x00FA, 0x011A, 0x011B, 0x00FC,
- 0x2020, 0x00B0, 0x0118, 0x00A3, 0x00A7, 0x2022, 0x00B6, 0x00DF,
- 0x00AE, 0x00A9, 0x2122, 0x0119, 0x00A8, 0x2260, 0x0123, 0x012E,
- 0x012F, 0x012A, 0x2264, 0x2265, 0x012B, 0x0136, 0x2202, 0x2211,
- 0x0142, 0x013B, 0x013C, 0x013D, 0x013E, 0x0139, 0x013A, 0x0145,
- 0x0146, 0x0143, 0x00AC, 0x221A, 0x0144, 0x0147, 0x2206, 0x00AB,
- 0x00BB, 0x2026, 0x00A0, 0x0148, 0x0150, 0x00D5, 0x0151, 0x014C,
- 0x2013, 0x2014, 0x201C, 0x201D, 0x2018, 0x2019, 0x00F7, 0x25CA,
- 0x014D, 0x0154, 0x0155, 0x0158, 0x2039, 0x203A, 0x0159, 0x0156,
- 0x0157, 0x0160, 0x201A, 0x201E, 0x0161, 0x015A, 0x015B, 0x00C1,
- 0x0164, 0x0165, 0x00CD, 0x017D, 0x017E, 0x016A, 0x00D3, 0x00D4,
- 0x016B, 0x016E, 0x00DA, 0x016F, 0x0170, 0x0171, 0x0172, 0x0173,
- 0x00DD, 0x00FD, 0x0137, 0x017B, 0x0141, 0x017C, 0x0122, 0x02C7
- };
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+ 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+ 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
+ 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+ 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
+ 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
+ 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+ 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+ 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, NONE,
+ 0x00C4, 0x0100, 0x0101, 0x00C9, 0x0104, 0x00D6, 0x00DC, 0x00E1,
+ 0x0105, 0x010C, 0x00E4, 0x010D, 0x0106, 0x0107, 0x00E9, 0x0179,
+ 0x017A, 0x010E, 0x00ED, 0x010F, 0x0112, 0x0113, 0x0116, 0x00F3,
+ 0x0117, 0x00F4, 0x00F6, 0x00F5, 0x00FA, 0x011A, 0x011B, 0x00FC,
+ 0x2020, 0x00B0, 0x0118, 0x00A3, 0x00A7, 0x2022, 0x00B6, 0x00DF,
+ 0x00AE, 0x00A9, 0x2122, 0x0119, 0x00A8, 0x2260, 0x0123, 0x012E,
+ 0x012F, 0x012A, 0x2264, 0x2265, 0x012B, 0x0136, 0x2202, 0x2211,
+ 0x0142, 0x013B, 0x013C, 0x013D, 0x013E, 0x0139, 0x013A, 0x0145,
+ 0x0146, 0x0143, 0x00AC, 0x221A, 0x0144, 0x0147, 0x2206, 0x00AB,
+ 0x00BB, 0x2026, 0x00A0, 0x0148, 0x0150, 0x00D5, 0x0151, 0x014C,
+ 0x2013, 0x2014, 0x201C, 0x201D, 0x2018, 0x2019, 0x00F7, 0x25CA,
+ 0x014D, 0x0154, 0x0155, 0x0158, 0x2039, 0x203A, 0x0159, 0x0156,
+ 0x0157, 0x0160, 0x201A, 0x201E, 0x0161, 0x015A, 0x015B, 0x00C1,
+ 0x0164, 0x0165, 0x00CD, 0x017D, 0x017E, 0x016A, 0x00D3, 0x00D4,
+ 0x016B, 0x016E, 0x00DA, 0x016F, 0x0170, 0x0171, 0x0172, 0x0173,
+ 0x00DD, 0x00FD, 0x0137, 0x017B, 0x0141, 0x017C, 0x0122, 0x02C7
+ };
public MacCentralEurope()
{
- super("MacCentralEurope", new String[] {}, lookup);
+ super("MacCentralEurope", new String[] {}, lookup);
}
} // class MacCentralEurope
diff --git a/gnu/java/nio/charset/MacCroatian.java b/gnu/java/nio/charset/MacCroatian.java
index 3bb19f5e2..acf018414 100644
--- a/gnu/java/nio/charset/MacCroatian.java
+++ b/gnu/java/nio/charset/MacCroatian.java
@@ -43,45 +43,45 @@ public final class MacCroatian extends ByteCharset
/**
* This is the lookup table for this encoding
*/
- private static final char[] lookup =
+ private static final char[] lookup =
{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, NONE,
- 0x00C4, 0x00C5, 0x00C7, 0x00C9, 0x00D1, 0x00D6, 0x00DC, 0x00E1,
- 0x00E0, 0x00E2, 0x00E4, 0x00E3, 0x00E5, 0x00E7, 0x00E9, 0x00E8,
- 0x00EA, 0x00EB, 0x00ED, 0x00EC, 0x00EE, 0x00EF, 0x00F1, 0x00F3,
- 0x00F2, 0x00F4, 0x00F6, 0x00F5, 0x00FA, 0x00F9, 0x00FB, 0x00FC,
- 0x2020, 0x00B0, 0x00A2, 0x00A3, 0x00A7, 0x2022, 0x00B6, 0x00DF,
- 0x00AE, 0x0160, 0x2122, 0x00B4, 0x00A8, 0x2260, 0x017D, 0x00D8,
- 0x221E, 0x00B1, 0x2264, 0x2265, 0x2206, 0x00B5, 0x2202, 0x2211,
- 0x220F, 0x0161, 0x222B, 0x00AA, 0x00BA, 0x03A9, 0x017E, 0x00F8,
- 0x00BF, 0x00A1, 0x00AC, 0x221A, 0x0192, 0x2248, 0x0106, 0x00AB,
- 0x010C, 0x2026, 0x00A0, 0x00C0, 0x00C3, 0x00D5, 0x0152, 0x0153,
- 0x0110, 0x2014, 0x201C, 0x201D, 0x2018, 0x2019, 0x00F7, 0x25CA,
- 0xF8FF, 0x00A9, 0x2044, 0x20AC, 0x2039, 0x203A, 0x00C6, 0x00BB,
- 0x2013, 0x00B7, 0x201A, 0x201E, 0x2030, 0x00C2, 0x0107, 0x00C1,
- 0x010D, 0x00C8, 0x00CD, 0x00CE, 0x00CF, 0x00CC, 0x00D3, 0x00D4,
- 0x0111, 0x00D2, 0x00DA, 0x00DB, 0x00D9, 0x0131, 0x02C6, 0x02DC,
- 0x00AF, 0x03C0, 0x00CB, 0x02DA, 0x00B8, 0x00CA, 0x00E6, 0x02C7
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+ 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+ 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
+ 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+ 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
+ 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
+ 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+ 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+ 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, NONE,
+ 0x00C4, 0x00C5, 0x00C7, 0x00C9, 0x00D1, 0x00D6, 0x00DC, 0x00E1,
+ 0x00E0, 0x00E2, 0x00E4, 0x00E3, 0x00E5, 0x00E7, 0x00E9, 0x00E8,
+ 0x00EA, 0x00EB, 0x00ED, 0x00EC, 0x00EE, 0x00EF, 0x00F1, 0x00F3,
+ 0x00F2, 0x00F4, 0x00F6, 0x00F5, 0x00FA, 0x00F9, 0x00FB, 0x00FC,
+ 0x2020, 0x00B0, 0x00A2, 0x00A3, 0x00A7, 0x2022, 0x00B6, 0x00DF,
+ 0x00AE, 0x0160, 0x2122, 0x00B4, 0x00A8, 0x2260, 0x017D, 0x00D8,
+ 0x221E, 0x00B1, 0x2264, 0x2265, 0x2206, 0x00B5, 0x2202, 0x2211,
+ 0x220F, 0x0161, 0x222B, 0x00AA, 0x00BA, 0x03A9, 0x017E, 0x00F8,
+ 0x00BF, 0x00A1, 0x00AC, 0x221A, 0x0192, 0x2248, 0x0106, 0x00AB,
+ 0x010C, 0x2026, 0x00A0, 0x00C0, 0x00C3, 0x00D5, 0x0152, 0x0153,
+ 0x0110, 0x2014, 0x201C, 0x201D, 0x2018, 0x2019, 0x00F7, 0x25CA,
+ 0xF8FF, 0x00A9, 0x2044, 0x20AC, 0x2039, 0x203A, 0x00C6, 0x00BB,
+ 0x2013, 0x00B7, 0x201A, 0x201E, 0x2030, 0x00C2, 0x0107, 0x00C1,
+ 0x010D, 0x00C8, 0x00CD, 0x00CE, 0x00CF, 0x00CC, 0x00D3, 0x00D4,
+ 0x0111, 0x00D2, 0x00DA, 0x00DB, 0x00D9, 0x0131, 0x02C6, 0x02DC,
+ 0x00AF, 0x03C0, 0x00CB, 0x02DA, 0x00B8, 0x00CA, 0x00E6, 0x02C7
};
public MacCroatian()
{
- super("MacCroatian", new String[] {}, lookup);
+ super("MacCroatian", new String[] {}, lookup);
}
} // class MacCroatian
diff --git a/gnu/java/nio/charset/MacCyrillic.java b/gnu/java/nio/charset/MacCyrillic.java
index b1984e57a..a788fd2ad 100644
--- a/gnu/java/nio/charset/MacCyrillic.java
+++ b/gnu/java/nio/charset/MacCyrillic.java
@@ -43,45 +43,45 @@ public final class MacCyrillic extends ByteCharset
/**
* This is the lookup table for this encoding
*/
- private static final char[] lookup =
+ private static final char[] lookup =
{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, NONE,
- 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417,
- 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F,
- 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427,
- 0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F,
- 0x2020, 0x00B0, 0x0490, 0x00A3, 0x00A7, 0x2022, 0x00B6, 0x0406,
- 0x00AE, 0x00A9, 0x2122, 0x0402, 0x0452, 0x2260, 0x0403, 0x0453,
- 0x221E, 0x00B1, 0x2264, 0x2265, 0x0456, 0x00B5, 0x0491, 0x0408,
- 0x0404, 0x0454, 0x0407, 0x0457, 0x0409, 0x0459, 0x040A, 0x045A,
- 0x0458, 0x0405, 0x00AC, 0x221A, 0x0192, 0x2248, 0x2206, 0x00AB,
- 0x00BB, 0x2026, 0x00A0, 0x040B, 0x045B, 0x040C, 0x045C, 0x0455,
- 0x2013, 0x2014, 0x201C, 0x201D, 0x2018, 0x2019, 0x00F7, 0x201E,
- 0x040E, 0x045E, 0x040F, 0x045F, 0x2116, 0x0401, 0x0451, 0x044F,
- 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437,
- 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F,
- 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
- 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x20AC
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+ 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+ 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
+ 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+ 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
+ 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
+ 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+ 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+ 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, NONE,
+ 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417,
+ 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F,
+ 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427,
+ 0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F,
+ 0x2020, 0x00B0, 0x0490, 0x00A3, 0x00A7, 0x2022, 0x00B6, 0x0406,
+ 0x00AE, 0x00A9, 0x2122, 0x0402, 0x0452, 0x2260, 0x0403, 0x0453,
+ 0x221E, 0x00B1, 0x2264, 0x2265, 0x0456, 0x00B5, 0x0491, 0x0408,
+ 0x0404, 0x0454, 0x0407, 0x0457, 0x0409, 0x0459, 0x040A, 0x045A,
+ 0x0458, 0x0405, 0x00AC, 0x221A, 0x0192, 0x2248, 0x2206, 0x00AB,
+ 0x00BB, 0x2026, 0x00A0, 0x040B, 0x045B, 0x040C, 0x045C, 0x0455,
+ 0x2013, 0x2014, 0x201C, 0x201D, 0x2018, 0x2019, 0x00F7, 0x201E,
+ 0x040E, 0x045E, 0x040F, 0x045F, 0x2116, 0x0401, 0x0451, 0x044F,
+ 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437,
+ 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F,
+ 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
+ 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x20AC
};
public MacCyrillic()
{
- super("MacCyrillic", new String[] {}, lookup);
+ super("MacCyrillic", new String[] {}, lookup);
}
} // class MacCyrillic
diff --git a/gnu/java/nio/charset/MacDingbat.java b/gnu/java/nio/charset/MacDingbat.java
index ad2f1c851..71ef82b13 100644
--- a/gnu/java/nio/charset/MacDingbat.java
+++ b/gnu/java/nio/charset/MacDingbat.java
@@ -43,45 +43,45 @@ public final class MacDingbat extends ByteCharset
/**
* This is the lookup table for this encoding
*/
- private static final char[] lookup =
+ private static final char[] lookup =
{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x2701, 0x2702, 0x2703, 0x2704, 0x260E, 0x2706, 0x2707,
- 0x2708, 0x2709, 0x261B, 0x261E, 0x270C, 0x270D, 0x270E, 0x270F,
- 0x2710, 0x2711, 0x2712, 0x2713, 0x2714, 0x2715, 0x2716, 0x2717,
- 0x2718, 0x2719, 0x271A, 0x271B, 0x271C, 0x271D, 0x271E, 0x271F,
- 0x2720, 0x2721, 0x2722, 0x2723, 0x2724, 0x2725, 0x2726, 0x2727,
- 0x2605, 0x2729, 0x272A, 0x272B, 0x272C, 0x272D, 0x272E, 0x272F,
- 0x2730, 0x2731, 0x2732, 0x2733, 0x2734, 0x2735, 0x2736, 0x2737,
- 0x2738, 0x2739, 0x273A, 0x273B, 0x273C, 0x273D, 0x273E, 0x273F,
- 0x2740, 0x2741, 0x2742, 0x2743, 0x2744, 0x2745, 0x2746, 0x2747,
- 0x2748, 0x2749, 0x274A, 0x274B, 0x25CF, 0x274D, 0x25A0, 0x274F,
- 0x2750, 0x2751, 0x2752, 0x25B2, 0x25BC, 0x25C6, 0x2756, 0x25D7,
- 0x2758, 0x2759, 0x275A, 0x275B, 0x275C, 0x275D, 0x275E, NONE,
- 0x2768, 0x2769, 0x276A, 0x276B, 0x276C, 0x276D, 0x276E, 0x276F,
- 0x2770, 0x2771, 0x2772, 0x2773, 0x2774, 0x2775, NONE, NONE,
- NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE,
- NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE,
- NONE, 0x2761, 0x2762, 0x2763, 0x2764, 0x2765, 0x2766, 0x2767,
- 0x2663, 0x2666, 0x2665, 0x2660, 0x2460, 0x2461, 0x2462, 0x2463,
- 0x2464, 0x2465, 0x2466, 0x2467, 0x2468, 0x2469, 0x2776, 0x2777,
- 0x2778, 0x2779, 0x277A, 0x277B, 0x277C, 0x277D, 0x277E, 0x277F,
- 0x2780, 0x2781, 0x2782, 0x2783, 0x2784, 0x2785, 0x2786, 0x2787,
- 0x2788, 0x2789, 0x278A, 0x278B, 0x278C, 0x278D, 0x278E, 0x278F,
- 0x2790, 0x2791, 0x2792, 0x2793, 0x2794, 0x2192, 0x2194, 0x2195,
- 0x2798, 0x2799, 0x279A, 0x279B, 0x279C, 0x279D, 0x279E, 0x279F,
- 0x27A0, 0x27A1, 0x27A2, 0x27A3, 0x27A4, 0x27A5, 0x27A6, 0x27A7,
- 0x27A8, 0x27A9, 0x27AA, 0x27AB, 0x27AC, 0x27AD, 0x27AE, 0x27AF,
- NONE, 0x27B1, 0x27B2, 0x27B3, 0x27B4, 0x27B5, 0x27B6, 0x27B7,
- 0x27B8, 0x27B9, 0x27BA, 0x27BB, 0x27BC, 0x27BD, 0x27BE, NONE
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+ 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+ 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x2701, 0x2702, 0x2703, 0x2704, 0x260E, 0x2706, 0x2707,
+ 0x2708, 0x2709, 0x261B, 0x261E, 0x270C, 0x270D, 0x270E, 0x270F,
+ 0x2710, 0x2711, 0x2712, 0x2713, 0x2714, 0x2715, 0x2716, 0x2717,
+ 0x2718, 0x2719, 0x271A, 0x271B, 0x271C, 0x271D, 0x271E, 0x271F,
+ 0x2720, 0x2721, 0x2722, 0x2723, 0x2724, 0x2725, 0x2726, 0x2727,
+ 0x2605, 0x2729, 0x272A, 0x272B, 0x272C, 0x272D, 0x272E, 0x272F,
+ 0x2730, 0x2731, 0x2732, 0x2733, 0x2734, 0x2735, 0x2736, 0x2737,
+ 0x2738, 0x2739, 0x273A, 0x273B, 0x273C, 0x273D, 0x273E, 0x273F,
+ 0x2740, 0x2741, 0x2742, 0x2743, 0x2744, 0x2745, 0x2746, 0x2747,
+ 0x2748, 0x2749, 0x274A, 0x274B, 0x25CF, 0x274D, 0x25A0, 0x274F,
+ 0x2750, 0x2751, 0x2752, 0x25B2, 0x25BC, 0x25C6, 0x2756, 0x25D7,
+ 0x2758, 0x2759, 0x275A, 0x275B, 0x275C, 0x275D, 0x275E, NONE,
+ 0x2768, 0x2769, 0x276A, 0x276B, 0x276C, 0x276D, 0x276E, 0x276F,
+ 0x2770, 0x2771, 0x2772, 0x2773, 0x2774, 0x2775, NONE, NONE,
+ NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE,
+ NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE,
+ NONE, 0x2761, 0x2762, 0x2763, 0x2764, 0x2765, 0x2766, 0x2767,
+ 0x2663, 0x2666, 0x2665, 0x2660, 0x2460, 0x2461, 0x2462, 0x2463,
+ 0x2464, 0x2465, 0x2466, 0x2467, 0x2468, 0x2469, 0x2776, 0x2777,
+ 0x2778, 0x2779, 0x277A, 0x277B, 0x277C, 0x277D, 0x277E, 0x277F,
+ 0x2780, 0x2781, 0x2782, 0x2783, 0x2784, 0x2785, 0x2786, 0x2787,
+ 0x2788, 0x2789, 0x278A, 0x278B, 0x278C, 0x278D, 0x278E, 0x278F,
+ 0x2790, 0x2791, 0x2792, 0x2793, 0x2794, 0x2192, 0x2194, 0x2195,
+ 0x2798, 0x2799, 0x279A, 0x279B, 0x279C, 0x279D, 0x279E, 0x279F,
+ 0x27A0, 0x27A1, 0x27A2, 0x27A3, 0x27A4, 0x27A5, 0x27A6, 0x27A7,
+ 0x27A8, 0x27A9, 0x27AA, 0x27AB, 0x27AC, 0x27AD, 0x27AE, 0x27AF,
+ NONE, 0x27B1, 0x27B2, 0x27B3, 0x27B4, 0x27B5, 0x27B6, 0x27B7,
+ 0x27B8, 0x27B9, 0x27BA, 0x27BB, 0x27BC, 0x27BD, 0x27BE, NONE
};
public MacDingbat()
{
- super("MacDingbat", new String[] {}, lookup);
+ super("MacDingbat", new String[] {}, lookup);
}
} // class MacDingbat
diff --git a/gnu/java/nio/charset/MacGreek.java b/gnu/java/nio/charset/MacGreek.java
index 6d1522874..39ca84554 100644
--- a/gnu/java/nio/charset/MacGreek.java
+++ b/gnu/java/nio/charset/MacGreek.java
@@ -43,45 +43,45 @@ public final class MacGreek extends ByteCharset
/**
* This is the lookup table for this encoding
*/
- private static final char[] lookup =
+ private static final char[] lookup =
{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, NONE,
- 0x00C4, 0x00B9, 0x00B2, 0x00C9, 0x00B3, 0x00D6, 0x00DC, 0x0385,
- 0x00E0, 0x00E2, 0x00E4, 0x0384, 0x00A8, 0x00E7, 0x00E9, 0x00E8,
- 0x00EA, 0x00EB, 0x00A3, 0x2122, 0x00EE, 0x00EF, 0x2022, 0x00BD,
- 0x2030, 0x00F4, 0x00F6, 0x00A6, 0x20AC, 0x00F9, 0x00FB, 0x00FC,
- 0x2020, 0x0393, 0x0394, 0x0398, 0x039B, 0x039E, 0x03A0, 0x00DF,
- 0x00AE, 0x00A9, 0x03A3, 0x03AA, 0x00A7, 0x2260, 0x00B0, 0x00B7,
- 0x0391, 0x00B1, 0x2264, 0x2265, 0x00A5, 0x0392, 0x0395, 0x0396,
- 0x0397, 0x0399, 0x039A, 0x039C, 0x03A6, 0x03AB, 0x03A8, 0x03A9,
- 0x03AC, 0x039D, 0x00AC, 0x039F, 0x03A1, 0x2248, 0x03A4, 0x00AB,
- 0x00BB, 0x2026, 0x00A0, 0x03A5, 0x03A7, 0x0386, 0x0388, 0x0153,
- 0x2013, 0x2015, 0x201C, 0x201D, 0x2018, 0x2019, 0x00F7, 0x0389,
- 0x038A, 0x038C, 0x038E, 0x03AD, 0x03AE, 0x03AF, 0x03CC, 0x038F,
- 0x03CD, 0x03B1, 0x03B2, 0x03C8, 0x03B4, 0x03B5, 0x03C6, 0x03B3,
- 0x03B7, 0x03B9, 0x03BE, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BF,
- 0x03C0, 0x03CE, 0x03C1, 0x03C3, 0x03C4, 0x03B8, 0x03C9, 0x03C2,
- 0x03C7, 0x03C5, 0x03B6, 0x03CA, 0x03CB, 0x0390, 0x03B0, 0x00AD
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+ 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+ 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
+ 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+ 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
+ 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
+ 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+ 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+ 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, NONE,
+ 0x00C4, 0x00B9, 0x00B2, 0x00C9, 0x00B3, 0x00D6, 0x00DC, 0x0385,
+ 0x00E0, 0x00E2, 0x00E4, 0x0384, 0x00A8, 0x00E7, 0x00E9, 0x00E8,
+ 0x00EA, 0x00EB, 0x00A3, 0x2122, 0x00EE, 0x00EF, 0x2022, 0x00BD,
+ 0x2030, 0x00F4, 0x00F6, 0x00A6, 0x20AC, 0x00F9, 0x00FB, 0x00FC,
+ 0x2020, 0x0393, 0x0394, 0x0398, 0x039B, 0x039E, 0x03A0, 0x00DF,
+ 0x00AE, 0x00A9, 0x03A3, 0x03AA, 0x00A7, 0x2260, 0x00B0, 0x00B7,
+ 0x0391, 0x00B1, 0x2264, 0x2265, 0x00A5, 0x0392, 0x0395, 0x0396,
+ 0x0397, 0x0399, 0x039A, 0x039C, 0x03A6, 0x03AB, 0x03A8, 0x03A9,
+ 0x03AC, 0x039D, 0x00AC, 0x039F, 0x03A1, 0x2248, 0x03A4, 0x00AB,
+ 0x00BB, 0x2026, 0x00A0, 0x03A5, 0x03A7, 0x0386, 0x0388, 0x0153,
+ 0x2013, 0x2015, 0x201C, 0x201D, 0x2018, 0x2019, 0x00F7, 0x0389,
+ 0x038A, 0x038C, 0x038E, 0x03AD, 0x03AE, 0x03AF, 0x03CC, 0x038F,
+ 0x03CD, 0x03B1, 0x03B2, 0x03C8, 0x03B4, 0x03B5, 0x03C6, 0x03B3,
+ 0x03B7, 0x03B9, 0x03BE, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BF,
+ 0x03C0, 0x03CE, 0x03C1, 0x03C3, 0x03C4, 0x03B8, 0x03C9, 0x03C2,
+ 0x03C7, 0x03C5, 0x03B6, 0x03CA, 0x03CB, 0x0390, 0x03B0, 0x00AD
};
public MacGreek()
{
- super("MacGreek", new String[] {}, lookup);
+ super("MacGreek", new String[] {}, lookup);
}
} // class MacGreek
diff --git a/gnu/java/nio/charset/MacIceland.java b/gnu/java/nio/charset/MacIceland.java
index a8eb7036c..352314641 100644
--- a/gnu/java/nio/charset/MacIceland.java
+++ b/gnu/java/nio/charset/MacIceland.java
@@ -43,45 +43,45 @@ public final class MacIceland extends ByteCharset
/**
* This is the lookup table for this encoding
*/
- private static final char[] lookup =
+ private static final char[] lookup =
{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, NONE,
- 0x00C4, 0x00C5, 0x00C7, 0x00C9, 0x00D1, 0x00D6, 0x00DC, 0x00E1,
- 0x00E0, 0x00E2, 0x00E4, 0x00E3, 0x00E5, 0x00E7, 0x00E9, 0x00E8,
- 0x00EA, 0x00EB, 0x00ED, 0x00EC, 0x00EE, 0x00EF, 0x00F1, 0x00F3,
- 0x00F2, 0x00F4, 0x00F6, 0x00F5, 0x00FA, 0x00F9, 0x00FB, 0x00FC,
- 0x00DD, 0x00B0, 0x00A2, 0x00A3, 0x00A7, 0x2022, 0x00B6, 0x00DF,
- 0x00AE, 0x00A9, 0x2122, 0x00B4, 0x00A8, 0x2260, 0x00C6, 0x00D8,
- 0x221E, 0x00B1, 0x2264, 0x2265, 0x00A5, 0x00B5, 0x2202, 0x2211,
- 0x220F, 0x03C0, 0x222B, 0x00AA, 0x00BA, 0x03A9, 0x00E6, 0x00F8,
- 0x00BF, 0x00A1, 0x00AC, 0x221A, 0x0192, 0x2248, 0x2206, 0x00AB,
- 0x00BB, 0x2026, 0x00A0, 0x00C0, 0x00C3, 0x00D5, 0x0152, 0x0153,
- 0x2013, 0x2014, 0x201C, 0x201D, 0x2018, 0x2019, 0x00F7, 0x25CA,
- 0x00FF, 0x0178, 0x2044, 0x20AC, 0x00D0, 0x00F0, 0x00DE, 0x00FE,
- 0x00FD, 0x00B7, 0x201A, 0x201E, 0x2030, 0x00C2, 0x00CA, 0x00C1,
- 0x00CB, 0x00C8, 0x00CD, 0x00CE, 0x00CF, 0x00CC, 0x00D3, 0x00D4,
- 0xF8FF, 0x00D2, 0x00DA, 0x00DB, 0x00D9, 0x0131, 0x02C6, 0x02DC,
- 0x00AF, 0x02D8, 0x02D9, 0x02DA, 0x00B8, 0x02DD, 0x02DB, 0x02C7
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+ 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+ 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
+ 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+ 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
+ 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
+ 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+ 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+ 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, NONE,
+ 0x00C4, 0x00C5, 0x00C7, 0x00C9, 0x00D1, 0x00D6, 0x00DC, 0x00E1,
+ 0x00E0, 0x00E2, 0x00E4, 0x00E3, 0x00E5, 0x00E7, 0x00E9, 0x00E8,
+ 0x00EA, 0x00EB, 0x00ED, 0x00EC, 0x00EE, 0x00EF, 0x00F1, 0x00F3,
+ 0x00F2, 0x00F4, 0x00F6, 0x00F5, 0x00FA, 0x00F9, 0x00FB, 0x00FC,
+ 0x00DD, 0x00B0, 0x00A2, 0x00A3, 0x00A7, 0x2022, 0x00B6, 0x00DF,
+ 0x00AE, 0x00A9, 0x2122, 0x00B4, 0x00A8, 0x2260, 0x00C6, 0x00D8,
+ 0x221E, 0x00B1, 0x2264, 0x2265, 0x00A5, 0x00B5, 0x2202, 0x2211,
+ 0x220F, 0x03C0, 0x222B, 0x00AA, 0x00BA, 0x03A9, 0x00E6, 0x00F8,
+ 0x00BF, 0x00A1, 0x00AC, 0x221A, 0x0192, 0x2248, 0x2206, 0x00AB,
+ 0x00BB, 0x2026, 0x00A0, 0x00C0, 0x00C3, 0x00D5, 0x0152, 0x0153,
+ 0x2013, 0x2014, 0x201C, 0x201D, 0x2018, 0x2019, 0x00F7, 0x25CA,
+ 0x00FF, 0x0178, 0x2044, 0x20AC, 0x00D0, 0x00F0, 0x00DE, 0x00FE,
+ 0x00FD, 0x00B7, 0x201A, 0x201E, 0x2030, 0x00C2, 0x00CA, 0x00C1,
+ 0x00CB, 0x00C8, 0x00CD, 0x00CE, 0x00CF, 0x00CC, 0x00D3, 0x00D4,
+ 0xF8FF, 0x00D2, 0x00DA, 0x00DB, 0x00D9, 0x0131, 0x02C6, 0x02DC,
+ 0x00AF, 0x02D8, 0x02D9, 0x02DA, 0x00B8, 0x02DD, 0x02DB, 0x02C7
};
public MacIceland()
{
- super("MacIceland", new String[] {}, lookup);
+ super("MacIceland", new String[] {}, lookup);
}
} // class MacIceland
diff --git a/gnu/java/nio/charset/MacRoman.java b/gnu/java/nio/charset/MacRoman.java
index 72738a2aa..f1611b398 100644
--- a/gnu/java/nio/charset/MacRoman.java
+++ b/gnu/java/nio/charset/MacRoman.java
@@ -43,45 +43,45 @@ public final class MacRoman extends ByteCharset
/**
* This is the lookup table for this encoding
*/
- private static final char[] lookup =
+ private static final char[] lookup =
{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, NONE,
- 0x00C4, 0x00C5, 0x00C7, 0x00C9, 0x00D1, 0x00D6, 0x00DC, 0x00E1,
- 0x00E0, 0x00E2, 0x00E4, 0x00E3, 0x00E5, 0x00E7, 0x00E9, 0x00E8,
- 0x00EA, 0x00EB, 0x00ED, 0x00EC, 0x00EE, 0x00EF, 0x00F1, 0x00F3,
- 0x00F2, 0x00F4, 0x00F6, 0x00F5, 0x00FA, 0x00F9, 0x00FB, 0x00FC,
- 0x2020, 0x00B0, 0x00A2, 0x00A3, 0x00A7, 0x2022, 0x00B6, 0x00DF,
- 0x00AE, 0x00A9, 0x2122, 0x00B4, 0x00A8, 0x2260, 0x00C6, 0x00D8,
- 0x221E, 0x00B1, 0x2264, 0x2265, 0x00A5, 0x00B5, 0x2202, 0x2211,
- 0x220F, 0x03C0, 0x222B, 0x00AA, 0x00BA, 0x03A9, 0x00E6, 0x00F8,
- 0x00BF, 0x00A1, 0x00AC, 0x221A, 0x0192, 0x2248, 0x2206, 0x00AB,
- 0x00BB, 0x2026, 0x00A0, 0x00C0, 0x00C3, 0x00D5, 0x0152, 0x0153,
- 0x2013, 0x2014, 0x201C, 0x201D, 0x2018, 0x2019, 0x00F7, 0x25CA,
- 0x00FF, 0x0178, 0x2044, 0x20AC, 0x2039, 0x203A, 0xFB01, 0xFB02,
- 0x2021, 0x00B7, 0x201A, 0x201E, 0x2030, 0x00C2, 0x00CA, 0x00C1,
- 0x00CB, 0x00C8, 0x00CD, 0x00CE, 0x00CF, 0x00CC, 0x00D3, 0x00D4,
- 0xF8FF, 0x00D2, 0x00DA, 0x00DB, 0x00D9, 0x0131, 0x02C6, 0x02DC,
- 0x00AF, 0x02D8, 0x02D9, 0x02DA, 0x00B8, 0x02DD, 0x02DB, 0x02C7
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+ 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+ 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
+ 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+ 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
+ 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
+ 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+ 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+ 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, NONE,
+ 0x00C4, 0x00C5, 0x00C7, 0x00C9, 0x00D1, 0x00D6, 0x00DC, 0x00E1,
+ 0x00E0, 0x00E2, 0x00E4, 0x00E3, 0x00E5, 0x00E7, 0x00E9, 0x00E8,
+ 0x00EA, 0x00EB, 0x00ED, 0x00EC, 0x00EE, 0x00EF, 0x00F1, 0x00F3,
+ 0x00F2, 0x00F4, 0x00F6, 0x00F5, 0x00FA, 0x00F9, 0x00FB, 0x00FC,
+ 0x2020, 0x00B0, 0x00A2, 0x00A3, 0x00A7, 0x2022, 0x00B6, 0x00DF,
+ 0x00AE, 0x00A9, 0x2122, 0x00B4, 0x00A8, 0x2260, 0x00C6, 0x00D8,
+ 0x221E, 0x00B1, 0x2264, 0x2265, 0x00A5, 0x00B5, 0x2202, 0x2211,
+ 0x220F, 0x03C0, 0x222B, 0x00AA, 0x00BA, 0x03A9, 0x00E6, 0x00F8,
+ 0x00BF, 0x00A1, 0x00AC, 0x221A, 0x0192, 0x2248, 0x2206, 0x00AB,
+ 0x00BB, 0x2026, 0x00A0, 0x00C0, 0x00C3, 0x00D5, 0x0152, 0x0153,
+ 0x2013, 0x2014, 0x201C, 0x201D, 0x2018, 0x2019, 0x00F7, 0x25CA,
+ 0x00FF, 0x0178, 0x2044, 0x20AC, 0x2039, 0x203A, 0xFB01, 0xFB02,
+ 0x2021, 0x00B7, 0x201A, 0x201E, 0x2030, 0x00C2, 0x00CA, 0x00C1,
+ 0x00CB, 0x00C8, 0x00CD, 0x00CE, 0x00CF, 0x00CC, 0x00D3, 0x00D4,
+ 0xF8FF, 0x00D2, 0x00DA, 0x00DB, 0x00D9, 0x0131, 0x02C6, 0x02DC,
+ 0x00AF, 0x02D8, 0x02D9, 0x02DA, 0x00B8, 0x02DD, 0x02DB, 0x02C7
};
public MacRoman()
{
- super("MacRoman", new String[] {}, lookup);
+ super("MacRoman", new String[] {}, lookup);
}
} // class MacRoman
diff --git a/gnu/java/nio/charset/MacRomania.java b/gnu/java/nio/charset/MacRomania.java
index e05e94025..00a299b1e 100644
--- a/gnu/java/nio/charset/MacRomania.java
+++ b/gnu/java/nio/charset/MacRomania.java
@@ -43,45 +43,45 @@ public final class MacRomania extends ByteCharset
/**
* This is the lookup table for this encoding
*/
- private static final char[] lookup =
+ private static final char[] lookup =
{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, NONE,
- 0x00C4, 0x00C5, 0x00C7, 0x00C9, 0x00D1, 0x00D6, 0x00DC, 0x00E1,
- 0x00E0, 0x00E2, 0x00E4, 0x00E3, 0x00E5, 0x00E7, 0x00E9, 0x00E8,
- 0x00EA, 0x00EB, 0x00ED, 0x00EC, 0x00EE, 0x00EF, 0x00F1, 0x00F3,
- 0x00F2, 0x00F4, 0x00F6, 0x00F5, 0x00FA, 0x00F9, 0x00FB, 0x00FC,
- 0x2020, 0x00B0, 0x00A2, 0x00A3, 0x00A7, 0x2022, 0x00B6, 0x00DF,
- 0x00AE, 0x00A9, 0x2122, 0x00B4, 0x00A8, 0x2260, 0x0102, 0x0218,
- 0x221E, 0x00B1, 0x2264, 0x2265, 0x00A5, 0x00B5, 0x2202, 0x2211,
- 0x220F, 0x03C0, 0x222B, 0x00AA, 0x00BA, 0x03A9, 0x0103, 0x0219,
- 0x00BF, 0x00A1, 0x00AC, 0x221A, 0x0192, 0x2248, 0x2206, 0x00AB,
- 0x00BB, 0x2026, 0x00A0, 0x00C0, 0x00C3, 0x00D5, 0x0152, 0x0153,
- 0x2013, 0x2014, 0x201C, 0x201D, 0x2018, 0x2019, 0x00F7, 0x25CA,
- 0x00FF, 0x0178, 0x2044, 0x20AC, 0x2039, 0x203A, 0x021A, 0x021B,
- 0x2021, 0x00B7, 0x201A, 0x201E, 0x2030, 0x00C2, 0x00CA, 0x00C1,
- 0x00CB, 0x00C8, 0x00CD, 0x00CE, 0x00CF, 0x00CC, 0x00D3, 0x00D4,
- 0xF8FF, 0x00D2, 0x00DA, 0x00DB, 0x00D9, 0x0131, 0x02C6, 0x02DC,
- 0x00AF, 0x02D8, 0x02D9, 0x02DA, 0x00B8, 0x02DD, 0x02DB, 0x02C7
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+ 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+ 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
+ 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+ 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
+ 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
+ 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+ 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+ 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, NONE,
+ 0x00C4, 0x00C5, 0x00C7, 0x00C9, 0x00D1, 0x00D6, 0x00DC, 0x00E1,
+ 0x00E0, 0x00E2, 0x00E4, 0x00E3, 0x00E5, 0x00E7, 0x00E9, 0x00E8,
+ 0x00EA, 0x00EB, 0x00ED, 0x00EC, 0x00EE, 0x00EF, 0x00F1, 0x00F3,
+ 0x00F2, 0x00F4, 0x00F6, 0x00F5, 0x00FA, 0x00F9, 0x00FB, 0x00FC,
+ 0x2020, 0x00B0, 0x00A2, 0x00A3, 0x00A7, 0x2022, 0x00B6, 0x00DF,
+ 0x00AE, 0x00A9, 0x2122, 0x00B4, 0x00A8, 0x2260, 0x0102, 0x0218,
+ 0x221E, 0x00B1, 0x2264, 0x2265, 0x00A5, 0x00B5, 0x2202, 0x2211,
+ 0x220F, 0x03C0, 0x222B, 0x00AA, 0x00BA, 0x03A9, 0x0103, 0x0219,
+ 0x00BF, 0x00A1, 0x00AC, 0x221A, 0x0192, 0x2248, 0x2206, 0x00AB,
+ 0x00BB, 0x2026, 0x00A0, 0x00C0, 0x00C3, 0x00D5, 0x0152, 0x0153,
+ 0x2013, 0x2014, 0x201C, 0x201D, 0x2018, 0x2019, 0x00F7, 0x25CA,
+ 0x00FF, 0x0178, 0x2044, 0x20AC, 0x2039, 0x203A, 0x021A, 0x021B,
+ 0x2021, 0x00B7, 0x201A, 0x201E, 0x2030, 0x00C2, 0x00CA, 0x00C1,
+ 0x00CB, 0x00C8, 0x00CD, 0x00CE, 0x00CF, 0x00CC, 0x00D3, 0x00D4,
+ 0xF8FF, 0x00D2, 0x00DA, 0x00DB, 0x00D9, 0x0131, 0x02C6, 0x02DC,
+ 0x00AF, 0x02D8, 0x02D9, 0x02DA, 0x00B8, 0x02DD, 0x02DB, 0x02C7
};
public MacRomania()
{
- super("MacRomania", new String[] {}, lookup);
+ super("MacRomania", new String[] {}, lookup);
}
} // class MacRomania
diff --git a/gnu/java/nio/charset/MacSymbol.java b/gnu/java/nio/charset/MacSymbol.java
index 9878efd89..a5e6f9428 100644
--- a/gnu/java/nio/charset/MacSymbol.java
+++ b/gnu/java/nio/charset/MacSymbol.java
@@ -43,45 +43,45 @@ public final class MacSymbol extends ByteCharset
/**
* This is the lookup table for this encoding
*/
- private static final char[] lookup =
+ private static final char[] lookup =
{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x2200, 0x0023, 0x2203, 0x0025, 0x0026, 0x220D,
- 0x0028, 0x0029, 0x2217, 0x002B, 0x002C, 0x2212, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x2245, 0x0391, 0x0392, 0x03A7, 0x0394, 0x0395, 0x03A6, 0x0393,
- 0x0397, 0x0399, 0x03D1, 0x039A, 0x039B, 0x039C, 0x039D, 0x039F,
- 0x03A0, 0x0398, 0x03A1, 0x03A3, 0x03A4, 0x03A5, 0x03C2, 0x03A9,
- 0x039E, 0x03A8, 0x0396, 0x005B, 0x2234, 0x005D, 0x22A5, 0x005F,
- 0xF8E5, 0x03B1, 0x03B2, 0x03C7, 0x03B4, 0x03B5, 0x03C6, 0x03B3,
- 0x03B7, 0x03B9, 0x03D5, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BF,
- 0x03C0, 0x03B8, 0x03C1, 0x03C3, 0x03C4, 0x03C5, 0x03D6, 0x03C9,
- 0x03BE, 0x03C8, 0x03B6, 0x007B, 0x007C, 0x007D, 0x223C, NONE,
- NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE,
- NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE,
- NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE,
- NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE,
- 0x20AC, 0x03D2, 0x2032, 0x2264, 0x2044, 0x221E, 0x0192, 0x2663,
- 0x2666, 0x2665, 0x2660, 0x2194, 0x2190, 0x2191, 0x2192, 0x2193,
- 0x00B0, 0x00B1, 0x2033, 0x2265, 0x00D7, 0x221D, 0x2202, 0x2022,
- 0x00F7, 0x2260, 0x2261, 0x2248, 0x2026, 0xF8E6, 0x23AF, 0x21B5,
- 0x2135, 0x2111, 0x211C, 0x2118, 0x2297, 0x2295, 0x2205, 0x2229,
- 0x222A, 0x2283, 0x2287, 0x2284, 0x2282, 0x2286, 0x2208, 0x2209,
- 0x2220, 0x2207, 0x00AE, 0x00A9, 0x2122, 0x220F, 0x221A, 0x22C5,
- 0x00AC, 0x2227, 0x2228, 0x21D4, 0x21D0, 0x21D1, 0x21D2, 0x21D3,
- 0x22C4, 0x3008, NONE, NONE, NONE, 0x2211, 0x239B, 0x239C,
- 0x239D, 0x23A1, 0x23A2, 0x23A3, 0x23A7, 0x23A8, 0x23A9, 0x23AA,
- 0xF8FF, 0x3009, 0x222B, 0x2320, 0x23AE, 0x2321, 0x239E, 0x239F,
- 0x23A0, 0x23A4, 0x23A5, 0x23A6, 0x23AB, 0x23AC, 0x23AD, NONE
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+ 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+ 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x2200, 0x0023, 0x2203, 0x0025, 0x0026, 0x220D,
+ 0x0028, 0x0029, 0x2217, 0x002B, 0x002C, 0x2212, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+ 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x2245, 0x0391, 0x0392, 0x03A7, 0x0394, 0x0395, 0x03A6, 0x0393,
+ 0x0397, 0x0399, 0x03D1, 0x039A, 0x039B, 0x039C, 0x039D, 0x039F,
+ 0x03A0, 0x0398, 0x03A1, 0x03A3, 0x03A4, 0x03A5, 0x03C2, 0x03A9,
+ 0x039E, 0x03A8, 0x0396, 0x005B, 0x2234, 0x005D, 0x22A5, 0x005F,
+ 0xF8E5, 0x03B1, 0x03B2, 0x03C7, 0x03B4, 0x03B5, 0x03C6, 0x03B3,
+ 0x03B7, 0x03B9, 0x03D5, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BF,
+ 0x03C0, 0x03B8, 0x03C1, 0x03C3, 0x03C4, 0x03C5, 0x03D6, 0x03C9,
+ 0x03BE, 0x03C8, 0x03B6, 0x007B, 0x007C, 0x007D, 0x223C, NONE,
+ NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE,
+ NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE,
+ NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE,
+ NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE,
+ 0x20AC, 0x03D2, 0x2032, 0x2264, 0x2044, 0x221E, 0x0192, 0x2663,
+ 0x2666, 0x2665, 0x2660, 0x2194, 0x2190, 0x2191, 0x2192, 0x2193,
+ 0x00B0, 0x00B1, 0x2033, 0x2265, 0x00D7, 0x221D, 0x2202, 0x2022,
+ 0x00F7, 0x2260, 0x2261, 0x2248, 0x2026, 0xF8E6, 0x23AF, 0x21B5,
+ 0x2135, 0x2111, 0x211C, 0x2118, 0x2297, 0x2295, 0x2205, 0x2229,
+ 0x222A, 0x2283, 0x2287, 0x2284, 0x2282, 0x2286, 0x2208, 0x2209,
+ 0x2220, 0x2207, 0x00AE, 0x00A9, 0x2122, 0x220F, 0x221A, 0x22C5,
+ 0x00AC, 0x2227, 0x2228, 0x21D4, 0x21D0, 0x21D1, 0x21D2, 0x21D3,
+ 0x22C4, 0x3008, NONE, NONE, NONE, 0x2211, 0x239B, 0x239C,
+ 0x239D, 0x23A1, 0x23A2, 0x23A3, 0x23A7, 0x23A8, 0x23A9, 0x23AA,
+ 0xF8FF, 0x3009, 0x222B, 0x2320, 0x23AE, 0x2321, 0x239E, 0x239F,
+ 0x23A0, 0x23A4, 0x23A5, 0x23A6, 0x23AB, 0x23AC, 0x23AD, NONE
};
public MacSymbol()
{
- super("MacSymbol", new String[] {}, lookup);
+ super("MacSymbol", new String[] {}, lookup);
}
} // class MacSymbol
diff --git a/gnu/java/nio/charset/MacThai.java b/gnu/java/nio/charset/MacThai.java
index daed75630..b726c70de 100644
--- a/gnu/java/nio/charset/MacThai.java
+++ b/gnu/java/nio/charset/MacThai.java
@@ -43,45 +43,45 @@ public final class MacThai extends ByteCharset
/**
* This is the lookup table for this encoding
*/
- private static final char[] lookup =
+ private static final char[] lookup =
{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, NONE,
- 0x00AB, 0x00BB, 0x2026, NONE, NONE, NONE, NONE, NONE,
- NONE, NONE, NONE, NONE, NONE, 0x201C, 0x201D, NONE,
- NONE, 0x2022, NONE, NONE, NONE, NONE, NONE, NONE,
- NONE, NONE, NONE, NONE, NONE, 0x2018, 0x2019, NONE,
- 0x00A0, 0x0E01, 0x0E02, 0x0E03, 0x0E04, 0x0E05, 0x0E06, 0x0E07,
- 0x0E08, 0x0E09, 0x0E0A, 0x0E0B, 0x0E0C, 0x0E0D, 0x0E0E, 0x0E0F,
- 0x0E10, 0x0E11, 0x0E12, 0x0E13, 0x0E14, 0x0E15, 0x0E16, 0x0E17,
- 0x0E18, 0x0E19, 0x0E1A, 0x0E1B, 0x0E1C, 0x0E1D, 0x0E1E, 0x0E1F,
- 0x0E20, 0x0E21, 0x0E22, 0x0E23, 0x0E24, 0x0E25, 0x0E26, 0x0E27,
- 0x0E28, 0x0E29, 0x0E2A, 0x0E2B, 0x0E2C, 0x0E2D, 0x0E2E, 0x0E2F,
- 0x0E30, 0x0E31, 0x0E32, 0x0E33, 0x0E34, 0x0E35, 0x0E36, 0x0E37,
- 0x0E38, 0x0E39, 0x0E3A, 0x2060, 0x200B, 0x2013, 0x2014, 0x0E3F,
- 0x0E40, 0x0E41, 0x0E42, 0x0E43, 0x0E44, 0x0E45, 0x0E46, 0x0E47,
- 0x0E48, 0x0E49, 0x0E4A, 0x0E4B, 0x0E4C, 0x0E4D, 0x2122, 0x0E4F,
- 0x0E50, 0x0E51, 0x0E52, 0x0E53, 0x0E54, 0x0E55, 0x0E56, 0x0E57,
- 0x0E58, 0x0E59, 0x00AE, 0x00A9, NONE, NONE, NONE, NONE
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+ 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+ 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
+ 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+ 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
+ 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
+ 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+ 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+ 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, NONE,
+ 0x00AB, 0x00BB, 0x2026, NONE, NONE, NONE, NONE, NONE,
+ NONE, NONE, NONE, NONE, NONE, 0x201C, 0x201D, NONE,
+ NONE, 0x2022, NONE, NONE, NONE, NONE, NONE, NONE,
+ NONE, NONE, NONE, NONE, NONE, 0x2018, 0x2019, NONE,
+ 0x00A0, 0x0E01, 0x0E02, 0x0E03, 0x0E04, 0x0E05, 0x0E06, 0x0E07,
+ 0x0E08, 0x0E09, 0x0E0A, 0x0E0B, 0x0E0C, 0x0E0D, 0x0E0E, 0x0E0F,
+ 0x0E10, 0x0E11, 0x0E12, 0x0E13, 0x0E14, 0x0E15, 0x0E16, 0x0E17,
+ 0x0E18, 0x0E19, 0x0E1A, 0x0E1B, 0x0E1C, 0x0E1D, 0x0E1E, 0x0E1F,
+ 0x0E20, 0x0E21, 0x0E22, 0x0E23, 0x0E24, 0x0E25, 0x0E26, 0x0E27,
+ 0x0E28, 0x0E29, 0x0E2A, 0x0E2B, 0x0E2C, 0x0E2D, 0x0E2E, 0x0E2F,
+ 0x0E30, 0x0E31, 0x0E32, 0x0E33, 0x0E34, 0x0E35, 0x0E36, 0x0E37,
+ 0x0E38, 0x0E39, 0x0E3A, 0x2060, 0x200B, 0x2013, 0x2014, 0x0E3F,
+ 0x0E40, 0x0E41, 0x0E42, 0x0E43, 0x0E44, 0x0E45, 0x0E46, 0x0E47,
+ 0x0E48, 0x0E49, 0x0E4A, 0x0E4B, 0x0E4C, 0x0E4D, 0x2122, 0x0E4F,
+ 0x0E50, 0x0E51, 0x0E52, 0x0E53, 0x0E54, 0x0E55, 0x0E56, 0x0E57,
+ 0x0E58, 0x0E59, 0x00AE, 0x00A9, NONE, NONE, NONE, NONE
};
public MacThai()
{
- super("MacThai", new String[] {}, lookup);
+ super("MacThai", new String[] {}, lookup);
}
} // class MacThai
diff --git a/gnu/java/nio/charset/MacTurkish.java b/gnu/java/nio/charset/MacTurkish.java
index b623ee39a..259802a3f 100644
--- a/gnu/java/nio/charset/MacTurkish.java
+++ b/gnu/java/nio/charset/MacTurkish.java
@@ -43,45 +43,45 @@ public final class MacTurkish extends ByteCharset
/**
* This is the lookup table for this encoding
*/
- private static final char[] lookup =
+ private static final char[] lookup =
{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, NONE,
- 0x00C4, 0x00C5, 0x00C7, 0x00C9, 0x00D1, 0x00D6, 0x00DC, 0x00E1,
- 0x00E0, 0x00E2, 0x00E4, 0x00E3, 0x00E5, 0x00E7, 0x00E9, 0x00E8,
- 0x00EA, 0x00EB, 0x00ED, 0x00EC, 0x00EE, 0x00EF, 0x00F1, 0x00F3,
- 0x00F2, 0x00F4, 0x00F6, 0x00F5, 0x00FA, 0x00F9, 0x00FB, 0x00FC,
- 0x2020, 0x00B0, 0x00A2, 0x00A3, 0x00A7, 0x2022, 0x00B6, 0x00DF,
- 0x00AE, 0x00A9, 0x2122, 0x00B4, 0x00A8, 0x2260, 0x00C6, 0x00D8,
- 0x221E, 0x00B1, 0x2264, 0x2265, 0x00A5, 0x00B5, 0x2202, 0x2211,
- 0x220F, 0x03C0, 0x222B, 0x00AA, 0x00BA, 0x03A9, 0x00E6, 0x00F8,
- 0x00BF, 0x00A1, 0x00AC, 0x221A, 0x0192, 0x2248, 0x2206, 0x00AB,
- 0x00BB, 0x2026, 0x00A0, 0x00C0, 0x00C3, 0x00D5, 0x0152, 0x0153,
- 0x2013, 0x2014, 0x201C, 0x201D, 0x2018, 0x2019, 0x00F7, 0x25CA,
- 0x00FF, 0x0178, 0x011E, 0x011F, 0x0130, 0x0131, 0x015E, 0x015F,
- 0x2021, 0x00B7, 0x201A, 0x201E, 0x2030, 0x00C2, 0x00CA, 0x00C1,
- 0x00CB, 0x00C8, 0x00CD, 0x00CE, 0x00CF, 0x00CC, 0x00D3, 0x00D4,
- 0xF8FF, 0x00D2, 0x00DA, 0x00DB, 0x00D9, 0xF8A0, 0x02C6, 0x02DC,
- 0x00AF, 0x02D8, 0x02D9, 0x02DA, 0x00B8, 0x02DD, 0x02DB, 0x02C7
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+ 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+ 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
+ 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+ 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
+ 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
+ 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+ 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+ 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, NONE,
+ 0x00C4, 0x00C5, 0x00C7, 0x00C9, 0x00D1, 0x00D6, 0x00DC, 0x00E1,
+ 0x00E0, 0x00E2, 0x00E4, 0x00E3, 0x00E5, 0x00E7, 0x00E9, 0x00E8,
+ 0x00EA, 0x00EB, 0x00ED, 0x00EC, 0x00EE, 0x00EF, 0x00F1, 0x00F3,
+ 0x00F2, 0x00F4, 0x00F6, 0x00F5, 0x00FA, 0x00F9, 0x00FB, 0x00FC,
+ 0x2020, 0x00B0, 0x00A2, 0x00A3, 0x00A7, 0x2022, 0x00B6, 0x00DF,
+ 0x00AE, 0x00A9, 0x2122, 0x00B4, 0x00A8, 0x2260, 0x00C6, 0x00D8,
+ 0x221E, 0x00B1, 0x2264, 0x2265, 0x00A5, 0x00B5, 0x2202, 0x2211,
+ 0x220F, 0x03C0, 0x222B, 0x00AA, 0x00BA, 0x03A9, 0x00E6, 0x00F8,
+ 0x00BF, 0x00A1, 0x00AC, 0x221A, 0x0192, 0x2248, 0x2206, 0x00AB,
+ 0x00BB, 0x2026, 0x00A0, 0x00C0, 0x00C3, 0x00D5, 0x0152, 0x0153,
+ 0x2013, 0x2014, 0x201C, 0x201D, 0x2018, 0x2019, 0x00F7, 0x25CA,
+ 0x00FF, 0x0178, 0x011E, 0x011F, 0x0130, 0x0131, 0x015E, 0x015F,
+ 0x2021, 0x00B7, 0x201A, 0x201E, 0x2030, 0x00C2, 0x00CA, 0x00C1,
+ 0x00CB, 0x00C8, 0x00CD, 0x00CE, 0x00CF, 0x00CC, 0x00D3, 0x00D4,
+ 0xF8FF, 0x00D2, 0x00DA, 0x00DB, 0x00D9, 0xF8A0, 0x02C6, 0x02DC,
+ 0x00AF, 0x02D8, 0x02D9, 0x02DA, 0x00B8, 0x02DD, 0x02DB, 0x02C7
};
public MacTurkish()
{
- super("MacTurkish", new String[] {}, lookup);
+ super("MacTurkish", new String[] {}, lookup);
}
} // class MacTurkish
diff --git a/gnu/java/nio/charset/Provider.java b/gnu/java/nio/charset/Provider.java
index d3b71a612..8fc42e5f6 100644
--- a/gnu/java/nio/charset/Provider.java
+++ b/gnu/java/nio/charset/Provider.java
@@ -1,4 +1,4 @@
-/* Provider.java --
+/* Provider.java --
Copyright (C) 2002, 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -65,7 +65,7 @@ public final class Provider extends CharsetProvider
/**
* Map from charset name to charset canonical name. The strings
* are all lower-case to allow case-insensitive retrieval of
- * Charset instances.
+ * Charset instances.
*/
private final HashMap<String, String> canonicalNames;
@@ -214,9 +214,9 @@ public final class Provider extends CharsetProvider
* Returns a Charset instance by converting the given
* name to lower-case, looking up the canonical charset
* name and finally looking up the Charset with that name.
- *
+ *
* <p>The lookup is therefore case-insensitive.</p>
- *
+ *
* @returns The Charset having <code>charsetName</code>
* as its alias or null if no such Charset exist.
*/
@@ -234,20 +234,20 @@ public final class Provider extends CharsetProvider
/**
* Puts a Charset under its canonical name into the 'charsets' map.
* Then puts a mapping from all its alias names to the canonical name.
- *
+ *
* <p>All names are converted to lower-case</p>.
- *
+ *
* @param cs
*/
private void addCharset (Charset cs)
{
String canonicalName = cs.name().toLowerCase();
charsets.put (canonicalName, cs);
-
+
/* Adds a mapping between the canonical name
* itself making a lookup using that name
* no special case.
- */
+ */
canonicalNames.put(canonicalName, canonicalName);
for (Iterator<String> i = cs.aliases ().iterator (); i.hasNext (); )
@@ -259,13 +259,13 @@ public final class Provider extends CharsetProvider
// The default provider is safe to instantiate.
if (singleton == null)
singleton = AccessController.doPrivileged
- (new PrivilegedAction<Provider>()
- {
- public Provider run()
- {
- return new Provider();
- }
- });
+ (new PrivilegedAction<Provider>()
+ {
+ public Provider run()
+ {
+ return new Provider();
+ }
+ });
return singleton;
}
}
diff --git a/gnu/java/nio/charset/US_ASCII.java b/gnu/java/nio/charset/US_ASCII.java
index b09c43e61..373b37a1f 100644
--- a/gnu/java/nio/charset/US_ASCII.java
+++ b/gnu/java/nio/charset/US_ASCII.java
@@ -1,4 +1,4 @@
-/* US_ASCII.java --
+/* US_ASCII.java --
Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -58,7 +58,7 @@ final class US_ASCII extends Charset
* http://java.sun.com/j2se/1.5.0/docs/guide/intl/encoding.doc.html
*/
super ("US-ASCII", new String[] {
- /* These names are provided by
+ /* These names are provided by
* http://www.iana.org/assignments/character-sets
*/
"iso-ir-6",
@@ -108,7 +108,7 @@ final class US_ASCII extends Charset
return (char)b;
}
};
-
+
// Package-private to avoid a trampoline constructor.
Decoder (Charset cs)
{
diff --git a/gnu/java/nio/charset/UTF_16.java b/gnu/java/nio/charset/UTF_16.java
index b1d7705d4..d91b15a7f 100644
--- a/gnu/java/nio/charset/UTF_16.java
+++ b/gnu/java/nio/charset/UTF_16.java
@@ -1,4 +1,4 @@
-/* UTF_16.java --
+/* UTF_16.java --
Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/gnu/java/nio/charset/UTF_16BE.java b/gnu/java/nio/charset/UTF_16BE.java
index 1fe3b5d7c..1299b015e 100644
--- a/gnu/java/nio/charset/UTF_16BE.java
+++ b/gnu/java/nio/charset/UTF_16BE.java
@@ -1,4 +1,4 @@
-/* UTF_16BE.java --
+/* UTF_16BE.java --
Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/gnu/java/nio/charset/UTF_16Decoder.java b/gnu/java/nio/charset/UTF_16Decoder.java
index fa1dbc412..e078a6919 100644
--- a/gnu/java/nio/charset/UTF_16Decoder.java
+++ b/gnu/java/nio/charset/UTF_16Decoder.java
@@ -1,4 +1,4 @@
-/* UTF_16Decoder.java --
+/* UTF_16Decoder.java --
Copyright (C) 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -117,15 +117,15 @@ final class UTF_16Decoder extends CharsetDecoder
}
}
- // FIXME: Change so you only do a single comparison here.
+ // FIXME: Change so you only do a single comparison here.
char c = (byteOrder == BIG_ENDIAN
- ? (char) (((b1 & 0xFF) << 8) | (b2 & 0xFF))
- : (char) (((b2 & 0xFF) << 8) | (b1 & 0xFF)));
+ ? (char) (((b1 & 0xFF) << 8) | (b2 & 0xFF))
+ : (char) (((b2 & 0xFF) << 8) | (b1 & 0xFF)));
if (0xD800 <= c && c <= 0xDFFF)
{
// c is a surrogate
-
+
// make sure c is a high surrogate
if (c > 0xDBFF)
return CoderResult.malformedForLength (2);
@@ -134,8 +134,8 @@ final class UTF_16Decoder extends CharsetDecoder
byte b3 = in.get ();
byte b4 = in.get ();
char d = (byteOrder == BIG_ENDIAN
- ? (char) (((b3 & 0xFF) << 8) | (b4 & 0xFF))
- : (char) (((b4 & 0xFF) << 8) | (b3 & 0xFF)));
+ ? (char) (((b3 & 0xFF) << 8) | (b4 & 0xFF))
+ : (char) (((b4 & 0xFF) << 8) | (b3 & 0xFF)));
// make sure d is a low surrogate
if (d < 0xDC00 || d > 0xDFFF)
return CoderResult.malformedForLength (2);
diff --git a/gnu/java/nio/charset/UTF_16Encoder.java b/gnu/java/nio/charset/UTF_16Encoder.java
index d5ab744e0..5283be491 100644
--- a/gnu/java/nio/charset/UTF_16Encoder.java
+++ b/gnu/java/nio/charset/UTF_16Encoder.java
@@ -1,4 +1,4 @@
-/* UTF_16Encoder.java --
+/* UTF_16Encoder.java --
Copyright (C) 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -68,8 +68,8 @@ final class UTF_16Encoder extends CharsetEncoder
byteOrder == BIG_ENDIAN
? new byte[] { (byte) 0xFF, (byte) 0xFD }
: new byte[] { (byte) 0xFD, (byte) 0xFF });
- this.byteOrder = (byteOrder == BIG_ENDIAN) ?
- ByteOrder.BIG_ENDIAN : ByteOrder.LITTLE_ENDIAN;
+ this.byteOrder = (byteOrder == BIG_ENDIAN) ?
+ ByteOrder.BIG_ENDIAN : ByteOrder.LITTLE_ENDIAN;
this.useByteOrderMark = useByteOrderMark;
this.needsByteOrderMark = useByteOrderMark;
}
@@ -84,11 +84,11 @@ final class UTF_16Encoder extends CharsetEncoder
if (needsByteOrderMark)
{
if (out.remaining () < 2)
- {
- out.order(originalBO);
- return CoderResult.OVERFLOW;
- }
- out.putChar (BYTE_ORDER_MARK);
+ {
+ out.order(originalBO);
+ return CoderResult.OVERFLOW;
+ }
+ out.putChar (BYTE_ORDER_MARK);
needsByteOrderMark = false;
}
@@ -118,15 +118,15 @@ final class UTF_16Encoder extends CharsetEncoder
else
{
if (out.remaining () < 2)
- {
- out.order(originalBO);
- return CoderResult.OVERFLOW;
- }
+ {
+ out.order(originalBO);
+ return CoderResult.OVERFLOW;
+ }
out.putChar (c);
inPos++;
}
}
- out.order(originalBO);
+ out.order(originalBO);
return CoderResult.UNDERFLOW;
}
finally
diff --git a/gnu/java/nio/charset/UTF_16LE.java b/gnu/java/nio/charset/UTF_16LE.java
index 6d72a324c..bede38aa8 100644
--- a/gnu/java/nio/charset/UTF_16LE.java
+++ b/gnu/java/nio/charset/UTF_16LE.java
@@ -1,4 +1,4 @@
-/* UTF_16LE.java --
+/* UTF_16LE.java --
Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -53,7 +53,7 @@ final class UTF_16LE extends Charset
{
super ("UTF-16LE", new String[] {
// witnessed by the internet
- "UTF16LE",
+ "UTF16LE",
/* These names are provided by
* http://oss.software.ibm.com/cgi-bin/icu/convexp?s=ALL
*/
diff --git a/gnu/java/nio/charset/UTF_8.java b/gnu/java/nio/charset/UTF_8.java
index 0e0730eec..0423efe51 100644
--- a/gnu/java/nio/charset/UTF_8.java
+++ b/gnu/java/nio/charset/UTF_8.java
@@ -1,4 +1,4 @@
-/* UTF_8.java --
+/* UTF_8.java --
Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -46,12 +46,12 @@ import java.nio.charset.CoderResult;
/**
* UTF-8 charset.
- *
+ *
* <p> UTF-8 references:
* <ul>
* <li> <a href="http://ietf.org/rfc/rfc2279.txt">RFC 2279</a>
* <li> The <a href="http://www.unicode.org/unicode/standard/standard.html">
- * Unicode standard</a> and
+ * Unicode standard</a> and
* <a href="http://www.unicode.org/versions/corrigendum1.html">
* Corrigendum</a>
* </ul>
@@ -101,7 +101,7 @@ final class UTF_8 extends Charset
protected CoderResult decodeLoop (ByteBuffer in, CharBuffer out)
{
// TODO: Optimize this in the case in.hasArray() / out.hasArray()
- int inPos = in.position();
+ int inPos = in.position();
try
{
while (in.hasRemaining ())
@@ -117,7 +117,7 @@ final class UTF_8 extends Charset
return CoderResult.OVERFLOW;
out.put ((char) b1);
inPos++;
- break;
+ break;
case 0xC: case 0xD:
byte b2;
@@ -159,7 +159,7 @@ final class UTF_8 extends Charset
byte b4;
if (in.remaining () < 3)
return CoderResult.UNDERFLOW;
- if((b1&0x0F) > 4)
+ if((b1&0x0F) > 4)
return CoderResult.malformedForLength (4);
if (out.remaining () < 2)
return CoderResult.OVERFLOW;
@@ -169,12 +169,12 @@ final class UTF_8 extends Charset
return CoderResult.malformedForLength (2);
if (!isContinuation (b4 = in.get ()))
return CoderResult.malformedForLength (1);
- int n = (((b1 & 0x3) << 18)
- | ((b2 & 0x3F) << 12)
- | ((b3 & 0x3F) << 6)
- | (b4 & 0x3F)) - 0x10000;
- char c1 = (char)(0xD800 | (n & 0xFFC00)>>10);
- char c2 = (char)(0xDC00 | (n & 0x003FF));
+ int n = (((b1 & 0x3) << 18)
+ | ((b2 & 0x3F) << 12)
+ | ((b3 & 0x3F) << 6)
+ | (b4 & 0x3F)) - 0x10000;
+ char c1 = (char)(0xD800 | (n & 0xFFC00)>>10);
+ char c2 = (char)(0xDC00 | (n & 0x003FF));
out.put (c1);
out.put (c2);
inPos += 4;
@@ -213,7 +213,7 @@ final class UTF_8 extends Charset
// Most Latin-script languages take about 1.1 bytes. Greek, Russian,
// Arabic and Hebrew take about 1.7 bytes, and most others (including
// Japanese, Chinese, Korean and Hindi) take about 3 bytes.
- // We assume we will be dealing with latin scripts, and use 1.1
+ // We assume we will be dealing with latin scripts, and use 1.1
// for averageBytesPerChar.
super (cs, 1.1f, 4.0f);
}
diff --git a/gnu/java/nio/charset/UnicodeLittle.java b/gnu/java/nio/charset/UnicodeLittle.java
index 63f2855d5..2fa22cf32 100644
--- a/gnu/java/nio/charset/UnicodeLittle.java
+++ b/gnu/java/nio/charset/UnicodeLittle.java
@@ -1,4 +1,4 @@
-/* UnicodeLittle.java --
+/* UnicodeLittle.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -45,7 +45,7 @@ import java.nio.charset.CharsetEncoder;
/**
* UTF-16 little endian with a byte-order mark
* Included for java.io completeness.
- * ("UTF-16" is equal to UnicodeBig, and
+ * ("UTF-16" is equal to UnicodeBig, and
* UTF-16BE/LE do not have a BOM
*/
final class UnicodeLittle extends Charset
diff --git a/gnu/java/nio/charset/Windows1250.java b/gnu/java/nio/charset/Windows1250.java
index f8fc90ae2..5845873e1 100644
--- a/gnu/java/nio/charset/Windows1250.java
+++ b/gnu/java/nio/charset/Windows1250.java
@@ -39,7 +39,7 @@ exception statement from your version. */
package gnu.java.nio.charset;
/**
- * Encoding table for Windows-1250-Latin-1,
+ * Encoding table for Windows-1250-Latin-1,
* aka cp1250 or Windows-1250 or whatever.
*/
public final class Windows1250 extends ByteCharset
@@ -48,55 +48,54 @@ public final class Windows1250 extends ByteCharset
/**
* This is the lookup table for this encoding
*/
- private static final char[] lookup =
+ private static final char[] lookup =
{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x20AC, 0xFFFD, 0x201A, 0xFFFD, 0x201E, 0x2026, 0x2020, 0x2021,
- 0xFFFD, 0x2030, 0x0160, 0x2039, 0x015A, 0x0164, 0x017D, 0x0179,
- 0xFFFD, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
- 0xFFFD, 0x2122, 0x0161, 0x203A, 0x015B, 0x0165, 0x017E, 0x017A,
- 0x00A0, 0x02C7, 0x02D8, 0x0141, 0x00A4, 0x0104, 0x00A6, 0x00A7,
- 0x00A8, 0x00A9, 0x015E, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x017B,
- 0x00B0, 0x00B1, 0x02DB, 0x0142, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
- 0x00B8, 0x0105, 0x015F, 0x00BB, 0x013D, 0x02DD, 0x013E, 0x017C,
- 0x0154, 0x00C1, 0x00C2, 0x0102, 0x00C4, 0x0139, 0x0106, 0x00C7,
- 0x010C, 0x00C9, 0x0118, 0x00CB, 0x011A, 0x00CD, 0x00CE, 0x010E,
- 0x0110, 0x0143, 0x0147, 0x00D3, 0x00D4, 0x0150, 0x00D6, 0x00D7,
- 0x0158, 0x016E, 0x00DA, 0x0170, 0x00DC, 0x00DD, 0x0162, 0x00DF,
- 0x0155, 0x00E1, 0x00E2, 0x0103, 0x00E4, 0x013A, 0x0107, 0x00E7,
- 0x010D, 0x00E9, 0x0119, 0x00EB, 0x011B, 0x00ED, 0x00EE, 0x010F,
- 0x0111, 0x0144, 0x0148, 0x00F3, 0x00F4, 0x0151, 0x00F6, 0x00F7,
- 0x0159, 0x016F, 0x00FA, 0x0171, 0x00FC, 0x00FD, 0x0163, 0x02D9
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+ 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+ 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
+ 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+ 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
+ 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
+ 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+ 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+ 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x20AC, 0xFFFD, 0x201A, 0xFFFD, 0x201E, 0x2026, 0x2020, 0x2021,
+ 0xFFFD, 0x2030, 0x0160, 0x2039, 0x015A, 0x0164, 0x017D, 0x0179,
+ 0xFFFD, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
+ 0xFFFD, 0x2122, 0x0161, 0x203A, 0x015B, 0x0165, 0x017E, 0x017A,
+ 0x00A0, 0x02C7, 0x02D8, 0x0141, 0x00A4, 0x0104, 0x00A6, 0x00A7,
+ 0x00A8, 0x00A9, 0x015E, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x017B,
+ 0x00B0, 0x00B1, 0x02DB, 0x0142, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
+ 0x00B8, 0x0105, 0x015F, 0x00BB, 0x013D, 0x02DD, 0x013E, 0x017C,
+ 0x0154, 0x00C1, 0x00C2, 0x0102, 0x00C4, 0x0139, 0x0106, 0x00C7,
+ 0x010C, 0x00C9, 0x0118, 0x00CB, 0x011A, 0x00CD, 0x00CE, 0x010E,
+ 0x0110, 0x0143, 0x0147, 0x00D3, 0x00D4, 0x0150, 0x00D6, 0x00D7,
+ 0x0158, 0x016E, 0x00DA, 0x0170, 0x00DC, 0x00DD, 0x0162, 0x00DF,
+ 0x0155, 0x00E1, 0x00E2, 0x0103, 0x00E4, 0x013A, 0x0107, 0x00E7,
+ 0x010D, 0x00E9, 0x0119, 0x00EB, 0x011B, 0x00ED, 0x00EE, 0x010F,
+ 0x0111, 0x0144, 0x0148, 0x00F3, 0x00F4, 0x0151, 0x00F6, 0x00F7,
+ 0x0159, 0x016F, 0x00FA, 0x0171, 0x00FC, 0x00FD, 0x0163, 0x02D9
};
public Windows1250()
{
super("windows-1250", new String[] {
- "Windows1250",
- "ibm-5346_P100-1998",
- "ibm-5346",
- "cp1250",
- "cp-1250",
- "cp_1250",
- "windows1250",
- "windows_1250"
+ "Windows1250",
+ "ibm-5346_P100-1998",
+ "ibm-5346",
+ "cp1250",
+ "cp-1250",
+ "cp_1250",
+ "windows1250",
+ "windows_1250"
}, lookup);
}
-
-} // class Windows1250
+} // class Windows1250
diff --git a/gnu/java/nio/charset/Windows1251.java b/gnu/java/nio/charset/Windows1251.java
index 51f289e2a..052d0ea38 100644
--- a/gnu/java/nio/charset/Windows1251.java
+++ b/gnu/java/nio/charset/Windows1251.java
@@ -48,53 +48,52 @@ public final class Windows1251 extends ByteCharset
/**
* This is the lookup table for this encoding
*/
- private static final char[] lookup =
+ private static final char[] lookup =
{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x0402, 0x0403, 0x201A, 0x0453, 0x201E, 0x2026, 0x2020, 0x2021,
- 0x20AC, 0x2030, 0x0409, 0x2039, 0x040A, 0x040C, 0x040B, 0x040F,
- 0x0452, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
- NONE, 0x2122, 0x0459, 0x203A, 0x045A, 0x045C, 0x045B, 0x045F,
- 0x00A0, 0x040E, 0x045E, 0x0408, 0x00A4, 0x0490, 0x00A6, 0x00A7,
- 0x0401, 0x00A9, 0x0404, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x0407,
- 0x00B0, 0x00B1, 0x0406, 0x0456, 0x0491, 0x00B5, 0x00B6, 0x00B7,
- 0x0451, 0x2116, 0x0454, 0x00BB, 0x0458, 0x0405, 0x0455, 0x0457,
- 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417,
- 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F,
- 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427,
- 0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F,
- 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437,
- 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F,
- 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
- 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+ 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+ 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
+ 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+ 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
+ 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
+ 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+ 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+ 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x0402, 0x0403, 0x201A, 0x0453, 0x201E, 0x2026, 0x2020, 0x2021,
+ 0x20AC, 0x2030, 0x0409, 0x2039, 0x040A, 0x040C, 0x040B, 0x040F,
+ 0x0452, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
+ NONE, 0x2122, 0x0459, 0x203A, 0x045A, 0x045C, 0x045B, 0x045F,
+ 0x00A0, 0x040E, 0x045E, 0x0408, 0x00A4, 0x0490, 0x00A6, 0x00A7,
+ 0x0401, 0x00A9, 0x0404, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x0407,
+ 0x00B0, 0x00B1, 0x0406, 0x0456, 0x0491, 0x00B5, 0x00B6, 0x00B7,
+ 0x0451, 0x2116, 0x0454, 0x00BB, 0x0458, 0x0405, 0x0455, 0x0457,
+ 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417,
+ 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F,
+ 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427,
+ 0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F,
+ 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437,
+ 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F,
+ 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
+ 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F
};
public Windows1251()
{
super("windows-1251", new String[] {
- "Windows1251",
- "cp1251",
- "cp-1251",
- "cp_1251",
- "windows1251",
- "windows_1251"
+ "Windows1251",
+ "cp1251",
+ "cp-1251",
+ "cp_1251",
+ "windows1251",
+ "windows_1251"
}, lookup);
}
-
-} // class Windows1251
+} // class Windows1251
diff --git a/gnu/java/nio/charset/Windows1252.java b/gnu/java/nio/charset/Windows1252.java
index 03d15802c..738f62a33 100644
--- a/gnu/java/nio/charset/Windows1252.java
+++ b/gnu/java/nio/charset/Windows1252.java
@@ -39,7 +39,7 @@ exception statement from your version. */
package gnu.java.nio.charset;
/**
- * Encoding table for Windows-1252-Latin-1,
+ * Encoding table for Windows-1252-Latin-1,
* aka cp1252 or Windows-1252 or whatever.
*/
public final class Windows1252 extends ByteCharset
@@ -48,52 +48,51 @@ public final class Windows1252 extends ByteCharset
/**
* This is the lookup table for this encoding
*/
- private static final char[] lookup =
- { 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x20AC, NONE, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
- 0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, NONE, 0x017D, NONE,
- NONE, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
- 0x02DC, 0x2122, 0x0161, 0x203A, 0x0153, NONE, 0x017E, 0x0178,
- 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
- 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
- 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
- 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
- 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7,
- 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
- 0x00D0, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7,
- 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF,
- 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7,
- 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
- 0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7,
+ private static final char[] lookup =
+ { 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+ 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+ 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
+ 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+ 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
+ 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
+ 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+ 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+ 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x20AC, NONE, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
+ 0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, NONE, 0x017D, NONE,
+ NONE, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
+ 0x02DC, 0x2122, 0x0161, 0x203A, 0x0153, NONE, 0x017E, 0x0178,
+ 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
+ 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
+ 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
+ 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
+ 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7,
+ 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
+ 0x00D0, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7,
+ 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF,
+ 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7,
+ 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
+ 0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7,
0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF
};
public Windows1252()
{
super("windows-1252", new String[] {
- "Windows1252",
- "ibm-5348_P100-1997",
- "ibm-5348",
- "windows-1252",
- "cp1252",
- "cp-1252"
+ "Windows1252",
+ "ibm-5348_P100-1997",
+ "ibm-5348",
+ "windows-1252",
+ "cp1252",
+ "cp-1252"
}, lookup);
}
-
-} // class Windows1252
+} // class Windows1252
diff --git a/gnu/java/nio/charset/Windows1253.java b/gnu/java/nio/charset/Windows1253.java
index 9e5b1f769..711215851 100644
--- a/gnu/java/nio/charset/Windows1253.java
+++ b/gnu/java/nio/charset/Windows1253.java
@@ -48,53 +48,52 @@ public final class Windows1253 extends ByteCharset
/**
* This is the lookup table for this encoding
*/
- private static final char[] lookup =
+ private static final char[] lookup =
{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x20AC, NONE, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
- NONE, 0x2030, NONE, 0x2039, NONE, NONE, NONE, NONE,
- NONE, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
- NONE, 0x2122, NONE, 0x203A, NONE, NONE, NONE, NONE,
- 0x00A0, 0x0385, 0x0386, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
- 0x00A8, 0x00A9, NONE, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x2015,
- 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x0384, 0x00B5, 0x00B6, 0x00B7,
- 0x0388, 0x0389, 0x038A, 0x00BB, 0x038C, 0x00BD, 0x038E, 0x038F,
- 0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397,
- 0x0398, 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F,
- 0x03A0, 0x03A1, NONE, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7,
- 0x03A8, 0x03A9, 0x03AA, 0x03AB, 0x03AC, 0x03AD, 0x03AE, 0x03AF,
- 0x03B0, 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7,
- 0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF,
- 0x03C0, 0x03C1, 0x03C2, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7,
- 0x03C8, 0x03C9, 0x03CA, 0x03CB, 0x03CC, 0x03CD, 0x03CE, NONE
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+ 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+ 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
+ 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+ 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
+ 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
+ 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+ 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+ 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x20AC, NONE, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
+ NONE, 0x2030, NONE, 0x2039, NONE, NONE, NONE, NONE,
+ NONE, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
+ NONE, 0x2122, NONE, 0x203A, NONE, NONE, NONE, NONE,
+ 0x00A0, 0x0385, 0x0386, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
+ 0x00A8, 0x00A9, NONE, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x2015,
+ 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x0384, 0x00B5, 0x00B6, 0x00B7,
+ 0x0388, 0x0389, 0x038A, 0x00BB, 0x038C, 0x00BD, 0x038E, 0x038F,
+ 0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397,
+ 0x0398, 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F,
+ 0x03A0, 0x03A1, NONE, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7,
+ 0x03A8, 0x03A9, 0x03AA, 0x03AB, 0x03AC, 0x03AD, 0x03AE, 0x03AF,
+ 0x03B0, 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7,
+ 0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF,
+ 0x03C0, 0x03C1, 0x03C2, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7,
+ 0x03C8, 0x03C9, 0x03CA, 0x03CB, 0x03CC, 0x03CD, 0x03CE, NONE
};
public Windows1253()
{
super("windows-1253", new String[] {
- "Windows1253",
- "cp1253",
- "cp-1253",
- "cp_1253",
- "windows1253",
- "windows_1253"
+ "Windows1253",
+ "cp1253",
+ "cp-1253",
+ "cp_1253",
+ "windows1253",
+ "windows_1253"
}, lookup);
}
-
-} // class Windows1253
+} // class Windows1253
diff --git a/gnu/java/nio/charset/Windows1254.java b/gnu/java/nio/charset/Windows1254.java
index 9025421b3..cad2057ff 100644
--- a/gnu/java/nio/charset/Windows1254.java
+++ b/gnu/java/nio/charset/Windows1254.java
@@ -48,53 +48,52 @@ public final class Windows1254 extends ByteCharset
/**
* This is the lookup table for this encoding
*/
- private static final char[] lookup =
+ private static final char[] lookup =
{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x20AC, NONE, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
- 0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, NONE, NONE, NONE,
- NONE, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
- 0x02DC, 0x2122, 0x0161, 0x203A, 0x0153, NONE, NONE, 0x0178,
- 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
- 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
- 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
- 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
- 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7,
- 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
- 0x011E, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7,
- 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x0130, 0x015E, 0x00DF,
- 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7,
- 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
- 0x011F, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7,
- 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x0131, 0x015F, 0x00FF
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+ 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+ 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
+ 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+ 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
+ 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
+ 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+ 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+ 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x20AC, NONE, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
+ 0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, NONE, NONE, NONE,
+ NONE, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
+ 0x02DC, 0x2122, 0x0161, 0x203A, 0x0153, NONE, NONE, 0x0178,
+ 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
+ 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
+ 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
+ 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
+ 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7,
+ 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
+ 0x011E, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7,
+ 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x0130, 0x015E, 0x00DF,
+ 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7,
+ 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
+ 0x011F, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7,
+ 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x0131, 0x015F, 0x00FF
};
public Windows1254()
{
super("windows-1254", new String[] {
- "Windows1254",
- "cp1254",
- "cp-1254",
- "cp_1254",
- "windows1254",
- "windows_1254"
+ "Windows1254",
+ "cp1254",
+ "cp-1254",
+ "cp_1254",
+ "windows1254",
+ "windows_1254"
}, lookup);
}
-
-} // class Windows1254
+} // class Windows1254
diff --git a/gnu/java/nio/charset/Windows1255.java b/gnu/java/nio/charset/Windows1255.java
index 61787d184..0d954f6ce 100644
--- a/gnu/java/nio/charset/Windows1255.java
+++ b/gnu/java/nio/charset/Windows1255.java
@@ -48,53 +48,52 @@ public final class Windows1255 extends ByteCharset
/**
* This is the lookup table for this encoding
*/
- private static final char[] lookup =
+ private static final char[] lookup =
{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x20AC, 0xFFFD, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
- 0x02C6, 0x2030, 0xFFFD, 0x2039, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
- 0xFFFD, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
- 0x02DC, 0x2122, 0xFFFD, 0x203A, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
- 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x20AA, 0x00A5, 0x00A6, 0x00A7,
- 0x00A8, 0x00A9, 0x00D7, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
- 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
- 0x00B8, 0x00B9, 0x00F7, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
- 0x05B0, 0x05B1, 0x05B2, 0x05B3, 0x05B4, 0x05B5, 0x05B6, 0x05B7,
- 0x05B8, 0x05B9, 0xFFFD, 0x05BB, 0x05BC, 0x05BD, 0x05BE, 0x05BF,
- 0x05C0, 0x05C1, 0x05C2, 0x05C3, 0x05F0, 0x05F1, 0x05F2, 0x05F3,
- 0x05F4, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
- 0x05D0, 0x05D1, 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7,
- 0x05D8, 0x05D9, 0x05DA, 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF,
- 0x05E0, 0x05E1, 0x05E2, 0x05E3, 0x05E4, 0x05E5, 0x05E6, 0x05E7,
- 0x05E8, 0x05E9, 0x05EA, 0xFFFD, 0xFFFD, 0x200E, 0x200F, 0xFFFD
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+ 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+ 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
+ 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+ 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
+ 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
+ 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+ 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+ 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x20AC, 0xFFFD, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
+ 0x02C6, 0x2030, 0xFFFD, 0x2039, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
+ 0xFFFD, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
+ 0x02DC, 0x2122, 0xFFFD, 0x203A, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
+ 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x20AA, 0x00A5, 0x00A6, 0x00A7,
+ 0x00A8, 0x00A9, 0x00D7, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
+ 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
+ 0x00B8, 0x00B9, 0x00F7, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
+ 0x05B0, 0x05B1, 0x05B2, 0x05B3, 0x05B4, 0x05B5, 0x05B6, 0x05B7,
+ 0x05B8, 0x05B9, 0xFFFD, 0x05BB, 0x05BC, 0x05BD, 0x05BE, 0x05BF,
+ 0x05C0, 0x05C1, 0x05C2, 0x05C3, 0x05F0, 0x05F1, 0x05F2, 0x05F3,
+ 0x05F4, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
+ 0x05D0, 0x05D1, 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7,
+ 0x05D8, 0x05D9, 0x05DA, 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF,
+ 0x05E0, 0x05E1, 0x05E2, 0x05E3, 0x05E4, 0x05E5, 0x05E6, 0x05E7,
+ 0x05E8, 0x05E9, 0x05EA, 0xFFFD, 0xFFFD, 0x200E, 0x200F, 0xFFFD
};
public Windows1255()
{
super("windows-1255", new String[] {
- "Windows1255",
- "cp1255",
- "cp-1255",
- "cp_1255",
- "windows1255",
- "windows_1255"
+ "Windows1255",
+ "cp1255",
+ "cp-1255",
+ "cp_1255",
+ "windows1255",
+ "windows_1255"
}, lookup);
}
-
-} // class Windows1255
+} // class Windows1255
diff --git a/gnu/java/nio/charset/Windows1256.java b/gnu/java/nio/charset/Windows1256.java
index cf88c21b4..ac822e63d 100644
--- a/gnu/java/nio/charset/Windows1256.java
+++ b/gnu/java/nio/charset/Windows1256.java
@@ -48,53 +48,52 @@ public final class Windows1256 extends ByteCharset
/**
* This is the lookup table for this encoding
*/
- private static final char[] lookup =
+ private static final char[] lookup =
{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x20AC, 0x067E, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
- 0x02C6, 0x2030, 0x0679, 0x2039, 0x0152, 0x0686, 0x0698, 0x0688,
- 0x06AF, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
- 0x06A9, 0x2122, 0x0691, 0x203A, 0x0153, 0x200C, 0x200D, 0x06BA,
- 0x00A0, 0x060C, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
- 0x00A8, 0x00A9, 0x06BE, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
- 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
- 0x00B8, 0x00B9, 0x061B, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x061F,
- 0x06C1, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627,
- 0x0628, 0x0629, 0x062A, 0x062B, 0x062C, 0x062D, 0x062E, 0x062F,
- 0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x00D7,
- 0x0637, 0x0638, 0x0639, 0x063A, 0x0640, 0x0641, 0x0642, 0x0643,
- 0x00E0, 0x0644, 0x00E2, 0x0645, 0x0646, 0x0647, 0x0648, 0x00E7,
- 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x0649, 0x064A, 0x00EE, 0x00EF,
- 0x064B, 0x064C, 0x064D, 0x064E, 0x00F4, 0x064F, 0x0650, 0x00F7,
- 0x0651, 0x00F9, 0x0652, 0x00FB, 0x00FC, 0x200E, 0x200F, 0x06D2
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+ 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+ 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
+ 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+ 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
+ 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
+ 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+ 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+ 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x20AC, 0x067E, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
+ 0x02C6, 0x2030, 0x0679, 0x2039, 0x0152, 0x0686, 0x0698, 0x0688,
+ 0x06AF, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
+ 0x06A9, 0x2122, 0x0691, 0x203A, 0x0153, 0x200C, 0x200D, 0x06BA,
+ 0x00A0, 0x060C, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
+ 0x00A8, 0x00A9, 0x06BE, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
+ 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
+ 0x00B8, 0x00B9, 0x061B, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x061F,
+ 0x06C1, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627,
+ 0x0628, 0x0629, 0x062A, 0x062B, 0x062C, 0x062D, 0x062E, 0x062F,
+ 0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x00D7,
+ 0x0637, 0x0638, 0x0639, 0x063A, 0x0640, 0x0641, 0x0642, 0x0643,
+ 0x00E0, 0x0644, 0x00E2, 0x0645, 0x0646, 0x0647, 0x0648, 0x00E7,
+ 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x0649, 0x064A, 0x00EE, 0x00EF,
+ 0x064B, 0x064C, 0x064D, 0x064E, 0x00F4, 0x064F, 0x0650, 0x00F7,
+ 0x0651, 0x00F9, 0x0652, 0x00FB, 0x00FC, 0x200E, 0x200F, 0x06D2
};
public Windows1256()
{
super("windows-1256", new String[] {
- "Windows1256",
- "cp1256",
- "cp-1256",
- "cp_1256",
- "windows1256",
- "windows_1256"
+ "Windows1256",
+ "cp1256",
+ "cp-1256",
+ "cp_1256",
+ "windows1256",
+ "windows_1256"
}, lookup);
}
-
-} // class Windows1256
+} // class Windows1256
diff --git a/gnu/java/nio/charset/Windows1257.java b/gnu/java/nio/charset/Windows1257.java
index 2d281d9cd..af7b61350 100644
--- a/gnu/java/nio/charset/Windows1257.java
+++ b/gnu/java/nio/charset/Windows1257.java
@@ -48,53 +48,52 @@ public final class Windows1257 extends ByteCharset
/**
* This is the lookup table for this encoding
*/
- private static final char[] lookup =
+ private static final char[] lookup =
{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x20AC, NONE, 0x201A, NONE, 0x201E, 0x2026, 0x2020, 0x2021,
- NONE, 0x2030, NONE, 0x2039, NONE, 0x00A8, 0x02C7, 0x00B8,
- NONE, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
- NONE, 0x2122, NONE, 0x203A, NONE, 0x00AF, 0x02DB, NONE,
- 0x00A0, NONE, 0x00A2, 0x00A3, 0x00A4, NONE, 0x00A6, 0x00A7,
- 0x00D8, 0x00A9, 0x0156, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00C6,
- 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
- 0x00F8, 0x00B9, 0x0157, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00E6,
- 0x0104, 0x012E, 0x0100, 0x0106, 0x00C4, 0x00C5, 0x0118, 0x0112,
- 0x010C, 0x00C9, 0x0179, 0x0116, 0x0122, 0x0136, 0x012A, 0x013B,
- 0x0160, 0x0143, 0x0145, 0x00D3, 0x014C, 0x00D5, 0x00D6, 0x00D7,
- 0x0172, 0x0141, 0x015A, 0x016A, 0x00DC, 0x017B, 0x017D, 0x00DF,
- 0x0105, 0x012F, 0x0101, 0x0107, 0x00E4, 0x00E5, 0x0119, 0x0113,
- 0x010D, 0x00E9, 0x017A, 0x0117, 0x0123, 0x0137, 0x012B, 0x013C,
- 0x0161, 0x0144, 0x0146, 0x00F3, 0x014D, 0x00F5, 0x00F6, 0x00F7,
- 0x0173, 0x0142, 0x015B, 0x016B, 0x00FC, 0x017C, 0x017E, 0x02D9
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+ 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+ 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
+ 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+ 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
+ 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
+ 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+ 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+ 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x20AC, NONE, 0x201A, NONE, 0x201E, 0x2026, 0x2020, 0x2021,
+ NONE, 0x2030, NONE, 0x2039, NONE, 0x00A8, 0x02C7, 0x00B8,
+ NONE, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
+ NONE, 0x2122, NONE, 0x203A, NONE, 0x00AF, 0x02DB, NONE,
+ 0x00A0, NONE, 0x00A2, 0x00A3, 0x00A4, NONE, 0x00A6, 0x00A7,
+ 0x00D8, 0x00A9, 0x0156, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00C6,
+ 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
+ 0x00F8, 0x00B9, 0x0157, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00E6,
+ 0x0104, 0x012E, 0x0100, 0x0106, 0x00C4, 0x00C5, 0x0118, 0x0112,
+ 0x010C, 0x00C9, 0x0179, 0x0116, 0x0122, 0x0136, 0x012A, 0x013B,
+ 0x0160, 0x0143, 0x0145, 0x00D3, 0x014C, 0x00D5, 0x00D6, 0x00D7,
+ 0x0172, 0x0141, 0x015A, 0x016A, 0x00DC, 0x017B, 0x017D, 0x00DF,
+ 0x0105, 0x012F, 0x0101, 0x0107, 0x00E4, 0x00E5, 0x0119, 0x0113,
+ 0x010D, 0x00E9, 0x017A, 0x0117, 0x0123, 0x0137, 0x012B, 0x013C,
+ 0x0161, 0x0144, 0x0146, 0x00F3, 0x014D, 0x00F5, 0x00F6, 0x00F7,
+ 0x0173, 0x0142, 0x015B, 0x016B, 0x00FC, 0x017C, 0x017E, 0x02D9
};
public Windows1257()
{
super("windows-1257", new String[] {
- "Windows1257",
- "cp1257",
- "cp-1257",
- "cp_1257",
- "windows1257",
- "windows_1257"
+ "Windows1257",
+ "cp1257",
+ "cp-1257",
+ "cp_1257",
+ "windows1257",
+ "windows_1257"
}, lookup);
}
-
-} // class Windows1257
+} // class Windows1257
diff --git a/gnu/java/nio/charset/Windows1258.java b/gnu/java/nio/charset/Windows1258.java
index 63ef37f1a..7fd55d99c 100644
--- a/gnu/java/nio/charset/Windows1258.java
+++ b/gnu/java/nio/charset/Windows1258.java
@@ -48,53 +48,52 @@ public final class Windows1258 extends ByteCharset
/**
* This is the lookup table for this encoding
*/
- private static final char[] lookup =
+ private static final char[] lookup =
{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- 0x20AC, NONE, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
- 0x02C6, 0x2030, NONE, 0x2039, 0x0152, NONE, NONE, NONE,
- NONE, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
- 0x02DC, 0x2122, NONE, 0x203A, 0x0153, NONE, NONE, 0x0178,
- 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
- 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
- 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
- 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
- 0x00C0, 0x00C1, 0x00C2, 0x0102, 0x00C4, 0x00C5, 0x00C6, 0x00C7,
- 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x0300, 0x00CD, 0x00CE, 0x00CF,
- 0x0110, 0x00D1, 0x0309, 0x00D3, 0x00D4, 0x01A0, 0x00D6, 0x00D7,
- 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x01AF, 0x0303, 0x00DF,
- 0x00E0, 0x00E1, 0x00E2, 0x0103, 0x00E4, 0x00E5, 0x00E6, 0x00E7,
- 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x0301, 0x00ED, 0x00EE, 0x00EF,
- 0x0111, 0x00F1, 0x0323, 0x00F3, 0x00F4, 0x01A1, 0x00F6, 0x00F7,
- 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x01B0, 0x20AB, 0x00FF
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+ 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+ 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
+ 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+ 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
+ 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
+ 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+ 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+ 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
+ 0x20AC, NONE, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
+ 0x02C6, 0x2030, NONE, 0x2039, 0x0152, NONE, NONE, NONE,
+ NONE, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
+ 0x02DC, 0x2122, NONE, 0x203A, 0x0153, NONE, NONE, 0x0178,
+ 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
+ 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
+ 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
+ 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
+ 0x00C0, 0x00C1, 0x00C2, 0x0102, 0x00C4, 0x00C5, 0x00C6, 0x00C7,
+ 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x0300, 0x00CD, 0x00CE, 0x00CF,
+ 0x0110, 0x00D1, 0x0309, 0x00D3, 0x00D4, 0x01A0, 0x00D6, 0x00D7,
+ 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x01AF, 0x0303, 0x00DF,
+ 0x00E0, 0x00E1, 0x00E2, 0x0103, 0x00E4, 0x00E5, 0x00E6, 0x00E7,
+ 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x0301, 0x00ED, 0x00EE, 0x00EF,
+ 0x0111, 0x00F1, 0x0323, 0x00F3, 0x00F4, 0x01A1, 0x00F6, 0x00F7,
+ 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x01B0, 0x20AB, 0x00FF
};
public Windows1258()
{
super("windows-1258", new String[] {
- "Windows1258",
- "cp1258",
- "cp-1258",
- "cp_1258",
- "windows1258",
- "windows_1258"
+ "Windows1258",
+ "cp1258",
+ "cp-1258",
+ "cp_1258",
+ "windows1258",
+ "windows_1258"
}, lookup);
}
-
-} // class Windows1258
+} // class Windows1258
diff --git a/gnu/java/nio/charset/iconv/IconvCharset.java b/gnu/java/nio/charset/iconv/IconvCharset.java
index ffd2a103f..2c59267b5 100644
--- a/gnu/java/nio/charset/iconv/IconvCharset.java
+++ b/gnu/java/nio/charset/iconv/IconvCharset.java
@@ -63,11 +63,11 @@ public final class IconvCharset extends Charset
{
try
{
- return new IconvDecoder(this, info);
+ return new IconvDecoder(this, info);
}
catch (IllegalArgumentException e)
{
- return null;
+ return null;
}
}
@@ -75,11 +75,11 @@ public final class IconvCharset extends Charset
{
try
{
- return new IconvEncoder(this, info);
+ return new IconvEncoder(this, info);
}
catch (IllegalArgumentException e)
{
- return null;
+ return null;
}
}
}
diff --git a/gnu/java/nio/charset/iconv/IconvDecoder.java b/gnu/java/nio/charset/iconv/IconvDecoder.java
index f76d3fd5e..86f7107f2 100644
--- a/gnu/java/nio/charset/iconv/IconvDecoder.java
+++ b/gnu/java/nio/charset/iconv/IconvDecoder.java
@@ -78,20 +78,20 @@ final class IconvDecoder extends CharsetDecoder
inArr = in.array();
else
{
- inArr = new byte[remIn];
- in.get(inArr);
+ inArr = new byte[remIn];
+ in.get(inArr);
}
if (out.hasArray())
{
- ret = decode(inArr, out.array(), inPos, remIn, outPos, remOut);
- out.position(outPos + (remOut - outremaining));
+ ret = decode(inArr, out.array(), inPos, remIn, outPos, remOut);
+ out.position(outPos + (remOut - outremaining));
}
else
{
- char[] outArr = new char[remOut];
- ret = decode(inArr, outArr, inPos, remIn, outPos, remOut);
- out.put(outArr, 0, (remOut - outremaining));
+ char[] outArr = new char[remOut];
+ ret = decode(inArr, outArr, inPos, remIn, outPos, remOut);
+ out.put(outArr, 0, (remOut - outremaining));
}
in.position(inPos + (remIn - inremaining));
@@ -108,5 +108,3 @@ final class IconvDecoder extends CharsetDecoder
closeIconv();
}
}
-
-
diff --git a/gnu/java/nio/charset/iconv/IconvEncoder.java b/gnu/java/nio/charset/iconv/IconvEncoder.java
index 47446f98f..4f7a34b28 100644
--- a/gnu/java/nio/charset/iconv/IconvEncoder.java
+++ b/gnu/java/nio/charset/iconv/IconvEncoder.java
@@ -78,20 +78,20 @@ final class IconvEncoder extends CharsetEncoder
inArr = in.array();
else
{
- inArr = new char[remIn];
- in.get(inArr);
+ inArr = new char[remIn];
+ in.get(inArr);
}
if (out.hasArray())
{
- ret = encode(inArr, out.array(), inPos, remIn, outPos, remOut);
- out.position(outPos + (remOut - outremaining));
+ ret = encode(inArr, out.array(), inPos, remIn, outPos, remOut);
+ out.position(outPos + (remOut - outremaining));
}
else
{
- byte[] outArr = new byte[remOut];
- ret = encode(inArr, outArr, inPos, remIn, outPos, remOut);
- out.put(outArr, 0, (remOut - outremaining));
+ byte[] outArr = new byte[remOut];
+ ret = encode(inArr, outArr, inPos, remIn, outPos, remOut);
+ out.put(outArr, 0, (remOut - outremaining));
}
in.position(inPos + (remIn - inremaining));
diff --git a/gnu/java/nio/charset/iconv/IconvProvider.java b/gnu/java/nio/charset/iconv/IconvProvider.java
index cf9fc56a2..1d5ca1052 100644
--- a/gnu/java/nio/charset/iconv/IconvProvider.java
+++ b/gnu/java/nio/charset/iconv/IconvProvider.java
@@ -72,13 +72,13 @@ public final class IconvProvider extends CharsetProvider
Vector charsets = new Vector();
for (int i = 0; i < names.size(); i++)
{
- try
- {
- charsets.add(new IconvCharset((IconvMetaData) names.elementAt(i)));
- }
- catch (IllegalArgumentException e)
- {
- }
+ try
+ {
+ charsets.add(new IconvCharset((IconvMetaData) names.elementAt(i)));
+ }
+ catch (IllegalArgumentException e)
+ {
+ }
}
return charsets.iterator();
}
@@ -87,17 +87,17 @@ public final class IconvProvider extends CharsetProvider
{
try
{
- IconvMetaData info = IconvMetaData.get(charsetName);
+ IconvMetaData info = IconvMetaData.get(charsetName);
- // Try anyway if the set isn't found.
- if (info == null)
- info = new IconvMetaData(charsetName, 2.0f, 2.0f, 2.0f, 2.0f,
- new String[] { }, charsetName);
- return new IconvCharset(info);
+ // Try anyway if the set isn't found.
+ if (info == null)
+ info = new IconvMetaData(charsetName, 2.0f, 2.0f, 2.0f, 2.0f,
+ new String[] { }, charsetName);
+ return new IconvCharset(info);
}
catch (IllegalArgumentException e)
{
- return null;
+ return null;
}
}
diff --git a/gnu/java/rmi/RMIMarshalledObjectInputStream.java b/gnu/java/rmi/RMIMarshalledObjectInputStream.java
index 140069379..f96310750 100644
--- a/gnu/java/rmi/RMIMarshalledObjectInputStream.java
+++ b/gnu/java/rmi/RMIMarshalledObjectInputStream.java
@@ -7,7 +7,7 @@ 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
@@ -45,21 +45,21 @@ import java.io.IOException;
import java.io.ObjectInputStream;
/**
- * This class is only for java.rmi.MarshalledObject to deserialize object from
+ * This class is only for java.rmi.MarshalledObject to deserialize object from
* objBytes and locBytes
*/
public class RMIMarshalledObjectInputStream extends RMIObjectInputStream
{
private ObjectInputStream locStream;
-
+
public RMIMarshalledObjectInputStream(byte[] objBytes, byte[] locBytes) throws IOException
{
super(new ByteArrayInputStream(objBytes));
if(locBytes != null)
locStream = new ObjectInputStream(new ByteArrayInputStream(locBytes));
}
-
+
//This method overrides RMIObjectInputStream's
protected Object getAnnotation() throws IOException, ClassNotFoundException
{
@@ -67,5 +67,5 @@ public class RMIMarshalledObjectInputStream extends RMIObjectInputStream
return null;
return locStream.readObject();
}
-
+
} // End of RMIMarshalledObjectInputStream
diff --git a/gnu/java/rmi/RMIMarshalledObjectOutputStream.java b/gnu/java/rmi/RMIMarshalledObjectOutputStream.java
index 2bbbaacb4..3bdf9239f 100644
--- a/gnu/java/rmi/RMIMarshalledObjectOutputStream.java
+++ b/gnu/java/rmi/RMIMarshalledObjectOutputStream.java
@@ -7,7 +7,7 @@ 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
@@ -46,34 +46,33 @@ import java.io.ObjectOutputStream;
import java.io.OutputStream;
/**
- * This class is only for java.rmi.MarshalledObject to serialize object and
+ * This class is only for java.rmi.MarshalledObject to serialize object and
* got objBytes and locBytes
*/
public class RMIMarshalledObjectOutputStream extends RMIObjectOutputStream
{
private ObjectOutputStream locStream;
private ByteArrayOutputStream locBytesStream;
-
+
public RMIMarshalledObjectOutputStream(OutputStream objStream) throws IOException
{
super(objStream);
locBytesStream = new ByteArrayOutputStream(256);
locStream = new ObjectOutputStream(locBytesStream);
}
-
+
//This method overrides RMIObjectOutputStream's.
protected void setAnnotation(String annotation) throws IOException{
locStream.writeObject(annotation);
}
-
+
public void flush() throws IOException {
super.flush();
locStream.flush();
}
-
+
public byte[] getLocBytes(){
return locBytesStream.toByteArray();
}
-
-} // End of RMIMarshalledObjectOutputStream
+} // End of RMIMarshalledObjectOutputStream
diff --git a/gnu/java/rmi/activation/ActivationSystemTransient.java b/gnu/java/rmi/activation/ActivationSystemTransient.java
index 1557220e1..975e13fd1 100644
--- a/gnu/java/rmi/activation/ActivationSystemTransient.java
+++ b/gnu/java/rmi/activation/ActivationSystemTransient.java
@@ -59,7 +59,7 @@ import java.util.Map;
/**
* Provides the default transient activation system.
- *
+ *
* @author Audrius Meskauskas (audriusa@bioinformatics.org)
*/
public class ActivationSystemTransient
@@ -69,8 +69,8 @@ public class ActivationSystemTransient
/**
* Maps group identifiers into group descriptions.
*/
- protected final BidiTable groupDescs;
-
+ protected final BidiTable groupDescs;
+
/**
* Maps object identifiers into object activation descriptions
*/
@@ -80,29 +80,29 @@ public class ActivationSystemTransient
* Maps group identifiers into already activated groups.
*/
protected transient final Map groupInstantiators = new Hashtable();
-
+
/**
* The cache of the activated objects, maps activation ids to remote
* object stubs.
*/
protected transient final Map activatedObjects = new HashMap();
-
+
/**
* The object incarnation counter.
*/
static long groupIncarnations = 0;
-
+
/**
* The singleton of this activation system
*/
static ActivationSystem singleton;
-
+
/**
* Set to true to print the event messages to console.
*/
public static boolean debug = false;
-
-
+
+
/**
* Creates the group which uses the given maps to store the data.
*/
@@ -112,7 +112,7 @@ public class ActivationSystemTransient
descriptions = objectDescriptions;
groupDescs = groupDescriptiopns;
}
-
+
/**
* Creates the group with transient maps.
*/
@@ -120,14 +120,14 @@ public class ActivationSystemTransient
{
this (new BidiTable(), new BidiTable());
}
-
+
public static ActivationSystem getInstance()
{
if (singleton == null)
singleton = new ActivationSystemTransient();
return singleton;
}
-
+
/**
* Activate the given object (try cache first if force = false)
*/
@@ -149,7 +149,7 @@ public class ActivationSystemTransient
throw new UnknownObjectException("Activating unknown object "+
id == null ? "null" : id.toString());
- ActivationInstantiator group =
+ ActivationInstantiator group =
(ActivationInstantiator) groupInstantiators.get(desc.getGroupID());
if (group == null)
@@ -159,7 +159,7 @@ public class ActivationSystemTransient
ActivationGroupDesc adesc = (ActivationGroupDesc) groupDescs.get(gid);
if (adesc == null)
- throw new UnknownGroupException("Activating unknown group "
+ throw new UnknownGroupException("Activating unknown group "
+ gid + " for "+ id+" this "+this);
synchronized (ActivationSystemTransient.class)
@@ -179,7 +179,7 @@ public class ActivationSystemTransient
}
return object;
}
-
+
/**
* Returns the activation monitor (THIS) and remebers the instantiator, used
* by that group.
@@ -192,10 +192,10 @@ public class ActivationSystemTransient
groupInstantiators.put(id, group);
return this;
}
-
+
/**
* Get the activation descriptor for the given activation id.
- *
+ *
* @return the activation descriptor, never null.
* @throws UnknownObjectException if such object is unknown.
*/
@@ -208,10 +208,10 @@ public class ActivationSystemTransient
id == null ? "null" : id.toString());
return desc;
}
-
+
/**
* Get the descriptor of the given activation group.
- *
+ *
* @return the activation group descriptor, never null.
* @throws UnknownGroupException if such group is unknown
*/
@@ -245,7 +245,7 @@ public class ActivationSystemTransient
return id;
}
-
+
/**
* Create the object activation id and put this id-descriptor combination into
* the group map. The new ID will only be created if this description has not
@@ -261,13 +261,13 @@ public class ActivationSystemTransient
id = new ActivationID(this);
descriptions.put(id, desc);
}
-
+
if (debug)
System.out.println("Register object " + id +":"+desc+" this "+this);
-
+
return id;
}
-
+
/**
* Replace the activation descriptor, return the previous descriptor.
*/
@@ -279,7 +279,7 @@ public class ActivationSystemTransient
descriptions.put(id, desc);
return prev;
}
-
+
/**
* Replace the activation group descriptor, return the previous descriptor.
*/
@@ -292,7 +292,7 @@ public class ActivationSystemTransient
groupDescs.put(groupId, groupDesc);
return prev;
}
-
+
/**
* Calls .shutdown on all bidirectional tables (has no effect if these
* table are not persistent).
@@ -302,7 +302,7 @@ public class ActivationSystemTransient
descriptions.shutdown();
groupDescs.shutdown();
}
-
+
/**
* Remove the group from the group map
*/
@@ -311,11 +311,11 @@ public class ActivationSystemTransient
{
if (! groupDescs.containsKey(groupId))
throw new UnknownGroupException("Unknown group "+groupId);
-
+
groupDescs.removeKey(groupId);
groupInstantiators.remove(groupId);
}
-
+
/**
* Remove the object id from the active object and description maps.
*/
@@ -331,7 +331,7 @@ public class ActivationSystemTransient
activatedObjects.remove(id);
}
}
-
+
/**
* Put the object into active object map.
*/
@@ -360,7 +360,7 @@ public class ActivationSystemTransient
throw un;
}
}
-
+
/**
* Check if the group is known. Remove all active objects, belonging to
* that group, from the active object cache.
@@ -370,9 +370,9 @@ public class ActivationSystemTransient
{
if (! groupInstantiators.containsKey(groupId))
throw new UnknownGroupException("Inactivating unkwnon group");
-
+
groupInstantiators.remove(groupId);
-
+
// Remove all members of this group from the cache.
synchronized (activatedObjects)
{
diff --git a/gnu/java/rmi/activation/BidiTable.java b/gnu/java/rmi/activation/BidiTable.java
index 5e421fe8d..ed9d9595a 100644
--- a/gnu/java/rmi/activation/BidiTable.java
+++ b/gnu/java/rmi/activation/BidiTable.java
@@ -45,26 +45,26 @@ import java.util.Map;
/**
* The bidirectional hash table, maps both a to b and b to a.
- *
- * @author Audrius Meskauskas (audriusa@bioinformatics.org)
+ *
+ * @author Audrius Meskauskas (audriusa@bioinformatics.org)
*/
-public class BidiTable
+public class BidiTable
{
/**
* Use serialVerionUID for interoperability.
*/
private static final long serialVersionUID = 1;
-
+
/**
* Maps keys to values
*/
protected Map k2v;
-
+
/**
* Maps values to keys (in reverse)
*/
protected Map v2k;
-
+
/**
* Create a new table that is ready to use.
*/
@@ -73,17 +73,17 @@ public class BidiTable
k2v = new HashMap();
v2k = new HashMap();
}
-
+
/**
* Create a new instance where the hashtable fields are not initialised
* (called from derivatives that intialise hashtables in they own way.
- *
+ *
* @param flags currently used to mark the different constructor only.
*/
protected BidiTable(int flags)
{
}
-
+
/**
* Get key by value
*/
@@ -91,7 +91,7 @@ public class BidiTable
{
return v2k.get(value);
}
-
+
/**
* Put key-value pair.
*/
@@ -100,7 +100,7 @@ public class BidiTable
k2v.put(key, value);
v2k.put(value, key);
}
-
+
/**
* Get value from key
*/
@@ -108,7 +108,7 @@ public class BidiTable
{
return k2v.get(key);
}
-
+
/**
* Remove the key-value pair by key
*/
@@ -121,7 +121,7 @@ public class BidiTable
v2k.remove(value);
}
}
-
+
/**
* Check if the table contains this key.
*/
@@ -129,7 +129,7 @@ public class BidiTable
{
return k2v.containsKey(key);
}
-
+
/**
* This method is called before exit and may be used to write the database
* to the disk. The default method does nothing.
@@ -137,7 +137,7 @@ public class BidiTable
public synchronized void shutdown()
{
}
-
+
/**
* Get the size.
*/
@@ -145,7 +145,7 @@ public class BidiTable
{
return k2v.size();
}
-
+
/**
* Get the key collection.
*/
@@ -157,7 +157,7 @@ public class BidiTable
Iterator iter = keys.iterator();
for (int i = 0; i < k.length; i++)
k[i] = iter.next();
-
+
return k;
}
}
diff --git a/gnu/java/rmi/activation/DefaultActivationGroup.java b/gnu/java/rmi/activation/DefaultActivationGroup.java
index 3a654f246..526d2ef40 100644
--- a/gnu/java/rmi/activation/DefaultActivationGroup.java
+++ b/gnu/java/rmi/activation/DefaultActivationGroup.java
@@ -55,9 +55,9 @@ import java.rmi.activation.UnknownObjectException;
/**
* The default activation group class. This activation group assumes that
* all classes are accessible via current thread context class loader.
- * The remote class loading is not supported for security reasons. The
+ * The remote class loading is not supported for security reasons. The
* activation always occurs in the current jre.
- *
+ *
* @author Audrius Meskauskas (audriusa@Bioinformatics.org)
*/
public class DefaultActivationGroup
@@ -67,7 +67,7 @@ public class DefaultActivationGroup
* Use the serialVersionUID for interoperability.
*/
private static final long serialVersionUID = 1;
-
+
/**
* Used during the group creation (required constructor).
*/
@@ -76,23 +76,23 @@ public class DefaultActivationGroup
ActivationID.class,
MarshalledObject.class
};
-
-
+
+
/**
* Create the new default activation group.
- *
+ *
* @param id the group activation id.
* @param data may contain the group initialization data (unused and can be
* null)
* @throws RemoteException if the super constructor does
- */
+ */
public DefaultActivationGroup(ActivationGroupID id, MarshalledObject data)
throws RemoteException
{
super(id);
}
-
-
+
+
/**
* May be overridden and used as a hook. This method is called each time
* the new object is instantiated.
@@ -108,14 +108,14 @@ public class DefaultActivationGroup
* information, stored in the passed descriptor. The method expects the object
* class to have the two parameter constructor, the first parameter being the
* {@link ActivationID} and the second the {@link MarshalledObject}.
- *
+ *
* @param id the object activation id
* @param desc the activation descriptor, providing the information, necessary
* to create and activate the object
* @return the marshalled object, containing the exported stub of the created
* object
* @throws ActivationException if the activation fails due any reason
- */
+ */
public MarshalledObject newInstance(ActivationID id, ActivationDesc desc)
throws ActivationException, RemoteException
{
@@ -123,7 +123,7 @@ public class DefaultActivationGroup
{
if (ActivationSystemTransient.debug)
System.out.println("Instantiating "+desc.getClassName());
-
+
Remote object;
Class objectClass;
@@ -132,19 +132,19 @@ public class DefaultActivationGroup
Constructor constructor = objectClass.getConstructor(cConstructorTypes);
object = (Remote) constructor.newInstance(
new Object[] { id, desc.getData() });
-
+
// Make the object accessible and create the stub.
ActivatableServerRef ref = UnicastServer.getActivatableRef(id);
Remote stub = ref.exportObject(object);
-
+
MarshalledObject marsh = new MarshalledObject(stub);
-
+
// Notify the activation monitor.
activeObject(id, marsh);
-
+
// Make call to the hook that may be overridden.
activeObject(id, stub);
-
+
return marsh;
}
catch (Exception e)
diff --git a/gnu/java/rmi/activation/DefaultActivationSystem.java b/gnu/java/rmi/activation/DefaultActivationSystem.java
index 754b5dcb9..3d1625052 100644
--- a/gnu/java/rmi/activation/DefaultActivationSystem.java
+++ b/gnu/java/rmi/activation/DefaultActivationSystem.java
@@ -44,7 +44,7 @@ import java.rmi.registry.Registry;
/**
* Finds and returns the default activation system for this jre.
- *
+ *
* @author Audrius Meskauskas (audriusa@bioinformatics.org)
*/
public abstract class DefaultActivationSystem
@@ -53,17 +53,17 @@ public abstract class DefaultActivationSystem
* The activation system (assigned if once found).
*/
static ActivationSystem system;
-
+
/**
* The default activation registry port.
*/
static int ACTIVATION_REGISTRY_PORT;
-
+
/**
* The name of the activation system registry port property.
*/
static String AS_PORT_PROPERTY = "java.rmi.activation.port";
-
+
/**
* The defalut name of the activation system in the activation registry.
*/
diff --git a/gnu/java/rmi/dgc/DGCImpl.java b/gnu/java/rmi/dgc/DGCImpl.java
index a5c036e7b..5efbf2796 100644
--- a/gnu/java/rmi/dgc/DGCImpl.java
+++ b/gnu/java/rmi/dgc/DGCImpl.java
@@ -68,12 +68,12 @@ public class DGCImpl
* The DGCImpl extends UnicastServerRef and not UnicastRemoteObject, because
* UnicastRemoteObject must exportObject automatically.
*/
-
+
/**
* Use the serial version UID for interoperability.
*/
private static final long serialVersionUID = 1;
-
+
/**
* Protects the array of object Id's for the scheduled period of time
* (lease). After the time expires, the protector is automatically discarded,
@@ -87,11 +87,11 @@ public class DGCImpl
* multiple references that are stored to collection.
*/
Collection[] references;
-
+
/**
* Create the new instance of the reference protector that protects the
* given array of ids and exists for the given period of time.
- *
+ *
* @param ids the ids to protect.
*/
RefProtector(ObjID[] ids, long timeToLive)
@@ -101,11 +101,11 @@ public class DGCImpl
{
references[i] = UnicastServer.getExported(ids[i]);
}
-
+
// Schedule the existence.
LeaseRenewingTask.timer.schedule(this, timeToLive);
}
-
+
/**
* Break all links, ensuring easy collection of the references by the gc.
*/
@@ -118,16 +118,16 @@ public class DGCImpl
}
}
}
-
+
/**
* This defauld lease value is used if the lease value, passed to the
* {@link #dirty} is equal to zero.
*/
static final long LEASE_VALUE = 600000L;
-
+
/**
* Create the new DGC implementation.
- *
+ *
* @throws RemoteException if the super constructor throws or the
* socket factory fails.
*/
@@ -138,7 +138,7 @@ public class DGCImpl
/**
* Mark the given objects referecnes as used on the client side.
- *
+ *
* @param ids the ids of the used objects.
* @param sequenceNum the number of the call (used to detect and discard late
* calls).
@@ -147,17 +147,17 @@ public class DGCImpl
*/
public Lease dirty(ObjID[] ids, long sequenceNum, Lease lease)
throws RemoteException
- {
+ {
// We do not fill in VMID because in this implementation it is not used.
long leaseValue = lease.getValue();
-
+
// Grant the maximal default lease time if the passed value is zero.
if (leaseValue <= 0)
leaseValue = LEASE_VALUE;
-
+
// Create (and shedule of the given existence) the new reference
// protector.
- new RefProtector(ids, leaseValue);
+ new RefProtector(ids, leaseValue);
lease = new Lease(lease.getVMID(), leaseValue);
return lease;
@@ -165,7 +165,7 @@ public class DGCImpl
/**
* Mark the given objects as no longer used on the client side.
- *
+ *
* @param ids the ids of the objects that are no longer used.
* @param sequenceNum the number of the call (used to detect and discard late
* calls)
diff --git a/gnu/java/rmi/dgc/DGCImpl_Skel.java b/gnu/java/rmi/dgc/DGCImpl_Skel.java
index 5f032e72f..a40b48ca0 100644
--- a/gnu/java/rmi/dgc/DGCImpl_Skel.java
+++ b/gnu/java/rmi/dgc/DGCImpl_Skel.java
@@ -44,16 +44,16 @@ public final class DGCImpl_Skel
implements java.rmi.server.Skeleton
{
private static final long interfaceHash = -669196253586618813L;
-
+
private static final java.rmi.server.Operation[] operations = {
new java.rmi.server.Operation("void clean(java.rmi.server.ObjID[], long, java.rmi.dgc.VMID, boolean"),
new java.rmi.server.Operation("java.rmi.dgc.Lease dirty(java.rmi.server.ObjID[], long, java.rmi.dgc.Lease")
};
-
+
public java.rmi.server.Operation[] getOperations() {
return ((java.rmi.server.Operation[]) operations.clone());
}
-
+
public void dispatch(java.rmi.Remote obj, java.rmi.server.RemoteCall call, int opnum, long hash) throws java.lang.Exception {
if (opnum < 0) {
if (hash == -5803803475088455571L) {
@@ -69,7 +69,7 @@ public final class DGCImpl_Skel
else if (hash != interfaceHash) {
throw new java.rmi.server.SkeletonMismatchException("interface hash mismatch");
}
-
+
gnu.java.rmi.dgc.DGCImpl server = (gnu.java.rmi.dgc.DGCImpl)obj;
switch (opnum) {
case 0:
@@ -84,7 +84,7 @@ public final class DGCImpl_Skel
$param_1 = (long)in.readLong();
$param_2 = (java.rmi.dgc.VMID)in.readObject();
$param_3 = (boolean)in.readBoolean();
-
+
}
catch (java.io.IOException e) {
throw new java.rmi.UnmarshalException("error unmarshalling arguments", e);
@@ -104,7 +104,7 @@ public final class DGCImpl_Skel
}
break;
}
-
+
case 1:
{
java.rmi.server.ObjID[] $param_0;
@@ -115,7 +115,7 @@ public final class DGCImpl_Skel
$param_0 = (java.rmi.server.ObjID[])in.readObject();
$param_1 = (long)in.readLong();
$param_2 = (java.rmi.dgc.Lease)in.readObject();
-
+
}
catch (java.io.IOException e) {
throw new java.rmi.UnmarshalException("error unmarshalling arguments", e);
@@ -136,7 +136,7 @@ public final class DGCImpl_Skel
}
break;
}
-
+
default:
throw new java.rmi.UnmarshalException("invalid method number");
}
diff --git a/gnu/java/rmi/dgc/DGCImpl_Stub.java b/gnu/java/rmi/dgc/DGCImpl_Stub.java
index 9f18d129e..dac8b6f4c 100644
--- a/gnu/java/rmi/dgc/DGCImpl_Stub.java
+++ b/gnu/java/rmi/dgc/DGCImpl_Stub.java
@@ -45,39 +45,39 @@ public final class DGCImpl_Stub
implements java.rmi.dgc.DGC
{
private static final long serialVersionUID = 2L;
-
+
private static final long interfaceHash = -669196253586618813L;
-
+
private static boolean useNewInvoke;
-
+
private static final java.rmi.server.Operation[] operations = {
new java.rmi.server.Operation("void clean(java.rmi.server.ObjID[], long, java.rmi.dgc.VMID, boolean)"),
new java.rmi.server.Operation("java.rmi.dgc.Lease dirty(java.rmi.server.ObjID[], long, java.rmi.dgc.Lease)")
};
-
+
private static java.lang.reflect.Method $method_clean_0;
private static java.lang.reflect.Method $method_dirty_1;
-
+
static {
try {
java.rmi.server.RemoteRef.class.getMethod("invoke", new java.lang.Class[] { java.rmi.Remote.class, java.lang.reflect.Method.class, java.lang.Object[].class, long.class });
useNewInvoke = true;
$method_clean_0 = gnu.java.rmi.dgc.DGCImpl.class.getMethod("clean", new java.lang.Class[] {java.rmi.server.ObjID[].class, long.class, java.rmi.dgc.VMID.class, boolean.class});
$method_dirty_1 = gnu.java.rmi.dgc.DGCImpl.class.getMethod("dirty", new java.lang.Class[] {java.rmi.server.ObjID[].class, long.class, java.rmi.dgc.Lease.class});
-
+
}
catch (java.lang.NoSuchMethodException e) {
useNewInvoke = false;
}
}
-
+
public DGCImpl_Stub() {
super();
}
public DGCImpl_Stub(java.rmi.server.RemoteRef ref) {
super(ref);
}
-
+
public void clean(java.rmi.server.ObjID[] $param_0, long $param_1, java.rmi.dgc.VMID $param_2, boolean $param_3) throws java.rmi.RemoteException {
try {
if (useNewInvoke) {
@@ -114,7 +114,7 @@ public final class DGCImpl_Stub
throw new java.rmi.UnexpectedException("undeclared checked exception", e);
}
}
-
+
public java.rmi.dgc.Lease dirty(java.rmi.server.ObjID[] $param_0, long $param_1, java.rmi.dgc.Lease $param_2) throws java.rmi.RemoteException {
try {
if (useNewInvoke) {
@@ -154,5 +154,5 @@ public final class DGCImpl_Stub
throw new java.rmi.UnexpectedException("undeclared checked exception", e);
}
}
-
+
}
diff --git a/gnu/java/rmi/dgc/LeaseRenewingTask.java b/gnu/java/rmi/dgc/LeaseRenewingTask.java
index ffb5560af..7995af744 100644
--- a/gnu/java/rmi/dgc/LeaseRenewingTask.java
+++ b/gnu/java/rmi/dgc/LeaseRenewingTask.java
@@ -54,11 +54,11 @@ import java.util.WeakHashMap;
* sheduled task does not prevent it from being garbage collected. If the
* reference has not been garbage collected, the task is resheduled after
* the lease is renewed.
- *
+ *
* @author Audrius Meskauskas (Audriusa@Bioinformatics.org)
*/
public class LeaseRenewingTask
-{
+{
/**
* The sheduled timer task to call the renew() method.
*/
@@ -69,12 +69,12 @@ public class LeaseRenewingTask
renew();
}
}
-
+
/**
* The default requested lease duration time (one minute by default).
*/
public static long REQUEST_LEASE_DURATION = 60000;
-
+
/**
* The reference to the UnicastRef that must renew its lease until not
* garbage collected. The different members of this list may point to the
@@ -84,28 +84,28 @@ public class LeaseRenewingTask
* frequent deletions from the middle easy.
*/
LinkedList ref = new LinkedList();
-
+
/**
* The granted (or supposed) lease.
*/
Lease lease = new Lease(null, REQUEST_LEASE_DURATION);
-
+
/**
* The timer, shared by all lease renewing tasks. The same instance is also
* used for the reference protector discarding in DGCImpl.
*/
static Timer timer = new Timer(true);
-
+
/**
* Maps the UnicastRef to its renewing task.
*/
- static WeakHashMap existingTasks = new WeakHashMap();
-
+ static WeakHashMap existingTasks = new WeakHashMap();
+
/**
* Creates the lease renewing task that renews the lease of the given
* UnicastRef until it is not collected. This constructor requests the lease
* value from the server and schedules the lease renewal action.
- *
+ *
* @param renewIt the reference that must be renewed.
*/
public LeaseRenewingTask(UnicastRef renewIt)
@@ -117,10 +117,10 @@ public class LeaseRenewingTask
ref.add(new WeakReference(renewIt));
}
}
-
+
/**
* Schedule periodic leases for the given UnicastRef reference.
- *
+ *
* @param renewIt the reference, for that the leases must be scheduled.
*/
public static void scheduleLeases(UnicastRef renewIt)
@@ -155,23 +155,23 @@ public class LeaseRenewingTask
throw ierr;
}
}
-
+
/**
* Shedule the renewing call, taking into consideration that the following
* lease was granted.
- *
+ *
* @param lease the lease that was granted.
*/
public void schedule(Lease lease)
{
long value = lease.getValue();
-
+
// Shedule a 10 % earlier because some time is needed for the message
// to reach the server.
long reduced = (value * 90)/100;
if (reduced == 0)
reduced = value;
-
+
timer.schedule(new LeaseTimerTask(), reduced);
}
@@ -197,11 +197,11 @@ public class LeaseRenewingTask
iter.remove();
}
}
-
+
if (renewIt!=null)
{
Lease lease = notifyDGC( (UnicastRef) renewIt);
-
+
// Schedule the next renewing session.
if (lease!=null)
schedule(lease);
@@ -210,10 +210,10 @@ public class LeaseRenewingTask
// All references collected - discard this entry.
}
}
-
+
/**
* Notify DGC that we still hold this reference.
- *
+ *
* @param renewIt the reference we still have (must not be null).
*/
public Lease notifyDGC(UnicastRef renewIt)
diff --git a/gnu/java/rmi/registry/RegistryImpl.java b/gnu/java/rmi/registry/RegistryImpl.java
index 7dcca612a..51d49a4f3 100644
--- a/gnu/java/rmi/registry/RegistryImpl.java
+++ b/gnu/java/rmi/registry/RegistryImpl.java
@@ -8,7 +8,7 @@ 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
@@ -56,99 +56,99 @@ import java.util.Enumeration;
import java.util.Hashtable;
public class RegistryImpl
- extends UnicastRemoteObject implements Registry {
+ extends UnicastRemoteObject implements Registry {
private Hashtable bindings = new Hashtable();
public RegistryImpl(int port) throws RemoteException {
- this(port, RMISocketFactory.getSocketFactory(), RMISocketFactory.getSocketFactory());
+ this(port, RMISocketFactory.getSocketFactory(), RMISocketFactory.getSocketFactory());
}
public RegistryImpl(int port, RMIClientSocketFactory cf, RMIServerSocketFactory sf) throws RemoteException {
- super(new UnicastServerRef(new ObjID(ObjID.REGISTRY_ID), port, sf));
- // The following is unnecessary, because UnicastRemoteObject export itself automatically.
- //((UnicastServerRef)getRef()).exportObject(this);
+ super(new UnicastServerRef(new ObjID(ObjID.REGISTRY_ID), port, sf));
+ // The following is unnecessary, because UnicastRemoteObject export itself automatically.
+ //((UnicastServerRef)getRef()).exportObject(this);
}
public Remote lookup(String name) throws RemoteException, NotBoundException, AccessException {
- Object obj = bindings.get(name);
- if (obj == null) {
- throw new NotBoundException(name);
- }
- return ((Remote)obj);
+ Object obj = bindings.get(name);
+ if (obj == null) {
+ throw new NotBoundException(name);
+ }
+ return ((Remote)obj);
}
public void bind(String name, Remote obj) throws RemoteException, AlreadyBoundException, AccessException {
- if (bindings.containsKey(name)) {
- throw new AlreadyBoundException(name);
- }
- bindings.put(name, obj);
+ if (bindings.containsKey(name)) {
+ throw new AlreadyBoundException(name);
+ }
+ bindings.put(name, obj);
}
public void unbind(String name) throws RemoteException, NotBoundException, AccessException {
- Object obj = bindings.remove(name);
- if (obj == null) {
- throw new NotBoundException(name);
- }
+ Object obj = bindings.remove(name);
+ if (obj == null) {
+ throw new NotBoundException(name);
+ }
}
public void rebind(String name, Remote obj) throws RemoteException, AccessException {
- bindings.put(name, obj);
+ bindings.put(name, obj);
}
public String[] list() throws RemoteException, AccessException {
- int size = bindings.size();
- String[] strings = new String[size];
- Enumeration e = bindings.keys();
- for (int i = 0; i < size; i++) {
- strings[i] = (String)e.nextElement();
- }
- return (strings);
+ int size = bindings.size();
+ String[] strings = new String[size];
+ Enumeration e = bindings.keys();
+ for (int i = 0; i < size; i++) {
+ strings[i] = (String)e.nextElement();
+ }
+ return (strings);
}
public static void version() {
- System.out.println("rmiregistry ("
- + System.getProperty("java.vm.name")
- + ") "
- + System.getProperty("java.vm.version"));
- System.out.println("Copyright 2006 Free Software Foundation, Inc.");
- System.out.println("This is free software; see the source for copying conditions. There is NO");
- System.out.println("warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.");
- System.exit(0);
+ System.out.println("rmiregistry ("
+ + System.getProperty("java.vm.name")
+ + ") "
+ + System.getProperty("java.vm.version"));
+ System.out.println("Copyright 2006 Free Software Foundation, Inc.");
+ System.out.println("This is free software; see the source for copying conditions. There is NO");
+ System.out.println("warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.");
+ System.exit(0);
}
public static void help() {
- System.out.println(
+ System.out.println(
"Usage: rmiregistry [OPTION | PORT]\n" +
"\n" +
" --help Print this help, then exit\n" +
" --version Print version number, then exit\n");
- System.exit(0);
+ System.exit(0);
}
public static void main(String[] args) {
- int port = Registry.REGISTRY_PORT;
- if (args.length > 0) {
- if (args[0].equals("--version")) {
- version();
- }
- else if (args[0].equals("--help")) {
- help();
- }
- try {
- port = Integer.parseInt(args[0]);
- }
- catch (NumberFormatException _) {
- System.err.println("Bad port number - using default");
- }
- }
-
- try {
- Registry impl = LocateRegistry.createRegistry(port);
- }
- catch (RemoteException _) {
- System.err.println("Registry failed");
- }
+ int port = Registry.REGISTRY_PORT;
+ if (args.length > 0) {
+ if (args[0].equals("--version")) {
+ version();
+ }
+ else if (args[0].equals("--help")) {
+ help();
+ }
+ try {
+ port = Integer.parseInt(args[0]);
+ }
+ catch (NumberFormatException _) {
+ System.err.println("Bad port number - using default");
+ }
+ }
+
+ try {
+ Registry impl = LocateRegistry.createRegistry(port);
+ }
+ catch (RemoteException _) {
+ System.err.println("Registry failed");
+ }
}
}
diff --git a/gnu/java/rmi/registry/RegistryImpl_Skel.java b/gnu/java/rmi/registry/RegistryImpl_Skel.java
index 8cf14ccc0..defa3bf61 100644
--- a/gnu/java/rmi/registry/RegistryImpl_Skel.java
+++ b/gnu/java/rmi/registry/RegistryImpl_Skel.java
@@ -44,7 +44,7 @@ public final class RegistryImpl_Skel
implements java.rmi.server.Skeleton
{
private static final long interfaceHash = 4905912898345647071L;
-
+
private static final java.rmi.server.Operation[] operations = {
new java.rmi.server.Operation("void bind(java.lang.String, java.rmi.Remote"),
new java.rmi.server.Operation("java.lang.String[] list("),
@@ -52,11 +52,11 @@ public final class RegistryImpl_Skel
new java.rmi.server.Operation("void rebind(java.lang.String, java.rmi.Remote"),
new java.rmi.server.Operation("void unbind(java.lang.String")
};
-
+
public java.rmi.server.Operation[] getOperations() {
return ((java.rmi.server.Operation[]) operations.clone());
}
-
+
public void dispatch(java.rmi.Remote obj, java.rmi.server.RemoteCall call, int opnum, long hash) throws java.lang.Exception {
if (opnum < 0) {
if (hash == 7583982177005850366L) {
@@ -81,7 +81,7 @@ public final class RegistryImpl_Skel
else if (hash != interfaceHash) {
throw new java.rmi.server.SkeletonMismatchException("interface hash mismatch");
}
-
+
gnu.java.rmi.registry.RegistryImpl server = (gnu.java.rmi.registry.RegistryImpl)obj;
switch (opnum) {
case 0:
@@ -92,7 +92,7 @@ public final class RegistryImpl_Skel
java.io.ObjectInput in = call.getInputStream();
$param_0 = (java.lang.String)in.readObject();
$param_1 = (java.rmi.Remote)in.readObject();
-
+
}
catch (java.io.IOException e) {
throw new java.rmi.UnmarshalException("error unmarshalling arguments", e);
@@ -112,12 +112,12 @@ public final class RegistryImpl_Skel
}
break;
}
-
+
case 1:
{
try {
java.io.ObjectInput in = call.getInputStream();
-
+
}
catch (java.io.IOException e) {
throw new java.rmi.UnmarshalException("error unmarshalling arguments", e);
@@ -135,14 +135,14 @@ public final class RegistryImpl_Skel
}
break;
}
-
+
case 2:
{
java.lang.String $param_0;
try {
java.io.ObjectInput in = call.getInputStream();
$param_0 = (java.lang.String)in.readObject();
-
+
}
catch (java.io.IOException e) {
throw new java.rmi.UnmarshalException("error unmarshalling arguments", e);
@@ -163,7 +163,7 @@ public final class RegistryImpl_Skel
}
break;
}
-
+
case 3:
{
java.lang.String $param_0;
@@ -172,7 +172,7 @@ public final class RegistryImpl_Skel
java.io.ObjectInput in = call.getInputStream();
$param_0 = (java.lang.String)in.readObject();
$param_1 = (java.rmi.Remote)in.readObject();
-
+
}
catch (java.io.IOException e) {
throw new java.rmi.UnmarshalException("error unmarshalling arguments", e);
@@ -192,14 +192,14 @@ public final class RegistryImpl_Skel
}
break;
}
-
+
case 4:
{
java.lang.String $param_0;
try {
java.io.ObjectInput in = call.getInputStream();
$param_0 = (java.lang.String)in.readObject();
-
+
}
catch (java.io.IOException e) {
throw new java.rmi.UnmarshalException("error unmarshalling arguments", e);
@@ -219,7 +219,7 @@ public final class RegistryImpl_Skel
}
break;
}
-
+
default:
throw new java.rmi.UnmarshalException("invalid method number");
}
diff --git a/gnu/java/rmi/registry/RegistryImpl_Stub.java b/gnu/java/rmi/registry/RegistryImpl_Stub.java
index b289426b4..786a5e180 100644
--- a/gnu/java/rmi/registry/RegistryImpl_Stub.java
+++ b/gnu/java/rmi/registry/RegistryImpl_Stub.java
@@ -45,11 +45,11 @@ public final class RegistryImpl_Stub
implements java.rmi.registry.Registry
{
private static final long serialVersionUID = 2L;
-
+
private static final long interfaceHash = 4905912898345647071L;
-
+
private static boolean useNewInvoke;
-
+
private static final java.rmi.server.Operation[] operations = {
new java.rmi.server.Operation("void bind(java.lang.String, java.rmi.Remote)"),
new java.rmi.server.Operation("java.lang.String[] list()"),
@@ -57,13 +57,13 @@ public final class RegistryImpl_Stub
new java.rmi.server.Operation("void rebind(java.lang.String, java.rmi.Remote)"),
new java.rmi.server.Operation("void unbind(java.lang.String)")
};
-
+
private static java.lang.reflect.Method $method_bind_0;
private static java.lang.reflect.Method $method_list_1;
private static java.lang.reflect.Method $method_lookup_2;
private static java.lang.reflect.Method $method_rebind_3;
private static java.lang.reflect.Method $method_unbind_4;
-
+
static {
try {
java.rmi.server.RemoteRef.class.getMethod("invoke", new java.lang.Class[] { java.rmi.Remote.class, java.lang.reflect.Method.class, java.lang.Object[].class, long.class });
@@ -73,20 +73,20 @@ public final class RegistryImpl_Stub
$method_lookup_2 = gnu.java.rmi.registry.RegistryImpl.class.getMethod("lookup", new java.lang.Class[] {java.lang.String.class});
$method_rebind_3 = gnu.java.rmi.registry.RegistryImpl.class.getMethod("rebind", new java.lang.Class[] {java.lang.String.class, java.rmi.Remote.class});
$method_unbind_4 = gnu.java.rmi.registry.RegistryImpl.class.getMethod("unbind", new java.lang.Class[] {java.lang.String.class});
-
+
}
catch (java.lang.NoSuchMethodException e) {
useNewInvoke = false;
}
}
-
+
public RegistryImpl_Stub() {
super();
}
public RegistryImpl_Stub(java.rmi.server.RemoteRef ref) {
super(ref);
}
-
+
public void bind(java.lang.String $param_0, java.rmi.Remote $param_1) throws java.rmi.AccessException, java.rmi.AlreadyBoundException, java.rmi.RemoteException {
try {
if (useNewInvoke) {
@@ -127,7 +127,7 @@ public final class RegistryImpl_Stub
throw new java.rmi.UnexpectedException("undeclared checked exception", e);
}
}
-
+
public java.lang.String[] list() throws java.rmi.AccessException, java.rmi.RemoteException {
try {
if (useNewInvoke) {
@@ -167,7 +167,7 @@ public final class RegistryImpl_Stub
throw new java.rmi.UnexpectedException("undeclared checked exception", e);
}
}
-
+
public java.rmi.Remote lookup(java.lang.String $param_0) throws java.rmi.AccessException, java.rmi.NotBoundException, java.rmi.RemoteException {
try {
if (useNewInvoke) {
@@ -211,7 +211,7 @@ public final class RegistryImpl_Stub
throw new java.rmi.UnexpectedException("undeclared checked exception", e);
}
}
-
+
public void rebind(java.lang.String $param_0, java.rmi.Remote $param_1) throws java.rmi.AccessException, java.rmi.RemoteException {
try {
if (useNewInvoke) {
@@ -249,7 +249,7 @@ public final class RegistryImpl_Stub
throw new java.rmi.UnexpectedException("undeclared checked exception", e);
}
}
-
+
public void unbind(java.lang.String $param_0) throws java.rmi.AccessException, java.rmi.NotBoundException, java.rmi.RemoteException {
try {
if (useNewInvoke) {
@@ -289,5 +289,5 @@ public final class RegistryImpl_Stub
throw new java.rmi.UnexpectedException("undeclared checked exception", e);
}
}
-
+
}
diff --git a/gnu/java/rmi/server/ActivatableRef.java b/gnu/java/rmi/server/ActivatableRef.java
index e7580bcd7..a6faaca2e 100644
--- a/gnu/java/rmi/server/ActivatableRef.java
+++ b/gnu/java/rmi/server/ActivatableRef.java
@@ -58,7 +58,7 @@ import java.rmi.server.RemoteRef;
* appears to be not accessible, it tries to reactivate it before reporting
* any errors. Apart the fields of the UnicastRef, the activatable reference
* contains the ActivationID that is used for this activation.
- *
+ *
* @author Audrius Meskauskas (Audriusa@Bioinformatics.org)
*/
public class ActivatableRef extends UnicastRef
@@ -67,12 +67,12 @@ public class ActivatableRef extends UnicastRef
* Use serial version UID for iteroperability
*/
private static final long serialVersionUID = 1;
-
+
/**
* The activation id.
*/
ActivationID actId;
-
+
/**
* Delegate call to the superclass.
*/
@@ -128,7 +128,7 @@ public class ActivatableRef extends UnicastRef
out.writeUTF("UnicastRef2");
super.writeExternal(out);
}
-
+
/**
* Invoke the remote method on the given object and try to activate the object
* if it is not reacheable with the current manager.
@@ -153,10 +153,10 @@ public class ActivatableRef extends UnicastRef
}
else if (Proxy.isProxyClass(reactivated.getClass()))
{
- RemoteObjectInvocationHandler hander =
- (RemoteObjectInvocationHandler)
+ RemoteObjectInvocationHandler hander =
+ (RemoteObjectInvocationHandler)
Proxy.getInvocationHandler(reactivated);
-
+
RemoteRef ref = hander.getRef();
manager = ((UnicastRef) ref).manager;
}
diff --git a/gnu/java/rmi/server/ActivatableServerRef.java b/gnu/java/rmi/server/ActivatableServerRef.java
index 5b7dadfd2..31e825a25 100644
--- a/gnu/java/rmi/server/ActivatableServerRef.java
+++ b/gnu/java/rmi/server/ActivatableServerRef.java
@@ -54,7 +54,7 @@ import java.rmi.server.Skeleton;
* additionally activates the associated object on demand, during the first
* incoming call. When UnicastServerReference takes the working reference,
* the ActivatableServerRef takes the activation id instead.
- *
+ *
* @author Audrius Meskauskas (Audriusa@Bioinformatics.org)
*/
public class ActivatableServerRef extends UnicastServerRef
@@ -63,7 +63,7 @@ public class ActivatableServerRef extends UnicastServerRef
* Use SVUID for interoperability
*/
private static final long serialVersionUID = 1;
-
+
/**
* The object activation id.
*/
@@ -76,7 +76,7 @@ public class ActivatableServerRef extends UnicastServerRef
{
super();
}
-
+
/**
* Create the new activatable server reference that will activate object on
* the first call using the given activation id.
@@ -87,13 +87,13 @@ public class ActivatableServerRef extends UnicastServerRef
{
super(id, aPort, ssFactory);
actId = anId;
-
+
// The object ID will be placed in the object map and should deliver
// incoming call to {@link #incommingMessageCall}. The object itself
// is currently null.
UnicastServer.exportActivatableObject(this);
}
-
+
/**
* Inactivate the object (stop the server).
*/
@@ -101,7 +101,7 @@ public class ActivatableServerRef extends UnicastServerRef
{
manager.stopServer();
}
-
+
/**
* Activate the object (normally during the first call).
*/
@@ -110,7 +110,7 @@ public class ActivatableServerRef extends UnicastServerRef
try
{
Remote self = actId.activate(false);
-
+
// This will call UnicastServer.exportObject, replacing null by
// the activated object (self) in the object map.
exportObject(self);
@@ -139,7 +139,7 @@ public class ActivatableServerRef extends UnicastServerRef
}
/**
- * Export object and ensure it is present in the server activation table
+ * Export object and ensure it is present in the server activation table
* as well.
*/
public Remote exportObject(Remote obj) throws RemoteException
@@ -148,11 +148,11 @@ public class ActivatableServerRef extends UnicastServerRef
UnicastServer.registerActivatable(this);
return r;
}
-
+
/**
* Export object and ensure it is present in the server activation table as
* well.
- *
+ *
* @param aClass the class being exported, must implement Remote.
*/
public Remote exportClass(Class aClass) throws RemoteException
@@ -161,17 +161,17 @@ public class ActivatableServerRef extends UnicastServerRef
throw new InternalError(aClass.getName()+" must implement Remote");
String ignoreStubs;
-
- ClassLoader loader =aClass.getClassLoader();
-
+
+ ClassLoader loader =aClass.getClassLoader();
+
// Stubs are always searched for the bootstrap classes that may have
// obsolete pattern and may still need also skeletons.
if (loader==null)
ignoreStubs = "false";
else
- ignoreStubs = System.getProperty("java.rmi.server.ignoreStubClasses",
+ ignoreStubs = System.getProperty("java.rmi.server.ignoreStubClasses",
"false");
-
+
if (! ignoreStubs.equals("true"))
{
// Find and install the stub
@@ -223,5 +223,5 @@ public class ActivatableServerRef extends UnicastServerRef
super.writeExternal(out);
out.writeObject(actId);
}
-
+
}
diff --git a/gnu/java/rmi/server/CombinedClassLoader.java b/gnu/java/rmi/server/CombinedClassLoader.java
index 6225fb30b..3d01d0987 100644
--- a/gnu/java/rmi/server/CombinedClassLoader.java
+++ b/gnu/java/rmi/server/CombinedClassLoader.java
@@ -49,8 +49,8 @@ import java.util.ArrayList;
* This class supports the multiple class loaders to load the resources. It is
* used for constructing proxy classes that implement interfaces, loaded by
* the several different class loaders.
- *
- * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public class CombinedClassLoader extends ClassLoader
{
@@ -58,20 +58,20 @@ public class CombinedClassLoader extends ClassLoader
* The class loader array.
*/
ClassLoader[] loaders;
-
+
/**
* Create a new combined class loader that uses the given collection of
* loaders to load the classes and resources. The loader order is equal to
* the order, returned by the collection interator. The duplicate loaders
* are discarded and the system class loader is added as the last loader.
- *
+ *
* @param a_loaders the loadery collection (may contain duplicate instances
* that will be discarded.
*/
public CombinedClassLoader(Collection a_loaders)
{
ArrayList sLoaders = new ArrayList(a_loaders.size());
-
+
Iterator iter = a_loaders.iterator();
Object cl;
while (iter.hasNext())
@@ -80,7 +80,7 @@ public class CombinedClassLoader extends ClassLoader
if (cl!=null && !sLoaders.contains(cl))
sLoaders.add(cl);
}
-
+
loaders = new ClassLoader[sLoaders.size()];
for (int i = 0; i < loaders.length; i++)
diff --git a/gnu/java/rmi/server/ConnectionRunnerPool.java b/gnu/java/rmi/server/ConnectionRunnerPool.java
index 9f2b3706e..86660fea7 100644
--- a/gnu/java/rmi/server/ConnectionRunnerPool.java
+++ b/gnu/java/rmi/server/ConnectionRunnerPool.java
@@ -7,7 +7,7 @@ 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
@@ -45,61 +45,61 @@ import java.util.Arrays;
class ConnectionRunnerPool
{
-
- public static
+
+ public static
class ConnectionRunner extends Thread{
private UnicastConnection conn;
private volatile boolean exiting = false;
-
+
public ConnectionRunner(ThreadGroup group, String id){
super(group, id);
}
-
+
public synchronized void run(){
while(!exiting){
- if(conn == null)
- try{
- wait();
- }catch(InterruptedException e){
- continue;
- }
- else{
- conn.run();
- conn = null;
- synchronized(ConnectionRunnerPool.class){
- freelist.add(this);
- if(freelist.size() == 1)
- ConnectionRunnerPool.class.notifyAll();
- }
- }
+ if(conn == null)
+ try{
+ wait();
+ }catch(InterruptedException e){
+ continue;
+ }
+ else{
+ conn.run();
+ conn = null;
+ synchronized(ConnectionRunnerPool.class){
+ freelist.add(this);
+ if(freelist.size() == 1)
+ ConnectionRunnerPool.class.notifyAll();
+ }
+ }
}
}
-
+
public synchronized void dispatch(UnicastConnection conn){
this.conn = conn;
notify();
}
-
+
void exit(){
exiting = true;
if(conn != null)
- try{
- join(500);
- }catch(InterruptedException e){}
+ try{
+ join(500);
+ }catch(InterruptedException e){}
interrupt();
}
-
+
}
-
+
// Should this value equal to number of CPU?
private static int size = 5;
private static int max_size = 10;
-
+
// Package-private to avoid a trampoline.
static ArrayList freelist;
-
+
private static ThreadGroup group = new ThreadGroup("pool");
-
+
static {
ConnectionRunner[] pools = new ConnectionRunner[size];
for(int i = 0; i < pools.length; i++){
@@ -109,42 +109,42 @@ class ConnectionRunnerPool
}
freelist = new ArrayList(Arrays.asList(pools));
}
-
+
public static void setSize(int size_){
size = size_;
}
-
+
public static void setMaxSize(int size){
max_size = size;
}
-
+
private static synchronized ConnectionRunner getConnectionRunner()
{
if(freelist.size() == 0){
if(size < max_size){
- ++size;
- ConnectionRunner a = new ConnectionRunner(group, Integer.toString(size));
- a.start();
- freelist.add(a);
+ ++size;
+ ConnectionRunner a = new ConnectionRunner(group, Integer.toString(size));
+ a.start();
+ freelist.add(a);
}else
- while(freelist.size() == 0)
- try{
- ConnectionRunnerPool.class.wait();
- }catch(InterruptedException e){}
+ while(freelist.size() == 0)
+ try{
+ ConnectionRunnerPool.class.wait();
+ }catch(InterruptedException e){}
}
-
+
// always let the first in pool most busy or other scheduling plan??
ConnectionRunner a = (ConnectionRunner)freelist.get(0);
freelist.remove(a);
return a;
}
-
+
public static void dispatchConnection(UnicastConnection conn)
{
ConnectionRunner r = getConnectionRunner();
r.dispatch(conn);
}
-
+
public static void exit()
{
Thread[] list = new Thread[group.activeCount()];
@@ -152,5 +152,5 @@ class ConnectionRunnerPool
for(int i = 0; i < list.length; i++)
((ConnectionRunner)list[i]).exit();
}
-
+
}
diff --git a/gnu/java/rmi/server/ProtocolConstants.java b/gnu/java/rmi/server/ProtocolConstants.java
index 30fb5e89b..72fbefe61 100644
--- a/gnu/java/rmi/server/ProtocolConstants.java
+++ b/gnu/java/rmi/server/ProtocolConstants.java
@@ -7,7 +7,7 @@ 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
diff --git a/gnu/java/rmi/server/RMIClassLoaderImpl.java b/gnu/java/rmi/server/RMIClassLoaderImpl.java
index 9c3edef76..b090d3444 100644
--- a/gnu/java/rmi/server/RMIClassLoaderImpl.java
+++ b/gnu/java/rmi/server/RMIClassLoaderImpl.java
@@ -90,21 +90,21 @@ public class RMIClassLoaderImpl extends RMIClassLoaderSpi
private final String annotation;
}
- /**
- * This class is used to identify a cached classloader by its codebase and
+ /**
+ * This class is used to identify a cached classloader by its codebase and
* the context classloader that is its parent.
- */
+ */
private static class CacheKey
{
private String mCodeBase;
private ClassLoader mContextClassLoader;
-
+
public CacheKey (String theCodebase, ClassLoader theContextClassLoader)
{
mCodeBase = theCodebase;
mContextClassLoader = theContextClassLoader;
}
-
+
/**
* @return true if the codebase and the context classloader are equal
*/
@@ -113,13 +113,13 @@ public class RMIClassLoaderImpl extends RMIClassLoaderSpi
if (theOther instanceof CacheKey)
{
CacheKey key = (CacheKey) theOther;
-
+
return (equals (this.mCodeBase,key.mCodeBase)
&& equals (this.mContextClassLoader, key.mContextClassLoader));
}
return false;
}
-
+
/**
* Test if the two objects are equal or both null.
* @param theOne
@@ -132,17 +132,17 @@ public class RMIClassLoaderImpl extends RMIClassLoaderSpi
}
/**
- * @return hashCode
+ * @return hashCode
*/
public int hashCode()
{
- return ((mCodeBase != null ? mCodeBase.hashCode() : 0)
+ return ((mCodeBase != null ? mCodeBase.hashCode() : 0)
^(mContextClassLoader != null ? mContextClassLoader.hashCode() : -1));
}
public String toString()
{
- return "[" + mCodeBase + "," + mContextClassLoader + "]";
+ return "[" + mCodeBase + "," + mContextClassLoader + "]";
}
}
@@ -214,7 +214,7 @@ public class RMIClassLoaderImpl extends RMIClassLoaderSpi
ClassLoader defaultLoader)
throws MalformedURLException, ClassNotFoundException
{
- try
+ try
{
if (defaultLoader != null)
return Class.forName(name, false, defaultLoader);
@@ -236,7 +236,7 @@ public class RMIClassLoaderImpl extends RMIClassLoaderSpi
{
clss[i] = loadClass(codeBase, interfaces[i], defaultLoader);
}
-
+
// Chain all class loaders (they may differ).
ArrayList loaders = new ArrayList(clss.length);
ClassLoader loader = null;
@@ -266,11 +266,11 @@ public class RMIClassLoaderImpl extends RMIClassLoaderSpi
/**
* Gets a classloader for the given codebase and with the current
* context classloader as parent.
- *
+ *
* @param codebase
- *
+ *
* @return a classloader for the given codebase
- *
+ *
* @throws MalformedURLException if the codebase contains a malformed URL
*/
public ClassLoader getClassLoader(String codebase)
@@ -283,23 +283,23 @@ public class RMIClassLoaderImpl extends RMIClassLoaderSpi
CacheKey loaderKey = new CacheKey
(codebase, Thread.currentThread().getContextClassLoader());
loader = (ClassLoader) cacheLoaders.get (loaderKey);
-
+
if (loader == null)
{
//create an entry in cacheLoaders mapping a loader to codebases.
// codebases are separated by " "
StringTokenizer tok = new StringTokenizer (codebase, " ");
ArrayList urls = new ArrayList();
-
+
while (tok.hasMoreTokens())
urls.add (new URL(tok.nextToken()));
-
+
loader = new MyClassLoader((URL[]) urls.toArray(new URL [urls.size()]),
Thread.currentThread().getContextClassLoader(),
codebase);
cacheLoaders.put (loaderKey, loader);
}
-
+
return loader;
}
@@ -315,38 +315,38 @@ public class RMIClassLoaderImpl extends RMIClassLoaderSpi
public String getClassAnnotation(Class cl)
{
ClassLoader loader = cl.getClassLoader();
-
+
if (loader == null
|| loader == ClassLoader.getSystemClassLoader())
{
return System.getProperty ("java.rmi.server.codebase");
}
-
+
if (loader instanceof MyClassLoader)
{
return ((MyClassLoader) loader).getClassAnnotation();
}
-
+
String s = (String) cacheAnnotations.get (loader);
-
+
if (s != null)
return s;
-
+
if (loader instanceof URLClassLoader)
{
URL[] urls = ((URLClassLoader) loader).getURLs();
-
+
if (urls.length == 0)
return null;
-
+
CPStringBuilder annotation = new CPStringBuilder (64 * urls.length);
-
+
for (int i = 0; i < urls.length; i++)
{
annotation.append (urls [i].toExternalForm());
annotation.append (' ');
}
-
+
s = annotation.toString();
cacheAnnotations.put (loader, s);
return s;
diff --git a/gnu/java/rmi/server/RMIDefaultSocketFactory.java b/gnu/java/rmi/server/RMIDefaultSocketFactory.java
index 628e1cc87..7115ba543 100644
--- a/gnu/java/rmi/server/RMIDefaultSocketFactory.java
+++ b/gnu/java/rmi/server/RMIDefaultSocketFactory.java
@@ -7,7 +7,7 @@ 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
@@ -43,17 +43,17 @@ import java.net.Socket;
import java.rmi.server.RMISocketFactory;
public class RMIDefaultSocketFactory
- extends RMISocketFactory {
+ extends RMISocketFactory {
public RMIDefaultSocketFactory() {
}
public Socket createSocket(String host, int port) throws IOException {
- return (new Socket(host, port));
+ return (new Socket(host, port));
}
public ServerSocket createServerSocket(int port) throws IOException {
- return (new ServerSocket(port));
+ return (new ServerSocket(port));
}
}
diff --git a/gnu/java/rmi/server/RMIHashes.java b/gnu/java/rmi/server/RMIHashes.java
index c3665a4e7..03eb09fd0 100644
--- a/gnu/java/rmi/server/RMIHashes.java
+++ b/gnu/java/rmi/server/RMIHashes.java
@@ -7,7 +7,7 @@ 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
@@ -51,7 +51,7 @@ public class RMIHashes
{
//There're other places using DigestOutputStream to generate hash in classpath, but I think the way I used
//here is more efficient, anyway, you can switch to DigestOutputStream by doing like "//or:" comments say.
-
+
//or:add this statement: private static final NullOutputStream nullOutputStream = new NullOutputStream ();
public static long getMethodHash(Method meth)
{
@@ -62,7 +62,7 @@ public class RMIHashes
//or:remove this statement: DigestOutputStream digest_out = new DigestOutputStream (nullOutputStream, md);
ByteArrayOutputStream digest_out = new ByteArrayOutputStream();
DataOutputStream data_out = new DataOutputStream (digest_out);
-
+
CPStringBuilder sbuf = new CPStringBuilder();
sbuf.append(meth.getName());
sbuf.append('(');
@@ -75,7 +75,7 @@ public class RMIHashes
sbuf.append(TypeSignature.getEncodingOfClass(rcls));
else
sbuf.append('V');
-
+
data_out.writeUTF (sbuf.toString());
data_out.flush();
data_out.close ();
@@ -97,4 +97,3 @@ public class RMIHashes
return clazz.hashCode ();
}
}
-
diff --git a/gnu/java/rmi/server/RMIIncomingThread.java b/gnu/java/rmi/server/RMIIncomingThread.java
index 990d37bc5..352b48b31 100644
--- a/gnu/java/rmi/server/RMIIncomingThread.java
+++ b/gnu/java/rmi/server/RMIIncomingThread.java
@@ -7,7 +7,7 @@ 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
@@ -35,24 +35,24 @@ 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 gnu.java.rmi.server;
-
-public class RMIIncomingThread extends Thread {
-
- private String clientHost = null;
-
- public RMIIncomingThread(Runnable runnable, String s_clientHost) {
- super(runnable);
- clientHost = s_clientHost;
- }
-
- public String toString() {
- return "RMIIncoming from " + clientHost + " " + super.toString();
- }
-
- public String getClientHost() {
- return clientHost;
- }
-
+package gnu.java.rmi.server;
+
+public class RMIIncomingThread extends Thread {
+
+ private String clientHost = null;
+
+ public RMIIncomingThread(Runnable runnable, String s_clientHost) {
+ super(runnable);
+ clientHost = s_clientHost;
+ }
+
+ public String toString() {
+ return "RMIIncoming from " + clientHost + " " + super.toString();
+ }
+
+ public String getClientHost() {
+ return clientHost;
+ }
+
}
diff --git a/gnu/java/rmi/server/RMIObjectInputStream.java b/gnu/java/rmi/server/RMIObjectInputStream.java
index 65a13f991..4ac7a0ae8 100644
--- a/gnu/java/rmi/server/RMIObjectInputStream.java
+++ b/gnu/java/rmi/server/RMIObjectInputStream.java
@@ -8,7 +8,7 @@ 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
@@ -48,44 +48,44 @@ import java.net.MalformedURLException;
import java.rmi.server.RMIClassLoader;
public class RMIObjectInputStream
- extends ObjectInputStream {
+ extends ObjectInputStream {
public RMIObjectInputStream(InputStream strm) throws IOException {
- super(strm);
- enableResolveObject(true);
+ super(strm);
+ enableResolveObject(true);
}
protected Class resolveClass(ObjectStreamClass desc) throws IOException, ClassNotFoundException {
- try {
+ try {
return RMIClassLoader.loadClass(
(String)getAnnotation(),
desc.getName(),
VMStackWalker.firstNonNullClassLoader());
- }
- catch (MalformedURLException x) {
- throw new ClassNotFoundException(desc.getName(), x);
- }
+ }
+ catch (MalformedURLException x) {
+ throw new ClassNotFoundException(desc.getName(), x);
+ }
}
//Separate it for override by MarshalledObject
protected Object getAnnotation()
- throws IOException, ClassNotFoundException
+ throws IOException, ClassNotFoundException
{
return readObject();
}
-
+
protected Class resolveProxyClass(String intfs[]) throws IOException,
ClassNotFoundException
{
- try
+ try
{
return RMIClassLoader.loadProxyClass(
(String)getAnnotation(),
intfs,
VMStackWalker.firstNonNullClassLoader());
}
- catch (MalformedURLException x)
+ catch (MalformedURLException x)
{
throw new ClassNotFoundException(null, x);
}
diff --git a/gnu/java/rmi/server/RMIObjectOutputStream.java b/gnu/java/rmi/server/RMIObjectOutputStream.java
index d42908a41..aaf09860c 100644
--- a/gnu/java/rmi/server/RMIObjectOutputStream.java
+++ b/gnu/java/rmi/server/RMIObjectOutputStream.java
@@ -8,7 +8,7 @@ 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
@@ -47,11 +47,11 @@ import java.rmi.server.RMIClassLoader;
import java.rmi.server.RemoteStub;
public class RMIObjectOutputStream
- extends ObjectOutputStream {
+ extends ObjectOutputStream {
public RMIObjectOutputStream(OutputStream strm) throws IOException {
- super(strm);
- enableReplaceObject(true);
+ super(strm);
+ enableReplaceObject(true);
}
//Separate it for override by MarshalledObject
@@ -60,7 +60,7 @@ protected void setAnnotation(String annotation) throws IOException{
}
protected void annotateClass(Class cls) throws IOException {
- setAnnotation(RMIClassLoader.getClassAnnotation(cls));
+ setAnnotation(RMIClassLoader.getClassAnnotation(cls));
}
protected void annotateProxyClass(Class cls)
@@ -68,14 +68,14 @@ protected void annotateProxyClass(Class cls)
{
annotateClass(cls);
}
-
+
protected Object replaceObject(Object obj)
throws IOException
{
if((obj instanceof Remote) && !(obj instanceof RemoteStub)){
- UnicastServerRef ref = UnicastServer.getExportedRef((Remote)obj);
- if (ref != null)
- return ref.getStub();
+ UnicastServerRef ref = UnicastServer.getExportedRef((Remote)obj);
+ if (ref != null)
+ return ref.getStub();
}
return obj;
}
diff --git a/gnu/java/rmi/server/UnicastConnection.java b/gnu/java/rmi/server/UnicastConnection.java
index 216e453e7..8245e0469 100644
--- a/gnu/java/rmi/server/UnicastConnection.java
+++ b/gnu/java/rmi/server/UnicastConnection.java
@@ -8,7 +8,7 @@ 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
@@ -49,8 +49,8 @@ import java.io.ObjectOutputStream;
import java.net.Socket;
import java.rmi.RemoteException;
-public class UnicastConnection
- implements Runnable, ProtocolConstants {
+public class UnicastConnection
+ implements Runnable, ProtocolConstants {
UnicastConnectionManager manager;
Socket sock;
@@ -64,78 +64,78 @@ long reviveTime = 0;
long expireTime = Long.MAX_VALUE;
UnicastConnection(UnicastConnectionManager man, Socket sock) {
- this.manager = man;
- this.sock = sock;
+ this.manager = man;
+ this.sock = sock;
}
void acceptConnection() throws IOException {
//System.out.println("Accepting connection on " + sock);
//Use BufferedXXXStream would be more efficient
- din = new DataInputStream(new BufferedInputStream(sock.getInputStream()));
- dout = new DataOutputStream(new BufferedOutputStream(sock.getOutputStream()));
-
- int sig = din.readInt();
- if (sig != PROTOCOL_HEADER) {
- throw new IOException("bad protocol header");
- }
- short ver = din.readShort();
- if (ver != PROTOCOL_VERSION) {
- throw new IOException("bad protocol version");
- }
- int protocol = din.readUnsignedByte();
- if (protocol != SINGLE_OP_PROTOCOL) {
- // Send an ACK
- dout.writeByte(PROTOCOL_ACK);
-
- // Send my hostname and port
- dout.writeUTF(manager.serverName);
- dout.writeInt(manager.serverPort);
- dout.flush();
-
- // Read their hostname and port
- String rhost = din.readUTF();
- int rport = din.readInt();
- }
- // Okay, ready to roll ...
+ din = new DataInputStream(new BufferedInputStream(sock.getInputStream()));
+ dout = new DataOutputStream(new BufferedOutputStream(sock.getOutputStream()));
+
+ int sig = din.readInt();
+ if (sig != PROTOCOL_HEADER) {
+ throw new IOException("bad protocol header");
+ }
+ short ver = din.readShort();
+ if (ver != PROTOCOL_VERSION) {
+ throw new IOException("bad protocol version");
+ }
+ int protocol = din.readUnsignedByte();
+ if (protocol != SINGLE_OP_PROTOCOL) {
+ // Send an ACK
+ dout.writeByte(PROTOCOL_ACK);
+
+ // Send my hostname and port
+ dout.writeUTF(manager.serverName);
+ dout.writeInt(manager.serverPort);
+ dout.flush();
+
+ // Read their hostname and port
+ String rhost = din.readUTF();
+ int rport = din.readInt();
+ }
+ // Okay, ready to roll ...
}
void makeConnection(int protocol) throws IOException {
//Use BufferedXXXStream would be more efficient
- din = new DataInputStream(new BufferedInputStream(sock.getInputStream()));
+ din = new DataInputStream(new BufferedInputStream(sock.getInputStream()));
- dout = new DataOutputStream(new BufferedOutputStream(sock.getOutputStream()));
+ dout = new DataOutputStream(new BufferedOutputStream(sock.getOutputStream()));
- // Send header
- dout.writeInt(PROTOCOL_HEADER);
- dout.writeShort(PROTOCOL_VERSION);
- dout.writeByte(protocol);
+ // Send header
+ dout.writeInt(PROTOCOL_HEADER);
+ dout.writeShort(PROTOCOL_VERSION);
+ dout.writeByte(protocol);
dout.flush();
-
- if (protocol != SINGLE_OP_PROTOCOL) {
- // Get back ack.
- int ack = din.readUnsignedByte();
- if (ack != PROTOCOL_ACK) {
- throw new RemoteException("Unsupported protocol");
- }
-
- // Read in host and port
- String dicard_rhost = din.readUTF();
- int discard_rport = din.readInt();
-
- // Send them my endpoint
- dout.writeUTF(manager.serverName);
- dout.writeInt(manager.serverPort);
- dout.flush();
- }
- // Okay, ready to roll ...
+
+ if (protocol != SINGLE_OP_PROTOCOL) {
+ // Get back ack.
+ int ack = din.readUnsignedByte();
+ if (ack != PROTOCOL_ACK) {
+ throw new RemoteException("Unsupported protocol");
+ }
+
+ // Read in host and port
+ String dicard_rhost = din.readUTF();
+ int discard_rport = din.readInt();
+
+ // Send them my endpoint
+ dout.writeUTF(manager.serverName);
+ dout.writeInt(manager.serverPort);
+ dout.flush();
+ }
+ // Okay, ready to roll ...
}
DataInputStream getDataInputStream() throws IOException {
- return (din);
+ return (din);
}
DataOutputStream getDataOutputStream() throws IOException {
- return (dout);
+ return (dout);
}
/*
@@ -144,10 +144,10 @@ DataOutputStream getDataOutputStream() throws IOException {
*
*/
ObjectInputStream getObjectInputStream() throws IOException {
- if (oin == null) {
- throw new IOException("no ObjectInputtream for reading more objects");
- }
- return (oin);
+ if (oin == null) {
+ throw new IOException("no ObjectInputtream for reading more objects");
+ }
+ return (oin);
}
/**
@@ -156,7 +156,7 @@ ObjectInputStream getObjectInputStream() throws IOException {
*
*/
ObjectInputStream startObjectInputStream() throws IOException {
- return (oin = new RMIObjectInputStream(din));
+ return (oin = new RMIObjectInputStream(din));
}
/**
@@ -165,10 +165,10 @@ ObjectInputStream startObjectInputStream() throws IOException {
*
*/
ObjectOutputStream getObjectOutputStream() throws IOException {
- if (oout == null) {
- throw new IOException("no ObjectOutputStream for sending more objects");
- }
- return (oout);
+ if (oout == null) {
+ throw new IOException("no ObjectOutputStream for sending more objects");
+ }
+ return (oout);
}
/**
@@ -177,23 +177,23 @@ ObjectOutputStream getObjectOutputStream() throws IOException {
*
*/
ObjectOutputStream startObjectOutputStream() throws IOException {
- return (oout = new RMIObjectOutputStream(dout));
-}
+ return (oout = new RMIObjectOutputStream(dout));
+}
void disconnect() {
- try {
- if(oout != null)
- oout.close();
+ try {
+ if(oout != null)
+ oout.close();
sock.close();
- }
- catch (IOException _) {
+ }
+ catch (IOException _) {
}
- oin = null;
+ oin = null;
oout = null;
- din = null;
- dout = null;
- sock = null;
+ din = null;
+ dout = null;
+ sock = null;
}
public static final long CONNECTION_TIMEOUT = 10000L;
@@ -215,15 +215,15 @@ static void resetTime(UnicastConnection conn){
*/
public void run() {
do{
- try {
- UnicastServer.dispatch(this);
+ try {
+ UnicastServer.dispatch(this);
//don't discardConnection explicitly, only when
- // exception happens or the connection's expireTime
+ // exception happens or the connection's expireTime
// comes
} catch (Exception e ){
- manager.discardConnection(this);
+ manager.discardConnection(this);
break;
- }
+ }
}while(true);
}
diff --git a/gnu/java/rmi/server/UnicastConnectionManager.java b/gnu/java/rmi/server/UnicastConnectionManager.java
index a9992af9f..981d11792 100644
--- a/gnu/java/rmi/server/UnicastConnectionManager.java
+++ b/gnu/java/rmi/server/UnicastConnectionManager.java
@@ -8,7 +8,7 @@ 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
@@ -56,7 +56,7 @@ import java.util.Hashtable;
import java.util.Iterator;
public class UnicastConnectionManager
- implements Runnable, ProtocolConstants {
+ implements Runnable, ProtocolConstants {
private static String localhost;
// use different maps for server/client type UnicastConnectionManager
@@ -100,8 +100,8 @@ static {
catch (UnknownHostException _) {
localhost = "localhost";
}
-
-
+
+
}
//Only one scavenger thread running globally
@@ -134,7 +134,7 @@ private static void startScavenger(){
if (UnicastConnection.isExpired(conn, l)){
conns.remove(last);
conn.disconnect();
- conn = null;
+ conn = null;
}else
liveon = true; //there're still live connections
}
@@ -159,11 +159,11 @@ private static void startScavenger(){
* Client UnicastConnectionManager constructor
*/
private UnicastConnectionManager(String host, int port, RMIClientSocketFactory csf) {
- ssock = null;
- serverName = host;
- serverPort = port;
- serverFactory = null;
- clientFactory = csf;
+ ssock = null;
+ serverName = host;
+ serverPort = port;
+ serverFactory = null;
+ clientFactory = csf;
connections = new ArrayList();
}
@@ -172,24 +172,24 @@ private UnicastConnectionManager(String host, int port, RMIClientSocketFactory c
*/
private UnicastConnectionManager(int port, RMIServerSocketFactory ssf) throws RemoteException {
- try {
- ssock = ssf.createServerSocket(port);
- serverPort = ssock.getLocalPort();
- }
- catch (IOException ioex) {
- ssock = null;
- serverPort = 0;
- throw new java.rmi.server.ExportException("can not create Server Socket on port " + port,ioex);
- }
- // Note that for compatibility the serverName is "localhost",
- // not UnicastConnectionManager.localhost, which is the name
- // of the local box. A server listening on localhost:port is
- // listening on the loopback interface, 127.0.0.1, but
- // UnicastConnectionManager.localhost is an externally
- // accessible IP address.
- serverName = "localhost";
- serverFactory = ssf;
- clientFactory = null;
+ try {
+ ssock = ssf.createServerSocket(port);
+ serverPort = ssock.getLocalPort();
+ }
+ catch (IOException ioex) {
+ ssock = null;
+ serverPort = 0;
+ throw new java.rmi.server.ExportException("can not create Server Socket on port " + port,ioex);
+ }
+ // Note that for compatibility the serverName is "localhost",
+ // not UnicastConnectionManager.localhost, which is the name
+ // of the local box. A server listening on localhost:port is
+ // listening on the loopback interface, 127.0.0.1, but
+ // UnicastConnectionManager.localhost is an externally
+ // accessible IP address.
+ serverName = "localhost";
+ serverFactory = ssf;
+ clientFactory = null;
}
/**
@@ -198,31 +198,31 @@ private UnicastConnectionManager(int port, RMIServerSocketFactory ssf) throws Re
*/
public static synchronized UnicastConnectionManager getInstance(String host, int port, RMIClientSocketFactory csf) {
//System.out.println("getInstance: " + host + "," + port + "," + csf);
- if (csf == null) {
+ if (csf == null) {
csf = defaultSocketFactory;
- }
- // change host name to host address to avoid name resolving issues
- try{
- host = InetAddress.getByName(host).getHostAddress();
+ }
+ // change host name to host address to avoid name resolving issues
+ try{
+ host = InetAddress.getByName(host).getHostAddress();
}catch(Exception _){}
-
- TripleKey key = new TripleKey(host, port, csf);
- UnicastConnectionManager man = (UnicastConnectionManager)clients.get(key);
- if (man == null) {
- man = new UnicastConnectionManager(host, port, csf);
+
+ TripleKey key = new TripleKey(host, port, csf);
+ UnicastConnectionManager man = (UnicastConnectionManager)clients.get(key);
+ if (man == null) {
+ man = new UnicastConnectionManager(host, port, csf);
if (debug) {
ncmanager++;
System.out.println("\n\n ====== " + ncmanager + " client managers.\n\n");
}
- clients.put(key, man);
-
+ clients.put(key, man);
+
// Detect if client and server are in the same VM, i.e., their keys are equal
UnicastConnectionManager svrman = (UnicastConnectionManager)servers.get(key);
if(svrman != null){ // server and client are in the same VM
man.serverobj = svrman.serverobj;
}
- }
- return (man);
+ }
+ return (man);
}
/**
@@ -231,50 +231,50 @@ public static synchronized UnicastConnectionManager getInstance(String host, int
*/
public static synchronized UnicastConnectionManager getInstance(int port, RMIServerSocketFactory ssf) throws RemoteException {
//System.out.println("getInstance: " + port + "," + ssf);
- if (ssf == null) {
+ if (ssf == null) {
ssf = defaultSocketFactory;
- }
- TripleKey key = new TripleKey(localhost, port, ssf);
- UnicastConnectionManager man = (UnicastConnectionManager)servers.get(key);
- if (man == null) {
- man = new UnicastConnectionManager(port, ssf);
+ }
+ TripleKey key = new TripleKey(localhost, port, ssf);
+ UnicastConnectionManager man = (UnicastConnectionManager)servers.get(key);
+ if (man == null) {
+ man = new UnicastConnectionManager(port, ssf);
if (debug) {
nsmanager++;
System.out.println("\n\n ****** " + nsmanager + " server managers.\n\n");
}
- // The provided port might not be the set port.
- key.port = man.serverPort;
- servers.put(key, man);
- }
- return (man);
+ // The provided port might not be the set port.
+ key.port = man.serverPort;
+ servers.put(key, man);
+ }
+ return (man);
}
/**
* Get a connection from this manager.
*/
public UnicastConnection getConnection() throws IOException {
- if (ssock == null) {
- return (getClientConnection());
- }
- else {
- return (getServerConnection());
- }
+ if (ssock == null) {
+ return (getClientConnection());
+ }
+ else {
+ return (getServerConnection());
+ }
}
/**
* Accept a connection to this server.
*/
private UnicastConnection getServerConnection() throws IOException {
- Socket sock = ssock.accept();
+ Socket sock = ssock.accept();
sock.setTcpNoDelay(true); //??
- UnicastConnection conn = new UnicastConnection(this, sock);
- conn.acceptConnection();
+ UnicastConnection conn = new UnicastConnection(this, sock);
+ conn.acceptConnection();
if (debug){
nssock++;
System.out.println("\n\n ****** " + nssock + " server socks.\n\n");
}
//System.out.println("Server connection " + sock);
- return (conn);
+ return (conn);
}
/**
@@ -283,37 +283,37 @@ private UnicastConnection getServerConnection() throws IOException {
private UnicastConnection getClientConnection() throws IOException {
ArrayList conns = connections;
UnicastConnection conn;
-
+
synchronized(conns) {
int nconn = conns.size() - 1;
-
+
// if there're free connections in connection pool
if(nconn >= 0) {
conn = (UnicastConnection)conns.get(nconn);
//Should we check if conn is alive using Ping??
conns.remove(nconn);
-
+
// Check if the connection is already expired
long l = System.currentTimeMillis();
if (!UnicastConnection.isExpired(conn, l)){
return conn;
}else {
conn.disconnect();
- conn = null;
+ conn = null;
}
}
}
-
- Socket sock = clientFactory.createSocket(serverName, serverPort);
+
+ Socket sock = clientFactory.createSocket(serverName, serverPort);
conn = new UnicastConnection(this, sock);
- conn.makeConnection(DEFAULT_PROTOCOL);
-
+ conn.makeConnection(DEFAULT_PROTOCOL);
+
if (debug) {
ncsock++;
System.out.println("\n\n ====== " + ncsock + " client socks.\n\n");
}
- return (conn);
+ return (conn);
}
/**
@@ -332,13 +332,13 @@ public void discardConnection(UnicastConnection conn) {
//System.out.println("Discarding connection " + conn);
//conn.disconnect();
if (ssock != null) //server connection
- conn.disconnect();
+ conn.disconnect();
else {
// To client connection, we'd like to return back to pool
UnicastConnection.resetTime(conn);
//Ensure there're only one scavenger globally
synchronized(GLOBAL_LOCK) {
- connections.add(conn); //borrow this lock to garantee thread safety
+ connections.add(conn); //borrow this lock to garantee thread safety
if (scavenger == null)
startScavenger();
}
@@ -350,15 +350,15 @@ public void discardConnection(UnicastConnection conn) {
* already got one running.
*/
public void startServer() {
- synchronized(this) {
- if (ssock == null || serverThread != null) {
- return;
- }
- serverThread = new Thread(this);
+ synchronized(this) {
+ if (ssock == null || serverThread != null) {
+ return;
+ }
+ serverThread = new Thread(this);
// The following is not necessary when java.lang.Thread's constructor do this.
// serverThread.setContextClassLoader(Thread.currentThread().getContextClassLoader());
- }
- serverThread.start();
+ }
+ serverThread.start();
}
/**
@@ -366,12 +366,12 @@ public void startServer() {
*/
public void stopServer() {
synchronized(this) {
- if(serverThread != null){
- serverThread = null;
- try{
- ssock.close();
- }catch(Exception _){}
- }
+ if(serverThread != null){
+ serverThread = null;
+ try{
+ ssock.close();
+ }catch(Exception _){}
+ }
}
}
@@ -379,26 +379,26 @@ public void stopServer() {
* Server thread for connection manager.
*/
public void run() {
- for (;serverThread != null;) { // if serverThread==null, then exit thread
- try {
+ for (;serverThread != null;) { // if serverThread==null, then exit thread
+ try {
//System.out.println("Waiting for connection on " + serverPort);
- UnicastConnection conn = getServerConnection();
+ UnicastConnection conn = getServerConnection();
- // get address of remote host for the RMIIncomingThread object
- String remoteHost = null;
- if (conn.sock != null) {
- remoteHost = conn.sock.getInetAddress().getHostAddress();
- }
+ // get address of remote host for the RMIIncomingThread object
+ String remoteHost = null;
+ if (conn.sock != null) {
+ remoteHost = conn.sock.getInetAddress().getHostAddress();
+ }
- // use a thread pool to improve performance
+ // use a thread pool to improve performance
//ConnectionRunnerPool.dispatchConnection(conn);
(new RMIIncomingThread(conn, remoteHost)).start();
-// (new Thread(conn)).start();
- }
- catch (Exception e) {
+// (new Thread(conn)).start();
+ }
+ catch (Exception e) {
e.printStackTrace();
- }
- }
+ }
+ }
}
/**
@@ -432,9 +432,9 @@ int port;
Object other;
TripleKey(String host, int port, Object other) {
- this.host = host;
- this.port = port;
- this.other = other;
+ this.host = host;
+ this.port = port;
+ this.other = other;
}
/**
@@ -442,19 +442,19 @@ TripleKey(String host, int port, Object other) {
* this has unusual matching behaviour.
*/
public int hashCode() {
- return (host.hashCode() ^ other.hashCode());
+ return (host.hashCode() ^ other.hashCode());
}
public boolean equals(Object obj) {
- if (obj instanceof TripleKey) {
- TripleKey other = (TripleKey)obj;
- if (this.host.equals(other.host) &&
- this.other == other.other &&
+ if (obj instanceof TripleKey) {
+ TripleKey other = (TripleKey)obj;
+ if (this.host.equals(other.host) &&
+ this.other == other.other &&
(this.port == other.port /* || this.port == 0 || other.port == 0*/)) {
- return (true);
- }
- }
- return (false);
+ return (true);
+ }
+ }
+ return (false);
}
/**
diff --git a/gnu/java/rmi/server/UnicastRef.java b/gnu/java/rmi/server/UnicastRef.java
index def1acdcf..ca2bab51a 100644
--- a/gnu/java/rmi/server/UnicastRef.java
+++ b/gnu/java/rmi/server/UnicastRef.java
@@ -8,7 +8,7 @@ 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
@@ -461,7 +461,7 @@ public class UnicastRef
{
return ("UnicastRef");
}
-
+
/**
* Return the string representing the remote reference information.
*/
@@ -497,7 +497,7 @@ public class UnicastRef
/**
* Check if this UnicastRef points to the object as the passed UnicastRef.
* Both the object Id and manager must be the same.
- *
+ *
* @return true if the passed reference points to the same remote object as
* this reference, false otherwise.
*/
diff --git a/gnu/java/rmi/server/UnicastRemoteCall.java b/gnu/java/rmi/server/UnicastRemoteCall.java
index c5206e76d..d0d77304c 100644
--- a/gnu/java/rmi/server/UnicastRemoteCall.java
+++ b/gnu/java/rmi/server/UnicastRemoteCall.java
@@ -54,7 +54,7 @@ import java.rmi.server.UID;
import java.util.Vector;
public class UnicastRemoteCall
- implements RemoteCall, ProtocolConstants
+ implements RemoteCall, ProtocolConstants
{
private UnicastConnection conn;
@@ -89,12 +89,12 @@ public class UnicastRemoteCall
this.hash = hash;
this.objid = objid;
}
-
+
UnicastConnection getConnection()
{
return conn;
}
-
+
public ObjectOutput getOutputStream() throws IOException
{
if (vec == null)
@@ -106,33 +106,33 @@ public class UnicastRemoteCall
{
if (vec != null)
{
- oout = conn.getObjectOutputStream();
-
- for (int i = 0; i < vec.size(); i += 2)
- {
- boolean primitive = ((Boolean)vec.elementAt(i)).booleanValue();
- Object data = vec.elementAt(i+1);
-
- // No type, this is
- if (!primitive)
- oout.writeObject(data);
- else
- {
- if (data instanceof Boolean)
- oout.writeBoolean(((Boolean)data).booleanValue());
- else if (data instanceof Character)
- oout.writeChar(((Character)data).charValue());
- else if (data instanceof Byte)
- oout.writeByte(((Byte)data).byteValue());
- else if (data instanceof Short)
- oout.writeShort(((Short)data).shortValue());
- else if (data instanceof Integer)
- oout.writeInt(((Integer)data).intValue());
- else if (data instanceof Long)
- oout.writeLong(((Long)data).longValue());
- }
- }
- vec = null;
+ oout = conn.getObjectOutputStream();
+
+ for (int i = 0; i < vec.size(); i += 2)
+ {
+ boolean primitive = ((Boolean)vec.elementAt(i)).booleanValue();
+ Object data = vec.elementAt(i+1);
+
+ // No type, this is
+ if (!primitive)
+ oout.writeObject(data);
+ else
+ {
+ if (data instanceof Boolean)
+ oout.writeBoolean(((Boolean)data).booleanValue());
+ else if (data instanceof Character)
+ oout.writeChar(((Character)data).charValue());
+ else if (data instanceof Byte)
+ oout.writeByte(((Byte)data).byteValue());
+ else if (data instanceof Short)
+ oout.writeShort(((Short)data).shortValue());
+ else if (data instanceof Integer)
+ oout.writeInt(((Integer)data).intValue());
+ else if (data instanceof Long)
+ oout.writeLong(((Long)data).longValue());
+ }
+ }
+ vec = null;
}
if(oout != null)
oout.flush();
@@ -142,14 +142,14 @@ public class UnicastRemoteCall
*
* (re)starts ObjectInputStream
*
- */
+ */
public ObjectInput startInputStream() throws IOException
{
- if (conn != null) {
- return (oin = conn.startObjectInputStream());
- } else {
- return getInputStream(); // dummy Input Stream
- }
+ if (conn != null) {
+ return (oin = conn.startObjectInputStream());
+ } else {
+ return getInputStream(); // dummy Input Stream
+ }
}
@@ -157,15 +157,15 @@ public class UnicastRemoteCall
{
if (conn != null)
{
- if(oin == null)
- return (oin = conn.getObjectInputStream());
- else
- return oin;
+ if(oin == null)
+ return (oin = conn.getObjectInputStream());
+ else
+ return oin;
}
else
{
- ptr = 0;
- return (new DummyObjectInputStream());
+ ptr = 0;
+ return (new DummyObjectInputStream());
}
}
@@ -180,34 +180,34 @@ public class UnicastRemoteCall
vec = new Vector();
return new DummyObjectOutputStream();
}
-
+
public void executeCall() throws Exception
{
byte returncode;
ObjectInput oin;
-
+
// signal the call when constructing
try
{
- DataOutputStream dout = conn.getDataOutputStream();
- dout.write(MESSAGE_CALL);
-
- oout = conn.startObjectOutputStream(); // (re)start ObjectOutputStream
- objid.write(oout);
- oout.writeInt(opnum);
- oout.writeLong(hash);
+ DataOutputStream dout = conn.getDataOutputStream();
+ dout.write(MESSAGE_CALL);
+
+ oout = conn.startObjectOutputStream(); // (re)start ObjectOutputStream
+ objid.write(oout);
+ oout.writeInt(opnum);
+ oout.writeLong(hash);
}
catch(IOException ex)
{
- throw new MarshalException("Try to write header but failed.", ex);
+ throw new MarshalException("Try to write header but failed.", ex);
}
try
{
- releaseOutputStream();
- DataInputStream din = conn.getDataInputStream();
+ releaseOutputStream();
+ DataInputStream din = conn.getDataInputStream();
if (din.readByte() != MESSAGE_CALL_ACK)
- throw new RemoteException("Call not acked");
+ throw new RemoteException("Call not acked");
oin = startInputStream();
returncode = oin.readByte();
@@ -217,31 +217,31 @@ public class UnicastRemoteCall
{
throw new UnmarshalException("Try to read header but failed:", ex);
}
-
+
//check return code
switch(returncode)
{
case RETURN_ACK: //it's ok
- return;
+ return;
case RETURN_NACK:
- Object returnobj;
- try
- {
- returnobj = oin.readObject();
- }
- catch(Exception ex2)
- {
- throw new UnmarshalException
- ("Try to read exception object but failed", ex2);
- }
-
- if(!(returnobj instanceof Exception))
- throw new UnmarshalException("Should be Exception type here: "
- + returnobj);
- throw (Exception)returnobj;
-
+ Object returnobj;
+ try
+ {
+ returnobj = oin.readObject();
+ }
+ catch(Exception ex2)
+ {
+ throw new UnmarshalException
+ ("Try to read exception object but failed", ex2);
+ }
+
+ if(!(returnobj instanceof Exception))
+ throw new UnmarshalException("Should be Exception type here: "
+ + returnobj);
+ throw (Exception)returnobj;
+
default:
- throw new UnmarshalException("Invalid return code");
+ throw new UnmarshalException("Invalid return code");
}
}
@@ -254,7 +254,7 @@ public class UnicastRemoteCall
{
return vec.size() > 0;
}
-
+
Object returnValue()
{
// This is not the first one (Boolean) but the second.
diff --git a/gnu/java/rmi/server/UnicastRemoteStub.java b/gnu/java/rmi/server/UnicastRemoteStub.java
index 87e932de5..179f30179 100644
--- a/gnu/java/rmi/server/UnicastRemoteStub.java
+++ b/gnu/java/rmi/server/UnicastRemoteStub.java
@@ -7,7 +7,7 @@ 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
@@ -41,10 +41,10 @@ import java.rmi.server.RemoteRef;
import java.rmi.server.RemoteStub;
public class UnicastRemoteStub
- extends RemoteStub {
+ extends RemoteStub {
public static void setStubRef(RemoteStub stub, RemoteRef ref) {
- setRef(stub, ref);
+ setRef(stub, ref);
}
}
diff --git a/gnu/java/rmi/server/UnicastServer.java b/gnu/java/rmi/server/UnicastServer.java
index 7fe539546..db2bd2ff8 100644
--- a/gnu/java/rmi/server/UnicastServer.java
+++ b/gnu/java/rmi/server/UnicastServer.java
@@ -8,7 +8,7 @@ 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
@@ -75,21 +75,21 @@ public class UnicastServer
* Mapping obj itself to server ref by identity.
*/
static private Map refcache = Collections.synchronizedMap(new WeakIdentityHashMap());
-
+
/**
* Mapping the registered activatable objects into they server references.
*/
public static Map actIds = new Hashtable();
-
+
/**
- * The reference to the local distributed garbage collector.
+ * The reference to the local distributed garbage collector.
*/
static private DGCImpl dgc;
-
+
/**
* Connect this server reference to the server, allowing the local
* implementation, associated with this object, to receive remote calls.
- *
+ *
* @param obj the server reference, encloses the (usually local) remote
* object.
*/
@@ -100,7 +100,7 @@ public class UnicastServer
refcache.put(obj.myself, obj);
obj.manager.startServer();
}
-
+
/**
* Register the activatable object into the table of the activatable
* objects.
@@ -109,7 +109,7 @@ public class UnicastServer
{
actIds.put(ref.actId, ref);
}
-
+
/**
* Export tha activatable object. The object id is placed into the map,
* but the object itself not. This is enough to deliver call to
@@ -123,8 +123,8 @@ public class UnicastServer
ref.manager.startServer();
actIds.put(ref.actId, ref);
}
-
-
+
+
/**
* Get the activatable server reference that is handling activation of the
* given activation id.
@@ -137,15 +137,15 @@ public class UnicastServer
throw new ActivationException(id + " was not registered with this server");
return ref;
}
-
+
/**
* Unregister the previously registered activatable server reference.
*/
public static void unregisterActivatable(ActivationID id)
{
- actIds.remove(id);
+ actIds.remove(id);
}
-
+
// FIX ME: I haven't handle force parameter
/**
* Remove the given server reference. The remote object, associated with
@@ -156,7 +156,7 @@ public class UnicastServer
objects.remove(obj.objid);
refcache.remove(obj.myself);
obj.manager.stopServer();
-
+
if (obj instanceof ActivatableServerRef)
{
ActivationID id = ((ActivatableServerRef) obj).actId;
@@ -164,15 +164,15 @@ public class UnicastServer
}
return true;
}
-
+
/**
* Get the exported reference of the given Remote. The identity map is used,
* the non-null value will only be returned if exactly the passed remote
- * is part of the registered UnicastServerRef.
- *
- * @param remote the Remote that is connected to this server via
+ * is part of the registered UnicastServerRef.
+ *
+ * @param remote the Remote that is connected to this server via
* {@link UnicastServerRef}.
- *
+ *
* @return the UnicastServerRef that is used to connect the passed
* remote with this server or null, if this Remote is not connected
* to this server.
@@ -186,7 +186,7 @@ public class UnicastServer
* Get the server references to the object, previously exported via this
* server. As the identity map is scanned, more than one reference may match
* this Id.
- *
+ *
* @param id the id of the exported object
* @return the server reference to this object, null if none.
*/
@@ -244,10 +244,10 @@ public class UnicastServer
throw new Exception("bad method type");
}
}
-
+
/**
* This method is invoked when the remote call is received. The method
- * dispatches the call to the responsible object, connected to this
+ * dispatches the call to the responsible object, connected to this
* server via UnicastServerReference.
*/
private static void incomingMessageCall(UnicastConnection conn)
@@ -287,7 +287,7 @@ public class UnicastServer
catch (Error e)
{
returnval = new ServerError(
- "Server error, ObjID: " + objid +
+ "Server error, ObjID: " + objid +
", method: " + method + ", hash: "+ hash, e);
returncode = RETURN_NACK;
}
diff --git a/gnu/java/rmi/server/UnicastServerRef.java b/gnu/java/rmi/server/UnicastServerRef.java
index 2f7cb9a2d..59a9f080b 100644
--- a/gnu/java/rmi/server/UnicastServerRef.java
+++ b/gnu/java/rmi/server/UnicastServerRef.java
@@ -8,7 +8,7 @@ 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
@@ -60,39 +60,39 @@ import java.util.Iterator;
/**
* This class connects the local, remotely available (exported) object to
- * the local RMI server that accepts the remote calls.
+ * the local RMI server that accepts the remote calls.
*/
public class UnicastServerRef
extends UnicastRef
-{
+{
/**
* Use GNU Classpath v 0.20 SVUID for interoperability
*/
private static final long serialVersionUID = - 5585608108300801246L;
-
+
/**
- * The class array, defining parameters of the jdk 1.2 RMI stub constructor.
+ * The class array, defining parameters of the jdk 1.2 RMI stub constructor.
*/
private static final Class[] stubprototype = new Class[] { RemoteRef.class };
-
+
/**
* The exported remote object itself.
*/
Remote myself; // save the remote object itself
-
+
/**
* The skeleton (if any), associated with the exported remote object.
*/
protected Skeleton skel;
-
+
/**
* The stub, associated with the exported remote object (may be proxy class).
*/
protected Remote stub;
-
+
/**
- * The method table (RMI hash code to method) of the methods of the
+ * The method table (RMI hash code to method) of the methods of the
* exported object.
*/
protected Hashtable methods = new Hashtable();
@@ -110,15 +110,15 @@ public class UnicastServerRef
super(id);
manager = UnicastConnectionManager.getInstance(port, ssf);
}
-
+
/**
* Export the object and return its remote stub. The method tries to locate
* existing stubs and skeletons. If this fails, the method instantiates the
* proxy stub class.
- *
- * Stubs and skeletons are always ignored (even if present) if the
+ *
+ * Stubs and skeletons are always ignored (even if present) if the
* java.rmi.server.ignoreStubClasses property is set to true.
- *
+ *
* @param obj the object being exported.
* @return the stub (existing class or proxy) of the exported object.
* @throws RemoteException if the export failed due any reason
@@ -133,17 +133,17 @@ public class UnicastServerRef
manager.serverobj = obj;
String ignoreStubs;
-
- ClassLoader loader =obj.getClass().getClassLoader();
-
+
+ ClassLoader loader =obj.getClass().getClassLoader();
+
// Stubs are always searched for the bootstrap classes that may have
// obsolete pattern and may still need also skeletons.
if (loader==null)
ignoreStubs = "false";
else
- ignoreStubs = System.getProperty("java.rmi.server.ignoreStubClasses",
+ ignoreStubs = System.getProperty("java.rmi.server.ignoreStubClasses",
"false");
-
+
if (! ignoreStubs.equals("true"))
{
// Find and install the stub
@@ -172,21 +172,21 @@ public class UnicastServerRef
return stub;
}
-
+
/**
* Get the stub (actual class or proxy) of the exported remote object.
- *
+ *
* @return the remote stub (null if exportObject has not been called).
*/
public Remote getStub()
{
return stub;
}
-
+
/**
- * Unexport the object (remove methods from the method hashcode table
+ * Unexport the object (remove methods from the method hashcode table
* and call UnicastServer.unexportObject.
- *
+ *
* @param obj the object being unexported
* @param force passed to the UnicastServer.unexportObject.
* @return value, returned by the UnicastServer.unexportObject.
@@ -202,7 +202,7 @@ public class UnicastServerRef
* Return the class in the hierarchy for that the stub class is defined.
* The Subs/Skels might not there for the actual class, but maybe for one of
* the superclasses.
- *
+ *
* @return the class having stub defined, null if none.
*/
protected Class findStubSkelClass(Class startCls)
@@ -231,17 +231,17 @@ public class UnicastServerRef
}
}
}
-
+
/**
- * Get the helper (assisting) class with the given type.
- *
+ * Get the helper (assisting) class with the given type.
+ *
* @param cls the class, for that the helper class is requested. This class
* and the requested helper class must share the same class loader.
- *
+ *
* @param type the type of the assisting helper. The only currently supported
* non deprecated value is "_Stub" (load jdk 1.1 or 1.2 RMI stub). Another
* (deprecated) value is "_Skel" (load skeleton).
- *
+ *
* @return the instantiated instance of the helper class or null if the
* helper class cannot be found or instantiated.
*/
@@ -303,14 +303,14 @@ public class UnicastServerRef
{
return RemoteServer.getClientHost();
}
-
+
/**
* Build the method has code table and put it into {@link #methods}
* (mapping RMI hashcode tos method). The same method is used to remove
* the table.
- *
- * @param cls the class for that the method table is built.
- * @param build if true, the class methods are added to the table. If
+ *
+ * @param cls the class for that the method table is built.
+ * @param build if true, the class methods are added to the table. If
* false, they are removed from the table.
*/
protected void buildMethodHash(Class cls, boolean build)
@@ -342,7 +342,7 @@ public class UnicastServerRef
else
return null;
}
-
+
/**
* This method is called from the {@link UnicastServer#incomingMessageCall}
* to deliver the remote call to this object.
@@ -422,7 +422,7 @@ public class UnicastServerRef
{
if (skel == null)
throw new NoSuchMethodException("JDK 1.1 call - Skeleton required");
-
+
UnicastRemoteCall call = new UnicastRemoteCall(conn);
skel.dispatch(myself, call, method, hash);
if (! call.isReturnValue())
@@ -431,16 +431,16 @@ public class UnicastServerRef
return (call.returnValue());
}
}
-
+
/**
* Create the 1.2 proxy stub in the case when the pre-generated stub is not
* available of the system is explicitly instructed to use proxy stubs.
- *
+ *
* @param stubFor the class for that the proxy class must be constructed.
* @param reference the remote reference, used to find the given object
- *
+ *
* @return the applicable proxy stub.
- *
+ *
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
Remote createProxyStub(Class stubFor, RemoteRef reference)
@@ -467,17 +467,15 @@ public class UnicastServerRef
for (int i = 0; i < intfs.length; i++)
intfs[i] = (Class) it.next();
-
- RemoteObjectInvocationHandler handler =
+
+ RemoteObjectInvocationHandler handler =
new RemoteObjectInvocationHandler(reference);
-
- Object proxy =
+
+ Object proxy =
Proxy.newProxyInstance(stubFor.getClassLoader(), intfs, handler);
return (Remote) proxy;
}
-
-
-}
+}
diff --git a/gnu/java/security/Engine.java b/gnu/java/security/Engine.java
index 6c39d46ac..969fcef6c 100644
--- a/gnu/java/security/Engine.java
+++ b/gnu/java/security/Engine.java
@@ -58,7 +58,7 @@ import java.util.Enumeration;
* represents.
*
* @see Provider
- * @author Casey Marshall
+ * @author Casey Marshall
*/
public final class Engine
{
@@ -85,7 +85,7 @@ public final class Engine
* Return the implementation for <i>algorithm</i> for service <i>service</i>
* from <i>provider</i>. The service is e.g. "Signature", and the algorithm
* "DSA".
- *
+ *
* @param service The service name.
* @param algorithm The name of the algorithm to get.
* @param provider The provider to get the implementation from.
@@ -111,7 +111,7 @@ public final class Engine
* constructor (which cannot be null; pass a zero-length array if the SPI
* takes no arguments). The service is e.g. "Signature", and the algorithm
* "DSA".
- *
+ *
* @param service The service name.
* @param algorithm The name of the algorithm to get.
* @param provider The provider to get the implementation from.
@@ -159,7 +159,7 @@ public final class Engine
if (key.equalsIgnoreCase(service + "." + algorithm))
{
// remove the service portion from the key
- algorithm = key.substring(service.length() + 1);
+ algorithm = key.substring(service.length() + 1);
algorithmFound = true;
break;
}
diff --git a/gnu/java/security/OID.java b/gnu/java/security/OID.java
index a3d70e220..c7efe6557 100644
--- a/gnu/java/security/OID.java
+++ b/gnu/java/security/OID.java
@@ -75,7 +75,7 @@ public class OID implements Cloneable, Comparable, java.io.Serializable
/* Serial version id for serialization. */
static final long serialVersionUID = 5722492029044597779L;
-
+
/**
* The numeric ID structure.
*/
diff --git a/gnu/java/security/PolicyFile.java b/gnu/java/security/PolicyFile.java
index e9c811644..0560bce07 100644
--- a/gnu/java/security/PolicyFile.java
+++ b/gnu/java/security/PolicyFile.java
@@ -154,7 +154,7 @@ public final class PolicyFile extends Policy
// Added to cut redundant AccessController.doPrivileged calls
private static GetPropertyAction prop = new GetPropertyAction("file.separator");
private static final String fs = (String) AccessController.doPrivileged(prop);
-
+
private static final String DEFAULT_POLICY =
(String) AccessController.doPrivileged(prop.setParameters("java.home"))
+ fs + "lib" + fs + "security" + fs + "java.policy";
@@ -536,7 +536,7 @@ public final class PolicyFile extends Policy
if (clazz == null)
{
currentPerms.add(new UnresolvedPermission(className,
- null, null, (Certificate[]) currentCerts.toArray(new Certificate[currentCerts.size()])));
+ null, null, (Certificate[]) currentCerts.toArray(new Certificate[currentCerts.size()])));
continue;
}
try
@@ -558,7 +558,7 @@ public final class PolicyFile extends Policy
if (clazz == null)
{
currentPerms.add(new UnresolvedPermission(className,
- target, null, (Certificate[]) currentCerts.toArray(new Certificate[currentCerts.size()])));
+ target, null, (Certificate[]) currentCerts.toArray(new Certificate[currentCerts.size()])));
continue;
}
try
@@ -601,7 +601,7 @@ public final class PolicyFile extends Policy
if (clazz == null)
{
currentPerms.add(new UnresolvedPermission(className,
- target, action, (Certificate[]) currentCerts.toArray(new Certificate[currentCerts.size()])));
+ target, action, (Certificate[]) currentCerts.toArray(new Certificate[currentCerts.size()])));
continue;
}
else
diff --git a/gnu/java/security/Properties.java b/gnu/java/security/Properties.java
index a515a5428..2213bde06 100644
--- a/gnu/java/security/Properties.java
+++ b/gnu/java/security/Properties.java
@@ -90,7 +90,7 @@ public final class Properties
/**
* Returns the string representation of the library global configuration
* property with the designated <code>key</code>.
- *
+ *
* @param key the case-insensitive, non-null and non-empty name of a
* configuration property.
* @return the string representation of the designated property, or
@@ -113,7 +113,7 @@ public final class Properties
/**
* Sets the value of a designated library global configuration property, to a
* string representation of what should be a legal value.
- *
+ *
* @param key the case-insensitive, non-null and non-empty name of a
* configuration property.
* @param value the non-null, non-empty string representation of a legal value
@@ -151,7 +151,7 @@ public final class Properties
* A convenience method that returns, as a boolean, the library global
* configuration property indicating if the default Pseudo Random Number
* Generator produces, or not, the same bit stream when instantiated.
- *
+ *
* @return <code>true</code> if the default PRNG produces the same bit
* stream with every VM instance. Returns <code>false</code> if the
* default PRNG is seeded with the time of day of its first
@@ -171,7 +171,7 @@ public final class Properties
* block ciphers check, or not, for possible/potential weak and semi-weak keys
* that may be produced in the course of generating round encryption and/or
* decryption keys.
- *
+ *
* @return <code>true</code> if the cipher implementations check for weak
* and semi-weak keys. Returns <code>false</code> if the cipher
* implementations do not check for weak or semi-weak keys.
@@ -188,7 +188,7 @@ public final class Properties
* A convenience method that returns, as a boolean, the library global
* configuration property indicating if RSA decryption (RSADP primitive),
* does, or not, blinding against timing attacks.
- *
+ *
* @return <code>true</code> if the RSA decryption primitive includes a
* blinding operation. Returns <code>false</code> if the RSA
* decryption primitive does not include the additional blinding
@@ -205,7 +205,7 @@ public final class Properties
/**
* A convenience method to set the global property for reproducibility of the
* default PRNG bit stream output.
- *
+ *
* @param value if <code>true</code> then the default PRNG bit stream output
* is the same with every invocation of the VM.
*/
@@ -221,7 +221,7 @@ public final class Properties
/**
* A convenience method to set the global property for checking for weak and
* semi-weak cipher keys.
- *
+ *
* @param value if <code>true</code> then the cipher implementations will
* invoke additional checks for weak and semi-weak key values that
* may get generated.
@@ -238,7 +238,7 @@ public final class Properties
/**
* A convenience method to set the global property fo adding a blinding
* operation when executing the RSA decryption primitive.
- *
+ *
* @param value if <code>true</code> then the code for performing the RSA
* decryption primitive will include a blinding operation.
*/
diff --git a/gnu/java/security/Registry.java b/gnu/java/security/Registry.java
index 053d71778..4ce5044ab 100644
--- a/gnu/java/security/Registry.java
+++ b/gnu/java/security/Registry.java
@@ -1,4 +1,4 @@
-/* Registry.java --
+/* Registry.java --
Copyright (C) 2001, 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/java/security/Requires.java b/gnu/java/security/Requires.java
index c820336c0..6b52bd168 100644
--- a/gnu/java/security/Requires.java
+++ b/gnu/java/security/Requires.java
@@ -46,8 +46,8 @@ import static java.lang.annotation.RetentionPolicy.CLASS;
import java.security.Permission;
/**
- *
- *
+ *
+ *
* @author Casey Marshall (csm@gnu.org)
*/
@Documented @Retention(CLASS) @Target(METHOD)
diff --git a/gnu/java/security/action/GetPropertyAction.java b/gnu/java/security/action/GetPropertyAction.java
index 0c8141a4d..7295d8d5a 100644
--- a/gnu/java/security/action/GetPropertyAction.java
+++ b/gnu/java/security/action/GetPropertyAction.java
@@ -57,7 +57,7 @@ public class GetPropertyAction implements PrivilegedAction<String>
public GetPropertyAction()
{
}
-
+
public GetPropertyAction(String propName)
{
setParameters(propName);
@@ -67,12 +67,12 @@ public class GetPropertyAction implements PrivilegedAction<String>
{
setParameters(propName, defaultValue);
}
-
+
public String run()
{
return System.getProperty(name, value);
}
-
+
public GetPropertyAction setParameters(String propName)
{
this.name = propName;
diff --git a/gnu/java/security/action/SetAccessibleAction.java b/gnu/java/security/action/SetAccessibleAction.java
index 77e5fc988..d3e3c0f90 100644
--- a/gnu/java/security/action/SetAccessibleAction.java
+++ b/gnu/java/security/action/SetAccessibleAction.java
@@ -41,7 +41,7 @@ import java.lang.reflect.AccessibleObject;
import java.security.PrivilegedAction;
/**
- * PrivilegedAction implementation that calls setAccessible(true) on the
+ * PrivilegedAction implementation that calls setAccessible(true) on the
* AccessibleObject passed to its constructor.
*
* Example of use:
@@ -53,22 +53,22 @@ import java.security.PrivilegedAction;
public class SetAccessibleAction implements PrivilegedAction
{
AccessibleObject member;
-
+
public SetAccessibleAction()
{
}
-
+
public SetAccessibleAction(AccessibleObject member)
{
this.member = member;
}
-
+
public Object run()
{
member.setAccessible(true);
return null;
}
-
+
public SetAccessibleAction setMember(AccessibleObject member)
{
this.member = member;
diff --git a/gnu/java/security/der/DERValue.java b/gnu/java/security/der/DERValue.java
index d98ce78ec..2cbe34573 100644
--- a/gnu/java/security/der/DERValue.java
+++ b/gnu/java/security/der/DERValue.java
@@ -173,11 +173,11 @@ public class DERValue implements DER
public String toString()
{
String start = "DERValue ( [";
- if (tagClass == DER.UNIVERSAL)
+ if (tagClass == DER.UNIVERSAL)
start = start + "UNIVERSAL ";
- else if (tagClass == DER.PRIVATE)
+ else if (tagClass == DER.PRIVATE)
start = start + "PRIVATE ";
- else if (tagClass == DER.APPLICATION)
+ else if (tagClass == DER.APPLICATION)
start = start + "APPLICATION ";
start = start + tag + "] constructed=" + constructed + ", value=";
if (constructed)
diff --git a/gnu/java/security/hash/BaseHash.java b/gnu/java/security/hash/BaseHash.java
index ff1750aea..bab930f28 100644
--- a/gnu/java/security/hash/BaseHash.java
+++ b/gnu/java/security/hash/BaseHash.java
@@ -1,4 +1,4 @@
-/* BaseHash.java --
+/* BaseHash.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -61,7 +61,7 @@ public abstract class BaseHash
/**
* Trivial constructor for use by concrete subclasses.
- *
+ *
* @param name the canonical name prefix of this instance.
* @param hashSize the block size of the output in bytes.
* @param blockSize the block size of the internal transform.
@@ -156,7 +156,7 @@ public abstract class BaseHash
/**
* Returns the byte array to use as padding before completing a hash
* operation.
- *
+ *
* @return the bytes to pad the remaining bytes in the buffer before
* completing a hash operation.
*/
@@ -164,7 +164,7 @@ public abstract class BaseHash
/**
* Constructs the result from the contents of the current context.
- *
+ *
* @return the output of the completed hash operation.
*/
protected abstract byte[] getResult();
@@ -174,7 +174,7 @@ public abstract class BaseHash
/**
* The block digest transformation per se.
- *
+ *
* @param in the <i>blockSize</i> long block, as an array of bytes to digest.
* @param offset the index where the data to digest is located within the
* input buffer.
diff --git a/gnu/java/security/hash/HashFactory.java b/gnu/java/security/hash/HashFactory.java
index 2a4e48785..1210ff4db 100644
--- a/gnu/java/security/hash/HashFactory.java
+++ b/gnu/java/security/hash/HashFactory.java
@@ -1,4 +1,4 @@
-/* HashFactory.java --
+/* HashFactory.java --
Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -57,7 +57,7 @@ public class HashFactory
/**
* Return an instance of a hash algorithm given its name.
- *
+ *
* @param name the name of the hash algorithm.
* @return an instance of the hash algorithm, or null if none found.
* @exception InternalError if the implementation does not pass its self-
@@ -111,7 +111,7 @@ public class HashFactory
/**
* Returns a {@link Set} of names of hash algorithms supported by this
* <i>Factory</i>.
- *
+ *
* @return a {@link Set} of hash names (Strings).
*/
public static final Set getNames()
diff --git a/gnu/java/security/hash/Haval.java b/gnu/java/security/hash/Haval.java
index 662934f34..15c303934 100644
--- a/gnu/java/security/hash/Haval.java
+++ b/gnu/java/security/hash/Haval.java
@@ -1,4 +1,4 @@
-/* Haval.java --
+/* Haval.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -105,7 +105,7 @@ public class Haval
/**
* Calls the constructor with two arguments using the designated output size,
* and {@link #HAVAL_3_ROUND} for the value of number of rounds.
- *
+ *
* @param size the output size in bytes of this instance.
* @throws IllegalArgumentException if the designated output size is invalid.
* @see #HAVAL_128_BIT
@@ -125,7 +125,7 @@ public class Haval
* <code>20</code>, <code>24</code>, <code>28</code> and
* <code>32</code>. Valid values for <code>rounds</code> are in the range
* <code>3..5</code> inclusive.
- *
+ *
* @param size the output size in bytes of this instance.
* @param rounds the number of rounds to apply when transforming data.
* @throws IllegalArgumentException if the designated output size is invalid,
@@ -160,7 +160,7 @@ public class Haval
/**
* Private constructor for cloning purposes.
- *
+ *
* @param md the instance to clone.
*/
private Haval(Haval md)
diff --git a/gnu/java/security/hash/IMessageDigest.java b/gnu/java/security/hash/IMessageDigest.java
index 2c5bdd41a..9b716e596 100644
--- a/gnu/java/security/hash/IMessageDigest.java
+++ b/gnu/java/security/hash/IMessageDigest.java
@@ -1,4 +1,4 @@
-/* IMessageDigest.java --
+/* IMessageDigest.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -49,28 +49,28 @@ public interface IMessageDigest
{
/**
* Returns the canonical name of this algorithm.
- *
+ *
* @return the canonical name of this instance.
*/
String name();
/**
* Returns the output length in bytes of this message digest algorithm.
- *
+ *
* @return the output length in bytes of this message digest algorithm.
*/
int hashSize();
/**
* Returns the algorithm's (inner) block size in bytes.
- *
+ *
* @return the algorithm's inner block size in bytes.
*/
int blockSize();
/**
* Continues a message digest operation using the input byte.
- *
+ *
* @param b the input byte to digest.
*/
void update(byte b);
@@ -79,7 +79,7 @@ public interface IMessageDigest
* Continues a message digest operation, by filling the buffer, processing
* data in the algorithm's HASH_SIZE-bit block(s), updating the context and
* count, and buffering the remaining bytes in buffer for the next operation.
- *
+ *
* @param in the input block.
*/
void update(byte[] in);
@@ -88,7 +88,7 @@ public interface IMessageDigest
* Continues a message digest operation, by filling the buffer, processing
* data in the algorithm's HASH_SIZE-bit block(s), updating the context and
* count, and buffering the remaining bytes in buffer for the next operation.
- *
+ *
* @param in the input block.
* @param offset start of meaningful bytes in input block.
* @param length number of bytes, in input block, to consider.
@@ -98,7 +98,7 @@ public interface IMessageDigest
/**
* Completes the message digest by performing final operations such as padding
* and resetting the instance.
- *
+ *
* @return the array of bytes representing the hash value.
*/
byte[] digest();
@@ -112,7 +112,7 @@ public interface IMessageDigest
/**
* A basic test. Ensures that the digest of a pre-determined message is equal
* to a known pre-computed value.
- *
+ *
* @return <code>true</code> if the implementation passes a basic self-test.
* Returns <code>false</code> otherwise.
*/
@@ -120,7 +120,7 @@ public interface IMessageDigest
/**
* Returns a clone copy of this instance.
- *
+ *
* @return a clone copy of this instance.
*/
Object clone();
diff --git a/gnu/java/security/hash/MD2.java b/gnu/java/security/hash/MD2.java
index 8f6b265b0..d78af93fa 100644
--- a/gnu/java/security/hash/MD2.java
+++ b/gnu/java/security/hash/MD2.java
@@ -1,4 +1,4 @@
-/* MD2.java --
+/* MD2.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/java/security/hash/MD4.java b/gnu/java/security/hash/MD4.java
index dfc1c6bd6..e6ac11bc8 100644
--- a/gnu/java/security/hash/MD4.java
+++ b/gnu/java/security/hash/MD4.java
@@ -1,4 +1,4 @@
-/* MD4.java --
+/* MD4.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/java/security/hash/MD5.java b/gnu/java/security/hash/MD5.java
index 653078512..dfffd3c80 100644
--- a/gnu/java/security/hash/MD5.java
+++ b/gnu/java/security/hash/MD5.java
@@ -1,4 +1,4 @@
-/* MD5.java --
+/* MD5.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/java/security/hash/RipeMD128.java b/gnu/java/security/hash/RipeMD128.java
index 62f5a05e5..bd0adc5e0 100644
--- a/gnu/java/security/hash/RipeMD128.java
+++ b/gnu/java/security/hash/RipeMD128.java
@@ -1,4 +1,4 @@
-/* RipeMD128.java --
+/* RipeMD128.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/java/security/hash/RipeMD160.java b/gnu/java/security/hash/RipeMD160.java
index 7949bc254..795f5a4b0 100644
--- a/gnu/java/security/hash/RipeMD160.java
+++ b/gnu/java/security/hash/RipeMD160.java
@@ -1,4 +1,4 @@
-/* RipeMD160.java --
+/* RipeMD160.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/java/security/hash/Sha160.java b/gnu/java/security/hash/Sha160.java
index 6adeba070..88bf0e405 100644
--- a/gnu/java/security/hash/Sha160.java
+++ b/gnu/java/security/hash/Sha160.java
@@ -1,4 +1,4 @@
-/* Sha160.java --
+/* Sha160.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/java/security/hash/Sha256.java b/gnu/java/security/hash/Sha256.java
index 536b1c8ba..76e28d4e0 100644
--- a/gnu/java/security/hash/Sha256.java
+++ b/gnu/java/security/hash/Sha256.java
@@ -1,4 +1,4 @@
-/* Sha256.java --
+/* Sha256.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/java/security/hash/Sha384.java b/gnu/java/security/hash/Sha384.java
index a47eb67db..5fea4f3b1 100644
--- a/gnu/java/security/hash/Sha384.java
+++ b/gnu/java/security/hash/Sha384.java
@@ -1,4 +1,4 @@
-/* Sha384.java --
+/* Sha384.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/java/security/hash/Sha512.java b/gnu/java/security/hash/Sha512.java
index e6f553ed4..17c4323fa 100644
--- a/gnu/java/security/hash/Sha512.java
+++ b/gnu/java/security/hash/Sha512.java
@@ -1,4 +1,4 @@
-/* Sha512.java --
+/* Sha512.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/java/security/hash/Tiger.java b/gnu/java/security/hash/Tiger.java
index 101df39ef..d2993db9f 100644
--- a/gnu/java/security/hash/Tiger.java
+++ b/gnu/java/security/hash/Tiger.java
@@ -1,4 +1,4 @@
-/* Tiger.java --
+/* Tiger.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/java/security/hash/Whirlpool.java b/gnu/java/security/hash/Whirlpool.java
index aebe1acb6..574104074 100644
--- a/gnu/java/security/hash/Whirlpool.java
+++ b/gnu/java/security/hash/Whirlpool.java
@@ -1,4 +1,4 @@
-/* Whirlpool.java --
+/* Whirlpool.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -548,7 +548,7 @@ public final class Whirlpool
// so far. hence the minimal number of bytes added to the message proper
// are 33 (1 for the 1-bit followed by the 0-bits and the encoding of
// the count framed in a 256-bit block). our formula is then:
- // count + 33 + padding = 0 (mod BLOCK_SIZE)
+ // count + 33 + padding = 0 (mod BLOCK_SIZE)
int n = (int)((count + 33) % BLOCK_SIZE);
int padding = n == 0 ? 33 : BLOCK_SIZE - n + 33;
byte[] result = new byte[padding];
diff --git a/gnu/java/security/jce/hash/HavalSpi.java b/gnu/java/security/jce/hash/HavalSpi.java
index 159ba3dd8..7c0a6027b 100644
--- a/gnu/java/security/jce/hash/HavalSpi.java
+++ b/gnu/java/security/jce/hash/HavalSpi.java
@@ -1,4 +1,4 @@
-/* HavalSpi.java --
+/* HavalSpi.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/java/security/jce/hash/MD2Spi.java b/gnu/java/security/jce/hash/MD2Spi.java
index 268f2fa69..76def7acb 100644
--- a/gnu/java/security/jce/hash/MD2Spi.java
+++ b/gnu/java/security/jce/hash/MD2Spi.java
@@ -1,4 +1,4 @@
-/* MD2Spi.java --
+/* MD2Spi.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/java/security/jce/hash/MD4Spi.java b/gnu/java/security/jce/hash/MD4Spi.java
index c050ef2df..125943d30 100644
--- a/gnu/java/security/jce/hash/MD4Spi.java
+++ b/gnu/java/security/jce/hash/MD4Spi.java
@@ -1,4 +1,4 @@
-/* MD4Spi.java --
+/* MD4Spi.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/java/security/jce/hash/MD5Spi.java b/gnu/java/security/jce/hash/MD5Spi.java
index 629741694..25d9240b4 100644
--- a/gnu/java/security/jce/hash/MD5Spi.java
+++ b/gnu/java/security/jce/hash/MD5Spi.java
@@ -1,4 +1,4 @@
-/* MD5Spi.java --
+/* MD5Spi.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/java/security/jce/hash/MessageDigestAdapter.java b/gnu/java/security/jce/hash/MessageDigestAdapter.java
index 7342ee551..2651ecf92 100644
--- a/gnu/java/security/jce/hash/MessageDigestAdapter.java
+++ b/gnu/java/security/jce/hash/MessageDigestAdapter.java
@@ -1,4 +1,4 @@
-/* MessageDigestAdapter.java --
+/* MessageDigestAdapter.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -69,7 +69,7 @@ class MessageDigestAdapter
/**
* Trivial protected constructor.
- *
+ *
* @param mdName the canonical name of the hash algorithm.
*/
protected MessageDigestAdapter(String mdName)
@@ -79,7 +79,7 @@ class MessageDigestAdapter
/**
* Private constructor for cloning purposes.
- *
+ *
* @param adaptee a clone of the underlying hash algorithm instance.
*/
private MessageDigestAdapter(IMessageDigest adaptee)
diff --git a/gnu/java/security/jce/hash/RipeMD128Spi.java b/gnu/java/security/jce/hash/RipeMD128Spi.java
index 159a1173c..499996c02 100644
--- a/gnu/java/security/jce/hash/RipeMD128Spi.java
+++ b/gnu/java/security/jce/hash/RipeMD128Spi.java
@@ -1,4 +1,4 @@
-/* RipeMD128Spi.java --
+/* RipeMD128Spi.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/java/security/jce/hash/RipeMD160Spi.java b/gnu/java/security/jce/hash/RipeMD160Spi.java
index 579ccb26f..a62bea6c0 100644
--- a/gnu/java/security/jce/hash/RipeMD160Spi.java
+++ b/gnu/java/security/jce/hash/RipeMD160Spi.java
@@ -1,4 +1,4 @@
-/* RipeMD160Spi.java --
+/* RipeMD160Spi.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/java/security/jce/hash/Sha160Spi.java b/gnu/java/security/jce/hash/Sha160Spi.java
index 901cac191..ea2dfe24c 100644
--- a/gnu/java/security/jce/hash/Sha160Spi.java
+++ b/gnu/java/security/jce/hash/Sha160Spi.java
@@ -1,4 +1,4 @@
-/* Sha160Spi.java --
+/* Sha160Spi.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/java/security/jce/hash/Sha256Spi.java b/gnu/java/security/jce/hash/Sha256Spi.java
index 9d471e65a..39d31d07b 100644
--- a/gnu/java/security/jce/hash/Sha256Spi.java
+++ b/gnu/java/security/jce/hash/Sha256Spi.java
@@ -1,4 +1,4 @@
-/* Sha256Spi.java --
+/* Sha256Spi.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/java/security/jce/hash/Sha384Spi.java b/gnu/java/security/jce/hash/Sha384Spi.java
index 30d5fce09..fa1e3f948 100644
--- a/gnu/java/security/jce/hash/Sha384Spi.java
+++ b/gnu/java/security/jce/hash/Sha384Spi.java
@@ -1,4 +1,4 @@
-/* Sha384Spi.java --
+/* Sha384Spi.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/java/security/jce/hash/Sha512Spi.java b/gnu/java/security/jce/hash/Sha512Spi.java
index a2d44ab24..4bd39daed 100644
--- a/gnu/java/security/jce/hash/Sha512Spi.java
+++ b/gnu/java/security/jce/hash/Sha512Spi.java
@@ -1,4 +1,4 @@
-/* Sha512Spi.java --
+/* Sha512Spi.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/java/security/jce/hash/TigerSpi.java b/gnu/java/security/jce/hash/TigerSpi.java
index a21e5fe10..3d38c847f 100644
--- a/gnu/java/security/jce/hash/TigerSpi.java
+++ b/gnu/java/security/jce/hash/TigerSpi.java
@@ -1,4 +1,4 @@
-/* TigerSpi.java --
+/* TigerSpi.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/java/security/jce/hash/WhirlpoolSpi.java b/gnu/java/security/jce/hash/WhirlpoolSpi.java
index d7a7a4504..68a3a7059 100644
--- a/gnu/java/security/jce/hash/WhirlpoolSpi.java
+++ b/gnu/java/security/jce/hash/WhirlpoolSpi.java
@@ -1,4 +1,4 @@
-/* WhirlpoolSpi.java --
+/* WhirlpoolSpi.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/java/security/jce/prng/HavalRandomSpi.java b/gnu/java/security/jce/prng/HavalRandomSpi.java
index c3d4b9412..ebf80f2d7 100644
--- a/gnu/java/security/jce/prng/HavalRandomSpi.java
+++ b/gnu/java/security/jce/prng/HavalRandomSpi.java
@@ -1,4 +1,4 @@
-/* HavalRandomSpi.java --
+/* HavalRandomSpi.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/java/security/jce/prng/MD2RandomSpi.java b/gnu/java/security/jce/prng/MD2RandomSpi.java
index 8ba286804..8b9abe4e9 100644
--- a/gnu/java/security/jce/prng/MD2RandomSpi.java
+++ b/gnu/java/security/jce/prng/MD2RandomSpi.java
@@ -1,4 +1,4 @@
-/* MD2RandomSpi.java --
+/* MD2RandomSpi.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/java/security/jce/prng/MD4RandomSpi.java b/gnu/java/security/jce/prng/MD4RandomSpi.java
index d4d182970..2a71d6a0d 100644
--- a/gnu/java/security/jce/prng/MD4RandomSpi.java
+++ b/gnu/java/security/jce/prng/MD4RandomSpi.java
@@ -1,4 +1,4 @@
-/* MD4RandomSpi.java --
+/* MD4RandomSpi.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/java/security/jce/prng/MD5RandomSpi.java b/gnu/java/security/jce/prng/MD5RandomSpi.java
index be38add0a..8fb50e16f 100644
--- a/gnu/java/security/jce/prng/MD5RandomSpi.java
+++ b/gnu/java/security/jce/prng/MD5RandomSpi.java
@@ -1,4 +1,4 @@
-/* MD5RandomSpi.java --
+/* MD5RandomSpi.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/java/security/jce/prng/RipeMD128RandomSpi.java b/gnu/java/security/jce/prng/RipeMD128RandomSpi.java
index 530c3ec21..6f8dde0e0 100644
--- a/gnu/java/security/jce/prng/RipeMD128RandomSpi.java
+++ b/gnu/java/security/jce/prng/RipeMD128RandomSpi.java
@@ -1,4 +1,4 @@
-/* RipeMD128RandomSpi.java --
+/* RipeMD128RandomSpi.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/java/security/jce/prng/RipeMD160RandomSpi.java b/gnu/java/security/jce/prng/RipeMD160RandomSpi.java
index 6875cdfa9..6bb4e2b50 100644
--- a/gnu/java/security/jce/prng/RipeMD160RandomSpi.java
+++ b/gnu/java/security/jce/prng/RipeMD160RandomSpi.java
@@ -1,4 +1,4 @@
-/* RipeMD160RandomSpi.java --
+/* RipeMD160RandomSpi.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/java/security/jce/prng/SecureRandomAdapter.java b/gnu/java/security/jce/prng/SecureRandomAdapter.java
index 5877e3edb..9307cfa7f 100644
--- a/gnu/java/security/jce/prng/SecureRandomAdapter.java
+++ b/gnu/java/security/jce/prng/SecureRandomAdapter.java
@@ -1,4 +1,4 @@
-/* SecureRandomAdapter.java --
+/* SecureRandomAdapter.java --
Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -68,7 +68,7 @@ import java.net.URL;
* <p>All the abstract methods in the {@link SecureRandomSpi} class are
* implemented by this class and all its sub-classes.</p>
*/
-public abstract class SecureRandomAdapter
+public abstract class SecureRandomAdapter
extends SecureRandomSpi
{
@@ -100,7 +100,7 @@ public abstract class SecureRandomAdapter
}
public static final byte[] getSeed(int numBytes)
- {
+ {
URL sourceUrl = null;
String urlStr = null;
@@ -117,7 +117,7 @@ public abstract class SecureRandomAdapter
catch (MalformedURLException ignored)
{
logger.log(Level.WARNING,
- SECURERANDOM_SOURCE + " property is malformed: {0}",
+ SECURERANDOM_SOURCE + " property is malformed: {0}",
urlStr);
}
@@ -132,7 +132,7 @@ public abstract class SecureRandomAdapter
catch (MalformedURLException mue)
{
logger.log(Level.WARNING,
- JAVA_SECURITY_EGD + " property is malformed: {0}",
+ JAVA_SECURITY_EGD + " property is malformed: {0}",
urlStr);
}
}
diff --git a/gnu/java/security/jce/prng/Sha160RandomSpi.java b/gnu/java/security/jce/prng/Sha160RandomSpi.java
index 9fded67e0..ba4d22265 100644
--- a/gnu/java/security/jce/prng/Sha160RandomSpi.java
+++ b/gnu/java/security/jce/prng/Sha160RandomSpi.java
@@ -1,4 +1,4 @@
-/* Sha160RandomSpi.java --
+/* Sha160RandomSpi.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/java/security/jce/prng/Sha256RandomSpi.java b/gnu/java/security/jce/prng/Sha256RandomSpi.java
index e3999ffe6..a6ddb70af 100644
--- a/gnu/java/security/jce/prng/Sha256RandomSpi.java
+++ b/gnu/java/security/jce/prng/Sha256RandomSpi.java
@@ -1,4 +1,4 @@
-/* Sha256RandomSpi.java --
+/* Sha256RandomSpi.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/java/security/jce/prng/Sha384RandomSpi.java b/gnu/java/security/jce/prng/Sha384RandomSpi.java
index 978c8fe38..4954b1be7 100644
--- a/gnu/java/security/jce/prng/Sha384RandomSpi.java
+++ b/gnu/java/security/jce/prng/Sha384RandomSpi.java
@@ -1,4 +1,4 @@
-/* Sha384RandomSpi.java --
+/* Sha384RandomSpi.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/java/security/jce/prng/Sha512RandomSpi.java b/gnu/java/security/jce/prng/Sha512RandomSpi.java
index a89e26f00..27de7f319 100644
--- a/gnu/java/security/jce/prng/Sha512RandomSpi.java
+++ b/gnu/java/security/jce/prng/Sha512RandomSpi.java
@@ -1,4 +1,4 @@
-/* Sha512RandomSpi.java --
+/* Sha512RandomSpi.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/java/security/jce/prng/TigerRandomSpi.java b/gnu/java/security/jce/prng/TigerRandomSpi.java
index ba4b22fb8..722ab3279 100644
--- a/gnu/java/security/jce/prng/TigerRandomSpi.java
+++ b/gnu/java/security/jce/prng/TigerRandomSpi.java
@@ -1,4 +1,4 @@
-/* TigerRandomSpi.java --
+/* TigerRandomSpi.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/java/security/jce/prng/WhirlpoolRandomSpi.java b/gnu/java/security/jce/prng/WhirlpoolRandomSpi.java
index 9d937e65f..5da43d77e 100644
--- a/gnu/java/security/jce/prng/WhirlpoolRandomSpi.java
+++ b/gnu/java/security/jce/prng/WhirlpoolRandomSpi.java
@@ -1,4 +1,4 @@
-/* WhirlpoolRandomSpi.java --
+/* WhirlpoolRandomSpi.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/java/security/jce/sig/DSSKeyFactory.java b/gnu/java/security/jce/sig/DSSKeyFactory.java
index 7b57dba70..ec993432c 100644
--- a/gnu/java/security/jce/sig/DSSKeyFactory.java
+++ b/gnu/java/security/jce/sig/DSSKeyFactory.java
@@ -61,7 +61,7 @@ import java.security.spec.X509EncodedKeySpec;
/**
* DSA key factory.
- *
+ *
* @author Casey Marshall (rsdio@metastatic.org)
*/
public class DSSKeyFactory
diff --git a/gnu/java/security/jce/sig/DSSKeyPairGeneratorSpi.java b/gnu/java/security/jce/sig/DSSKeyPairGeneratorSpi.java
index c44538106..2d33e1621 100644
--- a/gnu/java/security/jce/sig/DSSKeyPairGeneratorSpi.java
+++ b/gnu/java/security/jce/sig/DSSKeyPairGeneratorSpi.java
@@ -1,4 +1,4 @@
-/* DSSKeyPairGeneratorSpi.java --
+/* DSSKeyPairGeneratorSpi.java --
Copyright 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/java/security/jce/sig/DSSParameters.java b/gnu/java/security/jce/sig/DSSParameters.java
index 8a1cb4ca5..fbf778dae 100644
--- a/gnu/java/security/jce/sig/DSSParameters.java
+++ b/gnu/java/security/jce/sig/DSSParameters.java
@@ -99,8 +99,8 @@ public class DSSParameters
/**
* Decodes the set of DSS parameters as per RFC-2459; i.e. the DER-encoded
- * form of the following ASN.1 construct:
- *
+ * form of the following ASN.1 construct:
+ *
* <pre>
* DssParams ::= SEQUENCE {
* p INTEGER,
@@ -152,8 +152,8 @@ public class DSSParameters
/**
* Encodes the set of DSS parameters as per RFC-2459; i.e. as the DER-encoded
- * form of the following ASN.1 construct:
- *
+ * form of the following ASN.1 construct:
+ *
* <pre>
* DssParams ::= SEQUENCE {
* p INTEGER,
diff --git a/gnu/java/security/jce/sig/DSSRawSignatureSpi.java b/gnu/java/security/jce/sig/DSSRawSignatureSpi.java
index 9b20c03b1..edee4e577 100644
--- a/gnu/java/security/jce/sig/DSSRawSignatureSpi.java
+++ b/gnu/java/security/jce/sig/DSSRawSignatureSpi.java
@@ -1,4 +1,4 @@
-/* DSSRawSignatureSpi.java --
+/* DSSRawSignatureSpi.java --
Copyright 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/java/security/jce/sig/KeyPairGeneratorAdapter.java b/gnu/java/security/jce/sig/KeyPairGeneratorAdapter.java
index bcbbe477d..9d3e5efdd 100644
--- a/gnu/java/security/jce/sig/KeyPairGeneratorAdapter.java
+++ b/gnu/java/security/jce/sig/KeyPairGeneratorAdapter.java
@@ -1,4 +1,4 @@
-/* KeyPairGeneratorAdapter.java --
+/* KeyPairGeneratorAdapter.java --
Copyright 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -72,7 +72,7 @@ public abstract class KeyPairGeneratorAdapter
/**
* Trivial protected constructor.
- *
+ *
* @param kpgName the canonical name of the keypair generator algorithm.
*/
protected KeyPairGeneratorAdapter(String kpgName)
diff --git a/gnu/java/security/jce/sig/RSAPSSRawSignatureSpi.java b/gnu/java/security/jce/sig/RSAPSSRawSignatureSpi.java
index f1ccbde4d..496c9caa6 100644
--- a/gnu/java/security/jce/sig/RSAPSSRawSignatureSpi.java
+++ b/gnu/java/security/jce/sig/RSAPSSRawSignatureSpi.java
@@ -1,4 +1,4 @@
-/* RSAPSSRawSignatureSpi.java --
+/* RSAPSSRawSignatureSpi.java --
Copyright 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/java/security/jce/sig/SignatureAdapter.java b/gnu/java/security/jce/sig/SignatureAdapter.java
index a65d727ee..0ed1e2f41 100644
--- a/gnu/java/security/jce/sig/SignatureAdapter.java
+++ b/gnu/java/security/jce/sig/SignatureAdapter.java
@@ -1,4 +1,4 @@
-/* SignatureAdapter.java --
+/* SignatureAdapter.java --
Copyright 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -85,7 +85,7 @@ class SignatureAdapter
/**
* Trivial protected constructor.
- *
+ *
* @param sigName the canonical name of the signature scheme.
* @param codec the signature codec engine to use with this scheme.
*/
@@ -96,7 +96,7 @@ class SignatureAdapter
/**
* Private constructor for cloning purposes.
- *
+ *
* @param adaptee a clone of the underlying signature scheme instance.
* @param codec the signature codec engine to use with this scheme.
*/
diff --git a/gnu/java/security/key/IKeyPairCodec.java b/gnu/java/security/key/IKeyPairCodec.java
index f09743d2b..5c88c86ca 100644
--- a/gnu/java/security/key/IKeyPairCodec.java
+++ b/gnu/java/security/key/IKeyPairCodec.java
@@ -1,4 +1,4 @@
-/* IKeyPairCodec.java --
+/* IKeyPairCodec.java --
Copyright 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -69,14 +69,14 @@ public interface IKeyPairCodec
/**
* Returns the unique identifier (within this library) of the format used to
* externalise public and private keys.
- *
+ *
* @return the identifier of the format, the object supports.
*/
int getFormatID();
/**
* Encodes an instance of a public key for storage or transmission purposes.
- *
+ *
* @param key the non-null key to encode.
* @return a byte sequence representing the encoding of the designated key
* according to the format supported by this codec.
@@ -87,7 +87,7 @@ public interface IKeyPairCodec
/**
* Encodes an instance of a private key for storage or transmission purposes.
- *
+ *
* @param key the non-null key to encode.
* @return a byte sequence representing the encoding of the designated key
* according to the format supported by this codec.
@@ -99,7 +99,7 @@ public interface IKeyPairCodec
/**
* Decodes an instance of an external public key into its native Java
* representation.
- *
+ *
* @param input the source of the externalised key to decode.
* @return a concrete instance of a public key, reconstructed from the
* designated input.
@@ -112,7 +112,7 @@ public interface IKeyPairCodec
/**
* Decodes an instance of an external private key into its native Java
* representation.
- *
+ *
* @param input the source of the externalised key to decode.
* @return a concrete instance of a private key, reconstructed from the
* designated input.
diff --git a/gnu/java/security/key/IKeyPairGenerator.java b/gnu/java/security/key/IKeyPairGenerator.java
index 8d7842e93..72aac2463 100644
--- a/gnu/java/security/key/IKeyPairGenerator.java
+++ b/gnu/java/security/key/IKeyPairGenerator.java
@@ -1,4 +1,4 @@
-/* IKeyPairGenerator.java --
+/* IKeyPairGenerator.java --
Copyright 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -48,14 +48,14 @@ public interface IKeyPairGenerator
{
/**
* Returns the canonical name of this keypair generator.
- *
+ *
* @return the canonical name of this instance.
*/
String name();
/**
* [Re]-initialises this instance for use with a given set of attributes.
- *
+ *
* @param attributes a map of name/value pairs to use for setting up the
* instance.
* @exception IllegalArgumentException if at least one of the mandatory
@@ -66,7 +66,7 @@ public interface IKeyPairGenerator
/**
* Generates a new keypair based on the attributes used to configure the
* instance.
- *
+ *
* @return a new keypair.
*/
KeyPair generate();
diff --git a/gnu/java/security/key/KeyPairCodecFactory.java b/gnu/java/security/key/KeyPairCodecFactory.java
index e68a7d65c..d42866423 100644
--- a/gnu/java/security/key/KeyPairCodecFactory.java
+++ b/gnu/java/security/key/KeyPairCodecFactory.java
@@ -1,4 +1,4 @@
-/* KeyPairCodecFactory.java --
+/* KeyPairCodecFactory.java --
Copyright 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -79,7 +79,7 @@ public class KeyPairCodecFactory
* <b>IMPORTANT</b>: For backward compatibility, when the encoding format
* name is missing, the Raw encoding format is assumed. When this is the case
* the trailing forward slash is discarded from the name.
- *
+ *
* @param name the case-insensitive key codec name.
* @return an instance of the keypair codec, or <code>null</code> if none
* found.
@@ -113,7 +113,7 @@ public class KeyPairCodecFactory
* Returns an instance of a keypair codec given the canonical name of the
* key-pair algorithm, and the name of the encoding format to use when
* externalizing the keys.
- *
+ *
* @param name the case-insensitive key-pair algorithm name.
* @param format the name of the encoding format to use when externalizing the
* keys generated by the key-pair algorithm.
@@ -133,7 +133,7 @@ public class KeyPairCodecFactory
* Returns an instance of a keypair codec given the canonical name of the
* key-pair algorithm, and the identifier of the format to use when
* externalizing the keys.
- *
+ *
* @param name the case-insensitive key-pair algorithm name.
* @param formatID the identifier of the format to use when externalizing the
* keys generated by the key-pair algorithm.
@@ -161,7 +161,7 @@ public class KeyPairCodecFactory
/**
* Returns an instance of a keypair codec given a key.
- *
+ *
* @param key the key to encode.
* @return an instance of the keypair codec, or <code>null</code> if none
* found.
diff --git a/gnu/java/security/key/KeyPairGeneratorFactory.java b/gnu/java/security/key/KeyPairGeneratorFactory.java
index 4872fc3d1..151cace39 100644
--- a/gnu/java/security/key/KeyPairGeneratorFactory.java
+++ b/gnu/java/security/key/KeyPairGeneratorFactory.java
@@ -1,4 +1,4 @@
-/* KeyPairGeneratorFactory.java --
+/* KeyPairGeneratorFactory.java --
Copyright 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -60,7 +60,7 @@ public class KeyPairGeneratorFactory
/**
* Returns an instance of a keypair generator given its name.
- *
+ *
* @param name the case-insensitive key generator name.
* @return an instance of the keypair generator, or <code>null</code> if
* none found.
@@ -89,7 +89,7 @@ public class KeyPairGeneratorFactory
* Returns a {@link Set} of keypair generator names supported by this
* <i>Factory</i>. Those keypair generators may be used in conjunction with
* the digital signature schemes with appendix supported by this library.
- *
+ *
* @return a {@link Set} of keypair generator names (Strings).
*/
public static final Set getNames()
diff --git a/gnu/java/security/key/dss/DSSKey.java b/gnu/java/security/key/dss/DSSKey.java
index d4cf36513..49f229f7b 100644
--- a/gnu/java/security/key/dss/DSSKey.java
+++ b/gnu/java/security/key/dss/DSSKey.java
@@ -1,4 +1,4 @@
-/* DSSKey.java --
+/* DSSKey.java --
Copyright 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -66,7 +66,7 @@ import java.security.spec.DSAParameterSpec;
* <b>IMPORTANT</b>: Under certain circumstances (e.g. in an X.509 certificate
* with inherited AlgorithmIdentifier's parameters of a SubjectPublicKeyInfo
* element) these three MPIs may be <code>null</code>.
- *
+ *
* @see DSSPrivateKey#getEncoded
* @see DSSPublicKey#getEncoded
*/
@@ -108,7 +108,7 @@ public abstract class DSSKey
/**
* Trivial protected constructor.
- *
+ *
* @param defaultFormat the identifier of the encoding format to use by
* default when externalizing the key.
* @param p the DSS parameter <code>p</code>.
@@ -156,7 +156,7 @@ public abstract class DSSKey
* <i>inherited</i>. This may be the case when the key is re-constructed from
* an X.509 certificate with absent or NULL AlgorithmIdentifier's parameters
* field.
- *
+ *
* @param obj the other non-null DSS key to compare to.
* @return <code>true</code> if the designated object is of the same type
* and value as this one.
diff --git a/gnu/java/security/key/dss/DSSKeyPairGenerator.java b/gnu/java/security/key/dss/DSSKeyPairGenerator.java
index 1bad0b62e..6bda4e88e 100644
--- a/gnu/java/security/key/dss/DSSKeyPairGenerator.java
+++ b/gnu/java/security/key/dss/DSSKeyPairGenerator.java
@@ -1,4 +1,4 @@
-/* DSSKeyPairGenerator.java --
+/* DSSKeyPairGenerator.java --
Copyright 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -217,7 +217,7 @@ public class DSSKeyPairGenerator
/**
* Configures this instance.
- *
+ *
* @param attributes the map of name/value pairs to use.
* @exception IllegalArgumentException if the designated MODULUS_LENGTH value
* is not greater than 512, less than 1024 and not of the form
@@ -361,7 +361,7 @@ public class DSSKeyPairGenerator
/**
* Fills the designated byte array with random data.
- *
+ *
* @param buffer the byte array to fill with random data.
*/
private void nextRandomBytes(byte[] buffer)
diff --git a/gnu/java/security/key/dss/DSSKeyPairPKCS8Codec.java b/gnu/java/security/key/dss/DSSKeyPairPKCS8Codec.java
index 06b8e849a..a59ca3cee 100644
--- a/gnu/java/security/key/dss/DSSKeyPairPKCS8Codec.java
+++ b/gnu/java/security/key/dss/DSSKeyPairPKCS8Codec.java
@@ -88,7 +88,7 @@ public class DSSKeyPairPKCS8Codec
/**
* Returns the PKCS#8 ASN.1 <i>PrivateKeyInfo</i> representation of a DSA
* private key. The ASN.1 specification is as follows:
- *
+ *
* <pre>
* PrivateKeyInfo ::= SEQUENCE {
* version INTEGER, -- MUST be 0
@@ -107,7 +107,7 @@ public class DSSKeyPairPKCS8Codec
* g INTEGER
* }
* </pre>
- *
+ *
* @return the DER encoded form of the ASN.1 representation of the
* <i>PrivateKeyInfo</i> field in an X.509 certificate.
* @throw InvalidParameterException if an error occurs during the marshalling
diff --git a/gnu/java/security/key/dss/DSSKeyPairRawCodec.java b/gnu/java/security/key/dss/DSSKeyPairRawCodec.java
index b1135b75f..5b93c6b1e 100644
--- a/gnu/java/security/key/dss/DSSKeyPairRawCodec.java
+++ b/gnu/java/security/key/dss/DSSKeyPairRawCodec.java
@@ -1,4 +1,4 @@
-/* DSSKeyPairRawCodec.java --
+/* DSSKeyPairRawCodec.java --
Copyright 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -92,7 +92,7 @@ public class DSSKeyPairRawCodec
* the <code>toByteArray()</code> method on the DSA parameter <code>y</code>,
* </li>
* </ol>
- *
+ *
* @param key the key to encode.
* @return the <i>Raw</i> format encoding of the designated key.
* @throws IllegalArgumentException if the designated key is not a DSS
@@ -235,7 +235,7 @@ public class DSSKeyPairRawCodec
* the <code>toByteArray()</code> method on the DSA parameter <code>x</code>,
* </li>
* </ol>
- *
+ *
* @param key the key to encode.
* @return the <i>Raw</i> format encoding of the designated key.
* @throws IllegalArgumentException if the designated key is not a DSS
diff --git a/gnu/java/security/key/dss/DSSKeyPairX509Codec.java b/gnu/java/security/key/dss/DSSKeyPairX509Codec.java
index a5e8e9d47..8c26910f1 100644
--- a/gnu/java/security/key/dss/DSSKeyPairX509Codec.java
+++ b/gnu/java/security/key/dss/DSSKeyPairX509Codec.java
@@ -103,11 +103,11 @@ public class DSSKeyPairX509Codec
* <p>
* The <i>subjectPublicKey</i> field, which is a BIT STRING, contains the
* DER-encoded form of the DSA public key as an INTEGER.
- *
+ *
* <pre>
* DSAPublicKey ::= INTEGER -- public key, Y
* </pre>
- *
+ *
* @param key the {@link PublicKey} instance to encode. MUST be an instance of
* {@link DSSPublicKey}.
* @return the ASN.1 representation of the <i>SubjectPublicKeyInfo</i> in an
diff --git a/gnu/java/security/key/dss/DSSPrivateKey.java b/gnu/java/security/key/dss/DSSPrivateKey.java
index 633fcf7ce..de3668c01 100644
--- a/gnu/java/security/key/dss/DSSPrivateKey.java
+++ b/gnu/java/security/key/dss/DSSPrivateKey.java
@@ -1,4 +1,4 @@
-/* DSSPrivateKey.java --
+/* DSSPrivateKey.java --
Copyright 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -52,7 +52,7 @@ import java.security.interfaces.DSAPrivateKey;
/**
* An object that embodies a DSS (Digital Signature Standard) private key.
- *
+ *
* @see #getEncoded
*/
public class DSSPrivateKey
@@ -72,7 +72,7 @@ public class DSSPrivateKey
* Convenience constructor. Calls the constructor with 5 arguments passing
* {@link Registry#RAW_ENCODING_ID} as the identifier of the preferred
* encoding format.
- *
+ *
* @param p the public modulus.
* @param q the public prime divisor of <code>p-1</code>.
* @param g a generator of the unique cyclic group <code>Z<sup>*</sup>
@@ -87,7 +87,7 @@ public class DSSPrivateKey
/**
* Constructs a new instance of a <code>DSSPrivateKey</code> given the
* designated arguments.
- *
+ *
* @param preferredFormat the indetifier of the preferred encoding format to
* use when externalizing this key.
* @param p the public modulus.
@@ -110,7 +110,7 @@ public class DSSPrivateKey
* method of a DSS keypair codec object (an instance implementing
* {@link gnu.java.security.key.IKeyPairCodec} for DSS keys, and re-constructs
* an instance of this object.
- *
+ *
* @param k the contents of a previously encoded instance of this object.
* @exception ArrayIndexOutOfBoundsException if there is not enough bytes, in
* <code>k</code>, to represent a valid encoding of an
@@ -141,7 +141,7 @@ public class DSSPrivateKey
/**
* Returns the encoded form of this private key according to the designated
* format.
- *
+ *
* @param format the desired format identifier of the resulting encoding.
* @return the byte sequence encoding this key according to the designated
* format.
@@ -170,7 +170,7 @@ public class DSSPrivateKey
* Returns <code>true</code> if the designated object is an instance of
* {@link DSAPrivateKey} and has the same DSS (Digital Signature Standard)
* parameter values as this one.
- *
+ *
* @param obj the other non-null DSS key to compare to.
* @return <code>true</code> if the designated object is of the same type
* and value as this one.
diff --git a/gnu/java/security/key/dss/DSSPublicKey.java b/gnu/java/security/key/dss/DSSPublicKey.java
index e5c534671..d7c1afe15 100644
--- a/gnu/java/security/key/dss/DSSPublicKey.java
+++ b/gnu/java/security/key/dss/DSSPublicKey.java
@@ -1,4 +1,4 @@
-/* DSSPublicKey.java --
+/* DSSPublicKey.java --
Copyright 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -51,7 +51,7 @@ import java.security.interfaces.DSAPublicKey;
/**
* An object that embodies a DSS (Digital Signature Standard) public key.
- *
+ *
* @see #getEncoded
*/
public class DSSPublicKey
@@ -71,7 +71,7 @@ public class DSSPublicKey
* Conveience constructor. Calls the constructor with 5 arguments passing
* {@link Registry#RAW_ENCODING_ID} as the identifier of the preferred
* encoding format.
- *
+ *
* @param p the public modulus.
* @param q the public prime divisor of <code>p-1</code>.
* @param g a generator of the unique cyclic group <code>Z<sup>*</sup>
@@ -86,7 +86,7 @@ public class DSSPublicKey
/**
* Constructs a new instance of <code>DSSPublicKey</code> given the
* designated arguments.
- *
+ *
* @param preferredFormat the identifier of the preferred encoding format to
* use when externalizing this key.
* @param p the public modulus.
@@ -109,7 +109,7 @@ public class DSSPublicKey
* method of a DSS keypair codec object (an instance implementing
* {@link gnu.java.security.key.IKeyPairCodec} for DSS keys, and re-constructs
* an instance of this object.
- *
+ *
* @param k the contents of a previously encoded instance of this object.
* @exception ArrayIndexOutOfBoundsException if there is not enough bytes, in
* <code>k</code>, to represent a valid encoding of an
@@ -140,7 +140,7 @@ public class DSSPublicKey
/**
* Returns the encoded form of this public key according to the designated
* format.
- *
+ *
* @param format the desired format identifier of the resulting encoding.
* @return the byte sequence encoding this key according to the designated
* format.
@@ -169,7 +169,7 @@ public class DSSPublicKey
* Returns <code>true</code> if the designated object is an instance of
* {@link DSAPublicKey} and has the same DSS (Digital Signature Standard)
* parameter values as this one.
- *
+ *
* @param obj the other non-null DSS key to compare to.
* @return <code>true</code> if the designated object is of the same type
* and value as this one.
diff --git a/gnu/java/security/key/dss/FIPS186.java b/gnu/java/security/key/dss/FIPS186.java
index 65dc5800c..5d371e10c 100644
--- a/gnu/java/security/key/dss/FIPS186.java
+++ b/gnu/java/security/key/dss/FIPS186.java
@@ -1,4 +1,4 @@
-/* FIPS186.java --
+/* FIPS186.java --
Copyright 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -241,7 +241,7 @@ public class FIPS186
/**
* Fills the designated byte array with random data.
- *
+ *
* @param buffer the byte array to fill with random data.
*/
private void nextRandomBytes(byte[] buffer)
diff --git a/gnu/java/security/key/rsa/GnuRSAKey.java b/gnu/java/security/key/rsa/GnuRSAKey.java
index 0419ac96e..38530ee4c 100644
--- a/gnu/java/security/key/rsa/GnuRSAKey.java
+++ b/gnu/java/security/key/rsa/GnuRSAKey.java
@@ -1,4 +1,4 @@
-/* GnuRSAKey.java --
+/* GnuRSAKey.java --
Copyright 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -72,7 +72,7 @@ public abstract class GnuRSAKey
/**
* Trivial protected constructor.
- *
+ *
* @param defaultFormat the identifier of the encoding format to use by
* default when externalizing the key.
* @param n the public modulus <code>n</code>.
@@ -111,7 +111,7 @@ public abstract class GnuRSAKey
/**
* Returns the modulus <code>n</code>.
- *
+ *
* @return the modulus <code>n</code>.
*/
public BigInteger getN()
@@ -121,7 +121,7 @@ public abstract class GnuRSAKey
/**
* Returns the public exponent <code>e</code>.
- *
+ *
* @return the public exponent <code>e</code>.
*/
public BigInteger getPublicExponent()
@@ -131,7 +131,7 @@ public abstract class GnuRSAKey
/**
* Same as {@link #getPublicExponent()}.
- *
+ *
* @return the public exponent <code>e</code>.
*/
public BigInteger getE()
@@ -142,7 +142,7 @@ public abstract class GnuRSAKey
/**
* Returns <code>true</code> if the designated object is an instance of
* {@link RSAKey} and has the same RSA parameter values as this one.
- *
+ *
* @param obj the other non-null RSA key to compare to.
* @return <code>true</code> if the designated object is of the same type
* and value as this one.
diff --git a/gnu/java/security/key/rsa/GnuRSAPrivateKey.java b/gnu/java/security/key/rsa/GnuRSAPrivateKey.java
index e554f2f3f..39f91cbe4 100644
--- a/gnu/java/security/key/rsa/GnuRSAPrivateKey.java
+++ b/gnu/java/security/key/rsa/GnuRSAPrivateKey.java
@@ -1,4 +1,4 @@
-/* GnuRSAPrivateKey.java --
+/* GnuRSAPrivateKey.java --
Copyright 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -92,7 +92,7 @@ public class GnuRSAPrivateKey
* Convenience constructor. Calls the constructor with 5 arguments passing
* {@link Registry#RAW_ENCODING_ID} as the identifier of the preferred
* encoding format.
- *
+ *
* @param p the modulus first prime divisor.
* @param q the modulus second prime divisor.
* @param e the public exponent.
@@ -106,7 +106,7 @@ public class GnuRSAPrivateKey
/**
* Constructs a new instance of a <code>GnuRSAPrivateKey</code> given the
* designated arguments.
- *
+ *
* @param preferredFormat the indetifier of the preferred encoding format to
* use when externalizing this key.
* @param p the modulus first prime divisor.
@@ -128,7 +128,7 @@ public class GnuRSAPrivateKey
/**
* Constructs a new instance of a <code>GnuRSAPrivateKey</code> given the
* designated arguments.
- *
+ *
* @param preferredFormat the indetifier of the preferred encoding format to
* use when externalizing this key.
* @param n the public modulus, which is also the product of <code>p</code>
@@ -173,7 +173,7 @@ public class GnuRSAPrivateKey
* method of an RSA keypair codec object (an instance implementing
* {@link IKeyPairCodec} for RSA keys, and re-constructs an instance of this
* object.
- *
+ *
* @param k the contents of a previously encoded instance of this object.
* @throws ArrayIndexOutOfBoundsException if there is not enough bytes, in
* <code>k</code>, to represent a valid encoding of an instance
@@ -229,7 +229,7 @@ public class GnuRSAPrivateKey
/**
* Returns the encoded form of this private key according to the designated
* format.
- *
+ *
* @param format the desired format identifier of the resulting encoding.
* @return the byte sequence encoding this key according to the designated
* format.
@@ -258,7 +258,7 @@ public class GnuRSAPrivateKey
/**
* Returns <code>true</code> if the designated object is an instance of this
* class and has the same RSA parameter values as this one.
- *
+ *
* @param obj the other non-null RSA key to compare to.
* @return <code>true</code> if the designated object is of the same type
* and value as this one.
diff --git a/gnu/java/security/key/rsa/GnuRSAPublicKey.java b/gnu/java/security/key/rsa/GnuRSAPublicKey.java
index 3217130c2..0bad92881 100644
--- a/gnu/java/security/key/rsa/GnuRSAPublicKey.java
+++ b/gnu/java/security/key/rsa/GnuRSAPublicKey.java
@@ -1,4 +1,4 @@
-/* GnuRSAPublicKey.java --
+/* GnuRSAPublicKey.java --
Copyright 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -72,7 +72,7 @@ public class GnuRSAPublicKey
* Conveience constructor. Calls the constructor with 3 arguments passing
* {@link Registry#RAW_ENCODING_ID} as the identifier of the preferred
* encoding format.
- *
+ *
* @param n the modulus.
* @param e the public exponent.
*/
@@ -84,7 +84,7 @@ public class GnuRSAPublicKey
/**
* Constructs a new instance of <code>GnuRSAPublicKey</code> given the
* designated arguments.
- *
+ *
* @param preferredFormat the identifier of the preferred encoding format to
* use when externalizing this key.
* @param n the modulus.
@@ -102,7 +102,7 @@ public class GnuRSAPublicKey
* method of an RSA keypair codec object (an instance implementing
* {@link IKeyPairCodec} for RSA keys, and re-constructs an instance of this
* object.
- *
+ *
* @param k the contents of a previously encoded instance of this object.
* @throws ArrayIndexOutOfBoundsException if there is not enough bytes, in
* <code>k</code>, to represent a valid encoding of an instance
@@ -128,7 +128,7 @@ public class GnuRSAPublicKey
/**
* Returns the encoded form of this public key according to the designated
* format.
- *
+ *
* @param format the desired format identifier of the resulting encoding.
* @return the byte sequence encoding this key according to the designated
* format.
@@ -156,7 +156,7 @@ public class GnuRSAPublicKey
/**
* Returns <code>true</code> if the designated object is an instance of this
* class and has the same RSA parameter values as this one.
- *
+ *
* @param obj the other non-null RSA key to compare to.
* @return <code>true</code> if the designated object is of the same type
* and value as this one.
diff --git a/gnu/java/security/key/rsa/RSAKeyPairGenerator.java b/gnu/java/security/key/rsa/RSAKeyPairGenerator.java
index c31cc4cc1..bec60d350 100644
--- a/gnu/java/security/key/rsa/RSAKeyPairGenerator.java
+++ b/gnu/java/security/key/rsa/RSAKeyPairGenerator.java
@@ -1,4 +1,4 @@
-/* RSAKeyPairGenerator.java --
+/* RSAKeyPairGenerator.java --
Copyright 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -135,7 +135,7 @@ public class RSAKeyPairGenerator
/**
* Configures this instance.
- *
+ *
* @param attributes the map of name/value pairs to use.
* @exception IllegalArgumentException if the designated MODULUS_LENGTH value
* is less than 1024.
@@ -175,7 +175,7 @@ public class RSAKeyPairGenerator
* The algorithm used here is described in <i>nessie-pss-B.pdf</i> document
* which is part of the RSA-PSS submission to NESSIE.
* </p>
- *
+ *
* @return an RSA keypair.
*/
public KeyPair generate()
@@ -225,7 +225,7 @@ public class RSAKeyPairGenerator
/**
* Fills the designated byte array with random data.
- *
+ *
* @param buffer the byte array to fill with random data.
*/
private void nextRandomBytes(byte[] buffer)
diff --git a/gnu/java/security/key/rsa/RSAKeyPairPKCS8Codec.java b/gnu/java/security/key/rsa/RSAKeyPairPKCS8Codec.java
index 7a51d0a0d..2785f02c8 100644
--- a/gnu/java/security/key/rsa/RSAKeyPairPKCS8Codec.java
+++ b/gnu/java/security/key/rsa/RSAKeyPairPKCS8Codec.java
@@ -116,7 +116,7 @@ public class RSAKeyPairPKCS8Codec
* coefficient INTEGER, -- (inverse of q) mod p
* }
* </pre>
- *
+ *
* @return the DER encoded form of the ASN.1 representation of the
* <i>PrivateKeyInfo</i> field for an RSA {@link PrivateKey}..
* @throw InvalidParameterException if an error occurs during the marshalling
@@ -251,7 +251,7 @@ public class RSAKeyPairPKCS8Codec
der = new DERReader(pkBytes);
DERValue derRSAPrivateKey = der.read();
DerUtil.checkIsConstructed(derRSAPrivateKey, "Wrong RSAPrivateKey field");
-
+
val = der.read();
DerUtil.checkIsBigInteger(val, "Wrong RSAPrivateKey Version field");
version = (BigInteger) val.getValue();
diff --git a/gnu/java/security/key/rsa/RSAKeyPairRawCodec.java b/gnu/java/security/key/rsa/RSAKeyPairRawCodec.java
index 952202366..f088e794e 100644
--- a/gnu/java/security/key/rsa/RSAKeyPairRawCodec.java
+++ b/gnu/java/security/key/rsa/RSAKeyPairRawCodec.java
@@ -1,4 +1,4 @@
-/* RSAKeyPairRawCodec.java --
+/* RSAKeyPairRawCodec.java --
Copyright 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -190,7 +190,7 @@ public class RSAKeyPairRawCodec
* the <code>toByteArray()</code> method on the RSA parameter <code>d</code>,
* </li>
* </ol>
- *
+ *
* @param key the key to encode.
* @return the <i>Raw</i> format encoding of the designated key.
*/
diff --git a/gnu/java/security/key/rsa/RSAKeyPairX509Codec.java b/gnu/java/security/key/rsa/RSAKeyPairX509Codec.java
index b11e1c013..9ad6ae029 100644
--- a/gnu/java/security/key/rsa/RSAKeyPairX509Codec.java
+++ b/gnu/java/security/key/rsa/RSAKeyPairX509Codec.java
@@ -97,14 +97,14 @@ public class RSAKeyPairX509Codec
* <p>
* The <i>subjectPublicKey</i> field, which is a BIT STRING, contains the
* DER-encoded form of the RSA public key defined as:
- *
+ *
* <pre>
* RSAPublicKey ::= SEQUENCE {
* modulus INTEGER, -- n
* publicExponent INTEGER -- e
* }
* </pre>
- *
+ *
* @param key the {@link PublicKey} instance to encode. MUST be an instance of
* {@link GnuRSAPublicKey}.
* @return the ASN.1 representation of the <i>SubjectPublicKeyInfo</i> in an
diff --git a/gnu/java/security/pkcs/PKCS7Data.java b/gnu/java/security/pkcs/PKCS7Data.java
index 3d3052b96..c6474f081 100644
--- a/gnu/java/security/pkcs/PKCS7Data.java
+++ b/gnu/java/security/pkcs/PKCS7Data.java
@@ -52,7 +52,7 @@ public class PKCS7Data
/**
* Constructs a new instance of <code>PKCS7Data</code> with the possibly
* null (implicetly referenced) content data.
- *
+ *
* @param data the raw bytes of the data to use in a PKCS#7 framework.
*/
public PKCS7Data(byte[] data)
diff --git a/gnu/java/security/pkcs/PKCS7SignedData.java b/gnu/java/security/pkcs/PKCS7SignedData.java
index d59dba3cd..adb00a3be 100644
--- a/gnu/java/security/pkcs/PKCS7SignedData.java
+++ b/gnu/java/security/pkcs/PKCS7SignedData.java
@@ -333,7 +333,7 @@ public class PKCS7SignedData
/**
* Constructs a new instance of <code>PKCS7SignedData</code> given a
* designated set of fields.
- *
+ *
* @param digestAlgorithms the collection of DigestAlgorithm elements. Each
* DigestAlgorithm is a {@link List} of two elements, the first is an
* OID while the second is dependent on the value of the OID element.
@@ -401,7 +401,7 @@ public class PKCS7SignedData
/**
* Writes to the designated output stream the DER encoding of the current
* contents of this instance.
- *
+ *
* @param out the destination output stream.
* @throws IOException if an I/O related exception occurs during the process.
* @throws CRLException if an exception occurs while encoding the certificate
diff --git a/gnu/java/security/pkcs/SignerInfo.java b/gnu/java/security/pkcs/SignerInfo.java
index 3066401ac..645ed67bb 100644
--- a/gnu/java/security/pkcs/SignerInfo.java
+++ b/gnu/java/security/pkcs/SignerInfo.java
@@ -90,9 +90,9 @@ public class SignerInfo
* issuer Name,
* serialNumber CertificateSerialNumber
* }
- *
+ *
* DigestAlgorithmIdentifier ::= AlgorithmIdentifier
- *
+ *
* DigestEncryptionAlgorithmIdentifier ::= AlgorithmIdentifier
*
* EncryptedDigest ::= OCTET STRING
@@ -269,7 +269,7 @@ public class SignerInfo
/**
* Constructs a new instance of <code>SignerInfo</code> given a designated
* set of fields.
- *
+ *
* @param issuer the X.500 Principal name of the signer referenced by this
* instance.
* @param serialNumber the serial number of the certificate being used. Both
@@ -369,7 +369,7 @@ public class SignerInfo
/**
* Writes to the designated output stream the DER encoding of the current
* contents of this instance.
- *
+ *
* @param out the destination output stream.
* @throws IOException if an I/O related exception occurs during the process.
*/
diff --git a/gnu/java/security/prng/BasePRNG.java b/gnu/java/security/prng/BasePRNG.java
index 3b7c8cf07..eb5ada71c 100644
--- a/gnu/java/security/prng/BasePRNG.java
+++ b/gnu/java/security/prng/BasePRNG.java
@@ -1,4 +1,4 @@
-/* BasePRNG.java --
+/* BasePRNG.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -60,7 +60,7 @@ public abstract class BasePRNG
/**
* Trivial constructor for use by concrete subclasses.
- *
+ *
* @param name the canonical name of this instance.
*/
protected BasePRNG(String name)
diff --git a/gnu/java/security/prng/EntropySource.java b/gnu/java/security/prng/EntropySource.java
index 95f68f048..a7173d3b1 100644
--- a/gnu/java/security/prng/EntropySource.java
+++ b/gnu/java/security/prng/EntropySource.java
@@ -1,4 +1,4 @@
-/* EntropySource.java --
+/* EntropySource.java --
Copyright (C) 2004, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -58,4 +58,4 @@ public interface EntropySource
* @return The next random bytes.
*/
byte[] nextBytes();
-} \ No newline at end of file
+}
diff --git a/gnu/java/security/prng/IRandom.java b/gnu/java/security/prng/IRandom.java
index 66ad6d224..eb1495dd8 100644
--- a/gnu/java/security/prng/IRandom.java
+++ b/gnu/java/security/prng/IRandom.java
@@ -1,4 +1,4 @@
-/* IRandom.java --
+/* IRandom.java --
Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -79,7 +79,7 @@ public interface IRandom
{
/**
* Returns the canonical name of this instance.
- *
+ *
* @return the canonical name of this instance.
*/
String name();
@@ -87,7 +87,7 @@ public interface IRandom
/**
* Initialises the pseudo-random number generator scheme with the appropriate
* attributes.
- *
+ *
* @param attributes a set of name-value pairs that describe the desired
* future instance behaviour.
* @exception IllegalArgumentException if at least one of the defined name/
@@ -97,7 +97,7 @@ public interface IRandom
/**
* Returns the next 8 bits of random data generated from this instance.
- *
+ *
* @return the next 8 bits of random data generated from this instance.
* @exception IllegalStateException if the instance is not yet initialised.
* @exception LimitReachedException if this instance has reached its
@@ -110,7 +110,7 @@ public interface IRandom
* Fills the designated byte array, starting from byte at index
* <code>offset</code>, for a maximum of <code>length</code> bytes with
* the output of this generator instance.
- *
+ *
* @param out the placeholder to contain the generated random bytes.
* @param offset the starting index in <i>out</i> to consider. This method
* does nothing if this parameter is not within <code>0</code> and
@@ -132,7 +132,7 @@ public interface IRandom
* Implementations are not required to implement this method in any meaningful
* way; this may be a no-operation, and implementations may throw an
* {@link UnsupportedOperationException}.
- *
+ *
* @param b The byte to add.
*/
void addRandomByte(byte b);
@@ -144,7 +144,7 @@ public interface IRandom
* Implementations are not required to implement this method in any meaningful
* way; this may be a no-operation, and implementations may throw an
* {@link UnsupportedOperationException}.
- *
+ *
* @param in The buffer of new random bytes to add.
*/
void addRandomBytes(byte[] in);
@@ -156,7 +156,7 @@ public interface IRandom
* Implementations are not required to implement this method in any meaningful
* way; this may be a no-operation, and implementations may throw an
* {@link UnsupportedOperationException}.
- *
+ *
* @param in The buffer of new random bytes to add.
* @param offset The offset from whence to begin reading random bytes.
* @param length The number of random bytes to add.
@@ -167,7 +167,7 @@ public interface IRandom
/**
* Returns a clone copy of this instance.
- *
+ *
* @return a clone copy of this instance.
*/
Object clone() throws CloneNotSupportedException;
diff --git a/gnu/java/security/prng/LimitReachedException.java b/gnu/java/security/prng/LimitReachedException.java
index 8d5b30baf..028c74553 100644
--- a/gnu/java/security/prng/LimitReachedException.java
+++ b/gnu/java/security/prng/LimitReachedException.java
@@ -1,4 +1,4 @@
-/* LimitReachedException.java --
+/* LimitReachedException.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/java/security/prng/MDGenerator.java b/gnu/java/security/prng/MDGenerator.java
index 574a2f9d6..b110486f4 100644
--- a/gnu/java/security/prng/MDGenerator.java
+++ b/gnu/java/security/prng/MDGenerator.java
@@ -1,4 +1,4 @@
-/* MDGenerator.java --
+/* MDGenerator.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/java/security/prng/PRNGFactory.java b/gnu/java/security/prng/PRNGFactory.java
index ae15d053b..b57d7c7bb 100644
--- a/gnu/java/security/prng/PRNGFactory.java
+++ b/gnu/java/security/prng/PRNGFactory.java
@@ -1,4 +1,4 @@
-/* PRNGFactory.java --
+/* PRNGFactory.java --
Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -57,7 +57,7 @@ public class PRNGFactory
/**
* Returns an instance of a padding algorithm given its name.
- *
+ *
* @param prng the case-insensitive name of the PRNG.
* @return an instance of the pseudo-random number generator.
* @exception InternalError if the implementation does not pass its self-
@@ -79,7 +79,7 @@ public class PRNGFactory
/**
* Returns a {@link Set} of names of padding algorithms supported by this
* <i>Factory</i>.
- *
+ *
* @return a {@link Set} of pseudo-random number generator algorithm names
* (Strings).
*/
diff --git a/gnu/java/security/prng/RandomEventListener.java b/gnu/java/security/prng/RandomEventListener.java
index beb9087f4..720f2afe4 100644
--- a/gnu/java/security/prng/RandomEventListener.java
+++ b/gnu/java/security/prng/RandomEventListener.java
@@ -1,4 +1,4 @@
-/* RandomEventListener.java --
+/* RandomEventListener.java --
Copyright (C) 2004, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/java/security/provider/DefaultPolicy.java b/gnu/java/security/provider/DefaultPolicy.java
index d42be6c90..566c949da 100644
--- a/gnu/java/security/provider/DefaultPolicy.java
+++ b/gnu/java/security/provider/DefaultPolicy.java
@@ -7,7 +7,7 @@ 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
@@ -44,7 +44,7 @@ import java.security.PermissionCollection;
import java.security.Permissions;
import java.security.Policy;
-/**
+/**
* This is just a stub policy implementation which grants all permissions
* to any code source. FIXME: This should be replaced with a real
* implementation that reads the policy configuration from a file, like
@@ -60,7 +60,7 @@ public class DefaultPolicy extends Policy
perms.add(allPermission);
return perms;
}
-
+
public void refresh()
{
// Nothing.
diff --git a/gnu/java/security/provider/PKIXCertPathValidatorImpl.java b/gnu/java/security/provider/PKIXCertPathValidatorImpl.java
index cdfad3f61..d4ce4aeb4 100644
--- a/gnu/java/security/provider/PKIXCertPathValidatorImpl.java
+++ b/gnu/java/security/provider/PKIXCertPathValidatorImpl.java
@@ -91,7 +91,7 @@ import java.util.logging.Logger;
* See <a href="http://www.ietf.org/rfc/rfc3280.txt">RFC 3280: Internet X.509
* Public Key Infrastructure Certificate and Certificate Revocation List (CRL)
* Profile</a>.
- *
+ *
* @author Casey Marshall (rsdio@metastatic.org)
*/
public class PKIXCertPathValidatorImpl
@@ -403,7 +403,7 @@ public class PKIXCertPathValidatorImpl
* <li>The CRL is signed by a certificate in the given cert stores, and that
* cert is signed by one of the certificates in the path.</li>
* </ol>
- *
+ *
* @param crl The CRL being checked.
* @param path The path this CRL is being checked against.
* @param now The value to use as 'now'.
diff --git a/gnu/java/security/sig/BaseSignature.java b/gnu/java/security/sig/BaseSignature.java
index 9c76cacba..ef4d87f26 100644
--- a/gnu/java/security/sig/BaseSignature.java
+++ b/gnu/java/security/sig/BaseSignature.java
@@ -1,4 +1,4 @@
-/* BaseSignature.java --
+/* BaseSignature.java --
Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -77,7 +77,7 @@ public abstract class BaseSignature
/**
* Trivial constructor.
- *
+ *
* @param schemeName the name of this signature scheme.
* @param md the underlying instance of the message digest algorithm.
* @throws IllegalArgumentException if the designated hash instance is
@@ -174,7 +174,7 @@ public abstract class BaseSignature
/**
* Fills the designated byte array with random data.
- *
+ *
* @param buffer the byte array to fill with random data.
*/
protected void nextRandomBytes(byte[] buffer)
diff --git a/gnu/java/security/sig/ISignature.java b/gnu/java/security/sig/ISignature.java
index ff25f29d9..be98f9a9b 100644
--- a/gnu/java/security/sig/ISignature.java
+++ b/gnu/java/security/sig/ISignature.java
@@ -1,4 +1,4 @@
-/* ISignature.java --
+/* ISignature.java --
Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -75,14 +75,14 @@ public interface ISignature
/**
* Returns the canonical name of this signature scheme.
- *
+ *
* @return the canonical name of this instance.
*/
String name();
/**
* Initialises this instance for signature verification.
- *
+ *
* @param attributes the attributes to use for setting up this instance.
* @throws IllegalArgumentException if the designated public key is not
* appropriate for this signature scheme.
@@ -93,7 +93,7 @@ public interface ISignature
/**
* Initialises this instance for signature generation.
- *
+ *
* @param attributes the attributes to use for setting up this instance.
* @throws IllegalArgumentException if the designated private key is not
* appropriate for this signature scheme.
@@ -104,7 +104,7 @@ public interface ISignature
/**
* Digests one byte of a message for signing or verification purposes.
- *
+ *
* @param b the message byte to digest.
* @throws IllegalStateException if this instance was not setup for signature
* generation/verification.
@@ -114,7 +114,7 @@ public interface ISignature
/**
* Digests a sequence of bytes from a message for signing or verification
* purposes.
- *
+ *
* @param buffer the byte sequence to consider.
* @param offset the byte poisition in <code>buffer</code> of the first byte
* to consider.
@@ -129,7 +129,7 @@ public interface ISignature
/**
* Terminates a signature generation phase by digesting and processing the
* context of the underlying message digest algorithm instance.
- *
+ *
* @return a {@link Object} representing the native output of the signature
* scheme implementation.
* @throws IllegalStateException if this instance was not setup for signature
@@ -140,7 +140,7 @@ public interface ISignature
/**
* Terminates a signature verification phase by digesting and processing the
* context of the underlying message digest algorithm instance.
- *
+ *
* @param signature a native signature object previously generated by an
* invocation of the <code>sign()</code> method.
* @return <code>true</code> iff the outpout of the verification phase
@@ -153,7 +153,7 @@ public interface ISignature
/**
* Returns a clone copy of this instance.
- *
+ *
* @return a clone copy of this instance.
*/
Object clone();
diff --git a/gnu/java/security/sig/ISignatureCodec.java b/gnu/java/security/sig/ISignatureCodec.java
index aaae6ccb0..f8b147361 100644
--- a/gnu/java/security/sig/ISignatureCodec.java
+++ b/gnu/java/security/sig/ISignatureCodec.java
@@ -1,4 +1,4 @@
-/* ISignatureCodec.java --
+/* ISignatureCodec.java --
Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/java/security/sig/SignatureCodecFactory.java b/gnu/java/security/sig/SignatureCodecFactory.java
index c5b2ccd4b..0026ad164 100644
--- a/gnu/java/security/sig/SignatureCodecFactory.java
+++ b/gnu/java/security/sig/SignatureCodecFactory.java
@@ -74,7 +74,7 @@ public class SignatureCodecFactory
* When the encoding format name is missing, the Raw encoding format is
* assumed. When this is the case the trailing forward slash is discarded from
* the name.
- *
+ *
* @param name the case-insensitive, possibly composed, signature codec name.
* @return an instance of the signaturecodec, or <code>null</code> if none
* found.
@@ -107,7 +107,7 @@ public class SignatureCodecFactory
/**
* Returns an instance of a signature codec given the canonical name of the
* signature algorithm, and that of the encoding format.
- *
+ *
* @param name the case-insensitive signature algorithm name.
* @param format the name of the format to use when encodigng/decoding
* signatures generated by the named algorithm.
@@ -127,7 +127,7 @@ public class SignatureCodecFactory
* Returns an instance of a signature codec given the canonical name of the
* signature algorithm, and the identifier of the format to use when
* encoding/decoding signatures generated by that algorithm.
- *
+ *
* @param name the case-insensitive signature algorithm name.
* @param formatID the identifier of the format to use when encoding /
* decoding signatures generated by the designated algorithm.
diff --git a/gnu/java/security/sig/SignatureFactory.java b/gnu/java/security/sig/SignatureFactory.java
index 28b68925b..6cdaf6544 100644
--- a/gnu/java/security/sig/SignatureFactory.java
+++ b/gnu/java/security/sig/SignatureFactory.java
@@ -1,4 +1,4 @@
-/* SignatureFactory.java --
+/* SignatureFactory.java --
Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -61,7 +61,7 @@ public class SignatureFactory
/**
* Returns an instance of a signature-with-appendix scheme given its name.
- *
+ *
* @param ssa the case-insensitive signature-with-appendix scheme name.
* @return an instance of the scheme, or <code>null</code> if none found.
*/
@@ -84,7 +84,7 @@ public class SignatureFactory
/**
* Returns a {@link Set} of signature-with-appendix scheme names supported by
* this <i>Factory</i>.
- *
+ *
* @return a {@link Set} of signature-with-appendix scheme names (Strings).
*/
public static synchronized final Set getNames()
diff --git a/gnu/java/security/sig/dss/DSSSignature.java b/gnu/java/security/sig/dss/DSSSignature.java
index 1ef1bea1a..024521ba4 100644
--- a/gnu/java/security/sig/dss/DSSSignature.java
+++ b/gnu/java/security/sig/dss/DSSSignature.java
@@ -1,4 +1,4 @@
-/* DSSSignature.java --
+/* DSSSignature.java --
Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -211,7 +211,7 @@ public class DSSSignature
/**
* Returns the output of a signature generation phase.
- *
+ *
* @return an object encapsulating the DSS signature pair <code>r</code> and
* <code>s</code>.
*/
@@ -223,7 +223,7 @@ public class DSSSignature
/**
* Returns the output of a previously generated signature object as a pair of
* {@link java.math.BigInteger}.
- *
+ *
* @return the DSS signature pair <code>r</code> and <code>s</code>.
*/
private BigInteger[] decodeSignature(Object signature)
diff --git a/gnu/java/security/sig/dss/DSSSignatureRawCodec.java b/gnu/java/security/sig/dss/DSSSignatureRawCodec.java
index 903d7aad6..169f84bd1 100644
--- a/gnu/java/security/sig/dss/DSSSignatureRawCodec.java
+++ b/gnu/java/security/sig/dss/DSSSignatureRawCodec.java
@@ -1,4 +1,4 @@
-/* DSSSignatureRawCodec.java --
+/* DSSSignatureRawCodec.java --
Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -78,7 +78,7 @@ public class DSSSignatureRawCodec
* the <code>toByteArray()</code> method on the DSS parameter <code>s</code>.
* </li>
* </ol>
- *
+ *
* @param signature the signature to encode, consisting of the two DSS
* parameters <code>r</code> and <code>s</code> as a
* {@link BigInteger} array.
diff --git a/gnu/java/security/sig/dss/DSSSignatureX509Codec.java b/gnu/java/security/sig/dss/DSSSignatureX509Codec.java
index 0fdb754a9..d0a0188fb 100644
--- a/gnu/java/security/sig/dss/DSSSignatureX509Codec.java
+++ b/gnu/java/security/sig/dss/DSSSignatureX509Codec.java
@@ -60,7 +60,7 @@ import java.util.ArrayList;
* <p>
* Digital signatures when transmitted in an X.509 certificates are encoded
* in DER (Distinguished Encoding Rules) as a BIT STRING; i.e.
- *
+ *
* <pre>
* Certificate ::= SEQUENCE {
* tbsCertificate TBSCertificate,
@@ -77,7 +77,7 @@ import java.util.ArrayList;
* generates two MPIs, commonly called <code>r</code> and <code>s</code>, as the
* result of digitally signing a message, these two numbers will be transferred
* as the following ASN.1 structure:
- *
+ *
* <pre>
* Dss-Sig-Value ::= SEQUENCE {
* r INTEGER,
@@ -112,7 +112,7 @@ public class DSSSignatureX509Codec
* Encodes a DSS Signature output as the <i>signature</i> raw bytes which can
* be used to construct an ASN.1 DER-encoded BIT STRING as defined in the
* documentation of this class.
- *
+ *
* @param signature the output of the DSS signature algorithm; i.e. the value
* returned by the invocation of
* {@link gnu.java.security.sig.ISignature#sign()} method. In the
@@ -154,7 +154,7 @@ public class DSSSignatureX509Codec
/**
* Decodes a <i>signature</i> as defined in the documentation of this class.
- *
+ *
* @param input the byte array to unmarshall into a valid DSS signature
* instance; i.e. an array of two MPIs. MUST NOT be null.
* @return an array of two MPIs, <code>r</code> and <code>s</code> in this
diff --git a/gnu/java/security/sig/rsa/EME_PKCS1_V1_5.java b/gnu/java/security/sig/rsa/EME_PKCS1_V1_5.java
index 39de01f02..329ca8ed6 100644
--- a/gnu/java/security/sig/rsa/EME_PKCS1_V1_5.java
+++ b/gnu/java/security/sig/rsa/EME_PKCS1_V1_5.java
@@ -1,4 +1,4 @@
-/* EME_PKCS1_V1_5.java --
+/* EME_PKCS1_V1_5.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -104,7 +104,7 @@ public class EME_PKCS1_V1_5
* </pre>
* <p>
* This method uses a default PRNG to obtain the padding bytes.
- *
+ *
* @param M the message to encode.
* @return the encoded message <code>EM</code>.
*/
@@ -133,7 +133,7 @@ public class EME_PKCS1_V1_5
* Similar to {@link #encode(byte[])} method, except that the source of
* randomness to use for obtaining the padding bytes (an instance of
* {@link IRandom}) is given as a parameter.
- *
+ *
* @param M the message to encode.
* @param irnd the {@link IRandom} instance to use as a source of randomness.
* @return the encoded message <code>EM</code>.
@@ -173,7 +173,7 @@ public class EME_PKCS1_V1_5
/**
* Similar to the {@link #encode(byte[], IRandom)} method, except that the
* source of randmoness is an instance of {@link Random}.
- *
+ *
* @param M the message to encode.
* @param rnd the {@link Random} instance to use as a source of randomness.
* @return the encoded message <code>EM</code>.
@@ -213,7 +213,7 @@ public class EME_PKCS1_V1_5
* hexadecimal value <code>0x00</code> to separate <code>PS</code> from
* <code>M</code>, or if the length of <code>PS</code> is less than
* <code>8</code> octets, output "decryption error" and stop.
- *
+ *
* @param EM the designated encoded message.
* @return the decoded message <code>M</code> framed in the designated
* <code>EM</code> value.
diff --git a/gnu/java/security/sig/rsa/EMSA_PKCS1_V1_5.java b/gnu/java/security/sig/rsa/EMSA_PKCS1_V1_5.java
index a0c4de17f..3cddab4aa 100644
--- a/gnu/java/security/sig/rsa/EMSA_PKCS1_V1_5.java
+++ b/gnu/java/security/sig/rsa/EMSA_PKCS1_V1_5.java
@@ -1,4 +1,4 @@
-/* EMSA_PKCS1_V1_5.java --
+/* EMSA_PKCS1_V1_5.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/java/security/sig/rsa/EMSA_PSS.java b/gnu/java/security/sig/rsa/EMSA_PSS.java
index 97b3afcf8..917d96323 100644
--- a/gnu/java/security/sig/rsa/EMSA_PSS.java
+++ b/gnu/java/security/sig/rsa/EMSA_PSS.java
@@ -1,4 +1,4 @@
-/* EMSA_PSS.java --
+/* EMSA_PSS.java --
Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -83,7 +83,7 @@ public class EMSA_PSS
/**
* Trivial private constructor to enforce use through Factory method.
- *
+ *
* @param hash the message digest instance to use with this scheme instance.
*/
private EMSA_PSS(IMessageDigest hash)
@@ -97,7 +97,7 @@ public class EMSA_PSS
/**
* Returns an instance of this object given a designated name of a hash
* function.
- *
+ *
* @param mdName the canonical name of a hash function.
* @return an instance of this object configured for use with the designated
* options.
@@ -118,7 +118,7 @@ public class EMSA_PSS
* <code>M</code> using a hash function and maps the result to an encoded
* message <code>EM</code> of a specified length using a mask generation
* function.
- *
+ *
* @param mHash the byte sequence resulting from applying the message digest
* algorithm Hash to the message <i>M</i>.
* @param emBits the maximal bit length of the integer OS2IP(EM), at least
@@ -192,7 +192,7 @@ public class EMSA_PSS
* The decoding operation EMSA-PSS-Decode recovers the message hash from an
* encoded message <code>EM</code> and compares it to the hash of
* <code>M</code>.
- *
+ *
* @param mHash the byte sequence resulting from applying the message digest
* algorithm Hash to the message <i>M</i>.
* @param EM the <i>encoded message</i>, an octet string of length
@@ -324,7 +324,7 @@ public class EMSA_PSS
* the output. The provable security of RSA-PSS relies on the random nature of
* the output of the mask generation function, which in turn relies on the
* random nature of the underlying hash function.
- *
+ *
* @param Z a seed.
* @param l the desired output length in octets.
* @return the mask.
diff --git a/gnu/java/security/sig/rsa/RSA.java b/gnu/java/security/sig/rsa/RSA.java
index cdd9eaa5b..343b2cf65 100644
--- a/gnu/java/security/sig/rsa/RSA.java
+++ b/gnu/java/security/sig/rsa/RSA.java
@@ -1,4 +1,4 @@
-/* RSA.java --
+/* RSA.java --
Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -87,7 +87,7 @@ public class RSA
* RSA private key is a valid one, this method computes a <i>signature
* representative</i> for a designated <i>message representative</i> signed
* by the holder of the designated RSA private key.
- *
+ *
* @param K the RSA private key.
* @param m the <i>message representative</i>: an integer between
* <code>0</code> and <code>n - 1</code>, where <code>n</code>
@@ -117,7 +117,7 @@ public class RSA
* representative</i> for the designated <i>signature representative</i>
* generated by an RSA private key, for a message intended for the holder of
* the designated RSA public key.
- *
+ *
* @param K the RSA public key.
* @param s the <i>signature representative</i>, an integer between
* <code>0</code> and <code>n - 1</code>, where <code>n</code>
@@ -143,7 +143,7 @@ public class RSA
/**
* An implementation of the <code>RSAEP</code> algorithm.
- *
+ *
* @param K the recipient's RSA public key.
* @param m the message representative as an MPI.
* @return the resulting MPI --an MPI between <code>0</code> and
@@ -170,7 +170,7 @@ public class RSA
/**
* An implementation of the <code>RSADP</code> algorithm.
- *
+ *
* @param K the recipient's RSA private key.
* @param c the ciphertext representative as an MPI.
* @return the message representative, an MPI between <code>0</code> and
@@ -197,7 +197,7 @@ public class RSA
/**
* Converts a <i>multi-precision integer</i> (MPI) <code>s</code> into an
* octet sequence of length <code>k</code>.
- *
+ *
* @param s the multi-precision integer to convert.
* @param k the length of the output.
* @return the result of the transform.
@@ -302,7 +302,7 @@ public class RSA
/**
* Returns a random MPI with a random bit-length of the form <code>8b</code>,
* where <code>b</code> is in the range <code>[32..64]</code>.
- *
+ *
* @return a random MPI whose length in bytes is between 32 and 64 inclusive.
*/
private static final BigInteger newR(final BigInteger N)
diff --git a/gnu/java/security/sig/rsa/RSAPKCS1V1_5Signature.java b/gnu/java/security/sig/rsa/RSAPKCS1V1_5Signature.java
index 76460c0ca..1420331de 100644
--- a/gnu/java/security/sig/rsa/RSAPKCS1V1_5Signature.java
+++ b/gnu/java/security/sig/rsa/RSAPKCS1V1_5Signature.java
@@ -1,4 +1,4 @@
-/* RSAPKCS1V1_5Signature.java --
+/* RSAPKCS1V1_5Signature.java --
Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -85,7 +85,7 @@ public class RSAPKCS1V1_5Signature
/**
* Constructs an instance of this object using the designated message digest
* algorithm as its underlying hash function.
- *
+ *
* @param mdName the canonical name of the underlying hash function.
*/
public RSAPKCS1V1_5Signature(final String mdName)
diff --git a/gnu/java/security/sig/rsa/RSAPKCS1V1_5SignatureRawCodec.java b/gnu/java/security/sig/rsa/RSAPKCS1V1_5SignatureRawCodec.java
index 68c1edaa6..548dc3deb 100644
--- a/gnu/java/security/sig/rsa/RSAPKCS1V1_5SignatureRawCodec.java
+++ b/gnu/java/security/sig/rsa/RSAPKCS1V1_5SignatureRawCodec.java
@@ -71,7 +71,7 @@ public class RSAPKCS1V1_5SignatureRawCodec
* signature bytes in internet order,</li>
* <li>the RSA-PKCS#1 (v1.5) signature bytes in internet order.</li>
* </ol>
- *
+ *
* @param signature the signature to encode, consisting of the output of the
* <code>sign()</code> method of a {@link RSAPKCS1V1_5Signature}
* instance --a byte array.
@@ -116,7 +116,7 @@ public class RSAPKCS1V1_5SignatureRawCodec
/**
* Returns the decoded object from a designated input assumed to have been
* generated by the {@link #encodeSignature(Object)} method.
- *
+ *
* @param input the input bytes of a previously Raw-encoded RSA PKCS1 (v1.5)
* signature.
* @return the signature object.
diff --git a/gnu/java/security/sig/rsa/RSAPKCS1V1_5SignatureX509Codec.java b/gnu/java/security/sig/rsa/RSAPKCS1V1_5SignatureX509Codec.java
index 3cb375602..ee8586f7d 100644
--- a/gnu/java/security/sig/rsa/RSAPKCS1V1_5SignatureX509Codec.java
+++ b/gnu/java/security/sig/rsa/RSAPKCS1V1_5SignatureX509Codec.java
@@ -51,7 +51,7 @@ import java.security.InvalidParameterException;
* <p>
* Digital signatures when transmitted in an X.509 certificates are encoded
* in DER (Distinguished Encoding Rules) as a BIT STRING; i.e.
- *
+ *
* <pre>
* Certificate ::= SEQUENCE {
* tbsCertificate TBSCertificate,
@@ -95,7 +95,7 @@ public class RSAPKCS1V1_5SignatureX509Codec
/**
* Encodes an RSA Signature output as a <i>signature</i> BIT STRING as
* defined in the documentation of this class.
- *
+ *
* @param signature the output of the RSA PKCS1 (v1.5) signature algorithm;
* i.e. the value returned by the invocation of
* {@link gnu.java.security.sig.ISignature#sign()} method. In the
@@ -111,7 +111,7 @@ public class RSAPKCS1V1_5SignatureX509Codec
/**
* Decodes a <i>signature</i> as defined in the documentation of this class.
- *
+ *
* @param input the byte array to unmarshall into a valid RSA PKCS1 (v1.5)
* signature instance; i.e. a byte array. MUST NOT be null.
* @return an array of raw bytes decoded from the designated input. In the
diff --git a/gnu/java/security/sig/rsa/RSAPSSSignature.java b/gnu/java/security/sig/rsa/RSAPSSSignature.java
index 27c7fe620..d8f8327f1 100644
--- a/gnu/java/security/sig/rsa/RSAPSSSignature.java
+++ b/gnu/java/security/sig/rsa/RSAPSSSignature.java
@@ -1,4 +1,4 @@
-/* RSAPSSSignature.java --
+/* RSAPSSSignature.java --
Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -95,7 +95,7 @@ public class RSAPSSSignature
/**
* Constructs an instance of this object using the designated message digest
* algorithm as its underlying hash function, and having 0-octet <i>salt</i>.
- *
+ *
* @param mdName the canonical name of the underlying hash function.
*/
public RSAPSSSignature(String mdName)
@@ -106,7 +106,7 @@ public class RSAPSSSignature
/**
* Constructs an instance of this object using the designated message digest
* algorithm as its underlying hash function.
- *
+ *
* @param mdName the canonical name of the underlying hash function.
* @param sLen the desired length in octets of the salt to use for encoding /
* decoding signatures.
diff --git a/gnu/java/security/sig/rsa/RSAPSSSignatureRawCodec.java b/gnu/java/security/sig/rsa/RSAPSSSignatureRawCodec.java
index b5e059c20..b147ea3ea 100644
--- a/gnu/java/security/sig/rsa/RSAPSSSignatureRawCodec.java
+++ b/gnu/java/security/sig/rsa/RSAPSSSignatureRawCodec.java
@@ -1,4 +1,4 @@
-/* RSAPSSSignatureRawCodec.java --
+/* RSAPSSSignatureRawCodec.java --
Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -72,7 +72,7 @@ public class RSAPSSSignatureRawCodec
* bytes in internet order,</li>
* <li>the RSA-PSS signature bytes in internet order.</li>
* </ol>
- *
+ *
* @param signature the signature to encode, consisting of the output of the
* <code>sign()</code> method of a {@link RSAPSSSignature} instance
* --a byte array.
diff --git a/gnu/java/security/sig/rsa/RSASignatureFactory.java b/gnu/java/security/sig/rsa/RSASignatureFactory.java
index b8e12caf7..ba5121b46 100644
--- a/gnu/java/security/sig/rsa/RSASignatureFactory.java
+++ b/gnu/java/security/sig/rsa/RSASignatureFactory.java
@@ -71,7 +71,7 @@ public class RSASignatureFactory
* hyphen chanaracter <code>-</code> followed by the canonical message digest
* algorithm name. When no message digest algorithm name is given, SHA-160 is
* used.
- *
+ *
* @param name the composite RSA signature name.
* @return a new instance of an RSA Signature algorithm implementation.
* Returns <code>null</code> if the given name does not correspond to any
@@ -102,7 +102,7 @@ public class RSASignatureFactory
/**
* Returns a {@link Set} of names of <i>RSA</i> signatures supported by this
* <i>Factory</i>.
- *
+ *
* @return a {@link Set} of RSA Signature algorithm names (Strings).
*/
public static synchronized final Set getNames()
diff --git a/gnu/java/security/util/ByteArray.java b/gnu/java/security/util/ByteArray.java
index 514492043..a9b9e5d00 100644
--- a/gnu/java/security/util/ByteArray.java
+++ b/gnu/java/security/util/ByteArray.java
@@ -65,23 +65,23 @@ public final class ByteArray
int len = value.length;
while (i < len)
{
- out.print (formatInt (i, 16, 8));
- out.print (" ");
- int l = Math.min (16, len - i);
- String s = toHexString (value, i, l, ' ');
- out.print (s);
- for (int j = 56 - (56 - s.length ()); j < 56; j++)
- out.print (" ");
- for (int j = 0; j < l; j++)
- {
- byte b = value[i+j];
- if ((b & 0xFF) < 0x20 || (b & 0xFF) > 0x7E)
- out.print (".");
- else
- out.print ((char) (b & 0xFF));
- }
- out.println ();
- i += 16;
+ out.print (formatInt (i, 16, 8));
+ out.print (" ");
+ int l = Math.min (16, len - i);
+ String s = toHexString (value, i, l, ' ');
+ out.print (s);
+ for (int j = 56 - (56 - s.length ()); j < 56; j++)
+ out.print (" ");
+ for (int j = 0; j < l; j++)
+ {
+ byte b = value[i+j];
+ if ((b & 0xFF) < 0x20 || (b & 0xFF) > 0x7E)
+ out.print (".");
+ else
+ out.print ((char) (b & 0xFF));
+ }
+ out.println ();
+ i += 16;
}
return str.toString ();
}
@@ -91,8 +91,8 @@ public final class ByteArray
CPStringBuilder str = new CPStringBuilder();
for (int i = 0; i < len; i++)
{
- str.append (Character.forDigit (buf[i+off] >>> 4 & 0x0F, 16));
- str.append (Character.forDigit (buf[i+off] & 0x0F, 16));
+ str.append (Character.forDigit (buf[i+off] >>> 4 & 0x0F, 16));
+ str.append (Character.forDigit (buf[i+off] & 0x0F, 16));
if (i < len - 1)
str.append(sep);
}
diff --git a/gnu/java/security/util/ByteBufferOutputStream.java b/gnu/java/security/util/ByteBufferOutputStream.java
index be4d0a98d..642ccdf68 100644
--- a/gnu/java/security/util/ByteBufferOutputStream.java
+++ b/gnu/java/security/util/ByteBufferOutputStream.java
@@ -47,18 +47,18 @@ import java.nio.ByteBuffer;
/**
* An output stream that writes bytes to a ByteBuffer, which will be resized
* if more space is needed.
- *
+ *
* @author Casey Marshall (csm@gnu.org)
*/
public class ByteBufferOutputStream extends OutputStream
{
private ByteBuffer buffer;
-
+
public ByteBufferOutputStream()
{
this(256);
}
-
+
public ByteBufferOutputStream(int initialCapacity)
{
buffer = ByteBuffer.allocate(initialCapacity);
@@ -71,16 +71,16 @@ public class ByteBufferOutputStream extends OutputStream
{
if (!buffer.hasRemaining())
growBuffer();
- buffer.put((byte) b);
+ buffer.put((byte) b);
}
-
+
public @Override synchronized void write(byte[] b, int offset, int length)
{
if (buffer.remaining() < length)
growBuffer();
buffer.put(b, offset, length);
}
-
+
public @Override void write(byte[] b)
{
write(b, 0, b.length);
@@ -90,19 +90,19 @@ public class ByteBufferOutputStream extends OutputStream
* Get the current state of the buffer. The returned buffer will have
* its position set to zero, its capacity set to the current limit,
* and its limit set to its capacity.
- *
+ *
* @return The buffer.
*/
public ByteBuffer buffer()
{
return ((ByteBuffer) buffer.duplicate().flip()).slice();
}
-
+
public String toString()
{
return super.toString() + " [ buffer: " + buffer + " ]";
}
-
+
private void growBuffer()
{
int newCapacity = buffer.capacity();
diff --git a/gnu/java/security/util/ExpirableObject.java b/gnu/java/security/util/ExpirableObject.java
index e0c4e6b59..e24af249a 100644
--- a/gnu/java/security/util/ExpirableObject.java
+++ b/gnu/java/security/util/ExpirableObject.java
@@ -57,7 +57,7 @@ import javax.security.auth.Destroyable;
* <p>
* Note that if a {@link DestroyFailedException} occurs when the timeout
* expires, it will not be reported.
- *
+ *
* @see Destroyable
*/
public abstract class ExpirableObject
@@ -89,7 +89,7 @@ public abstract class ExpirableObject
/**
* Create a new expirable object that will expire after the specified timeout.
- *
+ *
* @param delay The delay before expiration.
* @throws IllegalArgumentException If <i>delay</i> is negative, or if
* <code>delay + System.currentTimeMillis()</code> is negative.
@@ -104,7 +104,7 @@ public abstract class ExpirableObject
* Destroys this object. This method calls {@link #doDestroy}, then, if no
* exception is thrown, cancels the task that would destroy this object when
* the timeout is reached.
- *
+ *
* @throws DestroyFailedException If this operation fails.
*/
public final void destroy() throws DestroyFailedException
@@ -116,7 +116,7 @@ public abstract class ExpirableObject
/**
* Subclasses must implement this method instead of the {@link
* Destroyable#destroy()} method.
- *
+ *
* @throws DestroyFailedException If this operation fails.
*/
protected abstract void doDestroy() throws DestroyFailedException;
diff --git a/gnu/java/security/util/FormatUtil.java b/gnu/java/security/util/FormatUtil.java
index eed669cc3..35da322b8 100644
--- a/gnu/java/security/util/FormatUtil.java
+++ b/gnu/java/security/util/FormatUtil.java
@@ -53,7 +53,7 @@ public class FormatUtil
/**
* Returns the fully qualified name of the designated encoding ID.
- *
+ *
* @param formatID the unique identifier of the encoding format.
* @return the fully qualified name of the designated format. Returns
* <code>null</code> if no such encoding format is known.
@@ -83,7 +83,7 @@ public class FormatUtil
/**
* Returns the short name of the designated encoding ID. This is used by the
* JCE Adapters.
- *
+ *
* @param formatID the unique identifier of the encoding format.
* @return the short name of the designated format. Returns <code>null</code>
* if no such encoding format is known.
@@ -112,7 +112,7 @@ public class FormatUtil
/**
* Returns the identifier of the encoding format given its short name.
- *
+ *
* @param name the case-insensitive canonical short name of an encoding
* format.
* @return the identifier of the designated encoding format, or <code>0</code>
@@ -134,7 +134,7 @@ public class FormatUtil
result = Registry.X509_ENCODING_ID;
else if (name.equalsIgnoreCase(Registry.PKCS8_ENCODING_SHORT_NAME))
result = Registry.PKCS8_ENCODING_ID;
-
+
return result;
}
}
diff --git a/gnu/java/security/util/IntegerUtil.java b/gnu/java/security/util/IntegerUtil.java
index f07130808..106dc4d66 100644
--- a/gnu/java/security/util/IntegerUtil.java
+++ b/gnu/java/security/util/IntegerUtil.java
@@ -71,7 +71,7 @@ public abstract class IntegerUtil
* This method MUST be used in the gnu.java.security and gnu.javax.crypto
* packages to ensure they would work with a version 1.4 only of the Java
* class library API.
- *
+ *
* @param aString a string representation of an integer.
* @return the {@link Integer} object representing the designated string.
*/
@@ -98,7 +98,7 @@ public abstract class IntegerUtil
* This method MUST be used in the gnu.java.security and gnu.javax.crypto
* packages to ensure they would work with a version 1.4 only of the Java
* class library API.
- *
+ *
* @param anInt a decimal integer.
* @return the {@link Integer} object representing the designated primitive.
*/
diff --git a/gnu/java/security/util/PRNG.java b/gnu/java/security/util/PRNG.java
index 7bb27cbf4..1bed04dcd 100644
--- a/gnu/java/security/util/PRNG.java
+++ b/gnu/java/security/util/PRNG.java
@@ -47,7 +47,7 @@ import gnu.java.security.prng.MDGenerator;
/**
* A useful hash-based (SHA) pseudo-random number generator used throughout this
* library.
- *
+ *
* @see MDGenerator
*/
public class PRNG
@@ -57,7 +57,7 @@ public class PRNG
/**
* Private constructor to enforce using the Factory method.
- *
+ *
* @param delegate the undelying {@link IRandom} object used.
*/
private PRNG(IRandom delegate)
@@ -93,7 +93,7 @@ public class PRNG
/**
* Completely fills the designated <code>buffer</code> with random data
* generated by the underlying delegate.
- *
+ *
* @param buffer the place holder of random bytes generated by the underlying
* delegate. On output, the contents of <code>buffer</code> are
* replaced with pseudo-random data, iff the <code>buffer</code>
@@ -108,7 +108,7 @@ public class PRNG
* Fills the designated <code>buffer</code>, starting from byte at position
* <code>offset</code> with, at most, <code>length</code> bytes of random
* data generated by the underlying delegate.
- *
+ *
* @see IRandom#nextBytes
*/
public void nextBytes(byte[] buffer, int offset, int length)
diff --git a/gnu/java/security/util/Prime.java b/gnu/java/security/util/Prime.java
index e493ce675..82c584ff4 100644
--- a/gnu/java/security/util/Prime.java
+++ b/gnu/java/security/util/Prime.java
@@ -7,7 +7,7 @@ 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
@@ -55,49 +55,49 @@ public final class Prime
BigInteger p = new BigInteger( (pmax + pmin)/2, new Random() );
if( p.compareTo( BigInteger.valueOf( 1 ).shiftLeft( pmin ) ) <= 0 )
{
- p = p.add( BigInteger.valueOf( 1 ).shiftLeft( pmin ).subtract( p ) );
+ p = p.add( BigInteger.valueOf( 1 ).shiftLeft( pmin ).subtract( p ) );
}
-
+
//Step 2 - test for even
if( p.mod( BigInteger.valueOf(2) ).compareTo( BigInteger.valueOf( 0 )) == 0)
p = p.add( BigInteger.valueOf( 1 ) );
for(;;)
{
- //Step 3
- if( p.compareTo( BigInteger.valueOf( 1 ).shiftLeft( pmax)) > 0)
- {
- //Step 3.1
- p = p.subtract( BigInteger.valueOf( 1 ).shiftLeft( pmax) );
- p = p.add( BigInteger.valueOf( 1 ).shiftLeft( pmin) );
- p = p.subtract( BigInteger.valueOf( 1 ) );
-
- //Step 3.2
- // put step 2 code here so looping code is cleaner
- //Step 2 - test for even
- if( p.mod( BigInteger.valueOf(2) ).compareTo( BigInteger.valueOf( 0 )) == 0)
- p = p.add( BigInteger.valueOf( 1 ) );
- continue;
- }
-
- //Step 4 - compute GCD
- d = p.subtract( BigInteger.valueOf(1) );
- d = d.gcd( f );
-
- //Step 5 - test d
- if( d.compareTo( BigInteger.valueOf( 1 ) ) == 0)
- {
- //Step 5.1 - test primality
- if( p.isProbablePrime( 1 ) == true )
- {
- //Step 5.2;
- return p;
- }
- }
- //Step 6
- p = p.add( BigInteger.valueOf( 2 ) );
-
- //Step 7
+ //Step 3
+ if( p.compareTo( BigInteger.valueOf( 1 ).shiftLeft( pmax)) > 0)
+ {
+ //Step 3.1
+ p = p.subtract( BigInteger.valueOf( 1 ).shiftLeft( pmax) );
+ p = p.add( BigInteger.valueOf( 1 ).shiftLeft( pmin) );
+ p = p.subtract( BigInteger.valueOf( 1 ) );
+
+ //Step 3.2
+ // put step 2 code here so looping code is cleaner
+ //Step 2 - test for even
+ if( p.mod( BigInteger.valueOf(2) ).compareTo( BigInteger.valueOf( 0 )) == 0)
+ p = p.add( BigInteger.valueOf( 1 ) );
+ continue;
+ }
+
+ //Step 4 - compute GCD
+ d = p.subtract( BigInteger.valueOf(1) );
+ d = d.gcd( f );
+
+ //Step 5 - test d
+ if( d.compareTo( BigInteger.valueOf( 1 ) ) == 0)
+ {
+ //Step 5.1 - test primality
+ if( p.isProbablePrime( 1 ) == true )
+ {
+ //Step 5.2;
+ return p;
+ }
+ }
+ //Step 6
+ p = p.add( BigInteger.valueOf( 2 ) );
+
+ //Step 7
}
}
@@ -122,43 +122,43 @@ public final class Prime
//Step 4 - test for even
if( p.mod( BigInteger.valueOf(2) ).compareTo( BigInteger.valueOf( 0 )) == 0)
- p = p.add( r );
+ p = p.add( r );
for(;;)
- {
- //Step 5
- if( p.compareTo( BigInteger.valueOf( 1 ).shiftLeft( pmax)) > 0)
- {
- //Step 5.1
- p = p.subtract( BigInteger.valueOf( 1 ).shiftLeft( pmax) );
- p = p.add( BigInteger.valueOf( 1 ).shiftLeft( pmin) );
- p = p.subtract( BigInteger.valueOf( 1 ) );
-
- //Step 5.2 - goto to Step 2
- break steptwo;
- }
-
- //Step 6
- d = p.subtract( BigInteger.valueOf(1) );
- d = d.gcd( f );
-
- //Step 7 - test d
- if( d.compareTo( BigInteger.valueOf( 1 ) ) == 0)
- {
- //Step 7.1 - test primality
- if( p.isProbablePrime( 1 ) == true )
- {
- //Step 7.2;
- return p;
- }
- }
- //Step 8
- p = p.add( r.multiply( BigInteger.valueOf(2) ) );
-
- //Step 9
- }
+ {
+ //Step 5
+ if( p.compareTo( BigInteger.valueOf( 1 ).shiftLeft( pmax)) > 0)
+ {
+ //Step 5.1
+ p = p.subtract( BigInteger.valueOf( 1 ).shiftLeft( pmax) );
+ p = p.add( BigInteger.valueOf( 1 ).shiftLeft( pmin) );
+ p = p.subtract( BigInteger.valueOf( 1 ) );
+
+ //Step 5.2 - goto to Step 2
+ break steptwo;
+ }
+
+ //Step 6
+ d = p.subtract( BigInteger.valueOf(1) );
+ d = d.gcd( f );
+
+ //Step 7 - test d
+ if( d.compareTo( BigInteger.valueOf( 1 ) ) == 0)
+ {
+ //Step 7.1 - test primality
+ if( p.isProbablePrime( 1 ) == true )
+ {
+ //Step 7.2;
+ return p;
+ }
+ }
+ //Step 8
+ p = p.add( r.multiply( BigInteger.valueOf(2) ) );
+
+ //Step 9
+ }
}
//Should never reach here but makes the compiler happy
- return BigInteger.valueOf(0);
+ return BigInteger.valueOf(0);
}
}
diff --git a/gnu/java/security/util/Sequence.java b/gnu/java/security/util/Sequence.java
index 5e3a64eaf..63086d2bd 100644
--- a/gnu/java/security/util/Sequence.java
+++ b/gnu/java/security/util/Sequence.java
@@ -55,7 +55,7 @@ public final class Sequence
* through all positive integers then negative integers until the end value is
* reached. Naturally, this will result in an enormous object, so don't do
* this.
- *
+ *
* @param end The ending value.
*/
public Sequence(int end)
@@ -68,7 +68,7 @@ public final class Sequence
* increment of 1. If <i>end</i> is less than <i>start</i>, then the
* sequence will wrap around until the end value is reached. Naturally, this
* will result in an enormous object, so don't do this.
- *
+ *
* @param start The starting value.
* @param end The ending value.
*/
@@ -88,7 +88,7 @@ public final class Sequence
* If <i>span</i> is 0, then the sequence will contain {<i>start</i>,
* <i>end</i>} if <i>start</i> != <i>end</i>, or just the singleton
* <i>start</i> if <i>start</i> == <i>end</i>.
- *
+ *
* @param start The starting value.
* @param end The ending value.
* @param span The increment value.
diff --git a/gnu/java/security/util/SimpleList.java b/gnu/java/security/util/SimpleList.java
index 74f3bafce..15d54c988 100644
--- a/gnu/java/security/util/SimpleList.java
+++ b/gnu/java/security/util/SimpleList.java
@@ -54,7 +54,7 @@ public final class SimpleList
/**
* Create a singleton list.
- *
+ *
* @param element The first element.
*/
public SimpleList(final Object element)
@@ -65,7 +65,7 @@ public final class SimpleList
/**
* Create an ordered pair (2-tuple).
- *
+ *
* @param e1 The first element.
* @param e2 The second element.
*/
@@ -78,7 +78,7 @@ public final class SimpleList
/**
* Create a 3-tuple.
- *
+ *
* @param e1 The first element.
* @param e2 The second element.
* @param e3 The third element.
@@ -93,7 +93,7 @@ public final class SimpleList
/**
* Create a 4-tuple.
- *
+ *
* @param e1 The first element.
* @param e2 The second element.
* @param e3 The third element.
@@ -121,7 +121,7 @@ public final class SimpleList
* Create an n-tuple of arbitrary size. Even if the supplied collection has no
* natural order, the created n-tuple will have the order that the elements
* are returned by the collection's iterator.
- *
+ *
* @param c The collection.
*/
public SimpleList(Collection c)
diff --git a/gnu/java/security/util/Util.java b/gnu/java/security/util/Util.java
index 50d4466d5..ef3d480a0 100644
--- a/gnu/java/security/util/Util.java
+++ b/gnu/java/security/util/Util.java
@@ -70,7 +70,7 @@ public class Util
* <pre>
* toString(ba, 0, ba.length);
* </pre>
- *
+ *
* @param ba the byte array to convert.
* @return a string of hexadecimal characters (two for each byte) representing
* the designated input byte array.
@@ -84,7 +84,7 @@ public class Util
* Returns a string of hexadecimal digits from a byte array, starting at
* <code>offset</code> and consisting of <code>length</code> bytes. Each
* byte is converted to 2 hex symbols; zero(es) included.
- *
+ *
* @param ba the byte array to convert.
* @param offset the index from which to start considering the bytes to
* convert.
@@ -114,7 +114,7 @@ public class Util
* <pre>
* toReversedString(ba, 0, ba.length);
* </pre>
- *
+ *
* @param ba the byte array to convert.
* @return a string of hexadecimal characters (two for each byte) representing
* the designated input byte array.
@@ -131,7 +131,7 @@ public class Util
* <p>
* The byte array is treated as a large little-endian integer, and is returned
* as a large big-endian integer.
- *
+ *
* @param ba the byte array to convert.
* @param offset the index from which to start considering the bytes to
* convert.
@@ -156,7 +156,7 @@ public class Util
* <p>
* Returns a byte array from a string of hexadecimal digits.
* </p>
- *
+ *
* @param s a string of hexadecimal ASCII characters
* @return the decoded byte array from the input hexadecimal string.
*/
@@ -179,7 +179,7 @@ public class Util
* Returns a byte array from a string of hexadecimal digits, interpreting them
* as a large big-endian integer and returning it as a large little-endian
* integer.
- *
+ *
* @param s a string of hexadecimal ASCII characters
* @return the decoded byte array from the input hexadecimal string.
*/
@@ -201,7 +201,7 @@ public class Util
/**
* Returns a number from <code>0</code> to <code>15</code> corresponding
* to the designated hexadecimal digit.
- *
+ *
* @param c a hexadecimal ASCII symbol.
*/
public static int fromDigit(char c)
@@ -219,7 +219,7 @@ public class Util
/**
* Returns a string of 8 hexadecimal digits (most significant digit first)
* corresponding to the unsigned integer <code>n</code>.
- *
+ *
* @param n the unsigned integer to convert.
* @return a hexadecimal string 8-character long.
*/
@@ -260,7 +260,7 @@ public class Util
/**
* Returns a string of 16 hexadecimal digits (most significant digit first)
* corresponding to the unsigned long <code>n</code>.
- *
+ *
* @param n the unsigned long to convert.
* @return a hexadecimal string 16-character long.
*/
@@ -280,7 +280,7 @@ public class Util
* escape character is inserted before every pair of bytes. Useful to
* externalise byte arrays that will be constructed later from such strings;
* eg. s-box values.
- *
+ *
* @throws ArrayIndexOutOfBoundsException if the length is odd.
*/
public static String toUnicodeString(byte[] ba)
@@ -293,7 +293,7 @@ public class Util
* escape character is inserted before every pair of bytes. Useful to
* externalise byte arrays that will be constructed later from such strings;
* eg. s-box values.
- *
+ *
* @throws ArrayIndexOutOfBoundsException if the length is odd.
*/
public static final String toUnicodeString(byte[] ba, int offset, int length)
@@ -324,7 +324,7 @@ public class Util
* escape character is inserted before every pair of bytes. Useful to
* externalise integer arrays that will be constructed later from such
* strings; eg. s-box values.
- *
+ *
* @throws ArrayIndexOutOfBoundsException if the length is not a multiple of
* 4.
*/
@@ -376,7 +376,7 @@ public class Util
* If <code>offset</code> and <code>length</code> are omitted, the whole
* array is used. If <code>m</code> is omitted, nothing is prepended to each
* line.
- *
+ *
* @param data the byte array to be dumped.
* @param offset the offset within <i>data</i> to start from.
* @param length the number of bytes to dump.
@@ -433,7 +433,7 @@ public class Util
/**
* Returns a string of 2 hexadecimal digits (most significant digit first)
* corresponding to the lowest 8 bits of <code>n</code>.
- *
+ *
* @param n the byte value to convert.
* @return a string of 2 hex characters representing the input.
*/
@@ -449,7 +449,7 @@ public class Util
* '.' (dot) shall be used instead of "+' (plus).
* <p>
* Used by SASL password file manipulation primitives.
- *
+ *
* @param buffer an arbitrary sequence of bytes to represent in Base-64.
* @return unpadded (without the '=' character(s)) Base-64 representation of
* the input.
@@ -525,7 +525,7 @@ public class Util
* <p>
* Converts a string representing the encoding of some bytes in Base-64 to
* their original form.
- *
+ *
* @param str the Base-64 encoded representation of some byte(s).
* @return the bytes represented by the <code>str</code>.
* @throws NumberFormatException if <code>str</code> is <code>null</code>,
@@ -597,7 +597,7 @@ public class Util
* Treats the input as the MSB representation of a number, and discards
* leading zero elements. For efficiency, the input is simply returned if no
* leading zeroes are found.
- *
+ *
* @param n the {@link BigInteger} to trim.
* @return the byte array representation of the designated {@link BigInteger}
* with no leading 0-bytes.
@@ -618,7 +618,7 @@ public class Util
/**
* Returns a hexadecimal dump of the trimmed bytes of a {@link BigInteger}.
- *
+ *
* @param x the {@link BigInteger} to display.
* @return the string representation of the designated {@link BigInteger}.
*/
diff --git a/gnu/java/security/x509/X509CRLSelectorImpl.java b/gnu/java/security/x509/X509CRLSelectorImpl.java
index 0ada55016..582d18583 100644
--- a/gnu/java/security/x509/X509CRLSelectorImpl.java
+++ b/gnu/java/security/x509/X509CRLSelectorImpl.java
@@ -135,4 +135,3 @@ public class X509CRLSelectorImpl implements CRLSelector
return false;
}
}
-
diff --git a/gnu/java/security/x509/X509CertSelectorImpl.java b/gnu/java/security/x509/X509CertSelectorImpl.java
index 36187ad8e..5201a76b9 100644
--- a/gnu/java/security/x509/X509CertSelectorImpl.java
+++ b/gnu/java/security/x509/X509CertSelectorImpl.java
@@ -194,4 +194,3 @@ public class X509CertSelectorImpl implements CertSelector
return matchIssuer && matchSubject;
}
}
-
diff --git a/gnu/java/security/x509/ext/CertificatePolicies.java b/gnu/java/security/x509/ext/CertificatePolicies.java
index c451762f8..874b8eeeb 100644
--- a/gnu/java/security/x509/ext/CertificatePolicies.java
+++ b/gnu/java/security/x509/ext/CertificatePolicies.java
@@ -142,7 +142,7 @@ public class CertificatePolicies extends Extension.Value
{
return policies;
}
-
+
/**
* Returns the list of policy OIDs, formatted as dotted-decimal strings.
*
diff --git a/gnu/java/security/x509/ext/GeneralName.java b/gnu/java/security/x509/ext/GeneralName.java
index fbc05339f..f399de1b7 100644
--- a/gnu/java/security/x509/ext/GeneralName.java
+++ b/gnu/java/security/x509/ext/GeneralName.java
@@ -48,7 +48,7 @@ import java.util.Arrays;
/**
* The GeneralName structure from X.509.
- *
+ *
* <pre>
GeneralName ::= CHOICE {
otherName [0] OtherName,
@@ -87,12 +87,12 @@ public class GeneralName
registeredId (8);
private int tag;
-
+
private Kind(int tag)
{
this.tag = tag;
}
-
+
public static Kind forTag(final int tag)
{
switch (tag)
@@ -107,10 +107,10 @@ public class GeneralName
case 7: return iPAddress;
case 8: return registeredId;
}
-
+
throw new IllegalArgumentException("invalid tag: " + tag);
}
-
+
public int tag()
{
return tag;
@@ -120,17 +120,17 @@ public class GeneralName
private final Kind kind;
private final byte[] name;
private final byte[] encoded;
-
+
public GeneralName(byte[] encoded) throws IOException
{
DERReader reader = new DERReader(encoded);
DERValue value = reader.read();
-
+
if (value.getTagClass() != DER.CONTEXT)
throw new IOException("malformed GeneralName");
-
+
this.encoded = value.getEncoded();
-
+
kind = Kind.forTag(value.getTag());
switch (kind)
{
@@ -176,29 +176,29 @@ public class GeneralName
name = value.getEncoded();
name[0] = DER.OBJECT_IDENTIFIER;
break;
-
+
default:
name = null; // Not reached.
}
}
-
+
public GeneralName(Kind kind, byte[] name)
{
this.kind = kind;
this.name = (byte[]) name.clone();
this.encoded = null;
}
-
+
public Kind kind()
{
return kind;
}
-
+
public byte[] name()
{
return (byte[]) name.clone();
}
-
+
public byte[] encoded()
{
try
@@ -210,7 +210,7 @@ public class GeneralName
return null;
}
}
-
+
public boolean equals(Object o)
{
try
@@ -223,7 +223,7 @@ public class GeneralName
return false;
}
}
-
+
public String toString()
{
return (super.toString() + " [ kind=" + kind + "; name=" +
diff --git a/gnu/java/security/x509/ext/GeneralSubtree.java b/gnu/java/security/x509/ext/GeneralSubtree.java
index 5f6ffd987..5d688deaa 100644
--- a/gnu/java/security/x509/ext/GeneralSubtree.java
+++ b/gnu/java/security/x509/ext/GeneralSubtree.java
@@ -1,4 +1,4 @@
-/* GeneralSubtree.java --
+/* GeneralSubtree.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -63,20 +63,20 @@ public class GeneralSubtree
private final GeneralName base;
private final int minimum;
private final int maximum;
-
+
public GeneralSubtree(byte[] encoded) throws IOException
{
DERReader reader = new DERReader(encoded);
DERValue generalSubtree = reader.read();
-
+
if (!generalSubtree.isConstructed())
throw new IOException("malformed GeneralSubtree");
-
+
DERValue generalName = reader.read();
base = new GeneralName(generalName.getEncoded());
if (generalName.isConstructed())
reader.skip(generalName.getLength());
-
+
int len = generalName.getEncodedLength();
if (len < generalSubtree.getLength())
{
@@ -116,7 +116,7 @@ public class GeneralSubtree
maximum = -1;
}
}
-
+
/**
* Returns the base name.
*
@@ -126,7 +126,7 @@ public class GeneralSubtree
{
return base;
}
-
+
/**
* Returns the minimum base distance, possibly zero.
*
@@ -136,7 +136,7 @@ public class GeneralSubtree
{
return minimum;
}
-
+
/**
* Returns the maximum base distance, or -1 if this value was not specified.
*
@@ -146,7 +146,7 @@ public class GeneralSubtree
{
return maximum;
}
-
+
public String toString()
{
return (GeneralSubtree.class.getName() + " [ base=" + base
diff --git a/gnu/java/security/x509/ext/NameConstraints.java b/gnu/java/security/x509/ext/NameConstraints.java
index 607c42966..8f374d560 100644
--- a/gnu/java/security/x509/ext/NameConstraints.java
+++ b/gnu/java/security/x509/ext/NameConstraints.java
@@ -51,7 +51,7 @@ import java.util.List;
/**
* The NameConstraints extension. From RFC 3280, section 4.2.1.11, this
* extension is defined as:
- *
+ *
* <pre>
id-ce-nameConstraints OBJECT IDENTIFIER ::= { id-ce 30 }
@@ -68,29 +68,29 @@ import java.util.List;
BaseDistance ::= INTEGER (0..MAX)
</pre>
- *
+ *
* See also the classes {@link GeneralNames} and {@link GeneralSubtree}.
- *
+ *
* @author csm
*/
public class NameConstraints extends Value
{
public static final OID ID = new OID("2.5.29.30");
-
+
private List<GeneralSubtree> permittedSubtrees;
private List<GeneralSubtree> excludedSubtrees;
-
+
public NameConstraints(byte[] encoded) throws IOException
{
super(encoded);
-
+
DERReader der = new DERReader(encoded);
DERValue value = der.read();
if (!value.isConstructed())
{
throw new IOException("malformed NameConstraints");
}
-
+
permittedSubtrees = new LinkedList<GeneralSubtree>();
excludedSubtrees = new LinkedList<GeneralSubtree>();
int len = 0;
@@ -108,7 +108,7 @@ public class NameConstraints extends Value
len2 += subtree.getEncodedLength();
}
len += subtrees.getEncodedLength();
-
+
if (len < value.getLength())
{
subtrees = der.read();
@@ -134,24 +134,24 @@ public class NameConstraints extends Value
excludedSubtrees.add(new GeneralSubtree(subtree.getEncoded()));
der.skip(subtree.getLength());
len2 += subtree.getEncodedLength();
- }
+ }
}
else
throw new IOException("unexpected tag " + subtrees.getTag()
+ " (expecting 0 or 1)");
}
}
-
+
public List<GeneralSubtree> permittedSubtrees()
{
return Collections.unmodifiableList(permittedSubtrees);
}
-
+
public List<GeneralSubtree> excludedSubtrees()
{
return Collections.unmodifiableList(excludedSubtrees);
}
-
+
public String toString()
{
return NameConstraints.class.getName() + " [ permittedSubtrees="
diff --git a/gnu/java/text/AttributedFormatBuffer.java b/gnu/java/text/AttributedFormatBuffer.java
index c2aae9609..2a89ae097 100644
--- a/gnu/java/text/AttributedFormatBuffer.java
+++ b/gnu/java/text/AttributedFormatBuffer.java
@@ -7,7 +7,7 @@ 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
@@ -56,13 +56,13 @@ public class AttributedFormatBuffer implements FormatBuffer
private final ArrayList ranges;
private final ArrayList attributes;
private int[] a_ranges;
- private HashMap[] a_attributes;
+ private HashMap[] a_attributes;
private int startingRange;
AttributedCharacterIterator.Attribute defaultAttr;
/**
* This constructor accepts a StringBuffer. If the buffer contains
- * already some characters they will not be attributed.
+ * already some characters they will not be attributed.
*/
public AttributedFormatBuffer(CPStringBuilder buffer)
{
@@ -72,8 +72,8 @@ public class AttributedFormatBuffer implements FormatBuffer
this.defaultAttr = null;
if (buffer.length() != 0)
{
- this.startingRange = buffer.length();
- addAttribute(buffer.length(), null);
+ this.startingRange = buffer.length();
+ addAttribute(buffer.length(), null);
}
else
this.startingRange = -1;
@@ -96,16 +96,16 @@ public class AttributedFormatBuffer implements FormatBuffer
*
* @param new_range A new range to insert in the list.
* @param attr A new attribute to insert in the list.
- */
+ */
private final void addAttribute(int new_range, AttributedCharacterIterator.Attribute attr)
{
HashMap map;
if (attr != null)
{
- map = new HashMap();
- map.put(attr, attr);
- attributes.add(map);
+ map = new HashMap();
+ map.put(attr, attr);
+ attributes.add(map);
}
else
attributes.add(null);
@@ -119,7 +119,7 @@ public class AttributedFormatBuffer implements FormatBuffer
startingRange = 0;
buffer.append(s);
}
-
+
public void append(String s, AttributedCharacterIterator.Attribute attr)
{
setDefaultAttribute(attr);
@@ -135,11 +135,11 @@ public class AttributedFormatBuffer implements FormatBuffer
setDefaultAttribute(null);
if (ranges != null)
{
- for (int i = 0; i < ranges.length; i++)
- {
- this.ranges.add(new Integer(ranges[i] + curPos));
- this.attributes.add(attrs[i]);
- }
+ for (int i = 0; i < ranges.length; i++)
+ {
+ this.ranges.add(new Integer(ranges[i] + curPos));
+ this.attributes.add(attrs[i]);
+ }
}
startingRange = buffer.length();
buffer.append(s);
@@ -168,7 +168,7 @@ public class AttributedFormatBuffer implements FormatBuffer
if (startingRange != currentPos && startingRange >= 0)
{
- addAttribute(currentPos, defaultAttr);
+ addAttribute(currentPos, defaultAttr);
}
defaultAttr = attr;
startingRange = currentPos;
@@ -212,7 +212,7 @@ public class AttributedFormatBuffer implements FormatBuffer
a_ranges = new int[ranges.size()];
for (int i = 0; i < a_ranges.length; i++)
a_ranges[i] = ((Integer)(ranges.get (i))).intValue();
-
+
a_attributes = new HashMap[attributes.size()];
System.arraycopy(attributes.toArray(), 0, a_attributes, 0, a_attributes.length);
}
@@ -239,7 +239,7 @@ public class AttributedFormatBuffer implements FormatBuffer
}
/**
- * This method returns the array containing the map on the
+ * This method returns the array containing the map on the
* attributes.
*
* @return An array of {@link java.util.Map} containing the attributes.
diff --git a/gnu/java/text/BaseBreakIterator.java b/gnu/java/text/BaseBreakIterator.java
index 4afd8ae66..b69f698a1 100644
--- a/gnu/java/text/BaseBreakIterator.java
+++ b/gnu/java/text/BaseBreakIterator.java
@@ -7,7 +7,7 @@ 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
@@ -70,7 +70,7 @@ public abstract class BaseBreakIterator extends BreakIterator
/**
* Return the first boundary after <code>pos</code>.
- * This has the side effect of setting the index of the
+ * This has the side effect of setting the index of the
* CharacterIterator.
*/
public int following (int pos)
@@ -98,19 +98,19 @@ public abstract class BaseBreakIterator extends BreakIterator
int r = iter.getIndex ();
if (n > 0)
{
- while (n > 0 && r != DONE)
- {
- r = next ();
- --n;
- }
+ while (n > 0 && r != DONE)
+ {
+ r = next ();
+ --n;
+ }
}
else if (n < 0)
{
- while (n < 0 && r != DONE)
- {
- r = previous ();
- ++n;
- }
+ while (n < 0 && r != DONE)
+ {
+ r = previous ();
+ ++n;
+ }
}
return r;
}
diff --git a/gnu/java/text/CharacterBreakIterator.java b/gnu/java/text/CharacterBreakIterator.java
index 5274543a9..565eb9b9d 100644
--- a/gnu/java/text/CharacterBreakIterator.java
+++ b/gnu/java/text/CharacterBreakIterator.java
@@ -7,7 +7,7 @@ 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
@@ -111,44 +111,44 @@ public class CharacterBreakIterator extends BaseBreakIterator
char c;
for (char prev = CharacterIterator.DONE; iter.getIndex() < end; prev = c)
{
- c = iter.next();
- if (c == CharacterIterator.DONE)
- break;
- int type = Character.getType(c);
-
- // Break after paragraph separators.
- if (type == Character.PARAGRAPH_SEPARATOR)
- break;
-
- // Now we need some lookahead.
- char ahead = iter.next();
- iter.previous();
- if (ahead == CharacterIterator.DONE)
- break;
- int aheadType = Character.getType(ahead);
-
- if (aheadType != Character.NON_SPACING_MARK
- && ! isLowSurrogate (ahead)
- && ! isLVT (ahead))
- break;
- if (! isLVT (c) && isLVT (ahead))
- break;
- if (isL (c) && ! isLVT (ahead)
- && aheadType != Character.NON_SPACING_MARK)
- break;
- if (isV (c) && ! isV (ahead) && !isT (ahead)
- && aheadType != Character.NON_SPACING_MARK)
- break;
- if (isT (c) && ! isT (ahead)
- && aheadType != Character.NON_SPACING_MARK)
- break;
-
- if (! isHighSurrogate (c) && isLowSurrogate (ahead))
- break;
- if (isHighSurrogate (c) && ! isLowSurrogate (ahead))
- break;
- if (! isHighSurrogate (prev) && isLowSurrogate (c))
- break;
+ c = iter.next();
+ if (c == CharacterIterator.DONE)
+ break;
+ int type = Character.getType(c);
+
+ // Break after paragraph separators.
+ if (type == Character.PARAGRAPH_SEPARATOR)
+ break;
+
+ // Now we need some lookahead.
+ char ahead = iter.next();
+ iter.previous();
+ if (ahead == CharacterIterator.DONE)
+ break;
+ int aheadType = Character.getType(ahead);
+
+ if (aheadType != Character.NON_SPACING_MARK
+ && ! isLowSurrogate (ahead)
+ && ! isLVT (ahead))
+ break;
+ if (! isLVT (c) && isLVT (ahead))
+ break;
+ if (isL (c) && ! isLVT (ahead)
+ && aheadType != Character.NON_SPACING_MARK)
+ break;
+ if (isV (c) && ! isV (ahead) && !isT (ahead)
+ && aheadType != Character.NON_SPACING_MARK)
+ break;
+ if (isT (c) && ! isT (ahead)
+ && aheadType != Character.NON_SPACING_MARK)
+ break;
+
+ if (! isHighSurrogate (c) && isLowSurrogate (ahead))
+ break;
+ if (isHighSurrogate (c) && ! isLowSurrogate (ahead))
+ break;
+ if (! isHighSurrogate (prev) && isLowSurrogate (c))
+ break;
}
return iter.getIndex();
@@ -161,51 +161,51 @@ public class CharacterBreakIterator extends BaseBreakIterator
while (iter.getIndex() >= iter.getBeginIndex())
{
- char c = iter.previous();
- if (c == CharacterIterator.DONE)
- break;
- int type = Character.getType(c);
-
- if (type != Character.NON_SPACING_MARK
- && ! isLowSurrogate (c)
- && ! isLVT (c))
- break;
-
- // Now we need some lookahead.
- char ahead = iter.previous();
- if (ahead == CharacterIterator.DONE)
- {
- iter.next();
- break;
- }
- char ahead2 = iter.previous();
- iter.next();
- iter.next();
- if (ahead2 == CharacterIterator.DONE)
- break;
- int aheadType = Character.getType(ahead);
-
- if (aheadType == Character.PARAGRAPH_SEPARATOR)
- break;
-
- if (isLVT (c) && ! isLVT (ahead))
- break;
- if (! isLVT (c) && type != Character.NON_SPACING_MARK
- && isL (ahead))
- break;
- if (! isV (c) && ! isT (c) && type != Character.NON_SPACING_MARK
- && isV (ahead))
- break;
- if (! isT (c) && type != Character.NON_SPACING_MARK
- && isT (ahead))
- break;
-
- if (isLowSurrogate (c) && ! isHighSurrogate (ahead))
- break;
- if (! isLowSurrogate (c) && isHighSurrogate (ahead))
- break;
- if (isLowSurrogate (ahead) && ! isHighSurrogate (ahead2))
- break;
+ char c = iter.previous();
+ if (c == CharacterIterator.DONE)
+ break;
+ int type = Character.getType(c);
+
+ if (type != Character.NON_SPACING_MARK
+ && ! isLowSurrogate (c)
+ && ! isLVT (c))
+ break;
+
+ // Now we need some lookahead.
+ char ahead = iter.previous();
+ if (ahead == CharacterIterator.DONE)
+ {
+ iter.next();
+ break;
+ }
+ char ahead2 = iter.previous();
+ iter.next();
+ iter.next();
+ if (ahead2 == CharacterIterator.DONE)
+ break;
+ int aheadType = Character.getType(ahead);
+
+ if (aheadType == Character.PARAGRAPH_SEPARATOR)
+ break;
+
+ if (isLVT (c) && ! isLVT (ahead))
+ break;
+ if (! isLVT (c) && type != Character.NON_SPACING_MARK
+ && isL (ahead))
+ break;
+ if (! isV (c) && ! isT (c) && type != Character.NON_SPACING_MARK
+ && isV (ahead))
+ break;
+ if (! isT (c) && type != Character.NON_SPACING_MARK
+ && isT (ahead))
+ break;
+
+ if (isLowSurrogate (c) && ! isHighSurrogate (ahead))
+ break;
+ if (! isLowSurrogate (c) && isHighSurrogate (ahead))
+ break;
+ if (isLowSurrogate (ahead) && ! isHighSurrogate (ahead2))
+ break;
}
return iter.getIndex();
diff --git a/gnu/java/text/FormatBuffer.java b/gnu/java/text/FormatBuffer.java
index e6b682087..590b16cce 100644
--- a/gnu/java/text/FormatBuffer.java
+++ b/gnu/java/text/FormatBuffer.java
@@ -7,7 +7,7 @@ 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
@@ -42,14 +42,14 @@ import java.util.HashMap;
/**
* This interface describes a modifiable buffer which contains attributed
* characters. The implementation may or may not implements attributes. It
- * aims to greatly simplify and clarify the implementation of java.text
+ * aims to greatly simplify and clarify the implementation of java.text
* formatters. The buffer may be appended or have its tail cut. It may also
* be completely cleant up.
*
* @author Guilhem Lavaux <guilhem@kaffe.org>
* @date April 10, 2004
*/
-public interface FormatBuffer
+public interface FormatBuffer
{
/**
* This method appends a simple string to the buffer. This part of
@@ -72,8 +72,8 @@ public interface FormatBuffer
/**
* This method appends a simple string to the buffer. This part of
* the buffer will be attributed using the specified ranges and attributes.
- * To have an example on how to specify ranges see {@link gnu.java.text.FormatCharacterIterator}.
- *
+ * To have an example on how to specify ranges see {@link gnu.java.text.FormatCharacterIterator}.
+ *
* @param s The string to append to the buffer.
* @param ranges The ranges describing how the attributes should be applied
* to the string.
@@ -121,7 +121,7 @@ public interface FormatBuffer
* @param length Number of characters to cut at the end of the buffer.
*/
public void cutTail(int length);
-
+
/**
* This method resets completely the buffer.
*/
diff --git a/gnu/java/text/FormatCharacterIterator.java b/gnu/java/text/FormatCharacterIterator.java
index 60773aa1e..889394ca4 100644
--- a/gnu/java/text/FormatCharacterIterator.java
+++ b/gnu/java/text/FormatCharacterIterator.java
@@ -1,4 +1,4 @@
-/* FormatCharacter.java -- Implementation of AttributedCharacterIterator for
+/* FormatCharacter.java -- Implementation of AttributedCharacterIterator for
formatters.
Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
@@ -8,7 +8,7 @@ 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
@@ -78,7 +78,7 @@ public class FormatCharacterIterator implements AttributedCharacterIterator
}
/**
- * This constructor take a string <code>s</code>, a set of ranges
+ * This constructor take a string <code>s</code>, a set of ranges
* and the corresponding attributes. This is used to build an iterator.
* The array <code>ranges</code> should be formatted as follow:
* each element of <code>ranges</code> specifies the index in the string
@@ -98,10 +98,10 @@ public class FormatCharacterIterator implements AttributedCharacterIterator
this.ranges = ranges;
this.attributes = attributes;
}
-
- /*
+
+ /*
* The following methods are inherited from AttributedCharacterIterator,
- * and thus are already documented.
+ * and thus are already documented.
*/
public Set getAllAttributeKeys()
@@ -111,7 +111,7 @@ public class FormatCharacterIterator implements AttributedCharacterIterator
else
return new HashSet();
}
-
+
public Map getAttributes()
{
if (attributes != null && attributes[attributeIndex] != null)
@@ -119,7 +119,7 @@ public class FormatCharacterIterator implements AttributedCharacterIterator
else
return new HashMap();
}
-
+
public Object getAttribute (AttributedCharacterIterator.Attribute attrib)
{
if (attributes != null && attributes[attributeIndex] != null)
@@ -127,7 +127,7 @@ public class FormatCharacterIterator implements AttributedCharacterIterator
else
return null;
}
-
+
public int getRunLimit(Set reqAttrs)
{
if (attributes == null)
@@ -138,19 +138,19 @@ public class FormatCharacterIterator implements AttributedCharacterIterator
do
{
- currentAttrIndex++;
- if (currentAttrIndex == attributes.length)
- return formattedString.length();
- if (attributes[currentAttrIndex] == null)
- break;
- newKeys = attributes[currentAttrIndex].keySet();
+ currentAttrIndex++;
+ if (currentAttrIndex == attributes.length)
+ return formattedString.length();
+ if (attributes[currentAttrIndex] == null)
+ break;
+ newKeys = attributes[currentAttrIndex].keySet();
}
while (newKeys.containsAll (reqAttrs));
return ranges[currentAttrIndex-1];
}
-
- public int getRunLimit (AttributedCharacterIterator.Attribute attribute)
+
+ public int getRunLimit (AttributedCharacterIterator.Attribute attribute)
{
Set s = new HashSet();
@@ -164,38 +164,38 @@ public class FormatCharacterIterator implements AttributedCharacterIterator
return formattedString.length();
if (attributes[attributeIndex] == null)
{
- for (int i=attributeIndex+1;i<attributes.length;i++)
- if (attributes[i] != null)
- return ranges[i-1];
- return formattedString.length();
+ for (int i=attributeIndex+1;i<attributes.length;i++)
+ if (attributes[i] != null)
+ return ranges[i-1];
+ return formattedString.length();
}
return getRunLimit (attributes[attributeIndex].keySet());
}
-
+
public int getRunStart (Set reqAttrs)
{
if (attributes == null)
return formattedString.length();
-
+
int currentAttrIndex = attributeIndex;
Set newKeys = null;
do
{
- if (currentAttrIndex == 0)
- return 0;
+ if (currentAttrIndex == 0)
+ return 0;
- currentAttrIndex--;
- if (attributes[currentAttrIndex] == null)
- break;
- newKeys = attributes[currentAttrIndex].keySet();
+ currentAttrIndex--;
+ if (attributes[currentAttrIndex] == null)
+ break;
+ newKeys = attributes[currentAttrIndex].keySet();
}
while (newKeys.containsAll (reqAttrs));
-
+
return (currentAttrIndex > 0) ? ranges[currentAttrIndex-1] : 0;
- }
-
+ }
+
public int getRunStart()
{
if (attributes == null)
@@ -203,19 +203,19 @@ public class FormatCharacterIterator implements AttributedCharacterIterator
if (attributes[attributeIndex] == null)
{
- for (int i=attributeIndex;i>0;i--)
- if (attributes[i] != null)
- return ranges[attributeIndex-1];
- return 0;
+ for (int i=attributeIndex;i>0;i--)
+ if (attributes[i] != null)
+ return ranges[attributeIndex-1];
+ return 0;
}
return getRunStart (attributes[attributeIndex].keySet());
}
-
- public int getRunStart (AttributedCharacterIterator.Attribute attribute)
+
+ public int getRunStart (AttributedCharacterIterator.Attribute attribute)
{
Set s = new HashSet();
-
+
s.add (attribute);
return getRunStart (s);
}
@@ -224,7 +224,7 @@ public class FormatCharacterIterator implements AttributedCharacterIterator
{
return new FormatCharacterIterator (formattedString, ranges, attributes);
}
-
+
/*
* The following methods are inherited from CharacterIterator and thus
* are already documented.
@@ -234,29 +234,29 @@ public class FormatCharacterIterator implements AttributedCharacterIterator
{
return formattedString.charAt (charIndex);
}
-
+
public char first()
{
charIndex = 0;
attributeIndex = 0;
return formattedString.charAt (0);
}
-
+
public int getBeginIndex()
{
return 0;
}
-
+
public int getEndIndex()
{
return formattedString.length();
}
-
+
public int getIndex()
{
return charIndex;
}
-
+
public char last()
{
charIndex = formattedString.length()-1;
@@ -264,53 +264,53 @@ public class FormatCharacterIterator implements AttributedCharacterIterator
attributeIndex = attributes.length-1;
return formattedString.charAt (charIndex);
}
-
+
public char next()
{
charIndex++;
if (charIndex >= formattedString.length())
{
- charIndex = getEndIndex();
- return DONE;
+ charIndex = getEndIndex();
+ return DONE;
}
if (attributes != null)
{
- if (charIndex >= ranges[attributeIndex])
- attributeIndex++;
+ if (charIndex >= ranges[attributeIndex])
+ attributeIndex++;
}
return formattedString.charAt (charIndex);
}
-
+
public char previous()
{
charIndex--;
if (charIndex < 0)
{
- charIndex = 0;
- return DONE;
+ charIndex = 0;
+ return DONE;
}
-
+
if (attributes != null)
{
- if (charIndex < ranges[attributeIndex])
- attributeIndex--;
+ if (charIndex < ranges[attributeIndex])
+ attributeIndex--;
}
return formattedString.charAt (charIndex);
}
-
+
public char setIndex (int position)
{
if (position < 0 || position > formattedString.length())
throw new IllegalArgumentException ("position is out of range");
-
+
charIndex = position;
if (attributes != null)
{
- for (attributeIndex=0;attributeIndex<attributes.length;
- attributeIndex++)
- if (ranges[attributeIndex] > charIndex)
- break;
- attributeIndex--;
+ for (attributeIndex=0;attributeIndex<attributes.length;
+ attributeIndex++)
+ if (ranges[attributeIndex] > charIndex)
+ break;
+ attributeIndex--;
}
if (charIndex == formattedString.length())
return DONE;
@@ -334,64 +334,64 @@ public class FormatCharacterIterator implements AttributedCharacterIterator
int i = 0, j = 0;
debug("merging " + attributes.length + " attrs");
-
+
while (i < this.ranges.length && j < ranges.length)
{
- if (this.attributes[i] != null)
- {
- new_attributes.add (this.attributes[i]);
- if (attributes[j] != null)
- this.attributes[i].putAll (attributes[j]);
- }
- else
- {
- new_attributes.add (attributes[j]);
- }
- if (this.ranges[i] == ranges[j])
- {
- new_ranges.add (new Integer (ranges[j]));
- i++;
- j++;
- }
- else if (this.ranges[i] < ranges[j])
- {
- new_ranges.add (new Integer (this.ranges[i]));
- i++;
- }
- else
- {
- new_ranges.add (new Integer (ranges[j]));
- j++;
- }
+ if (this.attributes[i] != null)
+ {
+ new_attributes.add (this.attributes[i]);
+ if (attributes[j] != null)
+ this.attributes[i].putAll (attributes[j]);
+ }
+ else
+ {
+ new_attributes.add (attributes[j]);
+ }
+ if (this.ranges[i] == ranges[j])
+ {
+ new_ranges.add (new Integer (ranges[j]));
+ i++;
+ j++;
+ }
+ else if (this.ranges[i] < ranges[j])
+ {
+ new_ranges.add (new Integer (this.ranges[i]));
+ i++;
+ }
+ else
+ {
+ new_ranges.add (new Integer (ranges[j]));
+ j++;
+ }
}
-
+
if (i != this.ranges.length)
{
- for (;i<this.ranges.length;i++)
- {
- new_attributes.add (this.attributes[i]);
- new_ranges.add (new Integer (this.ranges[i]));
- }
+ for (;i<this.ranges.length;i++)
+ {
+ new_attributes.add (this.attributes[i]);
+ new_ranges.add (new Integer (this.ranges[i]));
+ }
}
if (j != ranges.length)
{
- for (;j<ranges.length;j++)
- {
- new_attributes.add (attributes[j]);
- new_ranges.add (new Integer (ranges[j]));
- }
+ for (;j<ranges.length;j++)
+ {
+ new_attributes.add (attributes[j]);
+ new_ranges.add (new Integer (ranges[j]));
+ }
}
this.attributes = new HashMap[new_attributes.size()];
this.ranges = new int[new_ranges.size()];
System.arraycopy (new_attributes.toArray(), 0, this.attributes,
- 0, this.attributes.length);
+ 0, this.attributes.length);
for (i=0;i<new_ranges.size();i++)
{
- this.ranges[i] = ((Integer)new_ranges.elementAt (i)).intValue();
+ this.ranges[i] = ((Integer)new_ranges.elementAt (i)).intValue();
}
-
+
dumpTable();
}
@@ -410,22 +410,22 @@ public class FormatCharacterIterator implements AttributedCharacterIterator
do
{
- formattedString = formattedString + String.valueOf (c);
- // TODO: Reduce the size of the output array.
- more_attributes.add (iterator.getAttributes());
- more_ranges.add (new Integer (formattedString.length()));
- // END TOOD
- c = iterator.next();
- }
+ formattedString = formattedString + String.valueOf (c);
+ // TODO: Reduce the size of the output array.
+ more_attributes.add (iterator.getAttributes());
+ more_ranges.add (new Integer (formattedString.length()));
+ // END TOOD
+ c = iterator.next();
+ }
while (c != DONE);
HashMap[] new_attributes = new HashMap[attributes.length
- + more_attributes.size()];
+ + more_attributes.size()];
int[] new_ranges = new int[ranges.length + more_ranges.size()];
-
+
System.arraycopy (attributes, 0, new_attributes, 0, attributes.length);
System.arraycopy (more_attributes.toArray(), 0, new_attributes,
- attributes.length, more_attributes.size());
+ attributes.length, more_attributes.size());
System.arraycopy (ranges, 0, new_ranges, 0, ranges.length);
Object[] new_ranges_array = more_ranges.toArray();
@@ -458,7 +458,7 @@ public class FormatCharacterIterator implements AttributedCharacterIterator
ranges = new_ranges;
attributes = new_attributes;
- }
+ }
/**
* This method appends a string without attributes. It is completely
@@ -470,7 +470,7 @@ public class FormatCharacterIterator implements AttributedCharacterIterator
public void append (String text)
{
append (text, null);
- }
+ }
/**
* This method adds a set of attributes to a range of character. The
@@ -481,7 +481,7 @@ public class FormatCharacterIterator implements AttributedCharacterIterator
* @param range_start Lower bound of the range of characters which will receive the
* attribute.
* @param range_end Upper bound of the range of characters which will receive the
- * attribute.
+ * attribute.
*
* @throws IllegalArgumentException if ranges are out of bounds.
*/
@@ -502,30 +502,30 @@ public class FormatCharacterIterator implements AttributedCharacterIterator
private void dumpTable()
{
int start_range = 0;
-
+
if (!DEBUG)
return;
System.out.println("Dumping internal table:");
for (int i = 0; i < ranges.length; i++)
{
- System.out.print("\t" + start_range + " => " + ranges[i] + ":");
- if (attributes[i] == null)
- System.out.println("null");
- else
- {
- Set keyset = attributes[i].keySet();
- if (keyset != null)
- {
- Iterator keys = keyset.iterator();
-
- while (keys.hasNext())
- System.out.print(" " + keys.next());
- }
- else
- System.out.println("keySet null");
- System.out.println();
- }
+ System.out.print("\t" + start_range + " => " + ranges[i] + ":");
+ if (attributes[i] == null)
+ System.out.println("null");
+ else
+ {
+ Set keyset = attributes[i].keySet();
+ if (keyset != null)
+ {
+ Iterator keys = keyset.iterator();
+
+ while (keys.hasNext())
+ System.out.print(" " + keys.next());
+ }
+ else
+ System.out.println("keySet null");
+ System.out.println();
+ }
}
System.out.println();
System.out.flush();
diff --git a/gnu/java/text/LineBreakIterator.java b/gnu/java/text/LineBreakIterator.java
index ad07479fb..7e44121b0 100644
--- a/gnu/java/text/LineBreakIterator.java
+++ b/gnu/java/text/LineBreakIterator.java
@@ -7,7 +7,7 @@ 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
@@ -65,23 +65,23 @@ public class LineBreakIterator extends BaseBreakIterator
// Some methods to tell us different properties of characters.
private final boolean isNb (char c)
{
- return (c == 0x00a0 // NO-BREAK SPACE
- || c == 0x2011 // NON-BREAKING HYPHEN
- || c == 0xfeff); // ZERO WITH NO-BREAK SPACE
+ return (c == 0x00a0 // NO-BREAK SPACE
+ || c == 0x2011 // NON-BREAKING HYPHEN
+ || c == 0xfeff); // ZERO WITH NO-BREAK SPACE
}
private final boolean isClose (int type)
{
return (type == Character.END_PUNCTUATION
- // Unicode book says "comma, period, ...", which I take to
- // mean "Po" class.
- || type == Character.OTHER_PUNCTUATION);
+ // Unicode book says "comma, period, ...", which I take to
+ // mean "Po" class.
+ || type == Character.OTHER_PUNCTUATION);
}
private final boolean isIdeo (char c)
{
- return (c >= 0x3040 && c <= 0x309f // Hiragana
- || c >= 0x30a0 && c <= 0x30ff // Katakana
- || c >= 0x4e00 && c <= 0x9fff // Han
- || c >= 0x3100 && c <= 0x312f); // Bopomofo
+ return (c >= 0x3040 && c <= 0x309f // Hiragana
+ || c >= 0x30a0 && c <= 0x30ff // Katakana
+ || c >= 0x4e00 && c <= 0x9fff // Han
+ || c >= 0x3100 && c <= 0x312f); // Bopomofo
}
public int next ()
@@ -92,54 +92,54 @@ public class LineBreakIterator extends BaseBreakIterator
while (iter.getIndex() < end)
{
- char c = iter.current();
- int type = Character.getType(c);
-
- char n = iter.next();
-
- if (n == CharacterIterator.DONE
- || type == Character.PARAGRAPH_SEPARATOR
- || type == Character.LINE_SEPARATOR)
- break;
-
- // Handle two cases where we must scan for non-spacing marks.
- int start = iter.getIndex();
- if (type == Character.SPACE_SEPARATOR
- || type == Character.START_PUNCTUATION
- || isIdeo (c))
- {
- while (n != CharacterIterator.DONE
- && Character.getType(n) == Character.NON_SPACING_MARK)
- n = iter.next();
- if (n == CharacterIterator.DONE)
- break;
-
- if (type == Character.SPACE_SEPARATOR)
- {
- int nt = Character.getType(n);
- if (nt != Character.NON_SPACING_MARK
- && nt != Character.SPACE_SEPARATOR
- && ! isNb (n))
- break;
- }
- else if (type == Character.START_PUNCTUATION)
- {
- if (isIdeo (n))
- {
- // Open punctuation followed by non spacing marks
- // and then ideograph does not have a break in
- // it. So skip all this.
- start = iter.getIndex();
- }
- }
- else
- {
- // Ideograph preceded this character.
- if (isClose (Character.getType(n)))
- break;
- }
- }
- iter.setIndex(start);
+ char c = iter.current();
+ int type = Character.getType(c);
+
+ char n = iter.next();
+
+ if (n == CharacterIterator.DONE
+ || type == Character.PARAGRAPH_SEPARATOR
+ || type == Character.LINE_SEPARATOR)
+ break;
+
+ // Handle two cases where we must scan for non-spacing marks.
+ int start = iter.getIndex();
+ if (type == Character.SPACE_SEPARATOR
+ || type == Character.START_PUNCTUATION
+ || isIdeo (c))
+ {
+ while (n != CharacterIterator.DONE
+ && Character.getType(n) == Character.NON_SPACING_MARK)
+ n = iter.next();
+ if (n == CharacterIterator.DONE)
+ break;
+
+ if (type == Character.SPACE_SEPARATOR)
+ {
+ int nt = Character.getType(n);
+ if (nt != Character.NON_SPACING_MARK
+ && nt != Character.SPACE_SEPARATOR
+ && ! isNb (n))
+ break;
+ }
+ else if (type == Character.START_PUNCTUATION)
+ {
+ if (isIdeo (n))
+ {
+ // Open punctuation followed by non spacing marks
+ // and then ideograph does not have a break in
+ // it. So skip all this.
+ start = iter.getIndex();
+ }
+ }
+ else
+ {
+ // Ideograph preceded this character.
+ if (isClose (Character.getType(n)))
+ break;
+ }
+ }
+ iter.setIndex(start);
}
return iter.getIndex();
@@ -153,40 +153,40 @@ public class LineBreakIterator extends BaseBreakIterator
while (iter.getIndex() >= start)
{
- char c = iter.previous();
- if (c == CharacterIterator.DONE)
- break;
- int type = Character.getType(c);
-
- char n = iter.previous();
- if (n == CharacterIterator.DONE)
- break;
- iter.next();
-
- int nt = Character.getType(n);
- // Break after paragraph separators.
- if (nt == Character.PARAGRAPH_SEPARATOR
- || nt == Character.LINE_SEPARATOR)
- break;
-
- // Skip non-spacing marks.
- int init = iter.getIndex();
- while (n != CharacterIterator.DONE && nt == Character.NON_SPACING_MARK)
- {
- n = iter.previous();
- nt = Character.getType(n);
- }
-
- if (nt == Character.SPACE_SEPARATOR
- && type != Character.SPACE_SEPARATOR
- && type != Character.NON_SPACING_MARK
- && ! isNb (c))
- break;
- if (! isClose (type) && isIdeo (n))
- break;
- if (isIdeo (c) && nt != Character.START_PUNCTUATION)
- break;
- iter.setIndex(init);
+ char c = iter.previous();
+ if (c == CharacterIterator.DONE)
+ break;
+ int type = Character.getType(c);
+
+ char n = iter.previous();
+ if (n == CharacterIterator.DONE)
+ break;
+ iter.next();
+
+ int nt = Character.getType(n);
+ // Break after paragraph separators.
+ if (nt == Character.PARAGRAPH_SEPARATOR
+ || nt == Character.LINE_SEPARATOR)
+ break;
+
+ // Skip non-spacing marks.
+ int init = iter.getIndex();
+ while (n != CharacterIterator.DONE && nt == Character.NON_SPACING_MARK)
+ {
+ n = iter.previous();
+ nt = Character.getType(n);
+ }
+
+ if (nt == Character.SPACE_SEPARATOR
+ && type != Character.SPACE_SEPARATOR
+ && type != Character.NON_SPACING_MARK
+ && ! isNb (c))
+ break;
+ if (! isClose (type) && isIdeo (n))
+ break;
+ if (isIdeo (c) && nt != Character.START_PUNCTUATION)
+ break;
+ iter.setIndex(init);
}
return iter.getIndex();
diff --git a/gnu/java/text/SentenceBreakIterator.java b/gnu/java/text/SentenceBreakIterator.java
index f91d269bb..4da9df2ea 100644
--- a/gnu/java/text/SentenceBreakIterator.java
+++ b/gnu/java/text/SentenceBreakIterator.java
@@ -7,7 +7,7 @@ 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
@@ -70,66 +70,66 @@ public class SentenceBreakIterator extends BaseBreakIterator
while (iter.getIndex() < end)
{
- char c = iter.current();
- if (c == CharacterIterator.DONE)
- break;
- int type = Character.getType(c);
-
- char n = iter.next();
- if (n == CharacterIterator.DONE)
- break;
-
- // Always break after paragraph separator.
- if (type == Character.PARAGRAPH_SEPARATOR)
- break;
-
- if (c == '!' || c == '?')
- {
- // Skip close punctuation.
- while (n != CharacterIterator.DONE
- && Character.getType(n) == Character.END_PUNCTUATION)
- n = iter.next();
- // Skip (java) space, line and paragraph separators.
- while (n != CharacterIterator.DONE && Character.isWhitespace(n))
- n = iter.next();
-
- // There's always a break somewhere after `!' or `?'.
- break;
- }
-
- if (c == '.')
- {
- int save = iter.getIndex();
- // Skip close punctuation.
- while (n != CharacterIterator.DONE
- && Character.getType(n) == Character.END_PUNCTUATION)
- n = iter.next();
- // Skip (java) space, line and paragraph separators.
- // We keep count because we need at least one for this period to
- // represent a terminator.
- int spcount = 0;
- while (n != CharacterIterator.DONE && Character.isWhitespace(n))
- {
- n = iter.next();
- ++spcount;
- }
- if (spcount > 0)
- {
- int save2 = iter.getIndex();
- // Skip over open puncutation.
- while (n != CharacterIterator.DONE
- && Character.getType(n) == Character.START_PUNCTUATION)
- n = iter.next();
- // Next character must not be lower case.
- if (n == CharacterIterator.DONE
- || ! Character.isLowerCase(n))
- {
- iter.setIndex(save2);
- break;
- }
- }
- iter.setIndex(save);
- }
+ char c = iter.current();
+ if (c == CharacterIterator.DONE)
+ break;
+ int type = Character.getType(c);
+
+ char n = iter.next();
+ if (n == CharacterIterator.DONE)
+ break;
+
+ // Always break after paragraph separator.
+ if (type == Character.PARAGRAPH_SEPARATOR)
+ break;
+
+ if (c == '!' || c == '?')
+ {
+ // Skip close punctuation.
+ while (n != CharacterIterator.DONE
+ && Character.getType(n) == Character.END_PUNCTUATION)
+ n = iter.next();
+ // Skip (java) space, line and paragraph separators.
+ while (n != CharacterIterator.DONE && Character.isWhitespace(n))
+ n = iter.next();
+
+ // There's always a break somewhere after `!' or `?'.
+ break;
+ }
+
+ if (c == '.')
+ {
+ int save = iter.getIndex();
+ // Skip close punctuation.
+ while (n != CharacterIterator.DONE
+ && Character.getType(n) == Character.END_PUNCTUATION)
+ n = iter.next();
+ // Skip (java) space, line and paragraph separators.
+ // We keep count because we need at least one for this period to
+ // represent a terminator.
+ int spcount = 0;
+ while (n != CharacterIterator.DONE && Character.isWhitespace(n))
+ {
+ n = iter.next();
+ ++spcount;
+ }
+ if (spcount > 0)
+ {
+ int save2 = iter.getIndex();
+ // Skip over open puncutation.
+ while (n != CharacterIterator.DONE
+ && Character.getType(n) == Character.START_PUNCTUATION)
+ n = iter.next();
+ // Next character must not be lower case.
+ if (n == CharacterIterator.DONE
+ || ! Character.isLowerCase(n))
+ {
+ iter.setIndex(save2);
+ break;
+ }
+ }
+ iter.setIndex(save);
+ }
}
return iter.getIndex();
@@ -143,86 +143,86 @@ public class SentenceBreakIterator extends BaseBreakIterator
while (iter.getIndex() >= start)
{
- char c = iter.previous();
- if (c == CharacterIterator.DONE)
- break;
-
- char n = iter.previous();
- if (n == CharacterIterator.DONE)
- break;
- iter.next();
- int nt = Character.getType(n);
-
- if (! Character.isLowerCase(c)
- && (nt == Character.START_PUNCTUATION
- || Character.isWhitespace(n)))
- {
- int save = iter.getIndex();
- int save_nt = nt;
- char save_n = n;
- // Skip open punctuation.
- while (n != CharacterIterator.DONE
- && Character.getType(n) == Character.START_PUNCTUATION)
- n = iter.previous();
- if (n == CharacterIterator.DONE)
- break;
- if (Character.isWhitespace(n))
- {
- // Must have at least one (java) space after the `.'.
- int save2 = iter.getIndex();
- while (n != CharacterIterator.DONE
- && Character.isWhitespace(n))
- n = iter.previous();
- // Skip close punctuation.
- while (n != CharacterIterator.DONE
- && Character.getType(n) == Character.END_PUNCTUATION)
- n = iter.previous();
- if (n == CharacterIterator.DONE || n == '.')
- {
- // Communicate location of actual end.
- period = iter.getIndex();
- iter.setIndex(save2);
- break;
- }
- }
- iter.setIndex(save);
- nt = save_nt;
- n = save_n;
- }
-
- if (nt == Character.PARAGRAPH_SEPARATOR)
- {
- // Communicate location of actual end.
- period = iter.getIndex();
- break;
- }
- else if (Character.isWhitespace(n)
- || nt == Character.END_PUNCTUATION)
- {
- int save = iter.getIndex();
- // Skip (java) space, line and paragraph separators.
- while (n != CharacterIterator.DONE
- && Character.isWhitespace(n))
- n = iter.previous();
- // Skip close punctuation.
- while (n != CharacterIterator.DONE
- && Character.getType(n) == Character.END_PUNCTUATION)
- n = iter.previous();
- int here = iter.getIndex();
- iter.setIndex(save);
- if (n == CharacterIterator.DONE || n == '!' || n == '?')
- {
- // Communicate location of actual end.
- period = here;
- break;
- }
- }
- else if (n == '!' || n == '?')
- {
- // Communicate location of actual end.
- period = iter.getIndex();
- break;
- }
+ char c = iter.previous();
+ if (c == CharacterIterator.DONE)
+ break;
+
+ char n = iter.previous();
+ if (n == CharacterIterator.DONE)
+ break;
+ iter.next();
+ int nt = Character.getType(n);
+
+ if (! Character.isLowerCase(c)
+ && (nt == Character.START_PUNCTUATION
+ || Character.isWhitespace(n)))
+ {
+ int save = iter.getIndex();
+ int save_nt = nt;
+ char save_n = n;
+ // Skip open punctuation.
+ while (n != CharacterIterator.DONE
+ && Character.getType(n) == Character.START_PUNCTUATION)
+ n = iter.previous();
+ if (n == CharacterIterator.DONE)
+ break;
+ if (Character.isWhitespace(n))
+ {
+ // Must have at least one (java) space after the `.'.
+ int save2 = iter.getIndex();
+ while (n != CharacterIterator.DONE
+ && Character.isWhitespace(n))
+ n = iter.previous();
+ // Skip close punctuation.
+ while (n != CharacterIterator.DONE
+ && Character.getType(n) == Character.END_PUNCTUATION)
+ n = iter.previous();
+ if (n == CharacterIterator.DONE || n == '.')
+ {
+ // Communicate location of actual end.
+ period = iter.getIndex();
+ iter.setIndex(save2);
+ break;
+ }
+ }
+ iter.setIndex(save);
+ nt = save_nt;
+ n = save_n;
+ }
+
+ if (nt == Character.PARAGRAPH_SEPARATOR)
+ {
+ // Communicate location of actual end.
+ period = iter.getIndex();
+ break;
+ }
+ else if (Character.isWhitespace(n)
+ || nt == Character.END_PUNCTUATION)
+ {
+ int save = iter.getIndex();
+ // Skip (java) space, line and paragraph separators.
+ while (n != CharacterIterator.DONE
+ && Character.isWhitespace(n))
+ n = iter.previous();
+ // Skip close punctuation.
+ while (n != CharacterIterator.DONE
+ && Character.getType(n) == Character.END_PUNCTUATION)
+ n = iter.previous();
+ int here = iter.getIndex();
+ iter.setIndex(save);
+ if (n == CharacterIterator.DONE || n == '!' || n == '?')
+ {
+ // Communicate location of actual end.
+ period = here;
+ break;
+ }
+ }
+ else if (n == '!' || n == '?')
+ {
+ // Communicate location of actual end.
+ period = iter.getIndex();
+ break;
+ }
}
return iter.getIndex();
diff --git a/gnu/java/text/StringFormatBuffer.java b/gnu/java/text/StringFormatBuffer.java
index fc8d08ee6..2367fccb3 100644
--- a/gnu/java/text/StringFormatBuffer.java
+++ b/gnu/java/text/StringFormatBuffer.java
@@ -7,7 +7,7 @@ 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
@@ -41,7 +41,7 @@ import java.util.HashMap;
/**
* This class is an implementation of a FormatBuffer without attributes.
- *
+ *
* @author Guilhem Lavaux <guilhem@kaffe.org>
* @date April 10, 2004
*/
@@ -64,7 +64,7 @@ public class StringFormatBuffer implements FormatBuffer
{
buffer.append(s);
}
-
+
public void append(String s, AttributedCharacterIterator.Attribute attr)
{
buffer.append(s);
@@ -111,7 +111,7 @@ public class StringFormatBuffer implements FormatBuffer
}
/**
- * This method returns the internal {@link java.lang.StringBuffer} which
+ * This method returns the internal {@link java.lang.StringBuffer} which
* contains the string of character.
*/
public StringBuffer getBuffer()
diff --git a/gnu/java/text/WordBreakIterator.java b/gnu/java/text/WordBreakIterator.java
index f140369f8..fded4bf26 100644
--- a/gnu/java/text/WordBreakIterator.java
+++ b/gnu/java/text/WordBreakIterator.java
@@ -7,7 +7,7 @@ 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
@@ -84,78 +84,78 @@ public class WordBreakIterator extends BaseBreakIterator
while (iter.getIndex() < end)
{
- char c = iter.current();
- if (c == CharacterIterator.DONE)
- break;
- int type = Character.getType(c);
-
- char n = iter.next();
- if (n == CharacterIterator.DONE)
- break;
-
- // Break after paragraph separators.
- if (type == Character.PARAGRAPH_SEPARATOR
- || type == Character.LINE_SEPARATOR)
- break;
-
- // Break between letters and non-letters.
- // FIXME: we treat apostrophe as part of a word. This
- // is an English-ism.
- boolean is_letter = Character.isLetter(c);
- if (c != '\'' && ! is_letter && type != Character.NON_SPACING_MARK
- && Character.isLetter(n))
- break;
-
- // Always break after certain symbols, such as punctuation.
- // This heuristic is derived from hints in the JCL book and is
- // not part of Unicode. It seems to be right, however.
- // FIXME: we treat apostrophe as part of a word. This
- // is an English-ism.
- if (c != '\''
- && (type == Character.DASH_PUNCTUATION
- || type == Character.START_PUNCTUATION
- || type == Character.END_PUNCTUATION
- || type == Character.CONNECTOR_PUNCTUATION
- || type == Character.OTHER_PUNCTUATION
- || type == Character.MATH_SYMBOL
- || type == Character.CURRENCY_SYMBOL
- || type == Character.MODIFIER_SYMBOL
- || type == Character.OTHER_SYMBOL
- || type == Character.FORMAT
- || type == Character.CONTROL))
- break;
-
- boolean is_hira = isHira (c);
- boolean is_kata = isKata (c);
- boolean is_han = isHan (c);
-
- // Special case Japanese.
- if (! is_hira && ! is_kata && ! is_han
- && type != Character.NON_SPACING_MARK
- && (isHira (n) || isKata (n) || isHan (n)))
- break;
-
- if (is_hira || is_kata || is_han || is_letter)
- {
- // Now we need to do some lookahead. We might need to do
- // quite a bit of lookahead, so we save our position and
- // restore it later.
- int save = iter.getIndex();
- // Skip string of non spacing marks.
- while (n != CharacterIterator.DONE
- && Character.getType(n) == Character.NON_SPACING_MARK)
- n = iter.next();
- if (n == CharacterIterator.DONE)
- break;
- if ((is_hira && ! isHira (n))
- || (is_kata && ! isHira (n) && ! isKata (n))
- || (is_han && ! isHira (n) && ! isHan (n))
- // FIXME: we treat apostrophe as part of a word. This
- // is an English-ism.
- || (is_letter && ! Character.isLetter(n) && n != '\''))
- break;
- iter.setIndex(save);
- }
+ char c = iter.current();
+ if (c == CharacterIterator.DONE)
+ break;
+ int type = Character.getType(c);
+
+ char n = iter.next();
+ if (n == CharacterIterator.DONE)
+ break;
+
+ // Break after paragraph separators.
+ if (type == Character.PARAGRAPH_SEPARATOR
+ || type == Character.LINE_SEPARATOR)
+ break;
+
+ // Break between letters and non-letters.
+ // FIXME: we treat apostrophe as part of a word. This
+ // is an English-ism.
+ boolean is_letter = Character.isLetter(c);
+ if (c != '\'' && ! is_letter && type != Character.NON_SPACING_MARK
+ && Character.isLetter(n))
+ break;
+
+ // Always break after certain symbols, such as punctuation.
+ // This heuristic is derived from hints in the JCL book and is
+ // not part of Unicode. It seems to be right, however.
+ // FIXME: we treat apostrophe as part of a word. This
+ // is an English-ism.
+ if (c != '\''
+ && (type == Character.DASH_PUNCTUATION
+ || type == Character.START_PUNCTUATION
+ || type == Character.END_PUNCTUATION
+ || type == Character.CONNECTOR_PUNCTUATION
+ || type == Character.OTHER_PUNCTUATION
+ || type == Character.MATH_SYMBOL
+ || type == Character.CURRENCY_SYMBOL
+ || type == Character.MODIFIER_SYMBOL
+ || type == Character.OTHER_SYMBOL
+ || type == Character.FORMAT
+ || type == Character.CONTROL))
+ break;
+
+ boolean is_hira = isHira (c);
+ boolean is_kata = isKata (c);
+ boolean is_han = isHan (c);
+
+ // Special case Japanese.
+ if (! is_hira && ! is_kata && ! is_han
+ && type != Character.NON_SPACING_MARK
+ && (isHira (n) || isKata (n) || isHan (n)))
+ break;
+
+ if (is_hira || is_kata || is_han || is_letter)
+ {
+ // Now we need to do some lookahead. We might need to do
+ // quite a bit of lookahead, so we save our position and
+ // restore it later.
+ int save = iter.getIndex();
+ // Skip string of non spacing marks.
+ while (n != CharacterIterator.DONE
+ && Character.getType(n) == Character.NON_SPACING_MARK)
+ n = iter.next();
+ if (n == CharacterIterator.DONE)
+ break;
+ if ((is_hira && ! isHira (n))
+ || (is_kata && ! isHira (n) && ! isKata (n))
+ || (is_han && ! isHira (n) && ! isHan (n))
+ // FIXME: we treat apostrophe as part of a word. This
+ // is an English-ism.
+ || (is_letter && ! Character.isLetter(n) && n != '\''))
+ break;
+ iter.setIndex(save);
+ }
}
return iter.getIndex();
@@ -169,80 +169,80 @@ public class WordBreakIterator extends BaseBreakIterator
while (iter.getIndex() >= start)
{
- char c = iter.previous();
- if (c == CharacterIterator.DONE)
- break;
-
- boolean is_hira = isHira (c);
- boolean is_kata = isKata (c);
- boolean is_han = isHan (c);
- boolean is_letter = Character.isLetter(c);
-
- char n = iter.previous();
- if (n == CharacterIterator.DONE)
- break;
- iter.next();
- int type = Character.getType(n);
- // Break after paragraph separators.
- if (type == Character.PARAGRAPH_SEPARATOR
- || type == Character.LINE_SEPARATOR)
- break;
-
- // Break between letters and non-letters.
- // FIXME: we treat apostrophe as part of a word. This
- // is an English-ism.
- if (n != '\'' && ! Character.isLetter(n)
- && type != Character.NON_SPACING_MARK
- && is_letter)
- break;
-
- // Always break after certain symbols, such as punctuation.
- // This heuristic is derived from hints in the JCL book and is
- // not part of Unicode. It seems to be right, however.
- // FIXME: we treat apostrophe as part of a word. This
- // is an English-ism.
- if (n != '\''
- && (type == Character.DASH_PUNCTUATION
- || type == Character.START_PUNCTUATION
- || type == Character.END_PUNCTUATION
- || type == Character.CONNECTOR_PUNCTUATION
- || type == Character.OTHER_PUNCTUATION
- || type == Character.MATH_SYMBOL
- || type == Character.CURRENCY_SYMBOL
- || type == Character.MODIFIER_SYMBOL
- || type == Character.OTHER_SYMBOL
- || type == Character.FORMAT
- || type == Character.CONTROL))
- break;
-
- // Special case Japanese.
- if ((is_hira || is_kata || is_han)
- && ! isHira (n) && ! isKata (n) && ! isHan (n)
- && type != Character.NON_SPACING_MARK)
- break;
-
- // We might have to skip over non spacing marks to see what's
- // on the other side.
- if (! is_hira || (! is_letter && c != '\''))
- {
- int save = iter.getIndex();
- while (n != CharacterIterator.DONE
- && Character.getType(n) == Character.NON_SPACING_MARK)
- n = iter.previous();
- iter.setIndex(save);
- // This is a strange case: a bunch of non-spacing marks at
- // the beginning. We treat the current location as a word
- // break.
- if (n == CharacterIterator.DONE)
- break;
- if ((isHira (n) && ! is_hira)
- || (isKata (n) && ! is_hira && ! is_kata)
- || (isHan (n) && ! is_hira && ! is_han)
- // FIXME: we treat apostrophe as part of a word. This
- // is an English-ism.
- || (! is_letter && c != '\'' && Character.isLetter(n)))
- break;
- }
+ char c = iter.previous();
+ if (c == CharacterIterator.DONE)
+ break;
+
+ boolean is_hira = isHira (c);
+ boolean is_kata = isKata (c);
+ boolean is_han = isHan (c);
+ boolean is_letter = Character.isLetter(c);
+
+ char n = iter.previous();
+ if (n == CharacterIterator.DONE)
+ break;
+ iter.next();
+ int type = Character.getType(n);
+ // Break after paragraph separators.
+ if (type == Character.PARAGRAPH_SEPARATOR
+ || type == Character.LINE_SEPARATOR)
+ break;
+
+ // Break between letters and non-letters.
+ // FIXME: we treat apostrophe as part of a word. This
+ // is an English-ism.
+ if (n != '\'' && ! Character.isLetter(n)
+ && type != Character.NON_SPACING_MARK
+ && is_letter)
+ break;
+
+ // Always break after certain symbols, such as punctuation.
+ // This heuristic is derived from hints in the JCL book and is
+ // not part of Unicode. It seems to be right, however.
+ // FIXME: we treat apostrophe as part of a word. This
+ // is an English-ism.
+ if (n != '\''
+ && (type == Character.DASH_PUNCTUATION
+ || type == Character.START_PUNCTUATION
+ || type == Character.END_PUNCTUATION
+ || type == Character.CONNECTOR_PUNCTUATION
+ || type == Character.OTHER_PUNCTUATION
+ || type == Character.MATH_SYMBOL
+ || type == Character.CURRENCY_SYMBOL
+ || type == Character.MODIFIER_SYMBOL
+ || type == Character.OTHER_SYMBOL
+ || type == Character.FORMAT
+ || type == Character.CONTROL))
+ break;
+
+ // Special case Japanese.
+ if ((is_hira || is_kata || is_han)
+ && ! isHira (n) && ! isKata (n) && ! isHan (n)
+ && type != Character.NON_SPACING_MARK)
+ break;
+
+ // We might have to skip over non spacing marks to see what's
+ // on the other side.
+ if (! is_hira || (! is_letter && c != '\''))
+ {
+ int save = iter.getIndex();
+ while (n != CharacterIterator.DONE
+ && Character.getType(n) == Character.NON_SPACING_MARK)
+ n = iter.previous();
+ iter.setIndex(save);
+ // This is a strange case: a bunch of non-spacing marks at
+ // the beginning. We treat the current location as a word
+ // break.
+ if (n == CharacterIterator.DONE)
+ break;
+ if ((isHira (n) && ! is_hira)
+ || (isKata (n) && ! is_hira && ! is_kata)
+ || (isHan (n) && ! is_hira && ! is_han)
+ // FIXME: we treat apostrophe as part of a word. This
+ // is an English-ism.
+ || (! is_letter && c != '\'' && Character.isLetter(n)))
+ break;
+ }
}
return iter.getIndex();
diff --git a/gnu/java/util/Base64.java b/gnu/java/util/Base64.java
index 4401a151a..80b1fcc02 100644
--- a/gnu/java/util/Base64.java
+++ b/gnu/java/util/Base64.java
@@ -114,7 +114,7 @@ public final class Base64
{
return encode(buf, 0);
}
-
+
/**
* Base64 encode a byte array, returning the returning string.
*
@@ -129,7 +129,7 @@ public final class Base64
/**
* Base64 encode a byte array, returning the returning string.
- *
+ *
* @param buf The byte array to encode.
* @param offset The offset in the byte array to start.
* @param length The number of bytes to encode.
diff --git a/gnu/java/util/DoubleEnumeration.java b/gnu/java/util/DoubleEnumeration.java
index 94efb923d..852644bc6 100644
--- a/gnu/java/util/DoubleEnumeration.java
+++ b/gnu/java/util/DoubleEnumeration.java
@@ -46,7 +46,7 @@ import java.util.NoSuchElementException;
* It returns the elements of the first Enumeration until it has
* no more elements and then returns the elements of the second
* Enumeration.<br>
- *
+ *
* In the default case:
* <pre>
* doubleEnum = new DoubleEnumeration(enum1, enum2);
@@ -67,7 +67,7 @@ public class DoubleEnumeration<T> implements Enumeration<T>
{
/**
* This is true as long as one of the enumerations has more
- * elements.
+ * elements.
* Only valid when hasChecked is true.
* Set in <code>hasMoreElements()</code>
*/
diff --git a/gnu/java/util/EmptyEnumeration.java b/gnu/java/util/EmptyEnumeration.java
index ca2c56d73..30c50d81d 100644
--- a/gnu/java/util/EmptyEnumeration.java
+++ b/gnu/java/util/EmptyEnumeration.java
@@ -54,7 +54,7 @@ import java.util.NoSuchElementException;
public final class EmptyEnumeration<T> implements Enumeration<T>, Serializable
{
/** The only instance of this class */
- private static final EmptyEnumeration<Object> instance =
+ private static final EmptyEnumeration<Object> instance =
new EmptyEnumeration<Object>();
/**
diff --git a/gnu/java/util/WeakIdentityHashMap.java b/gnu/java/util/WeakIdentityHashMap.java
index 210a3d8c5..4d9014969 100644
--- a/gnu/java/util/WeakIdentityHashMap.java
+++ b/gnu/java/util/WeakIdentityHashMap.java
@@ -686,12 +686,12 @@ public class WeakIdentityHashMap extends AbstractMap implements Map
{
if (next == null)
throw new InternalError("WeakIdentityHashMap in inconsistent state");
- prev = next;
+ prev = next;
next = prev.next;
}
if (prev == null)
buckets[slot] = bucket.next;
- else
+ else
prev.next = bucket.next;
size--;
diff --git a/gnu/java/util/ZoneInfo.java b/gnu/java/util/ZoneInfo.java
index 2146a321f..117ef3cf2 100644
--- a/gnu/java/util/ZoneInfo.java
+++ b/gnu/java/util/ZoneInfo.java
@@ -134,7 +134,7 @@ public class ZoneInfo extends TimeZone
* rules after the last transition.
*/
public ZoneInfo(int rawOffset, String id, long[] transitions,
- SimpleTimeZone lastRule)
+ SimpleTimeZone lastRule)
{
if (transitions == null || transitions.length < 1)
throw new IllegalArgumentException("transitions must not be null");
@@ -166,7 +166,7 @@ public class ZoneInfo extends TimeZone
* @throws IllegalArgumentException if arguments are incorrect.
*/
public int getOffset(int era, int year, int month, int day, int dayOfWeek,
- int millis)
+ int millis)
{
if (gmtZone == null)
gmtZone = new SimpleTimeZone(0, "GMT");
@@ -201,15 +201,15 @@ public class ZoneInfo extends TimeZone
int mid = 1;
while (lo < hi)
{
- mid = (lo + hi) / 2;
- // secs < (transitions[mid-1] >> SECS_SHIFT)
- if (val <= transitions[mid-1])
- hi = mid;
- // secs >= (transitions[mid] >> SECS_SHIFT)
- else if (val > transitions[mid])
- lo = mid + 1;
- else
- break;
+ mid = (lo + hi) / 2;
+ // secs < (transitions[mid-1] >> SECS_SHIFT)
+ if (val <= transitions[mid-1])
+ hi = mid;
+ // secs >= (transitions[mid] >> SECS_SHIFT)
+ else if (val > transitions[mid])
+ lo = mid + 1;
+ else
+ break;
}
return transitions[mid];
}
@@ -257,30 +257,30 @@ public class ZoneInfo extends TimeZone
{
if (lastRule.useDaylightTime())
{
- dstSavings = lastRule.getDSTSavings();
- useDaylight = true;
+ dstSavings = lastRule.getDSTSavings();
+ useDaylight = true;
}
else
{
- dstSavings = 0;
- useDaylight = false;
- // lastRule might say no DST is in effect simply because
- // the DST rules are too complex for SimpleTimeZone, say
- // for Asia/Jerusalem.
- // Look at the last DST offset if it is newer than current time.
- long currentSecs = System.currentTimeMillis() / 1000;
- int i;
- for (i = transitions.length - 1;
- i >= 0 && currentSecs < (transitions[i] >> SECS_SHIFT);
- i--)
- if ((transitions[i] & IS_DST) != 0)
- {
- dstSavings = (int) (((transitions[i] << OFFSET_SHIFT)
- >> OFFSET_SHIFT) * 1000)
- - rawOffset;
- useDaylight = true;
- break;
- }
+ dstSavings = 0;
+ useDaylight = false;
+ // lastRule might say no DST is in effect simply because
+ // the DST rules are too complex for SimpleTimeZone, say
+ // for Asia/Jerusalem.
+ // Look at the last DST offset if it is newer than current time.
+ long currentSecs = System.currentTimeMillis() / 1000;
+ int i;
+ for (i = transitions.length - 1;
+ i >= 0 && currentSecs < (transitions[i] >> SECS_SHIFT);
+ i--)
+ if ((transitions[i] & IS_DST) != 0)
+ {
+ dstSavings = (int) (((transitions[i] << OFFSET_SHIFT)
+ >> OFFSET_SHIFT) * 1000)
+ - rawOffset;
+ useDaylight = true;
+ break;
+ }
}
}
@@ -372,10 +372,10 @@ public class ZoneInfo extends TimeZone
public String toString()
{
return getClass().getName() + "[" + "id=" + getID() + ",offset="
- + rawOffset + ",transitions=" + transitions.length
- + ",useDaylight=" + useDaylight
- + (useDaylight ? (",dstSavings=" + dstSavings) : "")
- + ",lastRule=" + lastRule.toString() + "]";
+ + rawOffset + ",transitions=" + transitions.length
+ + ",useDaylight=" + useDaylight
+ + (useDaylight ? (",dstSavings=" + dstSavings) : "")
+ + ",lastRule=" + lastRule.toString() + "]";
}
/**
@@ -389,470 +389,470 @@ public class ZoneInfo extends TimeZone
DataInputStream dis = null;
try
{
- FileInputStream fis = new FileInputStream(file);
- BufferedInputStream bis = new BufferedInputStream(fis);
- dis = new DataInputStream(bis);
-
- // Make sure we are reading a tzfile.
- byte[] tzif = new byte[5];
- dis.readFully(tzif);
- int tzif2 = 4;
- if (tzif[0] == 'T' && tzif[1] == 'Z'
- && tzif[2] == 'i' && tzif[3] == 'f')
- {
- if (tzif[4] >= '2')
- tzif2 = 8;
- // Reserved bytes
- skipFully(dis, 16 - 1);
- }
- else
- // Darwin has tzdata files that don't start with the TZif marker
- skipFully(dis, 16 - 5);
-
- int ttisgmtcnt = dis.readInt();
- int ttisstdcnt = dis.readInt();
- int leapcnt = dis.readInt();
- int timecnt = dis.readInt();
- int typecnt = dis.readInt();
- int charcnt = dis.readInt();
- if (tzif2 == 8)
- {
- skipFully(dis, timecnt * (4 + 1) + typecnt * (4 + 1 + 1) + charcnt
- + leapcnt * (4 + 4) + ttisgmtcnt + ttisstdcnt);
-
- dis.readFully(tzif);
- if (tzif[0] != 'T' || tzif[1] != 'Z' || tzif[2] != 'i'
- || tzif[3] != 'f' || tzif[4] < '2')
- return null;
-
- // Reserved bytes
- skipFully(dis, 16 - 1);
- ttisgmtcnt = dis.readInt();
- ttisstdcnt = dis.readInt();
- leapcnt = dis.readInt();
- timecnt = dis.readInt();
- typecnt = dis.readInt();
- charcnt = dis.readInt();
- }
-
- // Sanity checks
- if (typecnt <= 0 || timecnt < 0 || charcnt < 0
- || leapcnt < 0 || ttisgmtcnt < 0 || ttisstdcnt < 0
- || ttisgmtcnt > typecnt || ttisstdcnt > typecnt)
- return null;
-
- // Transition times
- long[] times = new long[timecnt];
- for (int i = 0; i < timecnt; i++)
- if (tzif2 == 8)
- times[i] = dis.readLong();
- else
- times[i] = (long) dis.readInt();
-
- // Transition types
- int[] types = new int[timecnt];
- for (int i = 0; i < timecnt; i++)
- {
- types[i] = dis.readByte();
- if (types[i] < 0)
- types[i] += 256;
- if (types[i] >= typecnt)
- return null;
- }
-
- // Types
- int[] offsets = new int[typecnt];
- int[] typeflags = new int[typecnt];
- for (int i = 0; i < typecnt; i++)
- {
- offsets[i] = dis.readInt();
- if (offsets[i] >= IS_DST / 2 || offsets[i] <= -IS_DST / 2)
- return null;
- int dst = dis.readByte();
- int abbrind = dis.readByte();
- if (abbrind < 0)
- abbrind += 256;
- if (abbrind >= charcnt)
- return null;
- typeflags[i] = (dst != 0 ? (1 << 8) : 0) + abbrind;
- }
-
- // Abbrev names
- byte[] names = new byte[charcnt];
- dis.readFully(names);
-
- // Leap transitions, for now ignore
- skipFully(dis, leapcnt * (tzif2 + 4) + ttisstdcnt + ttisgmtcnt);
-
- // tzIf2 format has optional POSIX TZ env string
- String tzstr = null;
- if (tzif2 == 8 && dis.readByte() == '\n')
- {
- tzstr = dis.readLine();
- if (tzstr.length() <= 0)
- tzstr = null;
- }
-
- // Get std/dst_offset and dst/non-dst time zone names.
- int std_ind = -1;
- int dst_ind = -1;
- if (timecnt == 0)
- std_ind = 0;
- else
- for (int i = timecnt - 1; i >= 0; i--)
- {
- if (std_ind == -1 && (typeflags[types[i]] & (1 << 8)) == 0)
- std_ind = types[i];
- else if (dst_ind == -1 && (typeflags[types[i]] & (1 << 8)) != 0)
- dst_ind = types[i];
- if (dst_ind != -1 && std_ind != -1)
- break;
- }
-
- if (std_ind == -1)
- return null;
-
- int j = typeflags[std_ind] & 255;
- while (j < charcnt && names[j] != 0)
- j++;
- String std_zonename = new String(names, typeflags[std_ind] & 255,
- j - (typeflags[std_ind] & 255),
- "ASCII");
-
- String dst_zonename = "";
- if (dst_ind != -1)
- {
- j = typeflags[dst_ind] & 255;
- while (j < charcnt && names[j] != 0)
- j++;
- dst_zonename = new String(names, typeflags[dst_ind] & 255,
- j - (typeflags[dst_ind] & 255), "ASCII");
- }
-
- // Only use gmt offset when necessary.
- // Also special case GMT+/- timezones.
- String std_offset_string = "";
- String dst_offset_string = "";
- if (tzstr == null
- && (dst_ind != -1
- || (offsets[std_ind] != 0
- && !std_zonename.startsWith("GMT+")
- && !std_zonename.startsWith("GMT-"))))
- {
- std_offset_string = Integer.toString(-offsets[std_ind] / 3600);
- int seconds = -offsets[std_ind] % 3600;
- if (seconds != 0)
- {
- if (seconds < 0)
- seconds *= -1;
- if (seconds < 600)
- std_offset_string += ":0" + Integer.toString(seconds / 60);
- else
- std_offset_string += ":" + Integer.toString(seconds / 60);
- seconds = seconds % 60;
- if (seconds >= 10)
- std_offset_string += ":" + Integer.toString(seconds);
- else if (seconds > 0)
- std_offset_string += ":0" + Integer.toString(seconds);
- }
-
- if (dst_ind != -1 && offsets[dst_ind] != offsets[std_ind] + 3600)
- {
- dst_offset_string = Integer.toString(-offsets[dst_ind] / 3600);
- seconds = -offsets[dst_ind] % 3600;
- if (seconds != 0)
- {
- if (seconds < 0)
- seconds *= -1;
- if (seconds < 600)
- dst_offset_string
- += ":0" + Integer.toString(seconds / 60);
- else
- dst_offset_string
- += ":" + Integer.toString(seconds / 60);
- seconds = seconds % 60;
- if (seconds >= 10)
- dst_offset_string += ":" + Integer.toString(seconds);
- else if (seconds > 0)
- dst_offset_string += ":0" + Integer.toString(seconds);
- }
- }
- }
-
- /*
- * If no tzIf2 POSIX TZ string is available and the timezone
- * uses DST, try to guess the last rule by trying to make
- * sense from transitions at 5 years in the future and onwards.
- * tzdata actually uses only 3 forms of rules:
- * fixed date within a month, e.g. change on April, 5th
- * 1st weekday on or after Nth: change on Sun>=15 in April
- * last weekday in a month: change on lastSun in April
- */
- String[] change_spec = { null, null };
- if (tzstr == null && dst_ind != -1 && timecnt > 10)
- {
- long nowPlus5y = System.currentTimeMillis() / 1000
- + 5 * 365 * 86400;
- int first;
-
- for (first = timecnt - 1; first >= 0; first--)
- if (times[first] < nowPlus5y
- || (types[first] != std_ind && types[first] != dst_ind)
- || types[first] != types[timecnt - 2 + ((first ^ timecnt) & 1)])
- break;
- first++;
-
- if (timecnt - first >= 10 && types[timecnt - 1] != types[timecnt - 2])
- {
- GregorianCalendar cal
- = new GregorianCalendar(new SimpleTimeZone(0, "GMT"));
-
- int[] values = new int[2 * 11];
- int i;
- for (i = timecnt - 1; i >= first; i--)
- {
- int base = (i % 2) * 11;
- int offset = offsets[types[i > first ? i - 1 : i + 1]];
- cal.setTimeInMillis((times[i] + offset) * 1000);
- if (i >= timecnt - 2)
- {
- values[base + 0] = cal.get(Calendar.YEAR);
- values[base + 1] = cal.get(Calendar.MONTH);
- values[base + 2] = cal.get(Calendar.DAY_OF_MONTH);
- values[base + 3]
- = cal.getActualMaximum(Calendar.DAY_OF_MONTH);
- values[base + 4] = cal.get(Calendar.DAY_OF_WEEK);
- values[base + 5] = cal.get(Calendar.HOUR_OF_DAY);
- values[base + 6] = cal.get(Calendar.MINUTE);
- values[base + 7] = cal.get(Calendar.SECOND);
- values[base + 8] = values[base + 2]; // Range start
- values[base + 9] = values[base + 2]; // Range end
- values[base + 10] = 0; // Determined type
- }
- else
- {
- int year = cal.get(Calendar.YEAR);
- int month = cal.get(Calendar.MONTH);
- int day_of_month = cal.get(Calendar.DAY_OF_MONTH);
- int month_days
- = cal.getActualMaximum(Calendar.DAY_OF_MONTH);
- int day_of_week = cal.get(Calendar.DAY_OF_WEEK);
- int hour = cal.get(Calendar.HOUR_OF_DAY);
- int minute = cal.get(Calendar.MINUTE);
- int second = cal.get(Calendar.SECOND);
- if (year != values[base + 0] - 1
- || month != values[base + 1]
- || hour != values[base + 5]
- || minute != values[base + 6]
- || second != values[base + 7])
- break;
- if (day_of_week == values[base + 4])
- {
- // Either a Sun>=8 or lastSun rule.
- if (day_of_month < values[base + 8])
- values[base + 8] = day_of_month;
- if (day_of_month > values[base + 9])
- values[base + 9] = day_of_month;
- if (values[base + 10] < 0)
- break;
- if (values[base + 10] == 0)
- {
- values[base + 10] = 1;
- // If day of month > 28, this is
- // certainly lastSun rule.
- if (values[base + 2] > 28)
- values[base + 2] = 3;
- // If day of month isn't in the last
- // week, it can't be lastSun rule.
- else if (values[base + 2]
- <= values[base + 3] - 7)
- values[base + 3] = 2;
- }
- if (values[base + 10] == 1)
- {
- // If day of month is > 28, this is
- // certainly lastSun rule.
- if (day_of_month > 28)
- values[base + 10] = 3;
- // If day of month isn't in the last
- // week, it can't be lastSun rule.
- else if (day_of_month <= month_days - 7)
- values[base + 10] = 2;
- }
- else if ((values[base + 10] == 2
- && day_of_month > 28)
- || (values[base + 10] == 3
- && day_of_month <= month_days - 7))
- break;
- }
- else
- {
- // Must be fixed day in month rule.
- if (day_of_month != values[base + 2]
- || values[base + 10] > 0)
- break;
- values[base + 4] = day_of_week;
- values[base + 10] = -1;
- }
- values[base + 0] -= 1;
- }
- }
-
- if (i < first)
- {
- for (i = 0; i < 2; i++)
- {
- int base = 11 * i;
- if (values[base + 10] == 0)
- continue;
- if (values[base + 10] == -1)
- {
- int[] dayCount
- = { 0, 31, 59, 90, 120, 151,
- 181, 212, 243, 273, 304, 334 };
- int d = dayCount[values[base + 1]
- - Calendar.JANUARY];
- d += values[base + 2];
- change_spec[i] = ",J" + Integer.toString(d);
- }
- else if (values[base + 10] == 2)
- {
- // If we haven't seen all days of the week,
- // we can't be sure what the rule really is.
- if (values[base + 8] + 6 != values[base + 9])
- continue;
-
- int d;
- d = values[base + 1] - Calendar.JANUARY + 1;
- // E.g. Sun >= 5 is not representable in POSIX
- // TZ env string, use ",Am.n.d" extension
- // where m is month 1 .. 12, n is the date on
- // or after which it happens and d is day
- // of the week, 0 .. 6. So Sun >= 5 in April
- // is ",A4.5.0".
- if ((values[base + 8] % 7) == 1)
- {
- change_spec[i] = ",M" + Integer.toString(d);
- d = (values[base + 8] + 6) / 7;
- }
- else
- {
- change_spec[i] = ",A" + Integer.toString(d);
- d = values[base + 8];
- }
- change_spec[i] += "." + Integer.toString(d);
- d = values[base + 4] - Calendar.SUNDAY;
- change_spec[i] += "." + Integer.toString(d);
- }
- else
- {
- // If we don't know whether this is lastSun or
- // Sun >= 22 rule. That can be either because
- // there was insufficient number of
- // transitions, or February, where it is quite
- // probable we haven't seen any 29th dates.
- // For February, assume lastSun rule, otherwise
- // punt.
- if (values[base + 10] == 1
- && values[base + 1] != Calendar.FEBRUARY)
- continue;
-
- int d;
- d = values[base + 1] - Calendar.JANUARY + 1;
- change_spec[i] = ",M" + Integer.toString(d);
- d = values[base + 4] - Calendar.SUNDAY;
- change_spec[i] += ".5." + Integer.toString(d);
- }
-
- // Don't add time specification if time is
- // 02:00:00.
- if (values[base + 5] != 2
- || values[base + 6] != 0
- || values[base + 7] != 0)
- {
- int d = values[base + 5];
- change_spec[i] += "/" + Integer.toString(d);
- if (values[base + 6] != 0 || values[base + 7] != 0)
- {
- d = values[base + 6];
- if (d < 10)
- change_spec[i]
- += ":0" + Integer.toString(d);
- else
- change_spec[i] += ":" + Integer.toString(d);
- d = values[base + 7];
- if (d >= 10)
- change_spec[i]
- += ":" + Integer.toString(d);
- else if (d > 0)
- change_spec[i]
- += ":0" + Integer.toString(d);
- }
- }
- }
- if (types[(timecnt - 1) & -2] == std_ind)
- {
- String tmp = change_spec[0];
- change_spec[0] = change_spec[1];
- change_spec[1] = tmp;
- }
- }
- }
- }
-
- if (tzstr == null)
- {
- tzstr = std_zonename + std_offset_string;
- if (change_spec[0] != null && change_spec[1] != null)
- tzstr += dst_zonename + dst_offset_string
- + change_spec[0] + change_spec[1];
- }
-
- if (timecnt == 0)
- return new SimpleTimeZone(offsets[std_ind] * 1000,
- id != null ? id : tzstr);
-
- SimpleTimeZone endRule = createLastRule(tzstr);
- if (endRule == null)
- return null;
-
- /* Finally adjust the times array into the form the constructor
- * expects. times[0] is special, the offset and DST flag there
- * are for all times before that transition. Use the first non-DST
- * type. For all other transitions, the data file has the type
- * (<offset, isdst, zonename>) for the time interval starting
- */
- for (int i = 0; i < typecnt; i++)
- if ((typeflags[i] & (1 << 8)) == 0)
- {
- times[0] = (times[0] << SECS_SHIFT) | (offsets[i] & OFFSET_MASK);
- break;
- }
-
- for (int i = 1; i < timecnt; i++)
- times[i] = (times[i] << SECS_SHIFT)
- | (offsets[types[i - 1]] & OFFSET_MASK)
- | ((typeflags[types[i - 1]] & (1 << 8)) != 0 ? IS_DST : 0);
-
- return new ZoneInfo(offsets[std_ind] * 1000, id != null ? id : tzstr,
- times, endRule);
+ FileInputStream fis = new FileInputStream(file);
+ BufferedInputStream bis = new BufferedInputStream(fis);
+ dis = new DataInputStream(bis);
+
+ // Make sure we are reading a tzfile.
+ byte[] tzif = new byte[5];
+ dis.readFully(tzif);
+ int tzif2 = 4;
+ if (tzif[0] == 'T' && tzif[1] == 'Z'
+ && tzif[2] == 'i' && tzif[3] == 'f')
+ {
+ if (tzif[4] >= '2')
+ tzif2 = 8;
+ // Reserved bytes
+ skipFully(dis, 16 - 1);
+ }
+ else
+ // Darwin has tzdata files that don't start with the TZif marker
+ skipFully(dis, 16 - 5);
+
+ int ttisgmtcnt = dis.readInt();
+ int ttisstdcnt = dis.readInt();
+ int leapcnt = dis.readInt();
+ int timecnt = dis.readInt();
+ int typecnt = dis.readInt();
+ int charcnt = dis.readInt();
+ if (tzif2 == 8)
+ {
+ skipFully(dis, timecnt * (4 + 1) + typecnt * (4 + 1 + 1) + charcnt
+ + leapcnt * (4 + 4) + ttisgmtcnt + ttisstdcnt);
+
+ dis.readFully(tzif);
+ if (tzif[0] != 'T' || tzif[1] != 'Z' || tzif[2] != 'i'
+ || tzif[3] != 'f' || tzif[4] < '2')
+ return null;
+
+ // Reserved bytes
+ skipFully(dis, 16 - 1);
+ ttisgmtcnt = dis.readInt();
+ ttisstdcnt = dis.readInt();
+ leapcnt = dis.readInt();
+ timecnt = dis.readInt();
+ typecnt = dis.readInt();
+ charcnt = dis.readInt();
+ }
+
+ // Sanity checks
+ if (typecnt <= 0 || timecnt < 0 || charcnt < 0
+ || leapcnt < 0 || ttisgmtcnt < 0 || ttisstdcnt < 0
+ || ttisgmtcnt > typecnt || ttisstdcnt > typecnt)
+ return null;
+
+ // Transition times
+ long[] times = new long[timecnt];
+ for (int i = 0; i < timecnt; i++)
+ if (tzif2 == 8)
+ times[i] = dis.readLong();
+ else
+ times[i] = (long) dis.readInt();
+
+ // Transition types
+ int[] types = new int[timecnt];
+ for (int i = 0; i < timecnt; i++)
+ {
+ types[i] = dis.readByte();
+ if (types[i] < 0)
+ types[i] += 256;
+ if (types[i] >= typecnt)
+ return null;
+ }
+
+ // Types
+ int[] offsets = new int[typecnt];
+ int[] typeflags = new int[typecnt];
+ for (int i = 0; i < typecnt; i++)
+ {
+ offsets[i] = dis.readInt();
+ if (offsets[i] >= IS_DST / 2 || offsets[i] <= -IS_DST / 2)
+ return null;
+ int dst = dis.readByte();
+ int abbrind = dis.readByte();
+ if (abbrind < 0)
+ abbrind += 256;
+ if (abbrind >= charcnt)
+ return null;
+ typeflags[i] = (dst != 0 ? (1 << 8) : 0) + abbrind;
+ }
+
+ // Abbrev names
+ byte[] names = new byte[charcnt];
+ dis.readFully(names);
+
+ // Leap transitions, for now ignore
+ skipFully(dis, leapcnt * (tzif2 + 4) + ttisstdcnt + ttisgmtcnt);
+
+ // tzIf2 format has optional POSIX TZ env string
+ String tzstr = null;
+ if (tzif2 == 8 && dis.readByte() == '\n')
+ {
+ tzstr = dis.readLine();
+ if (tzstr.length() <= 0)
+ tzstr = null;
+ }
+
+ // Get std/dst_offset and dst/non-dst time zone names.
+ int std_ind = -1;
+ int dst_ind = -1;
+ if (timecnt == 0)
+ std_ind = 0;
+ else
+ for (int i = timecnt - 1; i >= 0; i--)
+ {
+ if (std_ind == -1 && (typeflags[types[i]] & (1 << 8)) == 0)
+ std_ind = types[i];
+ else if (dst_ind == -1 && (typeflags[types[i]] & (1 << 8)) != 0)
+ dst_ind = types[i];
+ if (dst_ind != -1 && std_ind != -1)
+ break;
+ }
+
+ if (std_ind == -1)
+ return null;
+
+ int j = typeflags[std_ind] & 255;
+ while (j < charcnt && names[j] != 0)
+ j++;
+ String std_zonename = new String(names, typeflags[std_ind] & 255,
+ j - (typeflags[std_ind] & 255),
+ "ASCII");
+
+ String dst_zonename = "";
+ if (dst_ind != -1)
+ {
+ j = typeflags[dst_ind] & 255;
+ while (j < charcnt && names[j] != 0)
+ j++;
+ dst_zonename = new String(names, typeflags[dst_ind] & 255,
+ j - (typeflags[dst_ind] & 255), "ASCII");
+ }
+
+ // Only use gmt offset when necessary.
+ // Also special case GMT+/- timezones.
+ String std_offset_string = "";
+ String dst_offset_string = "";
+ if (tzstr == null
+ && (dst_ind != -1
+ || (offsets[std_ind] != 0
+ && !std_zonename.startsWith("GMT+")
+ && !std_zonename.startsWith("GMT-"))))
+ {
+ std_offset_string = Integer.toString(-offsets[std_ind] / 3600);
+ int seconds = -offsets[std_ind] % 3600;
+ if (seconds != 0)
+ {
+ if (seconds < 0)
+ seconds *= -1;
+ if (seconds < 600)
+ std_offset_string += ":0" + Integer.toString(seconds / 60);
+ else
+ std_offset_string += ":" + Integer.toString(seconds / 60);
+ seconds = seconds % 60;
+ if (seconds >= 10)
+ std_offset_string += ":" + Integer.toString(seconds);
+ else if (seconds > 0)
+ std_offset_string += ":0" + Integer.toString(seconds);
+ }
+
+ if (dst_ind != -1 && offsets[dst_ind] != offsets[std_ind] + 3600)
+ {
+ dst_offset_string = Integer.toString(-offsets[dst_ind] / 3600);
+ seconds = -offsets[dst_ind] % 3600;
+ if (seconds != 0)
+ {
+ if (seconds < 0)
+ seconds *= -1;
+ if (seconds < 600)
+ dst_offset_string
+ += ":0" + Integer.toString(seconds / 60);
+ else
+ dst_offset_string
+ += ":" + Integer.toString(seconds / 60);
+ seconds = seconds % 60;
+ if (seconds >= 10)
+ dst_offset_string += ":" + Integer.toString(seconds);
+ else if (seconds > 0)
+ dst_offset_string += ":0" + Integer.toString(seconds);
+ }
+ }
+ }
+
+ /*
+ * If no tzIf2 POSIX TZ string is available and the timezone
+ * uses DST, try to guess the last rule by trying to make
+ * sense from transitions at 5 years in the future and onwards.
+ * tzdata actually uses only 3 forms of rules:
+ * fixed date within a month, e.g. change on April, 5th
+ * 1st weekday on or after Nth: change on Sun>=15 in April
+ * last weekday in a month: change on lastSun in April
+ */
+ String[] change_spec = { null, null };
+ if (tzstr == null && dst_ind != -1 && timecnt > 10)
+ {
+ long nowPlus5y = System.currentTimeMillis() / 1000
+ + 5 * 365 * 86400;
+ int first;
+
+ for (first = timecnt - 1; first >= 0; first--)
+ if (times[first] < nowPlus5y
+ || (types[first] != std_ind && types[first] != dst_ind)
+ || types[first] != types[timecnt - 2 + ((first ^ timecnt) & 1)])
+ break;
+ first++;
+
+ if (timecnt - first >= 10 && types[timecnt - 1] != types[timecnt - 2])
+ {
+ GregorianCalendar cal
+ = new GregorianCalendar(new SimpleTimeZone(0, "GMT"));
+
+ int[] values = new int[2 * 11];
+ int i;
+ for (i = timecnt - 1; i >= first; i--)
+ {
+ int base = (i % 2) * 11;
+ int offset = offsets[types[i > first ? i - 1 : i + 1]];
+ cal.setTimeInMillis((times[i] + offset) * 1000);
+ if (i >= timecnt - 2)
+ {
+ values[base + 0] = cal.get(Calendar.YEAR);
+ values[base + 1] = cal.get(Calendar.MONTH);
+ values[base + 2] = cal.get(Calendar.DAY_OF_MONTH);
+ values[base + 3]
+ = cal.getActualMaximum(Calendar.DAY_OF_MONTH);
+ values[base + 4] = cal.get(Calendar.DAY_OF_WEEK);
+ values[base + 5] = cal.get(Calendar.HOUR_OF_DAY);
+ values[base + 6] = cal.get(Calendar.MINUTE);
+ values[base + 7] = cal.get(Calendar.SECOND);
+ values[base + 8] = values[base + 2]; // Range start
+ values[base + 9] = values[base + 2]; // Range end
+ values[base + 10] = 0; // Determined type
+ }
+ else
+ {
+ int year = cal.get(Calendar.YEAR);
+ int month = cal.get(Calendar.MONTH);
+ int day_of_month = cal.get(Calendar.DAY_OF_MONTH);
+ int month_days
+ = cal.getActualMaximum(Calendar.DAY_OF_MONTH);
+ int day_of_week = cal.get(Calendar.DAY_OF_WEEK);
+ int hour = cal.get(Calendar.HOUR_OF_DAY);
+ int minute = cal.get(Calendar.MINUTE);
+ int second = cal.get(Calendar.SECOND);
+ if (year != values[base + 0] - 1
+ || month != values[base + 1]
+ || hour != values[base + 5]
+ || minute != values[base + 6]
+ || second != values[base + 7])
+ break;
+ if (day_of_week == values[base + 4])
+ {
+ // Either a Sun>=8 or lastSun rule.
+ if (day_of_month < values[base + 8])
+ values[base + 8] = day_of_month;
+ if (day_of_month > values[base + 9])
+ values[base + 9] = day_of_month;
+ if (values[base + 10] < 0)
+ break;
+ if (values[base + 10] == 0)
+ {
+ values[base + 10] = 1;
+ // If day of month > 28, this is
+ // certainly lastSun rule.
+ if (values[base + 2] > 28)
+ values[base + 2] = 3;
+ // If day of month isn't in the last
+ // week, it can't be lastSun rule.
+ else if (values[base + 2]
+ <= values[base + 3] - 7)
+ values[base + 3] = 2;
+ }
+ if (values[base + 10] == 1)
+ {
+ // If day of month is > 28, this is
+ // certainly lastSun rule.
+ if (day_of_month > 28)
+ values[base + 10] = 3;
+ // If day of month isn't in the last
+ // week, it can't be lastSun rule.
+ else if (day_of_month <= month_days - 7)
+ values[base + 10] = 2;
+ }
+ else if ((values[base + 10] == 2
+ && day_of_month > 28)
+ || (values[base + 10] == 3
+ && day_of_month <= month_days - 7))
+ break;
+ }
+ else
+ {
+ // Must be fixed day in month rule.
+ if (day_of_month != values[base + 2]
+ || values[base + 10] > 0)
+ break;
+ values[base + 4] = day_of_week;
+ values[base + 10] = -1;
+ }
+ values[base + 0] -= 1;
+ }
+ }
+
+ if (i < first)
+ {
+ for (i = 0; i < 2; i++)
+ {
+ int base = 11 * i;
+ if (values[base + 10] == 0)
+ continue;
+ if (values[base + 10] == -1)
+ {
+ int[] dayCount
+ = { 0, 31, 59, 90, 120, 151,
+ 181, 212, 243, 273, 304, 334 };
+ int d = dayCount[values[base + 1]
+ - Calendar.JANUARY];
+ d += values[base + 2];
+ change_spec[i] = ",J" + Integer.toString(d);
+ }
+ else if (values[base + 10] == 2)
+ {
+ // If we haven't seen all days of the week,
+ // we can't be sure what the rule really is.
+ if (values[base + 8] + 6 != values[base + 9])
+ continue;
+
+ int d;
+ d = values[base + 1] - Calendar.JANUARY + 1;
+ // E.g. Sun >= 5 is not representable in POSIX
+ // TZ env string, use ",Am.n.d" extension
+ // where m is month 1 .. 12, n is the date on
+ // or after which it happens and d is day
+ // of the week, 0 .. 6. So Sun >= 5 in April
+ // is ",A4.5.0".
+ if ((values[base + 8] % 7) == 1)
+ {
+ change_spec[i] = ",M" + Integer.toString(d);
+ d = (values[base + 8] + 6) / 7;
+ }
+ else
+ {
+ change_spec[i] = ",A" + Integer.toString(d);
+ d = values[base + 8];
+ }
+ change_spec[i] += "." + Integer.toString(d);
+ d = values[base + 4] - Calendar.SUNDAY;
+ change_spec[i] += "." + Integer.toString(d);
+ }
+ else
+ {
+ // If we don't know whether this is lastSun or
+ // Sun >= 22 rule. That can be either because
+ // there was insufficient number of
+ // transitions, or February, where it is quite
+ // probable we haven't seen any 29th dates.
+ // For February, assume lastSun rule, otherwise
+ // punt.
+ if (values[base + 10] == 1
+ && values[base + 1] != Calendar.FEBRUARY)
+ continue;
+
+ int d;
+ d = values[base + 1] - Calendar.JANUARY + 1;
+ change_spec[i] = ",M" + Integer.toString(d);
+ d = values[base + 4] - Calendar.SUNDAY;
+ change_spec[i] += ".5." + Integer.toString(d);
+ }
+
+ // Don't add time specification if time is
+ // 02:00:00.
+ if (values[base + 5] != 2
+ || values[base + 6] != 0
+ || values[base + 7] != 0)
+ {
+ int d = values[base + 5];
+ change_spec[i] += "/" + Integer.toString(d);
+ if (values[base + 6] != 0 || values[base + 7] != 0)
+ {
+ d = values[base + 6];
+ if (d < 10)
+ change_spec[i]
+ += ":0" + Integer.toString(d);
+ else
+ change_spec[i] += ":" + Integer.toString(d);
+ d = values[base + 7];
+ if (d >= 10)
+ change_spec[i]
+ += ":" + Integer.toString(d);
+ else if (d > 0)
+ change_spec[i]
+ += ":0" + Integer.toString(d);
+ }
+ }
+ }
+ if (types[(timecnt - 1) & -2] == std_ind)
+ {
+ String tmp = change_spec[0];
+ change_spec[0] = change_spec[1];
+ change_spec[1] = tmp;
+ }
+ }
+ }
+ }
+
+ if (tzstr == null)
+ {
+ tzstr = std_zonename + std_offset_string;
+ if (change_spec[0] != null && change_spec[1] != null)
+ tzstr += dst_zonename + dst_offset_string
+ + change_spec[0] + change_spec[1];
+ }
+
+ if (timecnt == 0)
+ return new SimpleTimeZone(offsets[std_ind] * 1000,
+ id != null ? id : tzstr);
+
+ SimpleTimeZone endRule = createLastRule(tzstr);
+ if (endRule == null)
+ return null;
+
+ /* Finally adjust the times array into the form the constructor
+ * expects. times[0] is special, the offset and DST flag there
+ * are for all times before that transition. Use the first non-DST
+ * type. For all other transitions, the data file has the type
+ * (<offset, isdst, zonename>) for the time interval starting
+ */
+ for (int i = 0; i < typecnt; i++)
+ if ((typeflags[i] & (1 << 8)) == 0)
+ {
+ times[0] = (times[0] << SECS_SHIFT) | (offsets[i] & OFFSET_MASK);
+ break;
+ }
+
+ for (int i = 1; i < timecnt; i++)
+ times[i] = (times[i] << SECS_SHIFT)
+ | (offsets[types[i - 1]] & OFFSET_MASK)
+ | ((typeflags[types[i - 1]] & (1 << 8)) != 0 ? IS_DST : 0);
+
+ return new ZoneInfo(offsets[std_ind] * 1000, id != null ? id : tzstr,
+ times, endRule);
}
catch (IOException ioe)
{
- // Parse error, not a proper tzfile.
- return null;
+ // Parse error, not a proper tzfile.
+ return null;
}
finally
{
- try
- {
- if (dis != null)
- dis.close();
- }
- catch(IOException ioe)
- {
- // Error while close, nothing we can do.
- }
+ try
+ {
+ if (dis != null)
+ dis.close();
+ }
+ catch(IOException ioe)
+ {
+ // Error while close, nothing we can do.
+ }
}
}
@@ -865,10 +865,10 @@ public class ZoneInfo extends TimeZone
{
while (l > 0)
{
- long k = is.skip(l);
- if (k <= 0)
- throw new EOFException();
- l -= k;
+ long k = is.skip(l);
+ if (k <= 0)
+ throw new EOFException();
+ l -= k;
}
}
@@ -887,146 +887,146 @@ public class ZoneInfo extends TimeZone
int dstOffs;
try
{
- int idLength = tzstr.length();
-
- int index = 0;
- int prevIndex;
- char c;
-
- // get std
- do
- c = tzstr.charAt(index);
- while (c != '+' && c != '-' && c != ',' && c != ':'
- && ! Character.isDigit(c) && c != '\0' && ++index < idLength);
-
- if (index >= idLength)
- return new SimpleTimeZone(0, tzstr);
-
- stdName = tzstr.substring(0, index);
- prevIndex = index;
-
- // get the std offset
- do
- c = tzstr.charAt(index++);
- while ((c == '-' || c == '+' || c == ':' || Character.isDigit(c))
- && index < idLength);
- if (index < idLength)
- index--;
-
- { // convert the dst string to a millis number
- String offset = tzstr.substring(prevIndex, index);
- prevIndex = index;
-
- if (offset.charAt(0) == '+' || offset.charAt(0) == '-')
- stdOffs = parseTime(offset.substring(1));
- else
- stdOffs = parseTime(offset);
-
- if (offset.charAt(0) == '-')
- stdOffs = -stdOffs;
-
- // TZ timezone offsets are positive when WEST of the meridian.
- stdOffs = -stdOffs;
- }
-
- // Done yet? (Format: std offset)
- if (index >= idLength)
- return new SimpleTimeZone(stdOffs, stdName);
-
- // get dst
- do
- c = tzstr.charAt(index);
- while (c != '+' && c != '-' && c != ',' && c != ':'
- && ! Character.isDigit(c) && c != '\0' && ++index < idLength);
-
- // Done yet? (Format: std offset dst)
- if (index >= idLength)
- return new SimpleTimeZone(stdOffs, stdName);
-
- // get the dst offset
- prevIndex = index;
- do
- c = tzstr.charAt(index++);
- while ((c == '-' || c == '+' || c == ':' || Character.isDigit(c))
- && index < idLength);
- if (index < idLength)
- index--;
-
- if (index == prevIndex && (c == ',' || c == ';'))
- {
- // Missing dst offset defaults to one hour ahead of standard
- // time.
- dstOffs = stdOffs + 60 * 60 * 1000;
- }
- else
- { // convert the dst string to a millis number
- String offset = tzstr.substring(prevIndex, index);
- prevIndex = index;
-
- if (offset.charAt(0) == '+' || offset.charAt(0) == '-')
- dstOffs = parseTime(offset.substring(1));
- else
- dstOffs = parseTime(offset);
-
- if (offset.charAt(0) == '-')
- dstOffs = -dstOffs;
-
- // TZ timezone offsets are positive when WEST of the meridian.
- dstOffs = -dstOffs;
- }
-
- // Done yet? (Format: std offset dst offset)
- if (index >= idLength)
- return new SimpleTimeZone(stdOffs, stdName);
-
- // get the DST rule
- if (tzstr.charAt(index) == ','
- || tzstr.charAt(index) == ';')
- {
- index++;
- int offs = index;
- while (tzstr.charAt(index) != ','
- && tzstr.charAt(index) != ';')
- index++;
- String startTime = tzstr.substring(offs, index);
- index++;
- String endTime = tzstr.substring(index);
-
- index = startTime.indexOf('/');
- int startMillis;
- int endMillis;
- String startDate;
- String endDate;
- if (index != -1)
- {
- startDate = startTime.substring(0, index);
- startMillis = parseTime(startTime.substring(index + 1));
- }
- else
- {
- startDate = startTime;
- // if time isn't given, default to 2:00:00 AM.
- startMillis = 2 * 60 * 60 * 1000;
- }
- index = endTime.indexOf('/');
- if (index != -1)
- {
- endDate = endTime.substring(0, index);
- endMillis = parseTime(endTime.substring(index + 1));
- }
- else
- {
- endDate = endTime;
- // if time isn't given, default to 2:00:00 AM.
- endMillis = 2 * 60 * 60 * 1000;
- }
-
- int[] start = getDateParams(startDate);
- int[] end = getDateParams(endDate);
- return new SimpleTimeZone(stdOffs, tzstr, start[0], start[1],
- start[2], startMillis, end[0], end[1],
- end[2], endMillis, (dstOffs - stdOffs));
- }
+ int idLength = tzstr.length();
+
+ int index = 0;
+ int prevIndex;
+ char c;
+
+ // get std
+ do
+ c = tzstr.charAt(index);
+ while (c != '+' && c != '-' && c != ',' && c != ':'
+ && ! Character.isDigit(c) && c != '\0' && ++index < idLength);
+
+ if (index >= idLength)
+ return new SimpleTimeZone(0, tzstr);
+
+ stdName = tzstr.substring(0, index);
+ prevIndex = index;
+
+ // get the std offset
+ do
+ c = tzstr.charAt(index++);
+ while ((c == '-' || c == '+' || c == ':' || Character.isDigit(c))
+ && index < idLength);
+ if (index < idLength)
+ index--;
+
+ { // convert the dst string to a millis number
+ String offset = tzstr.substring(prevIndex, index);
+ prevIndex = index;
+
+ if (offset.charAt(0) == '+' || offset.charAt(0) == '-')
+ stdOffs = parseTime(offset.substring(1));
+ else
+ stdOffs = parseTime(offset);
+
+ if (offset.charAt(0) == '-')
+ stdOffs = -stdOffs;
+
+ // TZ timezone offsets are positive when WEST of the meridian.
+ stdOffs = -stdOffs;
+ }
+
+ // Done yet? (Format: std offset)
+ if (index >= idLength)
+ return new SimpleTimeZone(stdOffs, stdName);
+
+ // get dst
+ do
+ c = tzstr.charAt(index);
+ while (c != '+' && c != '-' && c != ',' && c != ':'
+ && ! Character.isDigit(c) && c != '\0' && ++index < idLength);
+
+ // Done yet? (Format: std offset dst)
+ if (index >= idLength)
+ return new SimpleTimeZone(stdOffs, stdName);
+
+ // get the dst offset
+ prevIndex = index;
+ do
+ c = tzstr.charAt(index++);
+ while ((c == '-' || c == '+' || c == ':' || Character.isDigit(c))
+ && index < idLength);
+ if (index < idLength)
+ index--;
+
+ if (index == prevIndex && (c == ',' || c == ';'))
+ {
+ // Missing dst offset defaults to one hour ahead of standard
+ // time.
+ dstOffs = stdOffs + 60 * 60 * 1000;
+ }
+ else
+ { // convert the dst string to a millis number
+ String offset = tzstr.substring(prevIndex, index);
+ prevIndex = index;
+
+ if (offset.charAt(0) == '+' || offset.charAt(0) == '-')
+ dstOffs = parseTime(offset.substring(1));
+ else
+ dstOffs = parseTime(offset);
+
+ if (offset.charAt(0) == '-')
+ dstOffs = -dstOffs;
+
+ // TZ timezone offsets are positive when WEST of the meridian.
+ dstOffs = -dstOffs;
+ }
+
+ // Done yet? (Format: std offset dst offset)
+ if (index >= idLength)
+ return new SimpleTimeZone(stdOffs, stdName);
+
+ // get the DST rule
+ if (tzstr.charAt(index) == ','
+ || tzstr.charAt(index) == ';')
+ {
+ index++;
+ int offs = index;
+ while (tzstr.charAt(index) != ','
+ && tzstr.charAt(index) != ';')
+ index++;
+ String startTime = tzstr.substring(offs, index);
+ index++;
+ String endTime = tzstr.substring(index);
+
+ index = startTime.indexOf('/');
+ int startMillis;
+ int endMillis;
+ String startDate;
+ String endDate;
+ if (index != -1)
+ {
+ startDate = startTime.substring(0, index);
+ startMillis = parseTime(startTime.substring(index + 1));
+ }
+ else
+ {
+ startDate = startTime;
+ // if time isn't given, default to 2:00:00 AM.
+ startMillis = 2 * 60 * 60 * 1000;
+ }
+ index = endTime.indexOf('/');
+ if (index != -1)
+ {
+ endDate = endTime.substring(0, index);
+ endMillis = parseTime(endTime.substring(index + 1));
+ }
+ else
+ {
+ endDate = endTime;
+ // if time isn't given, default to 2:00:00 AM.
+ endMillis = 2 * 60 * 60 * 1000;
+ }
+
+ int[] start = getDateParams(startDate);
+ int[] end = getDateParams(endDate);
+ return new SimpleTimeZone(stdOffs, tzstr, start[0], start[1],
+ start[2], startMillis, end[0], end[1],
+ end[2], endMillis, (dstOffs - stdOffs));
+ }
}
catch (IndexOutOfBoundsException _)
@@ -1057,44 +1057,44 @@ public class ZoneInfo extends TimeZone
if (type > 0)
{
- int day;
-
- // Month, week of month, day of week
- // "Mm.w.d". d is between 0 (Sunday) and 6. Week w is
- // between 1 and 5; Week 1 is the first week in which day d
- // occurs and Week 5 specifies the last d day in the month.
- // Month m is between 1 and 12.
-
- // Month, day of month, day of week
- // ZoneInfo extension, not in POSIX
- // "Am.n.d". d is between 0 (Sunday) and 6. Day of month n is
- // between 1 and 25. Month m is between 1 and 12.
-
- month = Integer.parseInt(date.substring(1, date.indexOf('.')));
- int week = Integer.parseInt(date.substring(date.indexOf('.') + 1,
- date.lastIndexOf('.')));
- int dayOfWeek = Integer.parseInt(date.substring(date.lastIndexOf('.')
- + 1));
- dayOfWeek++; // Java day of week is one-based, Sunday is first day.
-
- if (type == 2)
- {
- day = week;
- dayOfWeek = -dayOfWeek;
- }
- else if (week == 5)
- day = -1; // last day of month is -1 in java, 5 in TZ
- else
- {
- // First day of week starting on or after. For example,
- // to specify the second Sunday of April, set month to
- // APRIL, day-of-month to 8, and day-of-week to -SUNDAY.
- day = (week - 1) * 7 + 1;
- dayOfWeek = -dayOfWeek;
- }
-
- month--; // Java month is zero-based.
- return new int[] { month, day, dayOfWeek };
+ int day;
+
+ // Month, week of month, day of week
+ // "Mm.w.d". d is between 0 (Sunday) and 6. Week w is
+ // between 1 and 5; Week 1 is the first week in which day d
+ // occurs and Week 5 specifies the last d day in the month.
+ // Month m is between 1 and 12.
+
+ // Month, day of month, day of week
+ // ZoneInfo extension, not in POSIX
+ // "Am.n.d". d is between 0 (Sunday) and 6. Day of month n is
+ // between 1 and 25. Month m is between 1 and 12.
+
+ month = Integer.parseInt(date.substring(1, date.indexOf('.')));
+ int week = Integer.parseInt(date.substring(date.indexOf('.') + 1,
+ date.lastIndexOf('.')));
+ int dayOfWeek = Integer.parseInt(date.substring(date.lastIndexOf('.')
+ + 1));
+ dayOfWeek++; // Java day of week is one-based, Sunday is first day.
+
+ if (type == 2)
+ {
+ day = week;
+ dayOfWeek = -dayOfWeek;
+ }
+ else if (week == 5)
+ day = -1; // last day of month is -1 in java, 5 in TZ
+ else
+ {
+ // First day of week starting on or after. For example,
+ // to specify the second Sunday of April, set month to
+ // APRIL, day-of-month to 8, and day-of-week to -SUNDAY.
+ day = (week - 1) * 7 + 1;
+ dayOfWeek = -dayOfWeek;
+ }
+
+ month--; // Java month is zero-based.
+ return new int[] { month, day, dayOfWeek };
}
// julian day, either zero-based 0<=n<=365 (incl feb 29)
@@ -1103,13 +1103,13 @@ public class ZoneInfo extends TimeZone
if (date.charAt(0) != 'J' || date.charAt(0) != 'j')
{
- julianDay = Integer.parseInt(date.substring(1));
- julianDay++; // make 1-based
- // Adjust day count to include feb 29.
- dayCount = new int[]
- {
- 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335
- };
+ julianDay = Integer.parseInt(date.substring(1));
+ julianDay++; // make 1-based
+ // Adjust day count to include feb 29.
+ dayCount = new int[]
+ {
+ 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335
+ };
}
else
// 1-based julian day
@@ -1118,9 +1118,9 @@ public class ZoneInfo extends TimeZone
int i = 11;
while (i > 0)
if (dayCount[i] < julianDay)
- break;
+ break;
else
- i--;
+ i--;
julianDay -= dayCount[i];
month = i;
return new int[] { month, julianDay, 0 };
@@ -1137,9 +1137,9 @@ public class ZoneInfo extends TimeZone
while (i < time.length())
if (time.charAt(i) == ':')
- break;
+ break;
else
- i++;
+ i++;
millis = 60 * 60 * 1000 * Integer.parseInt(time.substring(0, i));
if (i >= time.length())
return millis;
@@ -1147,9 +1147,9 @@ public class ZoneInfo extends TimeZone
int iprev = ++i;
while (i < time.length())
if (time.charAt(i) == ':')
- break;
+ break;
else
- i++;
+ i++;
millis += 60 * 1000 * Integer.parseInt(time.substring(iprev, i));
if (i >= time.length())
return millis;
diff --git a/gnu/java/util/jar/JarUtils.java b/gnu/java/util/jar/JarUtils.java
index c35daec55..eb6a89e61 100644
--- a/gnu/java/util/jar/JarUtils.java
+++ b/gnu/java/util/jar/JarUtils.java
@@ -70,7 +70,7 @@ public abstract class JarUtils
/**
* The original string representation of the manifest version attribute name.
- */
+ */
public static final String MANIFEST_VERSION = "Manifest-Version";
/**
@@ -378,20 +378,20 @@ public abstract class JarUtils
* The basic method for writing <code>Mainfest</code> attributes. This
* implementation respects the rule stated in the Jar Specification concerning
* the maximum allowed line length; i.e.
- *
+ *
* <pre>
* No line may be longer than 72 bytes (not characters), in its UTF8-encoded
* form. If a value would make the initial line longer than this, it should
* be continued on extra lines (each starting with a single SPACE).
* </pre>
- *
+ *
* and
- *
+ *
* <pre>
* Because header names cannot be continued, the maximum length of a header
* name is 70 bytes (there must be a colon and a SPACE after the name).
* </pre>
- *
+ *
* @param name the name of the attribute.
* @param value the value of the attribute.
* @param out the output stream to write the attribute's name/value pair to.
diff --git a/gnu/java/util/prefs/FileBasedFactory.java b/gnu/java/util/prefs/FileBasedFactory.java
index e5f24efa3..91ea861c4 100644
--- a/gnu/java/util/prefs/FileBasedFactory.java
+++ b/gnu/java/util/prefs/FileBasedFactory.java
@@ -7,7 +7,7 @@ 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
diff --git a/gnu/java/util/prefs/FileBasedPreferences.java b/gnu/java/util/prefs/FileBasedPreferences.java
index f7566dddd..f89ed6be2 100644
--- a/gnu/java/util/prefs/FileBasedPreferences.java
+++ b/gnu/java/util/prefs/FileBasedPreferences.java
@@ -57,7 +57,7 @@ import java.util.prefs.BackingStoreException;
* beneath the user's home directory. The preferences for the node are
* stored in a single properties file in that directory. Sub-nodes are
* stored in subdirectories. This implementation uses file locking to
- * mediate access to the properties files.
+ * mediate access to the properties files.
*/
public class FileBasedPreferences
extends AbstractPreferences
@@ -217,7 +217,7 @@ public class FileBasedPreferences
{
// Write the underlying file.
directory.mkdirs();
-
+
FileOutputStream fos = null;
FileLock lock = null;
try
diff --git a/gnu/java/util/prefs/GConfBasedFactory.java b/gnu/java/util/prefs/GConfBasedFactory.java
index ae734b609..f5a189471 100644
--- a/gnu/java/util/prefs/GConfBasedFactory.java
+++ b/gnu/java/util/prefs/GConfBasedFactory.java
@@ -43,7 +43,7 @@ import java.util.prefs.PreferencesFactory;
/**
* Factory object that generates a Preferences nodes that are read from a GConf
* daemon.
- *
+ *
* @author Mario Torre <neugens@limasoftware.net>
*/
public class GConfBasedFactory implements PreferencesFactory
@@ -58,7 +58,7 @@ public class GConfBasedFactory implements PreferencesFactory
/**
* Returns the system root preference node.
- *
+ *
* @see java.util.prefs.PreferencesFactory#systemRoot()
*/
public Preferences systemRoot()
@@ -68,7 +68,7 @@ public class GConfBasedFactory implements PreferencesFactory
/**
* Returns the user root preference node corresponding to the calling user.
- *
+ *
* @see java.util.prefs.PreferencesFactory#userRoot()
*/
public Preferences userRoot()
diff --git a/gnu/java/util/prefs/GConfBasedPreferences.java b/gnu/java/util/prefs/GConfBasedPreferences.java
index c26fe63c9..e3374eee9 100644
--- a/gnu/java/util/prefs/GConfBasedPreferences.java
+++ b/gnu/java/util/prefs/GConfBasedPreferences.java
@@ -54,22 +54,22 @@ import java.util.prefs.BackingStoreException;
* <br />
* User Root:<br />
* <br />
- *
+ *
* <pre>
* gnu.java.util.prefs.gconf.user_root
* </pre>
- *
+ *
* <br />
* <br />
* and System Root:<br />
* <br />
- *
+ *
* <pre>
* gnu.java.util.prefs.gconf.system_root
* </pre>
- *
+ *
* <br />
- *
+ *
* @author Mario Torre <neugens@limasoftware.net>
*/
public class GConfBasedPreferences
@@ -115,7 +115,7 @@ public class GConfBasedPreferences
* Creates a new preference node given a parent node and a name, which has to
* be relative to its parent. When <code>isUser</code> is true it will be user
* node otherwise it will be a system node.
- *
+ *
* @param parent The parent node of this newly created node.
* @param name A name relative to the parent node.
* @param isUser Set to <code>true</code> initializes this node to be
@@ -142,7 +142,7 @@ public class GConfBasedPreferences
absolutePath = absolutePath.substring(0, index + 1);
absolutePath = absolutePath + GConfNativePeer.escapeString(name);
}
-
+
this.node = this.getRealRoot(isUser) + absolutePath;
boolean nodeExist = backend.nodeExist(this.node);
@@ -153,7 +153,7 @@ public class GConfBasedPreferences
/**
* Returns a child node with the given name.
* If the child node does not exists, it will be created.
- *
+ *
* @param name The name of the requested node.
* @return A new reference to the node, creating the node if it is necessary.
*/
@@ -162,10 +162,10 @@ public class GConfBasedPreferences
// we don't check anything here, if the node is a new node this will be
// detected in the constructor, so we simply return a new reference to
// the requested node.
-
+
GConfBasedPreferences preferenceNode
= new GConfBasedPreferences(this, name, this.isUser);
-
+
return preferenceNode;
}
@@ -173,7 +173,7 @@ public class GConfBasedPreferences
* Returns an array of names of the children of this preference node.
* If the current node does not have children, the returned array will be
* of <code>size</code> 0 (that is, not <code>null</code>).
- *
+ *
* @return A <code>String</code> array of names of children of the current
* node.
* @throws BackingStoreException if this operation cannot be completed.
@@ -192,7 +192,7 @@ public class GConfBasedPreferences
* GConf handles this for us asynchronously. More over, both sync and flush
* have the same meaning in this class, so calling sync has exactly the same
* effect.
- *
+ *
* @see #sync
* @throws BackingStoreException if this operation cannot be completed.
*/
@@ -203,7 +203,7 @@ public class GConfBasedPreferences
/**
* Request a flush.
- *
+ *
* @see #flush
* @throws BackingStoreException if this operation cannot be completed.
*/
@@ -216,7 +216,7 @@ public class GConfBasedPreferences
* Returns all of the key in this preference node.
* If the current node does not have preferences, the returned array will be
* of size zero.
- *
+ *
* @return A <code>String</code> array of keys stored under the current
* node.
* @throws BackingStoreException if this operation cannot be completed.
@@ -233,7 +233,7 @@ public class GConfBasedPreferences
/**
* Does a recursive postorder traversal of the preference tree, starting from
* the given directory invalidating every preference found in the node.
- *
+ *
* @param directory The name of the starting directory (node)
*/
private void postorderRemove(String directory)
@@ -271,7 +271,7 @@ public class GConfBasedPreferences
/**
* Stores the given key-value pair into this preference node.
- *
+ *
* @param key The key of this preference.
* @param value The value of this preference.
*/
@@ -293,7 +293,7 @@ public class GConfBasedPreferences
/**
* Removes the given key from this preference node.
* If the key does not exist, no operation is performed.
- *
+ *
* @param key The key to remove.
*/
protected void removeSpi(String key)
@@ -305,7 +305,7 @@ public class GConfBasedPreferences
* Suggest a sync to the backend. Actually, this is only a suggestion as GConf
* handles this for us asynchronously. More over, both sync and flush have the
* same meaning in this class, so calling flush has exactly the same effect.
- *
+ *
* @see #flush
* @throws BackingStoreException if this operation cannot be completed due to
* a failure in the backing store, or inability to communicate with
@@ -318,7 +318,7 @@ public class GConfBasedPreferences
/**
* Request a sync.
- *
+ *
* @see #sync
* @throws BackingStoreException if this operation cannot be completed due to
* a failure in the backing store, or inability to communicate with
@@ -333,7 +333,7 @@ public class GConfBasedPreferences
* Returns the value of the given key.
* If the keys does not have a value, or there is an error in the backing
* store, <code>null</code> is returned instead.
- *
+ *
* @param key The key to retrieve.
* @return The value associated with the given key.
*/
@@ -345,7 +345,7 @@ public class GConfBasedPreferences
/**
* Returns <code>true</code> if this preference node is a user node,
* <code>false</code> if is a system preference node.
- *
+ *
* @return <code>true</code> if this preference node is a user node,
* <code>false</code> if is a system preference node.
*/
@@ -360,18 +360,18 @@ public class GConfBasedPreferences
/**
* Builds a GConf key string suitable for operations on the backend.
- *
+ *
* @param key The key to convert into a valid GConf key.
* @return A valid Gconf key.
*/
private String getGConfKey(String key)
{
String nodeName = "";
-
+
// strip key
// please, note that all names are unescaped into the native peer
key = GConfNativePeer.escapeString(key);
-
+
if (this.node.endsWith("/"))
{
nodeName = this.node + key;
@@ -380,13 +380,13 @@ public class GConfBasedPreferences
{
nodeName = this.node + "/" + key;
}
-
+
return nodeName;
}
/**
* Builds the root node to use for this preference.
- *
+ *
* @param isUser Defines if this node is a user (<code>true</code>) or system
* (<code>false</code>) node.
* @return The real root of this preference tree.
diff --git a/gnu/java/util/prefs/MemoryBasedFactory.java b/gnu/java/util/prefs/MemoryBasedFactory.java
index 275b8796e..32ed12fc7 100644
--- a/gnu/java/util/prefs/MemoryBasedFactory.java
+++ b/gnu/java/util/prefs/MemoryBasedFactory.java
@@ -7,7 +7,7 @@ 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
diff --git a/gnu/java/util/prefs/MemoryBasedPreferences.java b/gnu/java/util/prefs/MemoryBasedPreferences.java
index dc8237916..ee184d182 100644
--- a/gnu/java/util/prefs/MemoryBasedPreferences.java
+++ b/gnu/java/util/prefs/MemoryBasedPreferences.java
@@ -7,7 +7,7 @@ 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
diff --git a/gnu/java/util/prefs/NodeReader.java b/gnu/java/util/prefs/NodeReader.java
index ae5510e1c..0a49fc777 100644
--- a/gnu/java/util/prefs/NodeReader.java
+++ b/gnu/java/util/prefs/NodeReader.java
@@ -7,7 +7,7 @@ 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
@@ -128,7 +128,7 @@ public class NodeReader {
readNodes(subnode);
skipTill("</node>");
}
-
+
}
private void readMap(Preferences node)
@@ -169,7 +169,7 @@ public class NodeReader {
while(true) {
if (line == null)
throw new InvalidPreferencesFormatException(s + " not found");
-
+
int index = line.indexOf(s);
if (index == -1) {
line = br.readLine();
@@ -199,7 +199,7 @@ public class NodeReader {
while(true) {
if (line == null)
throw new InvalidPreferencesFormatException("unexpected EOF");
-
+
int start = line.indexOf("<");
if (start == -1) {
line = br.readLine();
diff --git a/gnu/java/util/prefs/NodeWriter.java b/gnu/java/util/prefs/NodeWriter.java
index d3c095351..3e4f972ed 100644
--- a/gnu/java/util/prefs/NodeWriter.java
+++ b/gnu/java/util/prefs/NodeWriter.java
@@ -7,7 +7,7 @@ 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
@@ -271,7 +271,7 @@ public class NodeWriter {
}
}
- private void writeMap(Preferences node, int indent)
+ private void writeMap(Preferences node, int indent)
throws BackingStoreException, IOException
{
// construct String used for indentation
diff --git a/gnu/java/util/prefs/gconf/GConfNativePeer.java b/gnu/java/util/prefs/gconf/GConfNativePeer.java
index 3c0291959..64fc0498a 100644
--- a/gnu/java/util/prefs/gconf/GConfNativePeer.java
+++ b/gnu/java/util/prefs/gconf/GConfNativePeer.java
@@ -43,7 +43,7 @@ import java.util.prefs.BackingStoreException;
/**
* Native peer for GConf based preference backend.
- *
+ *
* @author Mario Torre <neugens@limasoftware.net>
*/
public final class GConfNativePeer
@@ -59,7 +59,7 @@ public final class GConfNativePeer
/**
* Queries whether the node <code>node</code> exists in theGConf database.
* Returns <code>true</code> or <code>false</code>.
- *
+ *
* @param node the node to check.
*/
public boolean nodeExist(String node)
@@ -72,7 +72,7 @@ public final class GConfNativePeer
* exist before (ie it was unset or it only had a default value).
* Key names must be valid GConf key names, that is, there can be more
* restrictions than for normal Preference Backend.
- *
+ *
* @param key the key to alter (or add).
* @param value the new value for this key.
* @return true if the key was updated, false otherwise.
@@ -86,7 +86,7 @@ public final class GConfNativePeer
* Unsets the value of key; if key is already unset, has no effect. Depending
* on the GConf daemon, unsetting a key may have the side effect to remove it
* completely form the database.
- *
+ *
* @param key the key to unset.
* @return true on success, false if the key was not updated.
*/
@@ -97,7 +97,7 @@ public final class GConfNativePeer
/**
* Gets the value of a configuration key.
- *
+ *
* @param key the configuration key.
* @return the values of this key, null if the key is not valid.
*/
@@ -110,7 +110,7 @@ public final class GConfNativePeer
* Lists the key in the given node. Does not list subnodes. Keys names are the
* stripped names (name relative to the current node) of the keys stored in
* this node.
- *
+ *
* @param node the node where keys are stored.
* @return a java.util.List of keys. If there are no keys in the given node, a
* list of size 0 is returned.
@@ -123,7 +123,7 @@ public final class GConfNativePeer
/**
* Lists the subnodes in <code>node</code>. The returned list contains
* allocated strings. Each string is the name relative tho the given node.
- *
+ *
* @param node the node to get subnodes from. If there are no subnodes in the
* given node, a list of size 0 is returned.
*/
@@ -139,7 +139,7 @@ public final class GConfNativePeer
{
return gconf_escape_key(plain);
}
-
+
/**
* Unescape a string escaped with {@link #escapeString}.
*/
@@ -147,7 +147,7 @@ public final class GConfNativePeer
{
return gconf_unescape_key(escaped);
}
-
+
/**
* Suggest to the backend GConf daemon to synch with the database.
*/
@@ -155,7 +155,7 @@ public final class GConfNativePeer
{
gconf_suggest_sync();
}
-
+
protected void finalize() throws Throwable
{
try
@@ -181,7 +181,7 @@ public final class GConfNativePeer
* It is meant to be used by the static initializer.
*/
native synchronized static final private void init_id_cache();
-
+
/**
* Initialize the GConf native peer. This is meant to be used by the
* class constructor.
@@ -196,7 +196,7 @@ public final class GConfNativePeer
/**
* Queries the GConf database to see if the given node exists, returning
* true if the node exist, false otherwise.
- *
+ *
* @param node the node to query for existence.
* @return true if the node exist, false otherwise.
*/
@@ -206,7 +206,7 @@ public final class GConfNativePeer
/**
* Sets the given key/value pair into the GConf database.
* The key must be a valid GConf key.
- *
+ *
* @param key the key to store in the GConf database
* @param value the value to associate to the given key.
* @return true if the change has effect, false otherwise.
@@ -217,7 +217,7 @@ public final class GConfNativePeer
/**
* Returns the key associated to the given key. Null is returned if the
* key is not valid.
- *
+ *
* @param key the key to return the value of.
* @return The value associated to the given key, or null.
*/
@@ -226,7 +226,7 @@ public final class GConfNativePeer
/**
* Usets the given key, removing the key from the database.
- *
+ *
* @param key the key to remove.
* @return true if the operation success, false otherwise.
*/
@@ -238,46 +238,46 @@ public final class GConfNativePeer
*/
native synchronized static final protected void gconf_suggest_sync()
throws BackingStoreException;
-
+
/**
* Returns a list of all nodes under the given node.
- *
+ *
* @param node the source node.
* @return A list of nodes under the given source node.
*/
native
static synchronized final protected List<String> gconf_all_nodes(String node)
throws BackingStoreException;
-
+
/**
* Returns a list of all keys stored in the given node.
- *
+ *
* @param node the source node.
* @return A list of all keys stored in the given node.
*/
- native synchronized
+ native synchronized
static final protected List<String> gconf_all_keys(String node)
throws BackingStoreException;
/**
* Escape the input String so that it's a valid element for GConf.
- *
+ *
* @param plain the String to escape.
* @return An escaped String for use with GConf.
*/
- native synchronized
+ native synchronized
static final protected String gconf_escape_key(String plain);
-
+
/**
* Converts a string escaped with gconf_escape_key back into its
* original form.
- *
- * @param escaped key as returned by gconf_escape_key
+ *
+ * @param escaped key as returned by gconf_escape_key
* @return An unescaped key.
*/
- native synchronized
+ native synchronized
static final protected String gconf_unescape_key(String escaped);
-
+
static
{
System.loadLibrary("gconfpeer");
diff --git a/gnu/java/util/regex/BacktrackStack.java b/gnu/java/util/regex/BacktrackStack.java
index 68472615e..b03fb8707 100644
--- a/gnu/java/util/regex/BacktrackStack.java
+++ b/gnu/java/util/regex/BacktrackStack.java
@@ -50,16 +50,16 @@ final class BacktrackStack
/** A set of data to be used for backtracking. */
static class Backtrack
{
- /** REToken to which to go back */
+ /** REToken to which to go back */
REToken token;
- /** CharIndexed on which matches are being searched for. */
+ /** CharIndexed on which matches are being searched for. */
CharIndexed input;
- /** REMatch to be used by the REToken token. */
+ /** REMatch to be used by the REToken token. */
REMatch match;
- /** Some parameter used by the token's backtrack method. */
+ /** Some parameter used by the token's backtrack method. */
Object param;
Backtrack (REToken token, CharIndexed input, REMatch match,
- Object param)
+ Object param)
{
this.token = token;
this.input = input;
@@ -104,7 +104,7 @@ final class BacktrackStack
{
for (int i = 0; i < size; i++)
{
- stack[i] = null;
+ stack[i] = null;
}
size = 0;
}
@@ -113,10 +113,10 @@ final class BacktrackStack
{
if (size >= capacity)
{
- capacity += CAPACITY_INCREMENT;
- Backtrack[]newStack = new Backtrack[capacity];
- System.arraycopy (stack, 0, newStack, 0, size);
- stack = newStack;
+ capacity += CAPACITY_INCREMENT;
+ Backtrack[]newStack = new Backtrack[capacity];
+ System.arraycopy (stack, 0, newStack, 0, size);
+ stack = newStack;
}
stack[size++] = bt;
}
diff --git a/gnu/java/util/regex/CharIndexed.java b/gnu/java/util/regex/CharIndexed.java
index 070547d7f..de4b1667f 100644
--- a/gnu/java/util/regex/CharIndexed.java
+++ b/gnu/java/util/regex/CharIndexed.java
@@ -82,7 +82,7 @@ public interface CharIndexed
* true if the new cursor position is valid or cursor position is at
* the end of input.
*/
- boolean move1 (int index); // I cannot think of a better name for this.
+ boolean move1 (int index); // I cannot think of a better name for this.
/**
* Returns true if the most recent move() operation placed the cursor
diff --git a/gnu/java/util/regex/CharIndexedInputStream.java b/gnu/java/util/regex/CharIndexedInputStream.java
index e42710b5d..d6340298a 100644
--- a/gnu/java/util/regex/CharIndexedInputStream.java
+++ b/gnu/java/util/regex/CharIndexedInputStream.java
@@ -45,7 +45,7 @@ import java.io.InputStream;
class CharIndexedInputStream implements CharIndexed
{
private static final int BUFFER_INCREMENT = 1024;
- private static final int UNKNOWN = Integer.MAX_VALUE; // value for end
+ private static final int UNKNOWN = Integer.MAX_VALUE; // value for end
private BufferedInputStream br;
@@ -78,22 +78,22 @@ class CharIndexedInputStream implements CharIndexed
{
if (end == 1)
return false;
- end--; // closer to end
+ end--; // closer to end
try
{
if (index != -1)
- {
- br.reset ();
- }
+ {
+ br.reset ();
+ }
int i = br.read ();
br.mark (bufsize);
if (i == -1)
- {
- end = 1;
- cached = OUT_OF_BOUNDS;
- return false;
- }
+ {
+ end = 1;
+ cached = OUT_OF_BOUNDS;
+ return false;
+ }
cached = (char) i;
index = 1;
} catch (IOException e)
@@ -109,62 +109,62 @@ class CharIndexedInputStream implements CharIndexed
{
if (index == 0)
{
- return cached;
+ return cached;
}
else if (index >= end)
{
- return OUT_OF_BOUNDS;
+ return OUT_OF_BOUNDS;
}
else if (index == -1)
{
- return lookBehind[0];
+ return lookBehind[0];
}
else if (index == -2)
{
- return lookBehind[1];
+ return lookBehind[1];
}
else if (index < -2)
{
- return OUT_OF_BOUNDS;
+ return OUT_OF_BOUNDS;
}
else if (index >= bufsize)
{
- // Allocate more space in the buffer.
- try
- {
- while (bufsize <= index)
- bufsize += BUFFER_INCREMENT;
- br.reset ();
- br.mark (bufsize);
- br.skip (index - 1);
- }
- catch (IOException e)
- {
- }
+ // Allocate more space in the buffer.
+ try
+ {
+ while (bufsize <= index)
+ bufsize += BUFFER_INCREMENT;
+ br.reset ();
+ br.mark (bufsize);
+ br.skip (index - 1);
+ }
+ catch (IOException e)
+ {
+ }
}
else if (this.index != index)
{
- try
- {
- br.reset ();
- br.skip (index - 1);
- }
- catch (IOException e)
- {
- }
+ try
+ {
+ br.reset ();
+ br.skip (index - 1);
+ }
+ catch (IOException e)
+ {
+ }
}
char ch = OUT_OF_BOUNDS;
try
{
int i = br.read ();
- this.index = index + 1; // this.index is index of next pos relative to charAt(0)
+ this.index = index + 1; // this.index is index of next pos relative to charAt(0)
if (i == -1)
- {
- // set flag that next should fail next time?
- end = index;
- return ch;
- }
+ {
+ // set flag that next should fail next time?
+ end = index;
+ return ch;
+ }
ch = (char) i;
} catch (IOException ie)
{
diff --git a/gnu/java/util/regex/RE.java b/gnu/java/util/regex/RE.java
index d064f7a35..5e9974a49 100644
--- a/gnu/java/util/regex/RE.java
+++ b/gnu/java/util/regex/RE.java
@@ -53,7 +53,7 @@ import java.util.ResourceBundle;
* expressions.
* <P>
* A regular expression object (class RE) is compiled by constructing it
- * from a String, StringBuffer or character array, with optional
+ * from a String, StringBuffer or character array, with optional
* compilation flags (below)
* and an optional syntax specification (see RESyntax; if not specified,
* <code>RESyntax.RE_SYNTAX_PERL5</code> is used).
@@ -110,7 +110,7 @@ import java.util.ResourceBundle;
* <P>
* You can optionally affect the execution environment by using a
* combination of execution flags (constants listed below).
- *
+ *
* <P>
* All operations on a regular expression are performed in a
* thread-safe manner.
@@ -281,7 +281,7 @@ public class RE extends REToken
{
if (messages == null)
messages =
- PropertyResourceBundle.getBundle (bundle, Locale.getDefault ());
+ PropertyResourceBundle.getBundle (bundle, Locale.getDefault ());
return messages.getString (key);
}
@@ -335,7 +335,7 @@ public class RE extends REToken
// internal constructor used for alternation
private RE (REToken first, REToken last, int subs, int subIndex,
- int minLength, int maxLength)
+ int minLength, int maxLength)
{
super (subIndex);
firstToken = first;
@@ -347,9 +347,9 @@ public class RE extends REToken
}
private RE (Object patternObj, int cflags, RESyntax syntax, int myIndex,
- int nextSub) throws REException
+ int nextSub) throws REException
{
- super (myIndex); // Subexpression index of this token.
+ super (myIndex); // Subexpression index of this token.
initialize (patternObj, cflags, syntax, myIndex, nextSub);
}
@@ -361,41 +361,41 @@ public class RE extends REToken
// The meat of construction
protected void initialize (Object patternObj, int cflags, RESyntax syntax,
- int myIndex, int nextSub) throws REException
+ int myIndex, int nextSub) throws REException
{
char[] pattern;
if (patternObj instanceof String)
{
- pattern = ((String) patternObj).toCharArray ();
+ pattern = ((String) patternObj).toCharArray ();
}
else if (patternObj instanceof char[])
{
- pattern = (char[]) patternObj;
+ pattern = (char[]) patternObj;
}
else if (patternObj instanceof StringBuffer)
{
- pattern = new char[((StringBuffer) patternObj).length ()];
- ((StringBuffer) patternObj).getChars (0, pattern.length, pattern, 0);
+ pattern = new char[((StringBuffer) patternObj).length ()];
+ ((StringBuffer) patternObj).getChars (0, pattern.length, pattern, 0);
}
else if (patternObj instanceof StringBuilder)
{
- pattern = new char[((StringBuilder) patternObj).length ()];
- ((StringBuilder) patternObj).getChars (0, pattern.length, pattern, 0);
+ pattern = new char[((StringBuilder) patternObj).length ()];
+ ((StringBuilder) patternObj).getChars (0, pattern.length, pattern, 0);
}
else if (patternObj instanceof CPStringBuilder)
{
- pattern = new char[((CPStringBuilder) patternObj).length ()];
- ((CPStringBuilder) patternObj).getChars (0, pattern.length, pattern,
- 0);
+ pattern = new char[((CPStringBuilder) patternObj).length ()];
+ ((CPStringBuilder) patternObj).getChars (0, pattern.length, pattern,
+ 0);
}
else
{
- pattern = patternObj.toString ().toCharArray ();
+ pattern = patternObj.toString ().toCharArray ();
}
int pLength = pattern.length;
- numSubs = 0; // Number of subexpressions in this token.
+ numSubs = 0; // Number of subexpressions in this token.
ArrayList < REToken > branches = null;
// linked list of tokens (sort of -- some closed loops can exist)
@@ -429,956 +429,956 @@ public class RE extends REToken
while (index < pLength)
{
- // read the next character unit (including backslash escapes)
- index = getCharUnit (pattern, index, unit, quot);
-
- if (unit.bk)
- if (unit.ch == 'Q')
- {
- quot = true;
- continue;
- }
- else if (unit.ch == 'E')
- {
- quot = false;
- continue;
- }
- if (quot)
- unit.bk = false;
-
- if (((cflags & REG_X_COMMENTS) > 0) && (!unit.bk) && (!quot))
- {
- if (Character.isWhitespace (unit.ch))
- {
- continue;
- }
- if (unit.ch == '#')
- {
- for (int i = index; i < pLength; i++)
- {
- if (pattern[i] == '\n')
- {
- index = i + 1;
- continue;
- }
- else if (pattern[i] == '\r')
- {
- if (i + 1 < pLength && pattern[i + 1] == '\n')
- {
- index = i + 2;
- }
- else
- {
- index = i + 1;
- }
- continue;
- }
- }
- index = pLength;
- continue;
- }
- }
-
- // ALTERNATION OPERATOR
- // \| or | (if RE_NO_BK_VBAR) or newline (if RE_NEWLINE_ALT)
- // not available if RE_LIMITED_OPS is set
-
- // TODO: the '\n' literal here should be a test against REToken.newline,
- // which unfortunately may be more than a single character.
- if (((unit.ch == '|'
- && (syntax.get (RESyntax.RE_NO_BK_VBAR) ^ (unit.bk || quot)))
- || (syntax.get (RESyntax.RE_NEWLINE_ALT) && (unit.ch == '\n')
- && !(unit.bk || quot)))
- && !syntax.get (RESyntax.RE_LIMITED_OPS))
- {
- // make everything up to here be a branch. create vector if nec.
- addToken (currentToken);
- RE theBranch =
- new RE (firstToken, lastToken, numSubs, subIndex, minimumLength,
- maximumLength);
- minimumLength = 0;
- maximumLength = 0;
- if (branches == null)
- {
- branches = new ArrayList < REToken > ();
- }
- branches.add (theBranch);
- firstToken = lastToken = currentToken = null;
- }
-
- // INTERVAL OPERATOR:
- // {x} | {x,} | {x,y} (RE_INTERVALS && RE_NO_BK_BRACES)
- // \{x\} | \{x,\} | \{x,y\} (RE_INTERVALS && !RE_NO_BK_BRACES)
- //
- // OPEN QUESTION:
- // what is proper interpretation of '{' at start of string?
- //
- // This method used to check "repeat.empty.token" to avoid such regexp
- // as "(a*){2,}", but now "repeat.empty.token" is allowed.
-
- else if ((unit.ch == '{') && syntax.get (RESyntax.RE_INTERVALS)
- && (syntax.
- get (RESyntax.RE_NO_BK_BRACES) ^ (unit.bk || quot)))
- {
- int newIndex = getMinMax (pattern, index, minMax, syntax);
- if (newIndex > index)
- {
- if (minMax.first > minMax.second)
- throw new
- REException (getLocalizedMessage ("interval.order"),
- REException.REG_BADRPT, newIndex);
- if (currentToken == null)
- throw new
- REException (getLocalizedMessage ("repeat.no.token"),
- REException.REG_BADRPT, newIndex);
- if (currentToken instanceof RETokenRepeated)
- throw new
- REException (getLocalizedMessage ("repeat.chained"),
- REException.REG_BADRPT, newIndex);
- if (currentToken instanceof RETokenWordBoundary
- || currentToken instanceof RETokenWordBoundary)
- throw new
- REException (getLocalizedMessage ("repeat.assertion"),
- REException.REG_BADRPT, newIndex);
- index = newIndex;
- currentToken =
- setRepeated (currentToken, minMax.first, minMax.second,
- index);
- }
- else
- {
- addToken (currentToken);
- currentToken = new RETokenChar (subIndex, unit.ch, insens);
- if (insensUSASCII)
- currentToken.unicodeAware = false;
- }
- }
-
- // LIST OPERATOR:
- // [...] | [^...]
-
- else if ((unit.ch == '[') && !(unit.bk || quot))
- {
- // Create a new RETokenOneOf
- ParseCharClassResult result =
- parseCharClass (subIndex, pattern, index, pLength, cflags,
- syntax, 0);
- addToken (currentToken);
- currentToken = result.token;
- index = result.index;
- }
-
- // SUBEXPRESSIONS
- // (...) | \(...\) depending on RE_NO_BK_PARENS
-
- else if ((unit.ch == '(')
- && (syntax.
- get (RESyntax.RE_NO_BK_PARENS) ^ (unit.bk || quot)))
- {
- boolean pure = false;
- boolean comment = false;
- boolean lookAhead = false;
- boolean lookBehind = false;
- boolean independent = false;
- boolean negativelh = false;
- boolean negativelb = false;
- if ((index + 1 < pLength) && (pattern[index] == '?'))
- {
- switch (pattern[index + 1])
- {
- case '!':
- if (syntax.get (RESyntax.RE_LOOKAHEAD))
- {
- pure = true;
- negativelh = true;
- lookAhead = true;
- index += 2;
- }
- break;
- case '=':
- if (syntax.get (RESyntax.RE_LOOKAHEAD))
- {
- pure = true;
- lookAhead = true;
- index += 2;
- }
- break;
- case '<':
- // We assume that if the syntax supports look-ahead,
- // it also supports look-behind.
- if (syntax.get (RESyntax.RE_LOOKAHEAD))
- {
- index++;
- switch (pattern[index + 1])
- {
- case '!':
- pure = true;
- negativelb = true;
- lookBehind = true;
- index += 2;
- break;
- case '=':
- pure = true;
- lookBehind = true;
- index += 2;
- }
- }
- break;
- case '>':
- // We assume that if the syntax supports look-ahead,
- // it also supports independent group.
- if (syntax.get (RESyntax.RE_LOOKAHEAD))
- {
- pure = true;
- independent = true;
- index += 2;
- }
- break;
- case 'i':
- case 'd':
- case 'm':
- case 's':
- case 'u':
- case 'x':
- case '-':
- if (!syntax.get (RESyntax.RE_EMBEDDED_FLAGS))
- break;
- // Set or reset syntax flags.
- int flagIndex = index + 1;
- int endFlag = -1;
- RESyntax newSyntax = new RESyntax (syntax);
- int newCflags = cflags;
- boolean negate = false;
- while (flagIndex < pLength && endFlag < 0)
- {
- switch (pattern[flagIndex])
- {
- case 'i':
- if (negate)
- newCflags &= ~REG_ICASE;
- else
- newCflags |= REG_ICASE;
- flagIndex++;
- break;
- case 'd':
- if (negate)
- newSyntax.setLineSeparator (RESyntax.
- DEFAULT_LINE_SEPARATOR);
- else
- newSyntax.setLineSeparator ("\n");
- flagIndex++;
- break;
- case 'm':
- if (negate)
- newCflags &= ~REG_MULTILINE;
- else
- newCflags |= REG_MULTILINE;
- flagIndex++;
- break;
- case 's':
- if (negate)
- newCflags &= ~REG_DOT_NEWLINE;
- else
- newCflags |= REG_DOT_NEWLINE;
- flagIndex++;
- break;
- case 'u':
- if (negate)
- newCflags |= REG_ICASE_USASCII;
- else
- newCflags &= ~REG_ICASE_USASCII;
- flagIndex++;
- break;
- case 'x':
- if (negate)
- newCflags &= ~REG_X_COMMENTS;
- else
- newCflags |= REG_X_COMMENTS;
- flagIndex++;
- break;
- case '-':
- negate = true;
- flagIndex++;
- break;
- case ':':
- case ')':
- endFlag = pattern[flagIndex];
- break;
- default:
- throw new
- REException (getLocalizedMessage
- ("repeat.no.token"),
- REException.REG_BADRPT, index);
- }
- }
- if (endFlag == ')')
- {
- syntax = newSyntax;
- cflags = newCflags;
- insens = ((cflags & REG_ICASE) > 0);
- insensUSASCII = ((cflags & REG_ICASE_USASCII) > 0);
- // This can be treated as though it were a comment.
- comment = true;
- index = flagIndex - 1;
- break;
- }
- if (endFlag == ':')
- {
- savedSyntax = syntax;
- savedCflags = cflags;
- flagsSaved = true;
- syntax = newSyntax;
- cflags = newCflags;
- insens = ((cflags & REG_ICASE) > 0);
- insensUSASCII = ((cflags & REG_ICASE_USASCII) > 0);
- index = flagIndex - 1;
- // Fall through to the next case.
- }
- else
- {
- throw new
- REException (getLocalizedMessage
- ("unmatched.paren"),
- REException.REG_ESUBREG, index);
- }
- case ':':
- if (syntax.get (RESyntax.RE_PURE_GROUPING))
- {
- pure = true;
- index += 2;
- }
- break;
- case '#':
- if (syntax.get (RESyntax.RE_COMMENTS))
- {
- comment = true;
- }
- break;
- default:
- throw new
- REException (getLocalizedMessage ("repeat.no.token"),
- REException.REG_BADRPT, index);
- }
- }
-
- if (index >= pLength)
- {
- throw new
- REException (getLocalizedMessage ("unmatched.paren"),
- REException.REG_ESUBREG, index);
- }
-
- // find end of subexpression
- int endIndex = index;
- int nextIndex = index;
- int nested = 0;
-
- while (((nextIndex =
- getCharUnit (pattern, endIndex, unit, false)) > 0)
- && !(nested == 0 && (unit.ch == ')')
- && (syntax.
- get (RESyntax.RE_NO_BK_PARENS) ^ (unit.bk
- || quot))))
- {
- if ((endIndex = nextIndex) >= pLength)
- throw new
- REException (getLocalizedMessage ("subexpr.no.end"),
- REException.REG_ESUBREG, nextIndex);
- else
- if ((unit.ch == '[') && !(unit.bk || quot))
- {
- // I hate to do something similar to the LIST OPERATOR matters
- // above, but ...
- int listIndex = nextIndex;
- if (listIndex < pLength && pattern[listIndex] == '^')
- listIndex++;
- if (listIndex < pLength && pattern[listIndex] == ']')
- listIndex++;
- int listEndIndex = -1;
- int listNest = 0;
- while (listIndex < pLength && listEndIndex < 0)
- {
- switch (pattern[listIndex++])
- {
- case '\\':
- listIndex++;
- break;
- case '[':
- // Sun's API document says that regexp like "[a-d[m-p]]"
- // is legal. Even something like "[[[^]]]]" is accepted.
- listNest++;
- if (listIndex < pLength
- && pattern[listIndex] == '^')
- listIndex++;
- if (listIndex < pLength
- && pattern[listIndex] == ']')
- listIndex++;
- break;
- case ']':
- if (listNest == 0)
- listEndIndex = listIndex;
- listNest--;
- break;
- }
- }
- if (listEndIndex >= 0)
- {
- nextIndex = listEndIndex;
- if ((endIndex = nextIndex) >= pLength)
- throw new
- REException (getLocalizedMessage ("subexpr.no.end"),
- REException.REG_ESUBREG, nextIndex);
- else
- continue;
- }
- throw new
- REException (getLocalizedMessage ("subexpr.no.end"),
- REException.REG_ESUBREG, nextIndex);
- }
- else if (unit.ch == '('
- && (syntax.
- get (RESyntax.RE_NO_BK_PARENS) ^ (unit.bk
- || quot)))
- nested++;
- else if (unit.ch == ')'
- && (syntax.
- get (RESyntax.RE_NO_BK_PARENS) ^ (unit.bk
- || quot)))
- nested--;
- }
-
- // endIndex is now position at a ')','\)'
- // nextIndex is end of string or position after ')' or '\)'
-
- if (comment)
- index = nextIndex;
- else
- { // not a comment
- // create RE subexpression as token.
- addToken (currentToken);
- if (!pure)
- {
- numSubs++;
- }
-
- int useIndex = (pure || lookAhead || lookBehind
- || independent) ? 0 : nextSub + numSubs;
- currentToken =
- new RE (String.valueOf (pattern, index, endIndex - index).
- toCharArray (), cflags, syntax, useIndex,
- nextSub + numSubs);
- numSubs += ((RE) currentToken).getNumSubs ();
-
- if (lookAhead)
- {
- currentToken =
- new RETokenLookAhead (currentToken, negativelh);
- }
- else if (lookBehind)
- {
- currentToken =
- new RETokenLookBehind (currentToken, negativelb);
- }
- else if (independent)
- {
- currentToken = new RETokenIndependent (currentToken);
- }
-
- index = nextIndex;
- if (flagsSaved)
- {
- syntax = savedSyntax;
- cflags = savedCflags;
- insens = ((cflags & REG_ICASE) > 0);
- insensUSASCII = ((cflags & REG_ICASE_USASCII) > 0);
- flagsSaved = false;
- }
- } // not a comment
- } // subexpression
-
- // UNMATCHED RIGHT PAREN
- // ) or \) throw exception if
- // !syntax.get(RESyntax.RE_UNMATCHED_RIGHT_PAREN_ORD)
- else if (!syntax.get (RESyntax.RE_UNMATCHED_RIGHT_PAREN_ORD)
- && ((unit.ch == ')')
- && (syntax.
- get (RESyntax.RE_NO_BK_PARENS) ^ (unit.bk || quot))))
- {
- throw new REException (getLocalizedMessage ("unmatched.paren"),
- REException.REG_EPAREN, index);
- }
-
- // START OF LINE OPERATOR
- // ^
-
- else if ((unit.ch == '^') && !(unit.bk || quot))
- {
- addToken (currentToken);
- currentToken = null;
- RETokenStart token = null;
- if ((cflags & REG_MULTILINE) > 0)
- {
- String sep = syntax.getLineSeparator ();
- if (sep == null)
- {
- token = new RETokenStart (subIndex, null, true);
- }
- else
- {
- token = new RETokenStart (subIndex, sep);
- }
- }
- else
- {
- token = new RETokenStart (subIndex, null);
- }
- addToken (token);
- }
-
- // END OF LINE OPERATOR
- // $
-
- else if ((unit.ch == '$') && !(unit.bk || quot))
- {
- addToken (currentToken);
- currentToken = null;
- RETokenEnd token = null;
- if ((cflags & REG_MULTILINE) > 0)
- {
- String sep = syntax.getLineSeparator ();
- if (sep == null)
- {
- token = new RETokenEnd (subIndex, null, true);
- }
- else
- {
- token = new RETokenEnd (subIndex, sep);
- }
- }
- else
- {
- token = new RETokenEnd (subIndex, null);
- }
- addToken (token);
- }
-
- // MATCH-ANY-CHARACTER OPERATOR (except possibly newline and null)
- // .
-
- else if ((unit.ch == '.') && !(unit.bk || quot))
- {
- addToken (currentToken);
- currentToken =
- new RETokenAny (subIndex, syntax.get (RESyntax.RE_DOT_NEWLINE)
- || ((cflags & REG_DOT_NEWLINE) > 0),
- syntax.get (RESyntax.RE_DOT_NOT_NULL));
- }
-
- // ZERO-OR-MORE REPEAT OPERATOR
- // *
- //
- // This method used to check "repeat.empty.token" to avoid such regexp
- // as "(a*)*", but now "repeat.empty.token" is allowed.
-
- else if ((unit.ch == '*') && !(unit.bk || quot))
- {
- if (currentToken == null)
- throw new REException (getLocalizedMessage ("repeat.no.token"),
- REException.REG_BADRPT, index);
- if (currentToken instanceof RETokenRepeated)
- throw new REException (getLocalizedMessage ("repeat.chained"),
- REException.REG_BADRPT, index);
- if (currentToken instanceof RETokenWordBoundary
- || currentToken instanceof RETokenWordBoundary)
- throw new REException (getLocalizedMessage ("repeat.assertion"),
- REException.REG_BADRPT, index);
- currentToken =
- setRepeated (currentToken, 0, Integer.MAX_VALUE, index);
- }
-
- // ONE-OR-MORE REPEAT OPERATOR / POSSESSIVE MATCHING OPERATOR
- // + | \+ depending on RE_BK_PLUS_QM
- // not available if RE_LIMITED_OPS is set
- //
- // This method used to check "repeat.empty.token" to avoid such regexp
- // as "(a*)+", but now "repeat.empty.token" is allowed.
-
- else if ((unit.ch == '+') && !syntax.get (RESyntax.RE_LIMITED_OPS)
- && (!syntax.
- get (RESyntax.RE_BK_PLUS_QM) ^ (unit.bk || quot)))
- {
- if (currentToken == null)
- throw new REException (getLocalizedMessage ("repeat.no.token"),
- REException.REG_BADRPT, index);
-
- // Check for possessive matching on RETokenRepeated
- if (currentToken instanceof RETokenRepeated)
- {
- RETokenRepeated tokenRep = (RETokenRepeated) currentToken;
- if (syntax.get (RESyntax.RE_POSSESSIVE_OPS)
- && !tokenRep.isPossessive () && !tokenRep.isStingy ())
- tokenRep.makePossessive ();
- else
- throw new
- REException (getLocalizedMessage ("repeat.chained"),
- REException.REG_BADRPT, index);
-
- }
- else if (currentToken instanceof RETokenWordBoundary
- || currentToken instanceof RETokenWordBoundary)
- throw new REException (getLocalizedMessage ("repeat.assertion"),
- REException.REG_BADRPT, index);
- else
- currentToken =
- setRepeated (currentToken, 1, Integer.MAX_VALUE, index);
- }
-
- // ZERO-OR-ONE REPEAT OPERATOR / STINGY MATCHING OPERATOR
- // ? | \? depending on RE_BK_PLUS_QM
- // not available if RE_LIMITED_OPS is set
- // stingy matching if RE_STINGY_OPS is set and it follows a quantifier
-
- else if ((unit.ch == '?') && !syntax.get (RESyntax.RE_LIMITED_OPS)
- && (!syntax.
- get (RESyntax.RE_BK_PLUS_QM) ^ (unit.bk || quot)))
- {
- if (currentToken == null)
- throw new REException (getLocalizedMessage ("repeat.no.token"),
- REException.REG_BADRPT, index);
-
- // Check for stingy matching on RETokenRepeated
- if (currentToken instanceof RETokenRepeated)
- {
- RETokenRepeated tokenRep = (RETokenRepeated) currentToken;
- if (syntax.get (RESyntax.RE_STINGY_OPS)
- && !tokenRep.isStingy () && !tokenRep.isPossessive ())
- tokenRep.makeStingy ();
- else
- throw new
- REException (getLocalizedMessage ("repeat.chained"),
- REException.REG_BADRPT, index);
- }
- else if (currentToken instanceof RETokenWordBoundary
- || currentToken instanceof RETokenWordBoundary)
- throw new REException (getLocalizedMessage ("repeat.assertion"),
- REException.REG_BADRPT, index);
- else
- currentToken = setRepeated (currentToken, 0, 1, index);
- }
-
- // OCTAL CHARACTER
- // \0377
-
- else if (unit.bk && (unit.ch == '0')
- && syntax.get (RESyntax.RE_OCTAL_CHAR))
- {
- CharExpression ce =
- getCharExpression (pattern, index - 2, pLength, syntax);
- if (ce == null)
- throw new REException ("invalid octal character",
- REException.REG_ESCAPE, index);
- index = index - 2 + ce.len;
- addToken (currentToken);
- currentToken = new RETokenChar (subIndex, ce.ch, insens);
- if (insensUSASCII)
- currentToken.unicodeAware = false;
- }
-
- // BACKREFERENCE OPERATOR
- // \1 \2 ... \9 and \10 \11 \12 ...
- // not available if RE_NO_BK_REFS is set
- // Perl recognizes \10, \11, and so on only if enough number of
- // parentheses have opened before it, otherwise they are treated
- // as aliases of \010, \011, ... (octal characters). In case of
- // Sun's JDK, octal character expression must always begin with \0.
- // We will do as JDK does. But FIXME, take a look at "(a)(b)\29".
- // JDK treats \2 as a back reference to the 2nd group because
- // there are only two groups. But in our poor implementation,
- // we cannot help but treat \29 as a back reference to the 29th group.
-
- else if (unit.bk && Character.isDigit (unit.ch)
- && !syntax.get (RESyntax.RE_NO_BK_REFS))
- {
- addToken (currentToken);
- int numBegin = index - 1;
- int numEnd = pLength;
- for (int i = index; i < pLength; i++)
- {
- if (!Character.isDigit (pattern[i]))
- {
- numEnd = i;
- break;
- }
- }
- int num = parseInt (pattern, numBegin, numEnd - numBegin, 10);
-
- currentToken = new RETokenBackRef (subIndex, num, insens);
- if (insensUSASCII)
- currentToken.unicodeAware = false;
- index = numEnd;
- }
-
- // START OF STRING OPERATOR
- // \A if RE_STRING_ANCHORS is set
-
- else if (unit.bk && (unit.ch == 'A')
- && syntax.get (RESyntax.RE_STRING_ANCHORS))
- {
- addToken (currentToken);
- currentToken = new RETokenStart (subIndex, null);
- }
-
- // WORD BREAK OPERATOR
- // \b if ????
-
- else if (unit.bk && (unit.ch == 'b')
- && syntax.get (RESyntax.RE_STRING_ANCHORS))
- {
- addToken (currentToken);
- currentToken =
- new RETokenWordBoundary (subIndex,
- RETokenWordBoundary.
- BEGIN | RETokenWordBoundary.END,
- false);
- }
-
- // WORD BEGIN OPERATOR
- // \< if ????
- else if (unit.bk && (unit.ch == '<'))
- {
- addToken (currentToken);
- currentToken =
- new RETokenWordBoundary (subIndex, RETokenWordBoundary.BEGIN,
- false);
- }
-
- // WORD END OPERATOR
- // \> if ????
- else if (unit.bk && (unit.ch == '>'))
- {
- addToken (currentToken);
- currentToken =
- new RETokenWordBoundary (subIndex, RETokenWordBoundary.END,
- false);
- }
-
- // NON-WORD BREAK OPERATOR
- // \B if ????
-
- else if (unit.bk && (unit.ch == 'B')
- && syntax.get (RESyntax.RE_STRING_ANCHORS))
- {
- addToken (currentToken);
- currentToken =
- new RETokenWordBoundary (subIndex,
- RETokenWordBoundary.
- BEGIN | RETokenWordBoundary.END, true);
- }
-
-
- // DIGIT OPERATOR
- // \d if RE_CHAR_CLASS_ESCAPES is set
-
- else if (unit.bk && (unit.ch == 'd')
- && syntax.get (RESyntax.RE_CHAR_CLASS_ESCAPES))
- {
- addToken (currentToken);
- currentToken =
- new RETokenPOSIX (subIndex, RETokenPOSIX.DIGIT, insens, false);
- if (insensUSASCII)
- currentToken.unicodeAware = false;
- }
-
- // NON-DIGIT OPERATOR
- // \D
-
- else if (unit.bk && (unit.ch == 'D')
- && syntax.get (RESyntax.RE_CHAR_CLASS_ESCAPES))
- {
- addToken (currentToken);
- currentToken =
- new RETokenPOSIX (subIndex, RETokenPOSIX.DIGIT, insens, true);
- if (insensUSASCII)
- currentToken.unicodeAware = false;
- }
-
- // NEWLINE ESCAPE
- // \n
-
- else if (unit.bk && (unit.ch == 'n'))
- {
- addToken (currentToken);
- currentToken = new RETokenChar (subIndex, '\n', false);
- }
-
- // RETURN ESCAPE
- // \r
-
- else if (unit.bk && (unit.ch == 'r'))
- {
- addToken (currentToken);
- currentToken = new RETokenChar (subIndex, '\r', false);
- }
-
- // WHITESPACE OPERATOR
- // \s if RE_CHAR_CLASS_ESCAPES is set
-
- else if (unit.bk && (unit.ch == 's')
- && syntax.get (RESyntax.RE_CHAR_CLASS_ESCAPES))
- {
- addToken (currentToken);
- currentToken =
- new RETokenPOSIX (subIndex, RETokenPOSIX.SPACE, insens, false);
- if (insensUSASCII)
- currentToken.unicodeAware = false;
- }
-
- // NON-WHITESPACE OPERATOR
- // \S
-
- else if (unit.bk && (unit.ch == 'S')
- && syntax.get (RESyntax.RE_CHAR_CLASS_ESCAPES))
- {
- addToken (currentToken);
- currentToken =
- new RETokenPOSIX (subIndex, RETokenPOSIX.SPACE, insens, true);
- if (insensUSASCII)
- currentToken.unicodeAware = false;
- }
-
- // TAB ESCAPE
- // \t
-
- else if (unit.bk && (unit.ch == 't'))
- {
- addToken (currentToken);
- currentToken = new RETokenChar (subIndex, '\t', false);
- }
-
- // ALPHANUMERIC OPERATOR
- // \w
-
- else if (unit.bk && (unit.ch == 'w')
- && syntax.get (RESyntax.RE_CHAR_CLASS_ESCAPES))
- {
- addToken (currentToken);
- currentToken =
- new RETokenPOSIX (subIndex, RETokenPOSIX.ALNUM, insens, false);
- if (insensUSASCII)
- currentToken.unicodeAware = false;
- }
-
- // NON-ALPHANUMERIC OPERATOR
- // \W
-
- else if (unit.bk && (unit.ch == 'W')
- && syntax.get (RESyntax.RE_CHAR_CLASS_ESCAPES))
- {
- addToken (currentToken);
- currentToken =
- new RETokenPOSIX (subIndex, RETokenPOSIX.ALNUM, insens, true);
- if (insensUSASCII)
- currentToken.unicodeAware = false;
- }
-
- // END OF STRING OPERATOR
- // \Z, \z
-
- // FIXME: \Z and \z are different in that if the input string
- // ends with a line terminator, \Z matches the position before
- // the final terminator. This special behavior of \Z is yet
- // to be implemented.
-
- else if (unit.bk && (unit.ch == 'Z' || unit.ch == 'z') &&
- syntax.get (RESyntax.RE_STRING_ANCHORS))
- {
- addToken (currentToken);
- currentToken = new RETokenEnd (subIndex, null);
- }
-
- // HEX CHARACTER, UNICODE CHARACTER
- // \x1B, \u1234
-
- else
- if ((unit.bk && (unit.ch == 'x')
- && syntax.get (RESyntax.RE_HEX_CHAR)) || (unit.bk
- && (unit.ch == 'u')
- && syntax.
- get (RESyntax.
- RE_UNICODE_CHAR)))
- {
- CharExpression ce =
- getCharExpression (pattern, index - 2, pLength, syntax);
- if (ce == null)
- throw new REException ("invalid hex character",
- REException.REG_ESCAPE, index);
- index = index - 2 + ce.len;
- addToken (currentToken);
- currentToken = new RETokenChar (subIndex, ce.ch, insens);
- if (insensUSASCII)
- currentToken.unicodeAware = false;
- }
-
- // NAMED PROPERTY
- // \p{prop}, \P{prop}
-
- else
- if ((unit.bk && (unit.ch == 'p')
- && syntax.get (RESyntax.RE_NAMED_PROPERTY)) || (unit.bk
- && (unit.ch ==
- 'P')
- && syntax.
- get (RESyntax.
- RE_NAMED_PROPERTY)))
- {
- NamedProperty np = getNamedProperty (pattern, index - 2, pLength);
- if (np == null)
- throw new REException ("invalid escape sequence",
- REException.REG_ESCAPE, index);
- index = index - 2 + np.len;
- addToken (currentToken);
- currentToken =
- getRETokenNamedProperty (subIndex, np, insens, index);
- if (insensUSASCII)
- currentToken.unicodeAware = false;
- }
-
- // END OF PREVIOUS MATCH
- // \G
-
- else if (unit.bk && (unit.ch == 'G') &&
- syntax.get (RESyntax.RE_STRING_ANCHORS))
- {
- addToken (currentToken);
- currentToken = new RETokenEndOfPreviousMatch (subIndex);
- }
-
- // NON-SPECIAL CHARACTER (or escape to make literal)
- // c | \* for example
-
- else
- { // not a special character
- addToken (currentToken);
- currentToken = new RETokenChar (subIndex, unit.ch, insens);
- if (insensUSASCII)
- currentToken.unicodeAware = false;
- }
- } // end while
+ // read the next character unit (including backslash escapes)
+ index = getCharUnit (pattern, index, unit, quot);
+
+ if (unit.bk)
+ if (unit.ch == 'Q')
+ {
+ quot = true;
+ continue;
+ }
+ else if (unit.ch == 'E')
+ {
+ quot = false;
+ continue;
+ }
+ if (quot)
+ unit.bk = false;
+
+ if (((cflags & REG_X_COMMENTS) > 0) && (!unit.bk) && (!quot))
+ {
+ if (Character.isWhitespace (unit.ch))
+ {
+ continue;
+ }
+ if (unit.ch == '#')
+ {
+ for (int i = index; i < pLength; i++)
+ {
+ if (pattern[i] == '\n')
+ {
+ index = i + 1;
+ continue;
+ }
+ else if (pattern[i] == '\r')
+ {
+ if (i + 1 < pLength && pattern[i + 1] == '\n')
+ {
+ index = i + 2;
+ }
+ else
+ {
+ index = i + 1;
+ }
+ continue;
+ }
+ }
+ index = pLength;
+ continue;
+ }
+ }
+
+ // ALTERNATION OPERATOR
+ // \| or | (if RE_NO_BK_VBAR) or newline (if RE_NEWLINE_ALT)
+ // not available if RE_LIMITED_OPS is set
+
+ // TODO: the '\n' literal here should be a test against REToken.newline,
+ // which unfortunately may be more than a single character.
+ if (((unit.ch == '|'
+ && (syntax.get (RESyntax.RE_NO_BK_VBAR) ^ (unit.bk || quot)))
+ || (syntax.get (RESyntax.RE_NEWLINE_ALT) && (unit.ch == '\n')
+ && !(unit.bk || quot)))
+ && !syntax.get (RESyntax.RE_LIMITED_OPS))
+ {
+ // make everything up to here be a branch. create vector if nec.
+ addToken (currentToken);
+ RE theBranch =
+ new RE (firstToken, lastToken, numSubs, subIndex, minimumLength,
+ maximumLength);
+ minimumLength = 0;
+ maximumLength = 0;
+ if (branches == null)
+ {
+ branches = new ArrayList < REToken > ();
+ }
+ branches.add (theBranch);
+ firstToken = lastToken = currentToken = null;
+ }
+
+ // INTERVAL OPERATOR:
+ // {x} | {x,} | {x,y} (RE_INTERVALS && RE_NO_BK_BRACES)
+ // \{x\} | \{x,\} | \{x,y\} (RE_INTERVALS && !RE_NO_BK_BRACES)
+ //
+ // OPEN QUESTION:
+ // what is proper interpretation of '{' at start of string?
+ //
+ // This method used to check "repeat.empty.token" to avoid such regexp
+ // as "(a*){2,}", but now "repeat.empty.token" is allowed.
+
+ else if ((unit.ch == '{') && syntax.get (RESyntax.RE_INTERVALS)
+ && (syntax.
+ get (RESyntax.RE_NO_BK_BRACES) ^ (unit.bk || quot)))
+ {
+ int newIndex = getMinMax (pattern, index, minMax, syntax);
+ if (newIndex > index)
+ {
+ if (minMax.first > minMax.second)
+ throw new
+ REException (getLocalizedMessage ("interval.order"),
+ REException.REG_BADRPT, newIndex);
+ if (currentToken == null)
+ throw new
+ REException (getLocalizedMessage ("repeat.no.token"),
+ REException.REG_BADRPT, newIndex);
+ if (currentToken instanceof RETokenRepeated)
+ throw new
+ REException (getLocalizedMessage ("repeat.chained"),
+ REException.REG_BADRPT, newIndex);
+ if (currentToken instanceof RETokenWordBoundary
+ || currentToken instanceof RETokenWordBoundary)
+ throw new
+ REException (getLocalizedMessage ("repeat.assertion"),
+ REException.REG_BADRPT, newIndex);
+ index = newIndex;
+ currentToken =
+ setRepeated (currentToken, minMax.first, minMax.second,
+ index);
+ }
+ else
+ {
+ addToken (currentToken);
+ currentToken = new RETokenChar (subIndex, unit.ch, insens);
+ if (insensUSASCII)
+ currentToken.unicodeAware = false;
+ }
+ }
+
+ // LIST OPERATOR:
+ // [...] | [^...]
+
+ else if ((unit.ch == '[') && !(unit.bk || quot))
+ {
+ // Create a new RETokenOneOf
+ ParseCharClassResult result =
+ parseCharClass (subIndex, pattern, index, pLength, cflags,
+ syntax, 0);
+ addToken (currentToken);
+ currentToken = result.token;
+ index = result.index;
+ }
+
+ // SUBEXPRESSIONS
+ // (...) | \(...\) depending on RE_NO_BK_PARENS
+
+ else if ((unit.ch == '(')
+ && (syntax.
+ get (RESyntax.RE_NO_BK_PARENS) ^ (unit.bk || quot)))
+ {
+ boolean pure = false;
+ boolean comment = false;
+ boolean lookAhead = false;
+ boolean lookBehind = false;
+ boolean independent = false;
+ boolean negativelh = false;
+ boolean negativelb = false;
+ if ((index + 1 < pLength) && (pattern[index] == '?'))
+ {
+ switch (pattern[index + 1])
+ {
+ case '!':
+ if (syntax.get (RESyntax.RE_LOOKAHEAD))
+ {
+ pure = true;
+ negativelh = true;
+ lookAhead = true;
+ index += 2;
+ }
+ break;
+ case '=':
+ if (syntax.get (RESyntax.RE_LOOKAHEAD))
+ {
+ pure = true;
+ lookAhead = true;
+ index += 2;
+ }
+ break;
+ case '<':
+ // We assume that if the syntax supports look-ahead,
+ // it also supports look-behind.
+ if (syntax.get (RESyntax.RE_LOOKAHEAD))
+ {
+ index++;
+ switch (pattern[index + 1])
+ {
+ case '!':
+ pure = true;
+ negativelb = true;
+ lookBehind = true;
+ index += 2;
+ break;
+ case '=':
+ pure = true;
+ lookBehind = true;
+ index += 2;
+ }
+ }
+ break;
+ case '>':
+ // We assume that if the syntax supports look-ahead,
+ // it also supports independent group.
+ if (syntax.get (RESyntax.RE_LOOKAHEAD))
+ {
+ pure = true;
+ independent = true;
+ index += 2;
+ }
+ break;
+ case 'i':
+ case 'd':
+ case 'm':
+ case 's':
+ case 'u':
+ case 'x':
+ case '-':
+ if (!syntax.get (RESyntax.RE_EMBEDDED_FLAGS))
+ break;
+ // Set or reset syntax flags.
+ int flagIndex = index + 1;
+ int endFlag = -1;
+ RESyntax newSyntax = new RESyntax (syntax);
+ int newCflags = cflags;
+ boolean negate = false;
+ while (flagIndex < pLength && endFlag < 0)
+ {
+ switch (pattern[flagIndex])
+ {
+ case 'i':
+ if (negate)
+ newCflags &= ~REG_ICASE;
+ else
+ newCflags |= REG_ICASE;
+ flagIndex++;
+ break;
+ case 'd':
+ if (negate)
+ newSyntax.setLineSeparator (RESyntax.
+ DEFAULT_LINE_SEPARATOR);
+ else
+ newSyntax.setLineSeparator ("\n");
+ flagIndex++;
+ break;
+ case 'm':
+ if (negate)
+ newCflags &= ~REG_MULTILINE;
+ else
+ newCflags |= REG_MULTILINE;
+ flagIndex++;
+ break;
+ case 's':
+ if (negate)
+ newCflags &= ~REG_DOT_NEWLINE;
+ else
+ newCflags |= REG_DOT_NEWLINE;
+ flagIndex++;
+ break;
+ case 'u':
+ if (negate)
+ newCflags |= REG_ICASE_USASCII;
+ else
+ newCflags &= ~REG_ICASE_USASCII;
+ flagIndex++;
+ break;
+ case 'x':
+ if (negate)
+ newCflags &= ~REG_X_COMMENTS;
+ else
+ newCflags |= REG_X_COMMENTS;
+ flagIndex++;
+ break;
+ case '-':
+ negate = true;
+ flagIndex++;
+ break;
+ case ':':
+ case ')':
+ endFlag = pattern[flagIndex];
+ break;
+ default:
+ throw new
+ REException (getLocalizedMessage
+ ("repeat.no.token"),
+ REException.REG_BADRPT, index);
+ }
+ }
+ if (endFlag == ')')
+ {
+ syntax = newSyntax;
+ cflags = newCflags;
+ insens = ((cflags & REG_ICASE) > 0);
+ insensUSASCII = ((cflags & REG_ICASE_USASCII) > 0);
+ // This can be treated as though it were a comment.
+ comment = true;
+ index = flagIndex - 1;
+ break;
+ }
+ if (endFlag == ':')
+ {
+ savedSyntax = syntax;
+ savedCflags = cflags;
+ flagsSaved = true;
+ syntax = newSyntax;
+ cflags = newCflags;
+ insens = ((cflags & REG_ICASE) > 0);
+ insensUSASCII = ((cflags & REG_ICASE_USASCII) > 0);
+ index = flagIndex - 1;
+ // Fall through to the next case.
+ }
+ else
+ {
+ throw new
+ REException (getLocalizedMessage
+ ("unmatched.paren"),
+ REException.REG_ESUBREG, index);
+ }
+ case ':':
+ if (syntax.get (RESyntax.RE_PURE_GROUPING))
+ {
+ pure = true;
+ index += 2;
+ }
+ break;
+ case '#':
+ if (syntax.get (RESyntax.RE_COMMENTS))
+ {
+ comment = true;
+ }
+ break;
+ default:
+ throw new
+ REException (getLocalizedMessage ("repeat.no.token"),
+ REException.REG_BADRPT, index);
+ }
+ }
+
+ if (index >= pLength)
+ {
+ throw new
+ REException (getLocalizedMessage ("unmatched.paren"),
+ REException.REG_ESUBREG, index);
+ }
+
+ // find end of subexpression
+ int endIndex = index;
+ int nextIndex = index;
+ int nested = 0;
+
+ while (((nextIndex =
+ getCharUnit (pattern, endIndex, unit, false)) > 0)
+ && !(nested == 0 && (unit.ch == ')')
+ && (syntax.
+ get (RESyntax.RE_NO_BK_PARENS) ^ (unit.bk
+ || quot))))
+ {
+ if ((endIndex = nextIndex) >= pLength)
+ throw new
+ REException (getLocalizedMessage ("subexpr.no.end"),
+ REException.REG_ESUBREG, nextIndex);
+ else
+ if ((unit.ch == '[') && !(unit.bk || quot))
+ {
+ // I hate to do something similar to the LIST OPERATOR matters
+ // above, but ...
+ int listIndex = nextIndex;
+ if (listIndex < pLength && pattern[listIndex] == '^')
+ listIndex++;
+ if (listIndex < pLength && pattern[listIndex] == ']')
+ listIndex++;
+ int listEndIndex = -1;
+ int listNest = 0;
+ while (listIndex < pLength && listEndIndex < 0)
+ {
+ switch (pattern[listIndex++])
+ {
+ case '\\':
+ listIndex++;
+ break;
+ case '[':
+ // Sun's API document says that regexp like "[a-d[m-p]]"
+ // is legal. Even something like "[[[^]]]]" is accepted.
+ listNest++;
+ if (listIndex < pLength
+ && pattern[listIndex] == '^')
+ listIndex++;
+ if (listIndex < pLength
+ && pattern[listIndex] == ']')
+ listIndex++;
+ break;
+ case ']':
+ if (listNest == 0)
+ listEndIndex = listIndex;
+ listNest--;
+ break;
+ }
+ }
+ if (listEndIndex >= 0)
+ {
+ nextIndex = listEndIndex;
+ if ((endIndex = nextIndex) >= pLength)
+ throw new
+ REException (getLocalizedMessage ("subexpr.no.end"),
+ REException.REG_ESUBREG, nextIndex);
+ else
+ continue;
+ }
+ throw new
+ REException (getLocalizedMessage ("subexpr.no.end"),
+ REException.REG_ESUBREG, nextIndex);
+ }
+ else if (unit.ch == '('
+ && (syntax.
+ get (RESyntax.RE_NO_BK_PARENS) ^ (unit.bk
+ || quot)))
+ nested++;
+ else if (unit.ch == ')'
+ && (syntax.
+ get (RESyntax.RE_NO_BK_PARENS) ^ (unit.bk
+ || quot)))
+ nested--;
+ }
+
+ // endIndex is now position at a ')','\)'
+ // nextIndex is end of string or position after ')' or '\)'
+
+ if (comment)
+ index = nextIndex;
+ else
+ { // not a comment
+ // create RE subexpression as token.
+ addToken (currentToken);
+ if (!pure)
+ {
+ numSubs++;
+ }
+
+ int useIndex = (pure || lookAhead || lookBehind
+ || independent) ? 0 : nextSub + numSubs;
+ currentToken =
+ new RE (String.valueOf (pattern, index, endIndex - index).
+ toCharArray (), cflags, syntax, useIndex,
+ nextSub + numSubs);
+ numSubs += ((RE) currentToken).getNumSubs ();
+
+ if (lookAhead)
+ {
+ currentToken =
+ new RETokenLookAhead (currentToken, negativelh);
+ }
+ else if (lookBehind)
+ {
+ currentToken =
+ new RETokenLookBehind (currentToken, negativelb);
+ }
+ else if (independent)
+ {
+ currentToken = new RETokenIndependent (currentToken);
+ }
+
+ index = nextIndex;
+ if (flagsSaved)
+ {
+ syntax = savedSyntax;
+ cflags = savedCflags;
+ insens = ((cflags & REG_ICASE) > 0);
+ insensUSASCII = ((cflags & REG_ICASE_USASCII) > 0);
+ flagsSaved = false;
+ }
+ } // not a comment
+ } // subexpression
+
+ // UNMATCHED RIGHT PAREN
+ // ) or \) throw exception if
+ // !syntax.get(RESyntax.RE_UNMATCHED_RIGHT_PAREN_ORD)
+ else if (!syntax.get (RESyntax.RE_UNMATCHED_RIGHT_PAREN_ORD)
+ && ((unit.ch == ')')
+ && (syntax.
+ get (RESyntax.RE_NO_BK_PARENS) ^ (unit.bk || quot))))
+ {
+ throw new REException (getLocalizedMessage ("unmatched.paren"),
+ REException.REG_EPAREN, index);
+ }
+
+ // START OF LINE OPERATOR
+ // ^
+
+ else if ((unit.ch == '^') && !(unit.bk || quot))
+ {
+ addToken (currentToken);
+ currentToken = null;
+ RETokenStart token = null;
+ if ((cflags & REG_MULTILINE) > 0)
+ {
+ String sep = syntax.getLineSeparator ();
+ if (sep == null)
+ {
+ token = new RETokenStart (subIndex, null, true);
+ }
+ else
+ {
+ token = new RETokenStart (subIndex, sep);
+ }
+ }
+ else
+ {
+ token = new RETokenStart (subIndex, null);
+ }
+ addToken (token);
+ }
+
+ // END OF LINE OPERATOR
+ // $
+
+ else if ((unit.ch == '$') && !(unit.bk || quot))
+ {
+ addToken (currentToken);
+ currentToken = null;
+ RETokenEnd token = null;
+ if ((cflags & REG_MULTILINE) > 0)
+ {
+ String sep = syntax.getLineSeparator ();
+ if (sep == null)
+ {
+ token = new RETokenEnd (subIndex, null, true);
+ }
+ else
+ {
+ token = new RETokenEnd (subIndex, sep);
+ }
+ }
+ else
+ {
+ token = new RETokenEnd (subIndex, null);
+ }
+ addToken (token);
+ }
+
+ // MATCH-ANY-CHARACTER OPERATOR (except possibly newline and null)
+ // .
+
+ else if ((unit.ch == '.') && !(unit.bk || quot))
+ {
+ addToken (currentToken);
+ currentToken =
+ new RETokenAny (subIndex, syntax.get (RESyntax.RE_DOT_NEWLINE)
+ || ((cflags & REG_DOT_NEWLINE) > 0),
+ syntax.get (RESyntax.RE_DOT_NOT_NULL));
+ }
+
+ // ZERO-OR-MORE REPEAT OPERATOR
+ // *
+ //
+ // This method used to check "repeat.empty.token" to avoid such regexp
+ // as "(a*)*", but now "repeat.empty.token" is allowed.
+
+ else if ((unit.ch == '*') && !(unit.bk || quot))
+ {
+ if (currentToken == null)
+ throw new REException (getLocalizedMessage ("repeat.no.token"),
+ REException.REG_BADRPT, index);
+ if (currentToken instanceof RETokenRepeated)
+ throw new REException (getLocalizedMessage ("repeat.chained"),
+ REException.REG_BADRPT, index);
+ if (currentToken instanceof RETokenWordBoundary
+ || currentToken instanceof RETokenWordBoundary)
+ throw new REException (getLocalizedMessage ("repeat.assertion"),
+ REException.REG_BADRPT, index);
+ currentToken =
+ setRepeated (currentToken, 0, Integer.MAX_VALUE, index);
+ }
+
+ // ONE-OR-MORE REPEAT OPERATOR / POSSESSIVE MATCHING OPERATOR
+ // + | \+ depending on RE_BK_PLUS_QM
+ // not available if RE_LIMITED_OPS is set
+ //
+ // This method used to check "repeat.empty.token" to avoid such regexp
+ // as "(a*)+", but now "repeat.empty.token" is allowed.
+
+ else if ((unit.ch == '+') && !syntax.get (RESyntax.RE_LIMITED_OPS)
+ && (!syntax.
+ get (RESyntax.RE_BK_PLUS_QM) ^ (unit.bk || quot)))
+ {
+ if (currentToken == null)
+ throw new REException (getLocalizedMessage ("repeat.no.token"),
+ REException.REG_BADRPT, index);
+
+ // Check for possessive matching on RETokenRepeated
+ if (currentToken instanceof RETokenRepeated)
+ {
+ RETokenRepeated tokenRep = (RETokenRepeated) currentToken;
+ if (syntax.get (RESyntax.RE_POSSESSIVE_OPS)
+ && !tokenRep.isPossessive () && !tokenRep.isStingy ())
+ tokenRep.makePossessive ();
+ else
+ throw new
+ REException (getLocalizedMessage ("repeat.chained"),
+ REException.REG_BADRPT, index);
+
+ }
+ else if (currentToken instanceof RETokenWordBoundary
+ || currentToken instanceof RETokenWordBoundary)
+ throw new REException (getLocalizedMessage ("repeat.assertion"),
+ REException.REG_BADRPT, index);
+ else
+ currentToken =
+ setRepeated (currentToken, 1, Integer.MAX_VALUE, index);
+ }
+
+ // ZERO-OR-ONE REPEAT OPERATOR / STINGY MATCHING OPERATOR
+ // ? | \? depending on RE_BK_PLUS_QM
+ // not available if RE_LIMITED_OPS is set
+ // stingy matching if RE_STINGY_OPS is set and it follows a quantifier
+
+ else if ((unit.ch == '?') && !syntax.get (RESyntax.RE_LIMITED_OPS)
+ && (!syntax.
+ get (RESyntax.RE_BK_PLUS_QM) ^ (unit.bk || quot)))
+ {
+ if (currentToken == null)
+ throw new REException (getLocalizedMessage ("repeat.no.token"),
+ REException.REG_BADRPT, index);
+
+ // Check for stingy matching on RETokenRepeated
+ if (currentToken instanceof RETokenRepeated)
+ {
+ RETokenRepeated tokenRep = (RETokenRepeated) currentToken;
+ if (syntax.get (RESyntax.RE_STINGY_OPS)
+ && !tokenRep.isStingy () && !tokenRep.isPossessive ())
+ tokenRep.makeStingy ();
+ else
+ throw new
+ REException (getLocalizedMessage ("repeat.chained"),
+ REException.REG_BADRPT, index);
+ }
+ else if (currentToken instanceof RETokenWordBoundary
+ || currentToken instanceof RETokenWordBoundary)
+ throw new REException (getLocalizedMessage ("repeat.assertion"),
+ REException.REG_BADRPT, index);
+ else
+ currentToken = setRepeated (currentToken, 0, 1, index);
+ }
+
+ // OCTAL CHARACTER
+ // \0377
+
+ else if (unit.bk && (unit.ch == '0')
+ && syntax.get (RESyntax.RE_OCTAL_CHAR))
+ {
+ CharExpression ce =
+ getCharExpression (pattern, index - 2, pLength, syntax);
+ if (ce == null)
+ throw new REException ("invalid octal character",
+ REException.REG_ESCAPE, index);
+ index = index - 2 + ce.len;
+ addToken (currentToken);
+ currentToken = new RETokenChar (subIndex, ce.ch, insens);
+ if (insensUSASCII)
+ currentToken.unicodeAware = false;
+ }
+
+ // BACKREFERENCE OPERATOR
+ // \1 \2 ... \9 and \10 \11 \12 ...
+ // not available if RE_NO_BK_REFS is set
+ // Perl recognizes \10, \11, and so on only if enough number of
+ // parentheses have opened before it, otherwise they are treated
+ // as aliases of \010, \011, ... (octal characters). In case of
+ // Sun's JDK, octal character expression must always begin with \0.
+ // We will do as JDK does. But FIXME, take a look at "(a)(b)\29".
+ // JDK treats \2 as a back reference to the 2nd group because
+ // there are only two groups. But in our poor implementation,
+ // we cannot help but treat \29 as a back reference to the 29th group.
+
+ else if (unit.bk && Character.isDigit (unit.ch)
+ && !syntax.get (RESyntax.RE_NO_BK_REFS))
+ {
+ addToken (currentToken);
+ int numBegin = index - 1;
+ int numEnd = pLength;
+ for (int i = index; i < pLength; i++)
+ {
+ if (!Character.isDigit (pattern[i]))
+ {
+ numEnd = i;
+ break;
+ }
+ }
+ int num = parseInt (pattern, numBegin, numEnd - numBegin, 10);
+
+ currentToken = new RETokenBackRef (subIndex, num, insens);
+ if (insensUSASCII)
+ currentToken.unicodeAware = false;
+ index = numEnd;
+ }
+
+ // START OF STRING OPERATOR
+ // \A if RE_STRING_ANCHORS is set
+
+ else if (unit.bk && (unit.ch == 'A')
+ && syntax.get (RESyntax.RE_STRING_ANCHORS))
+ {
+ addToken (currentToken);
+ currentToken = new RETokenStart (subIndex, null);
+ }
+
+ // WORD BREAK OPERATOR
+ // \b if ????
+
+ else if (unit.bk && (unit.ch == 'b')
+ && syntax.get (RESyntax.RE_STRING_ANCHORS))
+ {
+ addToken (currentToken);
+ currentToken =
+ new RETokenWordBoundary (subIndex,
+ RETokenWordBoundary.
+ BEGIN | RETokenWordBoundary.END,
+ false);
+ }
+
+ // WORD BEGIN OPERATOR
+ // \< if ????
+ else if (unit.bk && (unit.ch == '<'))
+ {
+ addToken (currentToken);
+ currentToken =
+ new RETokenWordBoundary (subIndex, RETokenWordBoundary.BEGIN,
+ false);
+ }
+
+ // WORD END OPERATOR
+ // \> if ????
+ else if (unit.bk && (unit.ch == '>'))
+ {
+ addToken (currentToken);
+ currentToken =
+ new RETokenWordBoundary (subIndex, RETokenWordBoundary.END,
+ false);
+ }
+
+ // NON-WORD BREAK OPERATOR
+ // \B if ????
+
+ else if (unit.bk && (unit.ch == 'B')
+ && syntax.get (RESyntax.RE_STRING_ANCHORS))
+ {
+ addToken (currentToken);
+ currentToken =
+ new RETokenWordBoundary (subIndex,
+ RETokenWordBoundary.
+ BEGIN | RETokenWordBoundary.END, true);
+ }
+
+
+ // DIGIT OPERATOR
+ // \d if RE_CHAR_CLASS_ESCAPES is set
+
+ else if (unit.bk && (unit.ch == 'd')
+ && syntax.get (RESyntax.RE_CHAR_CLASS_ESCAPES))
+ {
+ addToken (currentToken);
+ currentToken =
+ new RETokenPOSIX (subIndex, RETokenPOSIX.DIGIT, insens, false);
+ if (insensUSASCII)
+ currentToken.unicodeAware = false;
+ }
+
+ // NON-DIGIT OPERATOR
+ // \D
+
+ else if (unit.bk && (unit.ch == 'D')
+ && syntax.get (RESyntax.RE_CHAR_CLASS_ESCAPES))
+ {
+ addToken (currentToken);
+ currentToken =
+ new RETokenPOSIX (subIndex, RETokenPOSIX.DIGIT, insens, true);
+ if (insensUSASCII)
+ currentToken.unicodeAware = false;
+ }
+
+ // NEWLINE ESCAPE
+ // \n
+
+ else if (unit.bk && (unit.ch == 'n'))
+ {
+ addToken (currentToken);
+ currentToken = new RETokenChar (subIndex, '\n', false);
+ }
+
+ // RETURN ESCAPE
+ // \r
+
+ else if (unit.bk && (unit.ch == 'r'))
+ {
+ addToken (currentToken);
+ currentToken = new RETokenChar (subIndex, '\r', false);
+ }
+
+ // WHITESPACE OPERATOR
+ // \s if RE_CHAR_CLASS_ESCAPES is set
+
+ else if (unit.bk && (unit.ch == 's')
+ && syntax.get (RESyntax.RE_CHAR_CLASS_ESCAPES))
+ {
+ addToken (currentToken);
+ currentToken =
+ new RETokenPOSIX (subIndex, RETokenPOSIX.SPACE, insens, false);
+ if (insensUSASCII)
+ currentToken.unicodeAware = false;
+ }
+
+ // NON-WHITESPACE OPERATOR
+ // \S
+
+ else if (unit.bk && (unit.ch == 'S')
+ && syntax.get (RESyntax.RE_CHAR_CLASS_ESCAPES))
+ {
+ addToken (currentToken);
+ currentToken =
+ new RETokenPOSIX (subIndex, RETokenPOSIX.SPACE, insens, true);
+ if (insensUSASCII)
+ currentToken.unicodeAware = false;
+ }
+
+ // TAB ESCAPE
+ // \t
+
+ else if (unit.bk && (unit.ch == 't'))
+ {
+ addToken (currentToken);
+ currentToken = new RETokenChar (subIndex, '\t', false);
+ }
+
+ // ALPHANUMERIC OPERATOR
+ // \w
+
+ else if (unit.bk && (unit.ch == 'w')
+ && syntax.get (RESyntax.RE_CHAR_CLASS_ESCAPES))
+ {
+ addToken (currentToken);
+ currentToken =
+ new RETokenPOSIX (subIndex, RETokenPOSIX.ALNUM, insens, false);
+ if (insensUSASCII)
+ currentToken.unicodeAware = false;
+ }
+
+ // NON-ALPHANUMERIC OPERATOR
+ // \W
+
+ else if (unit.bk && (unit.ch == 'W')
+ && syntax.get (RESyntax.RE_CHAR_CLASS_ESCAPES))
+ {
+ addToken (currentToken);
+ currentToken =
+ new RETokenPOSIX (subIndex, RETokenPOSIX.ALNUM, insens, true);
+ if (insensUSASCII)
+ currentToken.unicodeAware = false;
+ }
+
+ // END OF STRING OPERATOR
+ // \Z, \z
+
+ // FIXME: \Z and \z are different in that if the input string
+ // ends with a line terminator, \Z matches the position before
+ // the final terminator. This special behavior of \Z is yet
+ // to be implemented.
+
+ else if (unit.bk && (unit.ch == 'Z' || unit.ch == 'z') &&
+ syntax.get (RESyntax.RE_STRING_ANCHORS))
+ {
+ addToken (currentToken);
+ currentToken = new RETokenEnd (subIndex, null);
+ }
+
+ // HEX CHARACTER, UNICODE CHARACTER
+ // \x1B, \u1234
+
+ else
+ if ((unit.bk && (unit.ch == 'x')
+ && syntax.get (RESyntax.RE_HEX_CHAR)) || (unit.bk
+ && (unit.ch == 'u')
+ && syntax.
+ get (RESyntax.
+ RE_UNICODE_CHAR)))
+ {
+ CharExpression ce =
+ getCharExpression (pattern, index - 2, pLength, syntax);
+ if (ce == null)
+ throw new REException ("invalid hex character",
+ REException.REG_ESCAPE, index);
+ index = index - 2 + ce.len;
+ addToken (currentToken);
+ currentToken = new RETokenChar (subIndex, ce.ch, insens);
+ if (insensUSASCII)
+ currentToken.unicodeAware = false;
+ }
+
+ // NAMED PROPERTY
+ // \p{prop}, \P{prop}
+
+ else
+ if ((unit.bk && (unit.ch == 'p')
+ && syntax.get (RESyntax.RE_NAMED_PROPERTY)) || (unit.bk
+ && (unit.ch ==
+ 'P')
+ && syntax.
+ get (RESyntax.
+ RE_NAMED_PROPERTY)))
+ {
+ NamedProperty np = getNamedProperty (pattern, index - 2, pLength);
+ if (np == null)
+ throw new REException ("invalid escape sequence",
+ REException.REG_ESCAPE, index);
+ index = index - 2 + np.len;
+ addToken (currentToken);
+ currentToken =
+ getRETokenNamedProperty (subIndex, np, insens, index);
+ if (insensUSASCII)
+ currentToken.unicodeAware = false;
+ }
+
+ // END OF PREVIOUS MATCH
+ // \G
+
+ else if (unit.bk && (unit.ch == 'G') &&
+ syntax.get (RESyntax.RE_STRING_ANCHORS))
+ {
+ addToken (currentToken);
+ currentToken = new RETokenEndOfPreviousMatch (subIndex);
+ }
+
+ // NON-SPECIAL CHARACTER (or escape to make literal)
+ // c | \* for example
+
+ else
+ { // not a special character
+ addToken (currentToken);
+ currentToken = new RETokenChar (subIndex, unit.ch, insens);
+ if (insensUSASCII)
+ currentToken.unicodeAware = false;
+ }
+ } // end while
// Add final buffered token and an EndSub marker
addToken (currentToken);
if (branches != null)
{
- branches.
- add (new
- RE (firstToken, lastToken, numSubs, subIndex, minimumLength,
- maximumLength));
- branches.trimToSize (); // compact the Vector
- minimumLength = 0;
- maximumLength = 0;
- firstToken = lastToken = null;
- addToken (new RETokenOneOf (subIndex, branches, false));
+ branches.
+ add (new
+ RE (firstToken, lastToken, numSubs, subIndex, minimumLength,
+ maximumLength));
+ branches.trimToSize (); // compact the Vector
+ minimumLength = 0;
+ maximumLength = 0;
+ firstToken = lastToken = null;
+ addToken (new RETokenOneOf (subIndex, branches, false));
}
else
addToken (new RETokenEndSub (subIndex));
@@ -1403,11 +1403,11 @@ public class RE extends REToken
* @param syntax Syntax used to parse the pattern.
*/
private static ParseCharClassResult parseCharClass (int subIndex,
- char[]pattern,
- int index, int pLength,
- int cflags,
- RESyntax syntax,
- int pflags) throws
+ char[]pattern,
+ int index, int pLength,
+ int cflags,
+ RESyntax syntax,
+ int pflags) throws
REException
{
@@ -1425,256 +1425,256 @@ public class RE extends REToken
boolean lastCharIsSet = false;
if (index == pLength)
throw new REException (getLocalizedMessage ("unmatched.bracket"),
- REException.REG_EBRACK, index);
+ REException.REG_EBRACK, index);
// Check for initial caret, negation
if ((ch = pattern[index]) == '^')
{
- negative = true;
- if (++index == pLength)
- throw new REException (getLocalizedMessage ("class.no.end"),
- REException.REG_EBRACK, index);
- ch = pattern[index];
+ negative = true;
+ if (++index == pLength)
+ throw new REException (getLocalizedMessage ("class.no.end"),
+ REException.REG_EBRACK, index);
+ ch = pattern[index];
}
// Check for leading right bracket literal
if (ch == ']')
{
- lastChar = ch;
- lastCharIsSet = true;
- if (++index == pLength)
- throw new REException (getLocalizedMessage ("class.no.end"),
- REException.REG_EBRACK, index);
+ lastChar = ch;
+ lastCharIsSet = true;
+ if (++index == pLength)
+ throw new REException (getLocalizedMessage ("class.no.end"),
+ REException.REG_EBRACK, index);
}
while ((ch = pattern[index++]) != ']')
{
- if ((ch == '-') && (lastCharIsSet))
- {
- if (index == pLength)
- throw new REException (getLocalizedMessage ("class.no.end"),
- REException.REG_EBRACK, index);
- if ((ch = pattern[index]) == ']')
- {
- RETokenChar t = new RETokenChar (subIndex, lastChar, insens);
- if (insensUSASCII)
- t.unicodeAware = false;
- options.add (t);
- lastChar = '-';
- }
- else
- {
- if ((ch == '\\')
- && syntax.get (RESyntax.RE_BACKSLASH_ESCAPE_IN_LISTS))
- {
- CharExpression ce =
- getCharExpression (pattern, index, pLength, syntax);
- if (ce == null)
- throw new REException ("invalid escape sequence",
- REException.REG_ESCAPE, index);
- ch = ce.ch;
- index = index + ce.len - 1;
- }
- RETokenRange t =
- new RETokenRange (subIndex, lastChar, ch, insens);
- if (insensUSASCII)
- t.unicodeAware = false;
- options.add (t);
- lastChar = 0;
- lastCharIsSet = false;
- index++;
- }
- }
- else if ((ch == '\\')
- && syntax.get (RESyntax.RE_BACKSLASH_ESCAPE_IN_LISTS))
- {
- if (index == pLength)
- throw new REException (getLocalizedMessage ("class.no.end"),
- REException.REG_EBRACK, index);
- int posixID = -1;
- boolean negate = false;
- char asciiEsc = 0;
- boolean asciiEscIsSet = false;
- NamedProperty np = null;
- if (("dswDSW".indexOf (pattern[index]) != -1)
- && syntax.get (RESyntax.RE_CHAR_CLASS_ESC_IN_LISTS))
- {
- switch (pattern[index])
- {
- case 'D':
- negate = true;
- case 'd':
- posixID = RETokenPOSIX.DIGIT;
- break;
- case 'S':
- negate = true;
- case 's':
- posixID = RETokenPOSIX.SPACE;
- break;
- case 'W':
- negate = true;
- case 'w':
- posixID = RETokenPOSIX.ALNUM;
- break;
- }
- }
- if (("pP".indexOf (pattern[index]) != -1)
- && syntax.get (RESyntax.RE_NAMED_PROPERTY))
- {
- np = getNamedProperty (pattern, index - 1, pLength);
- if (np == null)
- throw new REException ("invalid escape sequence",
- REException.REG_ESCAPE, index);
- index = index - 1 + np.len - 1;
- }
- else
- {
- CharExpression ce =
- getCharExpression (pattern, index - 1, pLength, syntax);
- if (ce == null)
- throw new REException ("invalid escape sequence",
- REException.REG_ESCAPE, index);
- asciiEsc = ce.ch;
- asciiEscIsSet = true;
- index = index - 1 + ce.len - 1;
- }
- if (lastCharIsSet)
- {
- RETokenChar t = new RETokenChar (subIndex, lastChar, insens);
- if (insensUSASCII)
- t.unicodeAware = false;
- options.add (t);
- }
-
- if (posixID != -1)
- {
- RETokenPOSIX t =
- new RETokenPOSIX (subIndex, posixID, insens, negate);
- if (insensUSASCII)
- t.unicodeAware = false;
- options.add (t);
- }
- else if (np != null)
- {
- RETokenNamedProperty t =
- getRETokenNamedProperty (subIndex, np, insens, index);
- if (insensUSASCII)
- t.unicodeAware = false;
- options.add (t);
- }
- else if (asciiEscIsSet)
- {
- lastChar = asciiEsc;
- lastCharIsSet = true;
- }
- else
- {
- lastChar = pattern[index];
- lastCharIsSet = true;
- }
- ++index;
- }
- else if ((ch == '[') && (syntax.get (RESyntax.RE_CHAR_CLASSES))
- && (index < pLength) && (pattern[index] == ':'))
- {
- CPStringBuilder posixSet = new CPStringBuilder ();
- index = getPosixSet (pattern, index + 1, posixSet);
- int posixId = RETokenPOSIX.intValue (posixSet.toString ());
- if (posixId != -1)
- {
- RETokenPOSIX t =
- new RETokenPOSIX (subIndex, posixId, insens, false);
- if (insensUSASCII)
- t.unicodeAware = false;
- options.add (t);
- }
- }
- else if ((ch == '[') && (syntax.get (RESyntax.RE_NESTED_CHARCLASS)))
- {
- ParseCharClassResult result =
- parseCharClass (subIndex, pattern, index, pLength, cflags,
- syntax, 0);
- addition.add (result.token);
- addition.add ("|");
- index = result.index;
- }
- else if ((ch == '&') &&
- (syntax.get (RESyntax.RE_NESTED_CHARCLASS)) &&
- (index < pLength) && (pattern[index] == '&'))
- {
- if (returnAtAndOperator)
- {
- ParseCharClassResult result = new ParseCharClassResult ();
- options.trimToSize ();
- if (additionAndAppeared)
- addition.add ("&");
- if (addition.size () == 0)
- addition = null;
- result.token = new RETokenOneOf (subIndex,
- options, addition, negative);
- result.index = index - 1;
- result.returnAtAndOperator = true;
- return result;
- }
- // The precedence of the operator "&&" is the lowest.
- // So we postpone adding "&" until other elements
- // are added. And we insert Boolean.FALSE at the
- // beginning of the list of tokens following "&&".
- // So, "&&[a-b][k-m]" will be stored in the Vecter
- // addition in this order:
- // Boolean.FALSE, [a-b], "|", [k-m], "|", "&"
- if (additionAndAppeared)
- addition.add ("&");
- addition.add (Boolean.FALSE);
- additionAndAppeared = true;
-
- // The part on which "&&" operates may be either
- // (1) explicitly enclosed by []
- // or
- // (2) not enclosed by [] and terminated by the
- // next "&&" or the end of the character list.
- // Let the preceding else if block do the case (1).
- // We must do something in case of (2).
- if ((index + 1 < pLength) && (pattern[index + 1] != '['))
- {
- ParseCharClassResult result =
- parseCharClass (subIndex, pattern, index + 1, pLength,
- cflags, syntax,
- RETURN_AT_AND);
- addition.add (result.token);
- addition.add ("|");
- // If the method returned at the next "&&", it is OK.
- // Otherwise we have eaten the mark of the end of this
- // character list "]". In this case we must give back
- // the end mark.
- index = (result.returnAtAndOperator ?
- result.index : result.index - 1);
- }
- }
- else
- {
- if (lastCharIsSet)
- {
- RETokenChar t = new RETokenChar (subIndex, lastChar, insens);
- if (insensUSASCII)
- t.unicodeAware = false;
- options.add (t);
- }
- lastChar = ch;
- lastCharIsSet = true;
- }
- if (index == pLength)
- throw new REException (getLocalizedMessage ("class.no.end"),
- REException.REG_EBRACK, index);
- } // while in list
+ if ((ch == '-') && (lastCharIsSet))
+ {
+ if (index == pLength)
+ throw new REException (getLocalizedMessage ("class.no.end"),
+ REException.REG_EBRACK, index);
+ if ((ch = pattern[index]) == ']')
+ {
+ RETokenChar t = new RETokenChar (subIndex, lastChar, insens);
+ if (insensUSASCII)
+ t.unicodeAware = false;
+ options.add (t);
+ lastChar = '-';
+ }
+ else
+ {
+ if ((ch == '\\')
+ && syntax.get (RESyntax.RE_BACKSLASH_ESCAPE_IN_LISTS))
+ {
+ CharExpression ce =
+ getCharExpression (pattern, index, pLength, syntax);
+ if (ce == null)
+ throw new REException ("invalid escape sequence",
+ REException.REG_ESCAPE, index);
+ ch = ce.ch;
+ index = index + ce.len - 1;
+ }
+ RETokenRange t =
+ new RETokenRange (subIndex, lastChar, ch, insens);
+ if (insensUSASCII)
+ t.unicodeAware = false;
+ options.add (t);
+ lastChar = 0;
+ lastCharIsSet = false;
+ index++;
+ }
+ }
+ else if ((ch == '\\')
+ && syntax.get (RESyntax.RE_BACKSLASH_ESCAPE_IN_LISTS))
+ {
+ if (index == pLength)
+ throw new REException (getLocalizedMessage ("class.no.end"),
+ REException.REG_EBRACK, index);
+ int posixID = -1;
+ boolean negate = false;
+ char asciiEsc = 0;
+ boolean asciiEscIsSet = false;
+ NamedProperty np = null;
+ if (("dswDSW".indexOf (pattern[index]) != -1)
+ && syntax.get (RESyntax.RE_CHAR_CLASS_ESC_IN_LISTS))
+ {
+ switch (pattern[index])
+ {
+ case 'D':
+ negate = true;
+ case 'd':
+ posixID = RETokenPOSIX.DIGIT;
+ break;
+ case 'S':
+ negate = true;
+ case 's':
+ posixID = RETokenPOSIX.SPACE;
+ break;
+ case 'W':
+ negate = true;
+ case 'w':
+ posixID = RETokenPOSIX.ALNUM;
+ break;
+ }
+ }
+ if (("pP".indexOf (pattern[index]) != -1)
+ && syntax.get (RESyntax.RE_NAMED_PROPERTY))
+ {
+ np = getNamedProperty (pattern, index - 1, pLength);
+ if (np == null)
+ throw new REException ("invalid escape sequence",
+ REException.REG_ESCAPE, index);
+ index = index - 1 + np.len - 1;
+ }
+ else
+ {
+ CharExpression ce =
+ getCharExpression (pattern, index - 1, pLength, syntax);
+ if (ce == null)
+ throw new REException ("invalid escape sequence",
+ REException.REG_ESCAPE, index);
+ asciiEsc = ce.ch;
+ asciiEscIsSet = true;
+ index = index - 1 + ce.len - 1;
+ }
+ if (lastCharIsSet)
+ {
+ RETokenChar t = new RETokenChar (subIndex, lastChar, insens);
+ if (insensUSASCII)
+ t.unicodeAware = false;
+ options.add (t);
+ }
+
+ if (posixID != -1)
+ {
+ RETokenPOSIX t =
+ new RETokenPOSIX (subIndex, posixID, insens, negate);
+ if (insensUSASCII)
+ t.unicodeAware = false;
+ options.add (t);
+ }
+ else if (np != null)
+ {
+ RETokenNamedProperty t =
+ getRETokenNamedProperty (subIndex, np, insens, index);
+ if (insensUSASCII)
+ t.unicodeAware = false;
+ options.add (t);
+ }
+ else if (asciiEscIsSet)
+ {
+ lastChar = asciiEsc;
+ lastCharIsSet = true;
+ }
+ else
+ {
+ lastChar = pattern[index];
+ lastCharIsSet = true;
+ }
+ ++index;
+ }
+ else if ((ch == '[') && (syntax.get (RESyntax.RE_CHAR_CLASSES))
+ && (index < pLength) && (pattern[index] == ':'))
+ {
+ CPStringBuilder posixSet = new CPStringBuilder ();
+ index = getPosixSet (pattern, index + 1, posixSet);
+ int posixId = RETokenPOSIX.intValue (posixSet.toString ());
+ if (posixId != -1)
+ {
+ RETokenPOSIX t =
+ new RETokenPOSIX (subIndex, posixId, insens, false);
+ if (insensUSASCII)
+ t.unicodeAware = false;
+ options.add (t);
+ }
+ }
+ else if ((ch == '[') && (syntax.get (RESyntax.RE_NESTED_CHARCLASS)))
+ {
+ ParseCharClassResult result =
+ parseCharClass (subIndex, pattern, index, pLength, cflags,
+ syntax, 0);
+ addition.add (result.token);
+ addition.add ("|");
+ index = result.index;
+ }
+ else if ((ch == '&') &&
+ (syntax.get (RESyntax.RE_NESTED_CHARCLASS)) &&
+ (index < pLength) && (pattern[index] == '&'))
+ {
+ if (returnAtAndOperator)
+ {
+ ParseCharClassResult result = new ParseCharClassResult ();
+ options.trimToSize ();
+ if (additionAndAppeared)
+ addition.add ("&");
+ if (addition.size () == 0)
+ addition = null;
+ result.token = new RETokenOneOf (subIndex,
+ options, addition, negative);
+ result.index = index - 1;
+ result.returnAtAndOperator = true;
+ return result;
+ }
+ // The precedence of the operator "&&" is the lowest.
+ // So we postpone adding "&" until other elements
+ // are added. And we insert Boolean.FALSE at the
+ // beginning of the list of tokens following "&&".
+ // So, "&&[a-b][k-m]" will be stored in the Vecter
+ // addition in this order:
+ // Boolean.FALSE, [a-b], "|", [k-m], "|", "&"
+ if (additionAndAppeared)
+ addition.add ("&");
+ addition.add (Boolean.FALSE);
+ additionAndAppeared = true;
+
+ // The part on which "&&" operates may be either
+ // (1) explicitly enclosed by []
+ // or
+ // (2) not enclosed by [] and terminated by the
+ // next "&&" or the end of the character list.
+ // Let the preceding else if block do the case (1).
+ // We must do something in case of (2).
+ if ((index + 1 < pLength) && (pattern[index + 1] != '['))
+ {
+ ParseCharClassResult result =
+ parseCharClass (subIndex, pattern, index + 1, pLength,
+ cflags, syntax,
+ RETURN_AT_AND);
+ addition.add (result.token);
+ addition.add ("|");
+ // If the method returned at the next "&&", it is OK.
+ // Otherwise we have eaten the mark of the end of this
+ // character list "]". In this case we must give back
+ // the end mark.
+ index = (result.returnAtAndOperator ?
+ result.index : result.index - 1);
+ }
+ }
+ else
+ {
+ if (lastCharIsSet)
+ {
+ RETokenChar t = new RETokenChar (subIndex, lastChar, insens);
+ if (insensUSASCII)
+ t.unicodeAware = false;
+ options.add (t);
+ }
+ lastChar = ch;
+ lastCharIsSet = true;
+ }
+ if (index == pLength)
+ throw new REException (getLocalizedMessage ("class.no.end"),
+ REException.REG_EBRACK, index);
+ } // while in list
// Out of list, index is one past ']'
if (lastCharIsSet)
{
- RETokenChar t = new RETokenChar (subIndex, lastChar, insens);
- if (insensUSASCII)
- t.unicodeAware = false;
- options.add (t);
+ RETokenChar t = new RETokenChar (subIndex, lastChar, insens);
+ if (insensUSASCII)
+ t.unicodeAware = false;
+ options.add (t);
}
ParseCharClassResult result = new ParseCharClassResult ();
@@ -1690,17 +1690,17 @@ public class RE extends REToken
}
private static int getCharUnit (char[]input, int index, CharUnit unit,
- boolean quot) throws REException
+ boolean quot) throws REException
{
unit.ch = input[index++];
unit.bk = (unit.ch == '\\'
- && (!quot || index >= input.length || input[index] == 'E'));
+ && (!quot || index >= input.length || input[index] == 'E'));
if (unit.bk)
if (index < input.length)
- unit.ch = input[index++];
+ unit.ch = input[index++];
else
- throw new REException (getLocalizedMessage ("ends.with.backslash"),
- REException.REG_ESCAPE, index);
+ throw new REException (getLocalizedMessage ("ends.with.backslash"),
+ REException.REG_ESCAPE, index);
return index;
}
@@ -1709,7 +1709,7 @@ public class RE extends REToken
int ret = 0;
for (int i = pos; i < pos + len; i++)
{
- ret = ret * radix + Character.digit (input[i], radix);
+ ret = ret * radix + Character.digit (input[i], radix);
}
return ret;
}
@@ -1736,92 +1736,92 @@ public class RE extends REToken
}
private static CharExpression getCharExpression (char[]input, int pos,
- int lim, RESyntax syntax)
+ int lim, RESyntax syntax)
{
CharExpression ce = new CharExpression ();
char c = input[pos];
if (c == '\\')
{
- if (pos + 1 >= lim)
- return null;
- c = input[pos + 1];
- switch (c)
- {
- case 't':
- ce.ch = '\t';
- ce.len = 2;
- break;
- case 'n':
- ce.ch = '\n';
- ce.len = 2;
- break;
- case 'r':
- ce.ch = '\r';
- ce.len = 2;
- break;
- case 'x':
- case 'u':
- if ((c == 'x' && syntax.get (RESyntax.RE_HEX_CHAR)) ||
- (c == 'u' && syntax.get (RESyntax.RE_UNICODE_CHAR)))
- {
- int l = 0;
- int expectedLength = (c == 'x' ? 2 : 4);
- for (int i = pos + 2; i < pos + 2 + expectedLength; i++)
- {
- if (i >= lim)
- break;
- if (!((input[i] >= '0' && input[i] <= '9') ||
- (input[i] >= 'A' && input[i] <= 'F') ||
- (input[i] >= 'a' && input[i] <= 'f')))
- break;
- l++;
- }
- if (l != expectedLength)
- return null;
- ce.ch = (char) (parseInt (input, pos + 2, l, 16));
- ce.len = l + 2;
- }
- else
- {
- ce.ch = c;
- ce.len = 2;
- }
- break;
- case '0':
- if (syntax.get (RESyntax.RE_OCTAL_CHAR))
- {
- int l = 0;
- for (int i = pos + 2; i < pos + 2 + 3; i++)
- {
- if (i >= lim)
- break;
- if (input[i] < '0' || input[i] > '7')
- break;
- l++;
- }
- if (l == 3 && input[pos + 2] > '3')
- l--;
- if (l <= 0)
- return null;
- ce.ch = (char) (parseInt (input, pos + 2, l, 8));
- ce.len = l + 2;
- }
- else
- {
- ce.ch = c;
- ce.len = 2;
- }
- break;
- default:
- ce.ch = c;
- ce.len = 2;
- break;
- }
+ if (pos + 1 >= lim)
+ return null;
+ c = input[pos + 1];
+ switch (c)
+ {
+ case 't':
+ ce.ch = '\t';
+ ce.len = 2;
+ break;
+ case 'n':
+ ce.ch = '\n';
+ ce.len = 2;
+ break;
+ case 'r':
+ ce.ch = '\r';
+ ce.len = 2;
+ break;
+ case 'x':
+ case 'u':
+ if ((c == 'x' && syntax.get (RESyntax.RE_HEX_CHAR)) ||
+ (c == 'u' && syntax.get (RESyntax.RE_UNICODE_CHAR)))
+ {
+ int l = 0;
+ int expectedLength = (c == 'x' ? 2 : 4);
+ for (int i = pos + 2; i < pos + 2 + expectedLength; i++)
+ {
+ if (i >= lim)
+ break;
+ if (!((input[i] >= '0' && input[i] <= '9') ||
+ (input[i] >= 'A' && input[i] <= 'F') ||
+ (input[i] >= 'a' && input[i] <= 'f')))
+ break;
+ l++;
+ }
+ if (l != expectedLength)
+ return null;
+ ce.ch = (char) (parseInt (input, pos + 2, l, 16));
+ ce.len = l + 2;
+ }
+ else
+ {
+ ce.ch = c;
+ ce.len = 2;
+ }
+ break;
+ case '0':
+ if (syntax.get (RESyntax.RE_OCTAL_CHAR))
+ {
+ int l = 0;
+ for (int i = pos + 2; i < pos + 2 + 3; i++)
+ {
+ if (i >= lim)
+ break;
+ if (input[i] < '0' || input[i] > '7')
+ break;
+ l++;
+ }
+ if (l == 3 && input[pos + 2] > '3')
+ l--;
+ if (l <= 0)
+ return null;
+ ce.ch = (char) (parseInt (input, pos + 2, l, 8));
+ ce.len = l + 2;
+ }
+ else
+ {
+ ce.ch = c;
+ ce.len = 2;
+ }
+ break;
+ default:
+ ce.ch = c;
+ ce.len = 2;
+ break;
+ }
}
else
{
- ce.ch = input[pos];
- ce.len = 1;
+ ce.ch = input[pos];
+ ce.len = 1;
}
ce.expr = new String (input, pos, ce.len);
return ce;
@@ -1846,60 +1846,60 @@ public class RE extends REToken
}
private static NamedProperty getNamedProperty (char[]input, int pos,
- int lim)
+ int lim)
{
NamedProperty np = new NamedProperty ();
char c = input[pos];
if (c == '\\')
{
- if (++pos >= lim)
- return null;
- c = input[pos++];
- switch (c)
- {
- case 'p':
- np.negate = false;
- break;
- case 'P':
- np.negate = true;
- break;
- default:
- return null;
- }
- c = input[pos++];
- if (c == '{')
- {
- int p = -1;
- for (int i = pos; i < lim; i++)
- {
- if (input[i] == '}')
- {
- p = i;
- break;
- }
- }
- if (p < 0)
- return null;
- int len = p - pos;
- np.name = new String (input, pos, len);
- np.len = len + 4;
- }
- else
- {
- np.name = new String (input, pos - 1, 1);
- np.len = 3;
- }
- return np;
+ if (++pos >= lim)
+ return null;
+ c = input[pos++];
+ switch (c)
+ {
+ case 'p':
+ np.negate = false;
+ break;
+ case 'P':
+ np.negate = true;
+ break;
+ default:
+ return null;
+ }
+ c = input[pos++];
+ if (c == '{')
+ {
+ int p = -1;
+ for (int i = pos; i < lim; i++)
+ {
+ if (input[i] == '}')
+ {
+ p = i;
+ break;
+ }
+ }
+ if (p < 0)
+ return null;
+ int len = p - pos;
+ np.name = new String (input, pos, len);
+ np.len = len + 4;
+ }
+ else
+ {
+ np.name = new String (input, pos - 1, 1);
+ np.len = 3;
+ }
+ return np;
}
else
return null;
}
private static RETokenNamedProperty getRETokenNamedProperty (int subIndex,
- NamedProperty
- np,
- boolean insens,
- int index)
+ NamedProperty
+ np,
+ boolean insens,
+ int index)
throws REException
{
try
@@ -1953,18 +1953,18 @@ public class RE extends REToken
private boolean isMatchImpl (CharIndexed input, int index, int eflags)
{
- if (firstToken == null) // Trivial case
+ if (firstToken == null) // Trivial case
return (input.charAt (0) == CharIndexed.OUT_OF_BOUNDS);
REMatch m = new REMatch (numSubs, index, eflags);
if (firstToken.match (input, m))
{
- if (m != null)
- {
- if (input.charAt (m.index) == CharIndexed.OUT_OF_BOUNDS)
- {
- return true;
- }
- }
+ if (m != null)
+ {
+ if (input.charAt (m.index) == CharIndexed.OUT_OF_BOUNDS)
+ {
+ return true;
+ }
+ }
}
return false;
}
@@ -1984,10 +1984,10 @@ public class RE extends REToken
{
if (lastToken != null)
{
- lastToken.setUncle (uncle);
+ lastToken.setUncle (uncle);
}
else
- super.setUncle (uncle); // to deal with empty subexpressions
+ super.setUncle (uncle); // to deal with empty subexpressions
}
// Overrides REToken.chain
@@ -2063,25 +2063,25 @@ public class RE extends REToken
// this has been changed since 1.03 to be non-overlapping matches
private REMatch[] getAllMatchesImpl (CharIndexed input, int index,
- int eflags)
+ int eflags)
{
List < REMatch > all = new ArrayList < REMatch > ();
REMatch m = null;
while ((m = getMatchImpl (input, index, eflags, null)) != null)
{
- all.add (m);
- index = m.getEndIndex ();
- if (m.end[0] == 0)
- { // handle pathological case of zero-length match
- index++;
- input.move (1);
- }
- else
- {
- input.move (m.end[0]);
- }
- if (!input.isValid ())
- break;
+ all.add (m);
+ index = m.getEndIndex ();
+ if (m.end[0] == 0)
+ { // handle pathological case of zero-length match
+ index++;
+ input.move (1);
+ }
+ else
+ {
+ input.move (m.end[0]);
+ }
+ if (!input.isValid ())
+ break;
}
return all.toArray (new REMatch[all.size ()]);
}
@@ -2092,7 +2092,7 @@ public class RE extends REToken
input.setHitEnd (mymatch);
if (firstToken == null)
{
- return next (input, mymatch);
+ return next (input, mymatch);
}
// Note the start of this subexpression
@@ -2108,7 +2108,7 @@ public class RE extends REToken
boolean b = match (input, mymatch);
if (b)
{
- return mymatch;
+ return mymatch;
}
return null;
}
@@ -2168,78 +2168,78 @@ public class RE extends REToken
* @param buffer The StringBuffer to save pre-match text in.
* @return An REMatch instance referencing the match, or null if none. */
public REMatch getMatch (Object input, int index, int eflags,
- CPStringBuilder buffer)
+ CPStringBuilder buffer)
{
return getMatchImpl (makeCharIndexed (input, index), index, eflags,
- buffer);
+ buffer);
}
REMatch getMatchImpl (CharIndexed input, int anchor, int eflags,
- CPStringBuilder buffer)
+ CPStringBuilder buffer)
{
boolean tryEntireMatch = ((eflags & REG_TRY_ENTIRE_MATCH) != 0);
boolean doMove = ((eflags & REG_FIX_STARTING_POSITION) == 0);
RE re = (tryEntireMatch ? (RE) this.clone () : this);
if (tryEntireMatch)
{
- RETokenEnd reEnd = new RETokenEnd (0, null);
- reEnd.setFake (true);
- re.chain (reEnd);
+ RETokenEnd reEnd = new RETokenEnd (0, null);
+ reEnd.setFake (true);
+ re.chain (reEnd);
}
// Create a new REMatch to hold results
REMatch mymatch = new REMatch (numSubs, anchor, eflags);
do
{
- /* The following potimization is commented out because
- the matching should be tried even if the length of
- input is obviously too short in order that
- java.util.regex.Matcher#hitEnd() may work correctly.
- // Optimization: check if anchor + minimumLength > length
- if (minimumLength == 0 || input.charAt(minimumLength-1) != CharIndexed.OUT_OF_BOUNDS) {
- */
- if (re.match (input, mymatch))
- {
- REMatch best = mymatch;
- // We assume that the match that coms first is the best.
- // And the following "The longer, the better" rule has
- // been commented out. The longest is not neccesarily
- // the best. For example, "a" out of "aaa" is the best
- // match for /a+?/.
- /*
- // Find best match of them all to observe leftmost longest
- while ((mymatch = mymatch.next) != null) {
- if (mymatch.index > best.index) {
- best = mymatch;
- }
- }
- */
- best.end[0] = best.index;
- best.finish (input);
- input.setLastMatch (best);
- return best;
- }
- /* End of the optimization commented out
- }
- */
- mymatch.clear (++anchor);
- // Append character to buffer if needed
- if (buffer != null && input.charAt (0) != CharIndexed.OUT_OF_BOUNDS)
- {
- buffer.append (input.charAt (0));
- }
- // java.util.regex.Matcher#hitEnd() requires that the search should
- // be tried at the end of input, so we use move1(1) instead of move(1)
+ /* The following potimization is commented out because
+ the matching should be tried even if the length of
+ input is obviously too short in order that
+ java.util.regex.Matcher#hitEnd() may work correctly.
+ // Optimization: check if anchor + minimumLength > length
+ if (minimumLength == 0 || input.charAt(minimumLength-1) != CharIndexed.OUT_OF_BOUNDS) {
+ */
+ if (re.match (input, mymatch))
+ {
+ REMatch best = mymatch;
+ // We assume that the match that coms first is the best.
+ // And the following "The longer, the better" rule has
+ // been commented out. The longest is not neccesarily
+ // the best. For example, "a" out of "aaa" is the best
+ // match for /a+?/.
+ /*
+ // Find best match of them all to observe leftmost longest
+ while ((mymatch = mymatch.next) != null) {
+ if (mymatch.index > best.index) {
+ best = mymatch;
+ }
+ }
+ */
+ best.end[0] = best.index;
+ best.finish (input);
+ input.setLastMatch (best);
+ return best;
+ }
+ /* End of the optimization commented out
+ }
+ */
+ mymatch.clear (++anchor);
+ // Append character to buffer if needed
+ if (buffer != null && input.charAt (0) != CharIndexed.OUT_OF_BOUNDS)
+ {
+ buffer.append (input.charAt (0));
+ }
+ // java.util.regex.Matcher#hitEnd() requires that the search should
+ // be tried at the end of input, so we use move1(1) instead of move(1)
}
while (doMove && input.move1 (1));
// Special handling at end of input for e.g. "$"
if (minimumLength == 0)
{
- if (match (input, mymatch))
- {
- mymatch.finish (input);
- return mymatch;
- }
+ if (match (input, mymatch))
+ {
+ mymatch.finish (input);
+ return mymatch;
+ }
}
return null;
@@ -2283,10 +2283,10 @@ public class RE extends REToken
* set to the index position specified.
*/
public REMatchEnumeration getMatchEnumeration (Object input, int index,
- int eflags)
+ int eflags)
{
return new REMatchEnumeration (this, makeCharIndexed (input, index),
- index, eflags);
+ index, eflags);
}
@@ -2307,7 +2307,7 @@ public class RE extends REToken
* Substitutes the replacement text for the first match found in the input
* beginning at the specified index position. Specifying an index
* effectively causes the regular expression engine to throw away the
- * specified number of characters.
+ * specified number of characters.
*
* @param input The input text.
* @param replace The replacement text, which may contain $x metacharacters (see REMatch.substituteInto).
@@ -2335,14 +2335,14 @@ public class RE extends REToken
* @see REMatch#substituteInto
*/
public String substitute (Object input, String replace, int index,
- int eflags)
+ int eflags)
{
return substituteImpl (makeCharIndexed (input, index), replace, index,
- eflags);
+ eflags);
}
private String substituteImpl (CharIndexed input, String replace, int index,
- int eflags)
+ int eflags)
{
CPStringBuilder buffer = new CPStringBuilder ();
REMatch m = getMatchImpl (input, index, eflags, buffer);
@@ -2351,17 +2351,17 @@ public class RE extends REToken
buffer.append (getReplacement (replace, m, eflags));
if (input.move (m.end[0]))
{
- do
- {
- buffer.append (input.charAt (0));
- }
- while (input.move (1));
+ do
+ {
+ buffer.append (input.charAt (0));
+ }
+ while (input.move (1));
}
return buffer.toString ();
}
/**
- * Substitutes the replacement text for each non-overlapping match found
+ * Substitutes the replacement text for each non-overlapping match found
* in the input text.
*
* @param input The input text.
@@ -2375,7 +2375,7 @@ public class RE extends REToken
}
/**
- * Substitutes the replacement text for each non-overlapping match found
+ * Substitutes the replacement text for each non-overlapping match found
* in the input text, starting at the specified index.
*
* If the regular expression allows the empty string to match, it will
@@ -2394,7 +2394,7 @@ public class RE extends REToken
}
/**
- * Substitutes the replacement text for each non-overlapping match found
+ * Substitutes the replacement text for each non-overlapping match found
* in the input text, starting at the specified index and using the
* specified execution flags.
*
@@ -2407,35 +2407,35 @@ public class RE extends REToken
* @see REMatch#substituteInto
*/
public String substituteAll (Object input, String replace, int index,
- int eflags)
+ int eflags)
{
return substituteAllImpl (makeCharIndexed (input, index), replace, index,
- eflags);
+ eflags);
}
private String substituteAllImpl (CharIndexed input, String replace,
- int index, int eflags)
+ int index, int eflags)
{
CPStringBuilder buffer = new CPStringBuilder ();
REMatch m;
while ((m = getMatchImpl (input, index, eflags, buffer)) != null)
{
- buffer.append (getReplacement (replace, m, eflags));
- index = m.getEndIndex ();
- if (m.end[0] == 0)
- {
- char ch = input.charAt (0);
- if (ch != CharIndexed.OUT_OF_BOUNDS)
- buffer.append (ch);
- input.move (1);
- }
- else
- {
- input.move (m.end[0]);
- }
-
- if (!input.isValid ())
- break;
+ buffer.append (getReplacement (replace, m, eflags));
+ index = m.getEndIndex ();
+ if (m.end[0] == 0)
+ {
+ char ch = input.charAt (0);
+ if (ch != CharIndexed.OUT_OF_BOUNDS)
+ buffer.append (ch);
+ input.move (1);
+ }
+ else
+ {
+ input.move (m.end[0]);
+ }
+
+ if (!input.isValid ())
+ break;
}
return buffer.toString ();
}
@@ -2446,36 +2446,36 @@ public class RE extends REToken
return replace;
else
{
- if ((eflags & REG_REPLACE_USE_BACKSLASHESCAPE) > 0)
- {
- CPStringBuilder sb = new CPStringBuilder ();
- int l = replace.length ();
- for (int i = 0; i < l; i++)
- {
- char c = replace.charAt (i);
- switch (c)
- {
- case '\\':
- i++;
- // Let StringIndexOutOfBoundsException be thrown.
- sb.append (replace.charAt (i));
- break;
- case '$':
- int i1 = i + 1;
- while (i1 < replace.length () &&
- Character.isDigit (replace.charAt (i1)))
- i1++;
- sb.append (m.substituteInto (replace.substring (i, i1)));
- i = i1 - 1;
- break;
- default:
- sb.append (c);
- }
- }
- return sb.toString ();
- }
- else
- return m.substituteInto (replace);
+ if ((eflags & REG_REPLACE_USE_BACKSLASHESCAPE) > 0)
+ {
+ CPStringBuilder sb = new CPStringBuilder ();
+ int l = replace.length ();
+ for (int i = 0; i < l; i++)
+ {
+ char c = replace.charAt (i);
+ switch (c)
+ {
+ case '\\':
+ i++;
+ // Let StringIndexOutOfBoundsException be thrown.
+ sb.append (replace.charAt (i));
+ break;
+ case '$':
+ int i1 = i + 1;
+ while (i1 < replace.length () &&
+ Character.isDigit (replace.charAt (i1)))
+ i1++;
+ sb.append (m.substituteInto (replace.substring (i, i1)));
+ i = i1 - 1;
+ break;
+ default:
+ sb.append (c);
+ }
+ }
+ return sb.toString ();
+ }
+ else
+ return m.substituteInto (replace);
}
}
@@ -2493,45 +2493,45 @@ public class RE extends REToken
if (firstToken == null)
{
- lastToken = firstToken = next;
+ lastToken = firstToken = next;
}
else
{
- // if chain returns false, it "rejected" the token due to
- // an optimization, and next was combined with lastToken
- if (lastToken.chain (next))
- {
- lastToken = next;
- }
+ // if chain returns false, it "rejected" the token due to
+ // an optimization, and next was combined with lastToken
+ if (lastToken.chain (next))
+ {
+ lastToken = next;
+ }
}
}
private static REToken setRepeated (REToken current, int min, int max,
- int index) throws REException
+ int index) throws REException
{
if (current == null)
throw new REException (getLocalizedMessage ("repeat.no.token"),
- REException.REG_BADRPT, index);
+ REException.REG_BADRPT, index);
return new RETokenRepeated (current.subIndex, current, min, max);
}
private static int getPosixSet (char[]pattern, int index,
- CPStringBuilder buf)
+ CPStringBuilder buf)
{
// Precondition: pattern[index-1] == ':'
// we will return pos of closing ']'.
int i;
for (i = index; i < (pattern.length - 1); i++)
{
- if ((pattern[i] == ':') && (pattern[i + 1] == ']'))
- return i + 2;
- buf.append (pattern[i]);
+ if ((pattern[i] == ':') && (pattern[i + 1] == ']'))
+ return i + 2;
+ buf.append (pattern[i]);
}
- return index; // didn't match up
+ return index; // didn't match up
}
private int getMinMax (char[]input, int index, IntPair minMax,
- RESyntax syntax) throws REException
+ RESyntax syntax) throws REException
{
// Precondition: input[index-1] == '{', minMax != null
@@ -2539,11 +2539,11 @@ public class RE extends REToken
int startIndex = index;
if (index == input.length)
{
- if (mustMatch)
- throw new REException (getLocalizedMessage ("unmatched.brace"),
- REException.REG_EBRACE, index);
- else
- return startIndex;
+ if (mustMatch)
+ throw new REException (getLocalizedMessage ("unmatched.brace"),
+ REException.REG_EBRACE, index);
+ else
+ return startIndex;
}
int min, max = 0;
@@ -2553,20 +2553,20 @@ public class RE extends REToken
// Read string of digits
do
{
- index = getCharUnit (input, index, unit, false);
- if (Character.isDigit (unit.ch))
- buf.append (unit.ch);
+ index = getCharUnit (input, index, unit, false);
+ if (Character.isDigit (unit.ch))
+ buf.append (unit.ch);
}
while ((index != input.length) && Character.isDigit (unit.ch));
// Check for {} tomfoolery
if (buf.length () == 0)
{
- if (mustMatch)
- throw new REException (getLocalizedMessage ("interval.error"),
- REException.REG_EBRACE, index);
- else
- return startIndex;
+ if (mustMatch)
+ throw new REException (getLocalizedMessage ("interval.error"),
+ REException.REG_EBRACE, index);
+ else
+ return startIndex;
}
min = Integer.parseInt (buf.toString ());
@@ -2575,8 +2575,8 @@ public class RE extends REToken
max = min;
else if (index == input.length)
if (mustMatch)
- throw new REException (getLocalizedMessage ("interval.no.end"),
- REException.REG_EBRACE, index);
+ throw new REException (getLocalizedMessage ("interval.no.end"),
+ REException.REG_EBRACE, index);
else
return startIndex;
else
@@ -2585,28 +2585,28 @@ public class RE extends REToken
buf = new CPStringBuilder ();
// Read string of digits
while (((index =
- getCharUnit (input, index, unit, false)) != input.length)
- && Character.isDigit (unit.ch))
- buf.append (unit.ch);
+ getCharUnit (input, index, unit, false)) != input.length)
+ && Character.isDigit (unit.ch))
+ buf.append (unit.ch);
if (!
- ((unit.ch == '}')
- && (syntax.get (RESyntax.RE_NO_BK_BRACES) ^ unit.bk)))
- if (mustMatch)
- throw new REException (getLocalizedMessage ("interval.error"),
- REException.REG_EBRACE, index);
+ ((unit.ch == '}')
+ && (syntax.get (RESyntax.RE_NO_BK_BRACES) ^ unit.bk)))
+ if (mustMatch)
+ throw new REException (getLocalizedMessage ("interval.error"),
+ REException.REG_EBRACE, index);
else
return startIndex;
// This is the case of {x,}
if (buf.length () == 0)
- max = Integer.MAX_VALUE;
+ max = Integer.MAX_VALUE;
else
- max = Integer.parseInt (buf.toString ());
+ max = Integer.parseInt (buf.toString ());
}
else if (mustMatch)
throw new REException (getLocalizedMessage ("interval.error"),
- REException.REG_EBRACE, index);
+ REException.REG_EBRACE, index);
else
return startIndex;
@@ -2651,13 +2651,13 @@ public class RE extends REToken
// be the most likely because this is the case with
// java.util.regex.Matcher.
// We could let a String or a CharSequence fall through
- // to final input, but since it'a very likely input type,
+ // to final input, but since it'a very likely input type,
// we check it first.
if (input instanceof CharIndexed)
{
- CharIndexed ci = (CharIndexed) input;
- ci.setAnchor (index);
- return ci;
+ CharIndexed ci = (CharIndexed) input;
+ ci.setAnchor (index);
+ return ci;
}
else if (input instanceof CharSequence)
return new CharIndexedCharSequence ((CharSequence) input, index);
diff --git a/gnu/java/util/regex/REFilterInputStream.java b/gnu/java/util/regex/REFilterInputStream.java
index c7acb714a..c9fb346ba 100644
--- a/gnu/java/util/regex/REFilterInputStream.java
+++ b/gnu/java/util/regex/REFilterInputStream.java
@@ -70,7 +70,7 @@ public class REFilterInputStream extends FilterInputStream
*
* @param stream The InputStream to be filtered.
* @param expr The regular expression to search for.
- * @param replace The text pattern to replace matches with.
+ * @param replace The text pattern to replace matches with.
*/
public REFilterInputStream (InputStream stream, RE expr, String replace)
{
@@ -89,7 +89,7 @@ public class REFilterInputStream extends FilterInputStream
// If we have buffered replace data, use it.
if ((buffer != null) && (bufpos < buffer.length ()))
{
- return (int) buffer.charAt (bufpos++);
+ return (int) buffer.charAt (bufpos++);
}
// check if input is at a valid position
@@ -99,18 +99,18 @@ public class REFilterInputStream extends FilterInputStream
REMatch mymatch = new REMatch (expr.getNumSubs (), offset, 0);
if (expr.match (stream, mymatch))
{
- mymatch.end[0] = mymatch.index;
- mymatch.finish (stream);
- stream.move (mymatch.toString ().length ());
- offset += mymatch.toString ().length ();
- buffer = mymatch.substituteInto (replace);
- bufpos = 1;
-
- // This is prone to infinite loops if replace string turns out empty.
- if (buffer.length () > 0)
- {
- return buffer.charAt (0);
- }
+ mymatch.end[0] = mymatch.index;
+ mymatch.finish (stream);
+ stream.move (mymatch.toString ().length ());
+ offset += mymatch.toString ().length ();
+ buffer = mymatch.substituteInto (replace);
+ bufpos = 1;
+
+ // This is prone to infinite loops if replace string turns out empty.
+ if (buffer.length () > 0)
+ {
+ return buffer.charAt (0);
+ }
}
char ch = stream.charAt (0);
if (ch == CharIndexed.OUT_OF_BOUNDS)
@@ -120,9 +120,9 @@ public class REFilterInputStream extends FilterInputStream
return ch;
}
- /**
+ /**
* Returns false. REFilterInputStream does not support mark() and
- * reset() methods.
+ * reset() methods.
*/
public boolean markSupported ()
{
@@ -136,11 +136,11 @@ public class REFilterInputStream extends FilterInputStream
int ok = 0;
while (len-- > 0)
{
- i = read ();
- if (i == -1)
- return (ok == 0) ? -1 : ok;
- b[off++] = (byte) i;
- ok++;
+ i = read ();
+ if (i == -1)
+ return (ok == 0) ? -1 : ok;
+ b[off++] = (byte) i;
+ ok++;
}
return ok;
}
diff --git a/gnu/java/util/regex/REMatch.java b/gnu/java/util/regex/REMatch.java
index d29972e1d..5940094ba 100644
--- a/gnu/java/util/regex/REMatch.java
+++ b/gnu/java/util/regex/REMatch.java
@@ -56,7 +56,7 @@ public final class REMatch implements Serializable, Cloneable
private CharIndexed matchedCharIndexed;
// These variables are package scope for fast access within the engine
- int eflags; // execution flags this match was made using
+ int eflags; // execution flags this match was made using
// Offset in source text where match was tried. This is zero-based;
// the actual position in the source text is given by (offset + anchor).
@@ -68,19 +68,19 @@ public final class REMatch implements Serializable, Cloneable
int anchor;
// Package scope; used by RE.
- int index; // used while matching to mark current match position in input
+ int index; // used while matching to mark current match position in input
// start1[i] is set when the i-th subexp starts. And start1[i] is copied
// to start[i] when the i-th subexp ends. So start[i] keeps the previously
// assigned value while the i-th subexp is being processed. This makes
// backreference to the i-th subexp within the i-th subexp possible.
- int[] start; // start positions (relative to offset) for each (sub)exp.
- int[] start1; // start positions (relative to offset) for each (sub)exp.
- int[] end; // end positions for the same
+ int[] start; // start positions (relative to offset) for each (sub)exp.
+ int[] start1; // start positions (relative to offset) for each (sub)exp.
+ int[] end; // end positions for the same
// start[i] == -1 or end[i] == -1 means that the start/end position is void.
// start[i] == p or end[i] == p where p < 0 and p != -1 means that
// the actual start/end position is (p+1). Start/end positions may
// become negative when the subexpression is in a RETokenLookBehind.
- boolean empty; // empty string matched. This flag is used only within
+ boolean empty; // empty string matched. This flag is used only within
// RETokenRepeated.
BacktrackStack backtrackStack;
@@ -99,7 +99,7 @@ public final class REMatch implements Serializable, Cloneable
}
catch (CloneNotSupportedException e)
{
- throw new Error (); // doesn't happen
+ throw new Error (); // doesn't happen
}
}
@@ -133,13 +133,13 @@ public final class REMatch implements Serializable, Cloneable
matchedCharIndexed = text;
for (i = 0; i < start.length; i++)
{
- // If any subexpressions didn't terminate, they don't count
- // TODO check if this code ever gets hit
- if ((start[i] == -1) ^ (end[i] == -1))
- {
- start[i] = -1;
- end[i] = -1;
- }
+ // If any subexpressions didn't terminate, they don't count
+ // TODO check if this code ever gets hit
+ if ((start[i] == -1) ^ (end[i] == -1))
+ {
+ start[i] = -1;
+ end[i] = -1;
+ }
}
backtrackStack = null;
}
@@ -151,7 +151,7 @@ public final class REMatch implements Serializable, Cloneable
this.index = 0;
for (int i = 0; i < start.length; i++)
{
- start[i] = start1[i] = end[i] = -1;
+ start[i] = start1[i] = end[i] = -1;
}
backtrackStack = null;
}
@@ -160,7 +160,7 @@ public final class REMatch implements Serializable, Cloneable
* Returns the string matching the pattern. This makes it convenient
* to write code like the following:
* <P>
- * <code>
+ * <code>
* REMatch myMatch = myExpression.getMatch(myString);<br>
* if (myMatch != null) System.out.println("Regexp found: "+myMatch);
* </code>
@@ -194,7 +194,7 @@ public final class REMatch implements Serializable, Cloneable
* myMatch.getEndIndex());</code>
* <P>
* But you can save yourself that work, since the <code>toString()</code>
- * method (above) does exactly that for you.
+ * method (above) does exactly that for you.
*/
public int getEndIndex ()
{
@@ -219,21 +219,21 @@ public final class REMatch implements Serializable, Cloneable
return (matchedText.substring (start[sub], end[sub]));
else
{
- // This case occurs with RETokenLookAhead or RETokenLookBehind.
- CPStringBuilder sb = new CPStringBuilder ();
- int s = start[sub];
- int e = end[sub];
- if (s < 0)
- s += 1;
- if (e < 0)
- e += 1;
- for (int i = start[0] + s; i < start[0] + e; i++)
- sb.append (matchedCharIndexed.charAt (i));
- return sb.toString ();
+ // This case occurs with RETokenLookAhead or RETokenLookBehind.
+ CPStringBuilder sb = new CPStringBuilder ();
+ int s = start[sub];
+ int e = end[sub];
+ if (s < 0)
+ s += 1;
+ if (e < 0)
+ e += 1;
+ for (int i = start[0] + s; i < start[0] + e; i++)
+ sb.append (matchedCharIndexed.charAt (i));
+ return sb.toString ();
}
}
- /**
+ /**
* Returns the index within the input string used to generate this match
* where subexpression number <i>sub</i> begins, or <code>-1</code> if
* the subexpression does not exist. The initial position is zero.
@@ -249,7 +249,7 @@ public final class REMatch implements Serializable, Cloneable
return (x == -1) ? x : (x >= 0) ? offset + x : offset + x + 1;
}
- /**
+ /**
* Returns the index within the input string used to generate this match
* where subexpression number <i>sub</i> begins, or <code>-1</code> if
* the subexpression does not exist. The initial position is zero.
@@ -265,7 +265,7 @@ public final class REMatch implements Serializable, Cloneable
return (x == -1) ? x : (x >= 0) ? offset + x : offset + x + 1;
}
- /**
+ /**
* Returns the index within the input string used to generate this match
* where subexpression number <i>sub</i> ends, or <code>-1</code> if
* the subexpression does not exist. The initial position is zero.
@@ -281,7 +281,7 @@ public final class REMatch implements Serializable, Cloneable
return (x == -1) ? x : (x >= 0) ? offset + x : offset + x + 1;
}
- /**
+ /**
* Returns the index within the input string used to generate this match
* where subexpression number <i>sub</i> ends, or <code>-1</code> if
* the subexpression does not exist. The initial position is zero.
@@ -314,30 +314,30 @@ public final class REMatch implements Serializable, Cloneable
int pos;
for (pos = 0; pos < input.length () - 1; pos++)
{
- if ((input.charAt (pos) == '$')
- && (Character.isDigit (input.charAt (pos + 1))))
- {
- int val = Character.digit (input.charAt (++pos), 10);
- int pos1 = pos + 1;
- while (pos1 < input.length () &&
- Character.isDigit (input.charAt (pos1)))
- {
- int val1 =
- val * 10 + Character.digit (input.charAt (pos1), 10);
- if (val1 >= start.length)
- break;
- pos1++;
- val = val1;
- }
- pos = pos1 - 1;
-
- if (val < start.length)
- {
- output.append (toString (val));
- }
- }
- else
- output.append (input.charAt (pos));
+ if ((input.charAt (pos) == '$')
+ && (Character.isDigit (input.charAt (pos + 1))))
+ {
+ int val = Character.digit (input.charAt (++pos), 10);
+ int pos1 = pos + 1;
+ while (pos1 < input.length () &&
+ Character.isDigit (input.charAt (pos1)))
+ {
+ int val1 =
+ val * 10 + Character.digit (input.charAt (pos1), 10);
+ if (val1 >= start.length)
+ break;
+ pos1++;
+ val = val1;
+ }
+ pos = pos1 - 1;
+
+ if (val < start.length)
+ {
+ output.append (toString (val));
+ }
+ }
+ else
+ output.append (input.charAt (pos));
}
if (pos < input.length ())
output.append (input.charAt (pos));
@@ -346,16 +346,16 @@ public final class REMatch implements Serializable, Cloneable
/* The following are used for debugging purpose
public static String d(REMatch m) {
- if (m == null) return "null";
+ if (m == null) return "null";
else return "[" + m.index + "]";
}
public String substringUptoIndex(CharIndexed input) {
- StringBuffer sb = new StringBuffer();
- for (int i = 0; i < index; i++) {
- sb.append(input.charAt(i));
- }
- return sb.toString();
+ StringBuffer sb = new StringBuffer();
+ for (int i = 0; i < index; i++) {
+ sb.append(input.charAt(i));
+ }
+ return sb.toString();
}
*/
diff --git a/gnu/java/util/regex/REMatchEnumeration.java b/gnu/java/util/regex/REMatchEnumeration.java
index f0c78be92..04432d07c 100644
--- a/gnu/java/util/regex/REMatchEnumeration.java
+++ b/gnu/java/util/regex/REMatchEnumeration.java
@@ -47,7 +47,7 @@ import java.util.NoSuchElementException;
* An REMatchEnumeration enumerates regular expression matches over a
* given input text. You obtain a reference to an enumeration using
* the <code>getMatchEnumeration()</code> methods on an instance of
- * RE.
+ * RE.
*
* <P>
*
@@ -59,15 +59,15 @@ import java.util.NoSuchElementException;
* not need to be searched immediately.
*
* <P>
- *
+ *
* The enumerated type is especially useful when searching on a Reader
* or InputStream, because the InputStream read position cannot be
* guaranteed after calling <code>getMatch()</code> (see the
* description of that method for an explanation of why). Enumeration
* also saves a lot of overhead required when calling
* <code>getMatch()</code> multiple times.
- *
- * @author <A HREF="mailto:wes@cacas.org">Wes Biggs</A>
+ *
+ * @author <A HREF="mailto:wes@cacas.org">Wes Biggs</A>
*/
public class REMatchEnumeration
implements Enumeration < REMatch >, Serializable
@@ -113,17 +113,17 @@ public class REMatchEnumeration
{
if (more == MAYBE)
{
- match = expr.getMatchImpl (input, index, eflags, buffer);
- if (match != null)
- {
- input.move ((match.end[0] > 0) ? match.end[0] : 1);
-
- index =
- (match.end[0] > 0) ? match.end[0] + match.offset : index + 1;
- more = YES;
- }
- else
- more = NO;
+ match = expr.getMatchImpl (input, index, eflags, buffer);
+ if (match != null)
+ {
+ input.move ((match.end[0] > 0) ? match.end[0] : 1);
+
+ index =
+ (match.end[0] > 0) ? match.end[0] + match.offset : index + 1;
+ more = YES;
+ }
+ else
+ more = NO;
}
return (more == YES);
}
@@ -133,8 +133,8 @@ public class REMatchEnumeration
{
if (hasMoreElements ())
{
- more = (input.isValid ())? MAYBE : NO;
- return match;
+ more = (input.isValid ())? MAYBE : NO;
+ return match;
}
throw new NoSuchElementException ();
}
diff --git a/gnu/java/util/regex/RESyntax.java b/gnu/java/util/regex/RESyntax.java
index 38d70564d..2080cb763 100644
--- a/gnu/java/util/regex/RESyntax.java
+++ b/gnu/java/util/regex/RESyntax.java
@@ -94,7 +94,7 @@ public final class RESyntax implements Serializable
/**
* Syntax bit. Repetition and alternation operators are invalid
- * at start and end of pattern and other places.
+ * at start and end of pattern and other places.
* <B>Not implemented</B>.
*/
public static final int RE_CONTEXT_INVALID_OPS = 5;
@@ -115,7 +115,7 @@ public final class RESyntax implements Serializable
public static final int RE_INTERVALS = 8;
/**
- * Syntax bit. No alternation (|), match one-or-more (+), or
+ * Syntax bit. No alternation (|), match one-or-more (+), or
* match zero-or-one (?) operators.
*/
public static final int RE_LIMITED_OPS = 9;
@@ -123,7 +123,7 @@ public final class RESyntax implements Serializable
/**
* Syntax bit. Newline is an alternation operator.
*/
- public static final int RE_NEWLINE_ALT = 10; // impl.
+ public static final int RE_NEWLINE_ALT = 10; // impl.
/**
* Syntax bit. Intervals use { } instead of \{ \}
@@ -317,7 +317,7 @@ public final class RESyntax implements Serializable
* Emulates regular expression support in Larry Wall's perl, version 4,
* using single line mode (/s modifier).
*/
- public static final RESyntax RE_SYNTAX_PERL4_S; // single line mode (/s)
+ public static final RESyntax RE_SYNTAX_PERL4_S; // single line mode (/s)
/**
* Predefined syntax.
@@ -403,23 +403,23 @@ public final class RESyntax implements Serializable
/* There is no official Perl spec, but here's a "best guess" */
- RE_SYNTAX_PERL4 = new RESyntax ().set (RE_BACKSLASH_ESCAPE_IN_LISTS).set (RE_CONTEXT_INDEP_ANCHORS).set (RE_CONTEXT_INDEP_OPS) // except for '{', apparently
- .set (RE_INTERVALS).set (RE_NO_BK_BRACES).set (RE_NO_BK_PARENS).set (RE_NO_BK_VBAR).set (RE_NO_EMPTY_RANGES).set (RE_CHAR_CLASS_ESCAPES) // \d,\D,\w,\W,\s,\S
+ RE_SYNTAX_PERL4 = new RESyntax ().set (RE_BACKSLASH_ESCAPE_IN_LISTS).set (RE_CONTEXT_INDEP_ANCHORS).set (RE_CONTEXT_INDEP_OPS) // except for '{', apparently
+ .set (RE_INTERVALS).set (RE_NO_BK_BRACES).set (RE_NO_BK_PARENS).set (RE_NO_BK_VBAR).set (RE_NO_EMPTY_RANGES).set (RE_CHAR_CLASS_ESCAPES) // \d,\D,\w,\W,\s,\S
.makeFinal ();
RE_SYNTAX_PERL4_S =
new RESyntax (RE_SYNTAX_PERL4).set (RE_DOT_NEWLINE).makeFinal ();
- RE_SYNTAX_PERL5 = new RESyntax (RE_SYNTAX_PERL4).set (RE_PURE_GROUPING) // (?:)
- .set (RE_STINGY_OPS) // *?,??,+?,{}?
- .set (RE_LOOKAHEAD) // (?=)(?!)
- .set (RE_STRING_ANCHORS) // \A,\Z
- .set (RE_CHAR_CLASS_ESC_IN_LISTS) // \d,\D,\w,\W,\s,\S within []
- .set (RE_COMMENTS) // (?#)
- .set (RE_EMBEDDED_FLAGS) // (?imsx-imsx)
- .set (RE_OCTAL_CHAR) // \0377
- .set (RE_HEX_CHAR) // \x1b
- .set (RE_NAMED_PROPERTY) // \p{prop}, \P{prop}
+ RE_SYNTAX_PERL5 = new RESyntax (RE_SYNTAX_PERL4).set (RE_PURE_GROUPING) // (?:)
+ .set (RE_STINGY_OPS) // *?,??,+?,{}?
+ .set (RE_LOOKAHEAD) // (?=)(?!)
+ .set (RE_STRING_ANCHORS) // \A,\Z
+ .set (RE_CHAR_CLASS_ESC_IN_LISTS) // \d,\D,\w,\W,\s,\S within []
+ .set (RE_COMMENTS) // (?#)
+ .set (RE_EMBEDDED_FLAGS) // (?imsx-imsx)
+ .set (RE_OCTAL_CHAR) // \0377
+ .set (RE_HEX_CHAR) // \x1b
+ .set (RE_NAMED_PROPERTY) // \p{prop}, \P{prop}
.makeFinal ();
RE_SYNTAX_PERL5_S =
@@ -427,9 +427,9 @@ public final class RESyntax implements Serializable
RE_SYNTAX_JAVA_1_4 = new RESyntax (RE_SYNTAX_PERL5)
// XXX
- .set (RE_POSSESSIVE_OPS) // *+,?+,++,{}+
- .set (RE_UNICODE_CHAR) // \u1234
- .set (RE_NESTED_CHARCLASS) // [a-z&&[^p-r]]
+ .set (RE_POSSESSIVE_OPS) // *+,?+,++,{}+
+ .set (RE_UNICODE_CHAR) // \u1234
+ .set (RE_NESTED_CHARCLASS) // [a-z&&[^p-r]]
.makeFinal ();
}
@@ -457,7 +457,7 @@ public final class RESyntax implements Serializable
}
/**
- * Construct a new syntax object with all bits set the same
+ * Construct a new syntax object with all bits set the same
* as the other syntax.
*/
public RESyntax (RESyntax other)
@@ -474,7 +474,7 @@ public final class RESyntax implements Serializable
}
/**
- * Set a given bit in this syntax.
+ * Set a given bit in this syntax.
*
* @param index the constant (RESyntax.RE_xxx) bit to set.
* @return a reference to this object for easy chaining.
@@ -488,7 +488,7 @@ public final class RESyntax implements Serializable
}
/**
- * Clear a given bit in this syntax.
+ * Clear a given bit in this syntax.
*
* @param index the constant (RESyntax.RE_xxx) bit to clear.
* @return a reference to this object for easy chaining.
@@ -516,7 +516,7 @@ public final class RESyntax implements Serializable
* characters that have specific meaning within the current syntax
* can cause unexpected chronosynclastic infundibula.
*
- * @return this object for convenient chaining
+ * @return this object for convenient chaining
*/
public RESyntax setLineSeparator (String aSeparator)
{
diff --git a/gnu/java/util/regex/REToken.java b/gnu/java/util/regex/REToken.java
index 681ac517f..ed9b31747 100644
--- a/gnu/java/util/regex/REToken.java
+++ b/gnu/java/util/regex/REToken.java
@@ -58,7 +58,7 @@ abstract class REToken implements Serializable, Cloneable
}
catch (CloneNotSupportedException e)
{
- throw new Error (); // doesn't happen
+ throw new Error (); // doesn't happen
}
}
@@ -96,15 +96,15 @@ abstract class REToken implements Serializable, Cloneable
{
if (!fake)
{
- setHitEnd (input, mymatch);
+ setHitEnd (input, mymatch);
}
REMatch m = matchThis (input, mymatch);
if (m == null)
return false;
if (next (input, m))
{
- mymatch.assignFrom (m);
- return true;
+ mymatch.assignFrom (m);
+ return true;
}
return false;
}
@@ -188,7 +188,7 @@ abstract class REToken implements Serializable, Cloneable
boolean chain (REToken token)
{
next = token;
- return true; // Token was accepted
+ return true; // Token was accepted
}
abstract void dump (CPStringBuilder os);
diff --git a/gnu/java/util/regex/RETokenAny.java b/gnu/java/util/regex/RETokenAny.java
index c002d0504..f5039682d 100644
--- a/gnu/java/util/regex/RETokenAny.java
+++ b/gnu/java/util/regex/RETokenAny.java
@@ -71,8 +71,8 @@ final class RETokenAny extends REToken
boolean retval = matchOneChar (ch);
if (retval)
{
- ++mymatch.index;
- return mymatch;
+ ++mymatch.index;
+ return mymatch;
}
return null;
}
@@ -80,9 +80,9 @@ final class RETokenAny extends REToken
boolean matchOneChar (char ch)
{
if ((ch == CharIndexed.OUT_OF_BOUNDS)
- || (!newline && (ch == '\n')) || (matchNull && (ch == 0)))
+ || (!newline && (ch == '\n')) || (matchNull && (ch == 0)))
{
- return false;
+ return false;
}
return true;
}
@@ -98,12 +98,12 @@ final class RETokenAny extends REToken
int numRepeats = 0;
while (true)
{
- if (numRepeats >= max)
- break;
- char ch = input.charAt (index++);
- if (!matchOneChar (ch))
- break;
- numRepeats++;
+ if (numRepeats >= max)
+ break;
+ char ch = input.charAt (index++);
+ if (!matchOneChar (ch))
+ break;
+ numRepeats++;
}
return numRepeats;
}
diff --git a/gnu/java/util/regex/RETokenBackRef.java b/gnu/java/util/regex/RETokenBackRef.java
index 8f146222d..52061ca2e 100644
--- a/gnu/java/util/regex/RETokenBackRef.java
+++ b/gnu/java/util/regex/RETokenBackRef.java
@@ -64,30 +64,30 @@ final class RETokenBackRef extends REToken
b = mymatch.start[num];
e = mymatch.end[num];
if ((b == -1) || (e == -1))
- return null; // this shouldn't happen, but...
+ return null; // this shouldn't happen, but...
if (b < 0)
b += 1;
if (e < 0)
e += 1;
for (int i = b; i < e; i++)
{
- char c1 = input.charAt (mymatch.index + i - b);
- char c2 = input.charAt (i);
- if (c1 != c2)
- {
- if (insens)
- {
- if (c1 != toLowerCase (c2, unicodeAware) &&
- c1 != toUpperCase (c2, unicodeAware))
- {
- return null;
- }
- }
- else
- {
- return null;
- }
- }
+ char c1 = input.charAt (mymatch.index + i - b);
+ char c2 = input.charAt (i);
+ if (c1 != c2)
+ {
+ if (insens)
+ {
+ if (c1 != toLowerCase (c2, unicodeAware) &&
+ c1 != toUpperCase (c2, unicodeAware))
+ {
+ return null;
+ }
+ }
+ else
+ {
+ return null;
+ }
+ }
}
mymatch.index += e - b;
return mymatch;
diff --git a/gnu/java/util/regex/RETokenChar.java b/gnu/java/util/regex/RETokenChar.java
index babcf3e4e..3469ecfa8 100644
--- a/gnu/java/util/regex/RETokenChar.java
+++ b/gnu/java/util/regex/RETokenChar.java
@@ -67,8 +67,8 @@ final class RETokenChar extends REToken
{
if (matchOneString (input, mymatch.index))
{
- mymatch.index += matchedLength;
- return mymatch;
+ mymatch.index += matchedLength;
+ return mymatch;
}
// java.util.regex.Matcher#hitEnd() requires that the length of
// partial match be counted.
@@ -85,12 +85,12 @@ final class RETokenChar extends REToken
char c;
for (int i = 0; i < z; i++)
{
- c = input.charAt (index + i);
- if (!charEquals (c, ch[i]))
- {
- return false;
- }
- ++matchedLength;
+ c = input.charAt (index + i);
+ if (!charEquals (c, ch[i]))
+ {
+ return false;
+ }
+ ++matchedLength;
}
return true;
}
@@ -120,15 +120,15 @@ final class RETokenChar extends REToken
int z = ch.length;
while (true)
{
- if (numRepeats >= max)
- break;
- if (matchOneString (input, index))
- {
- index += z;
- numRepeats++;
- }
- else
- break;
+ if (numRepeats >= max)
+ break;
+ if (matchOneString (input, index))
+ {
+ index += z;
+ numRepeats++;
+ }
+ else
+ break;
}
return numRepeats;
}
@@ -138,18 +138,18 @@ final class RETokenChar extends REToken
{
if (next instanceof RETokenChar && ((RETokenChar) next).insens == insens)
{
- RETokenChar cnext = (RETokenChar) next;
- int newsize = ch.length + cnext.ch.length;
+ RETokenChar cnext = (RETokenChar) next;
+ int newsize = ch.length + cnext.ch.length;
- char[] chTemp = new char[newsize];
+ char[] chTemp = new char[newsize];
- System.arraycopy (ch, 0, chTemp, 0, ch.length);
- System.arraycopy (cnext.ch, 0, chTemp, ch.length, cnext.ch.length);
+ System.arraycopy (ch, 0, chTemp, 0, ch.length);
+ System.arraycopy (cnext.ch, 0, chTemp, ch.length, cnext.ch.length);
- ch = chTemp;
- if (cnext.next == null)
- return false;
- return chain (cnext.next);
+ ch = chTemp;
+ if (cnext.next == null)
+ return false;
+ return chain (cnext.next);
}
else
return super.chain (next);
diff --git a/gnu/java/util/regex/RETokenEnd.java b/gnu/java/util/regex/RETokenEnd.java
index 33e0febb7..28d78231a 100644
--- a/gnu/java/util/regex/RETokenEnd.java
+++ b/gnu/java/util/regex/RETokenEnd.java
@@ -92,38 +92,38 @@ final class RETokenEnd extends REToken
return ((mymatch.eflags & RE.REG_NOTEOL) > 0) ? null : mymatch;
if (check_java_line_terminators)
{
- if (ch == '\n')
- {
- char ch1 = input.charAt (mymatch.index - 1);
- if (ch1 == '\r')
- return null;
- return mymatch;
- }
- if (ch == '\r')
- return mymatch;
- if (ch == '\u0085')
- return mymatch; // A next-line character
- if (ch == '\u2028')
- return mymatch; // A line-separator character
- if (ch == '\u2029')
- return mymatch; // A paragraph-separator character
- return null;
+ if (ch == '\n')
+ {
+ char ch1 = input.charAt (mymatch.index - 1);
+ if (ch1 == '\r')
+ return null;
+ return mymatch;
+ }
+ if (ch == '\r')
+ return mymatch;
+ if (ch == '\u0085')
+ return mymatch; // A next-line character
+ if (ch == '\u2028')
+ return mymatch; // A line-separator character
+ if (ch == '\u2029')
+ return mymatch; // A paragraph-separator character
+ return null;
}
if (newline != null)
{
- char z;
- int i = 0; // position in newline
- do
- {
- z = newline.charAt (i);
- if (ch != z)
- return null;
- ++i;
- ch = input.charAt (mymatch.index + i);
- }
- while (i < newline.length ());
-
- return mymatch;
+ char z;
+ int i = 0; // position in newline
+ do
+ {
+ z = newline.charAt (i);
+ if (ch != z)
+ return null;
+ ++i;
+ ch = input.charAt (mymatch.index + i);
+ }
+ while (i < newline.length ());
+
+ return mymatch;
}
return null;
}
diff --git a/gnu/java/util/regex/RETokenEndOfPreviousMatch.java b/gnu/java/util/regex/RETokenEndOfPreviousMatch.java
index e4ad61941..67a1b852e 100644
--- a/gnu/java/util/regex/RETokenEndOfPreviousMatch.java
+++ b/gnu/java/util/regex/RETokenEndOfPreviousMatch.java
@@ -58,13 +58,13 @@ class RETokenEndOfPreviousMatch extends RETokenStart
if (lastMatch == null)
return super.matchThis (input, mymatch);
if (input.getAnchor () + mymatch.index ==
- lastMatch.anchor + lastMatch.index)
+ lastMatch.anchor + lastMatch.index)
{
- return mymatch;
+ return mymatch;
}
else
{
- return null;
+ return null;
}
}
diff --git a/gnu/java/util/regex/RETokenIndependent.java b/gnu/java/util/regex/RETokenIndependent.java
index 8ad728df8..089aa18af 100644
--- a/gnu/java/util/regex/RETokenIndependent.java
+++ b/gnu/java/util/regex/RETokenIndependent.java
@@ -67,10 +67,10 @@ final class RETokenIndependent extends REToken
boolean b = re.match (input, mymatch);
if (b)
{
- // Once we have found a match, we do not see other possible matches.
- if (mymatch.backtrackStack != null)
- mymatch.backtrackStack.clear ();
- return mymatch;
+ // Once we have found a match, we do not see other possible matches.
+ if (mymatch.backtrackStack != null)
+ mymatch.backtrackStack.clear ();
+ return mymatch;
}
return null;
diff --git a/gnu/java/util/regex/RETokenLookAhead.java b/gnu/java/util/regex/RETokenLookAhead.java
index 1dc601938..34625aac6 100644
--- a/gnu/java/util/regex/RETokenLookAhead.java
+++ b/gnu/java/util/regex/RETokenLookAhead.java
@@ -65,16 +65,16 @@ final class RETokenLookAhead extends REToken
REMatch trymatch = (REMatch) mymatch.clone ();
if (re.match (input, trymatch))
{
- if (negative)
- return null;
- trymatch.index = mymatch.index;
- return trymatch;
+ if (negative)
+ return null;
+ trymatch.index = mymatch.index;
+ return trymatch;
}
else
{
- if (negative)
- return mymatch;
- return null;
+ if (negative)
+ return mymatch;
+ return null;
}
}
diff --git a/gnu/java/util/regex/RETokenLookBehind.java b/gnu/java/util/regex/RETokenLookBehind.java
index f61c93c0a..c85e37f69 100644
--- a/gnu/java/util/regex/RETokenLookBehind.java
+++ b/gnu/java/util/regex/RETokenLookBehind.java
@@ -73,29 +73,29 @@ final class RETokenLookBehind extends REToken
re1.chain (stopper);
if (re1.match (behind, trymatch))
{
- if (negative)
- return null;
- for (int i = 0; i < trymatch.start.length; i++)
- {
- if (trymatch.start[i] != -1 && trymatch.end[i] != -1)
- {
- trymatch.start[i] -= diff;
- if (trymatch.start[i] < 0)
- trymatch.start[i] -= 1;
- trymatch.end[i] -= diff;
- if (trymatch.end[i] < 0)
- trymatch.end[i] -= 1;
- }
- }
- trymatch.index = mymatch.index;
- trymatch.offset = mymatch.offset;
- return trymatch;
+ if (negative)
+ return null;
+ for (int i = 0; i < trymatch.start.length; i++)
+ {
+ if (trymatch.start[i] != -1 && trymatch.end[i] != -1)
+ {
+ trymatch.start[i] -= diff;
+ if (trymatch.start[i] < 0)
+ trymatch.start[i] -= 1;
+ trymatch.end[i] -= diff;
+ if (trymatch.end[i] < 0)
+ trymatch.end[i] -= 1;
+ }
+ }
+ trymatch.index = mymatch.index;
+ trymatch.offset = mymatch.offset;
+ return trymatch;
}
else
{
- if (negative)
- return mymatch;
- return null;
+ if (negative)
+ return mymatch;
+ return null;
}
}
diff --git a/gnu/java/util/regex/RETokenNamedProperty.java b/gnu/java/util/regex/RETokenNamedProperty.java
index 1683cb1bf..340da03fb 100644
--- a/gnu/java/util/regex/RETokenNamedProperty.java
+++ b/gnu/java/util/regex/RETokenNamedProperty.java
@@ -96,7 +96,7 @@ final class RETokenNamedProperty extends REToken
};
RETokenNamedProperty (int subIndex, String name, boolean insens,
- boolean negate) throws REException
+ boolean negate) throws REException
{
super (subIndex);
this.name = name;
@@ -121,8 +121,8 @@ final class RETokenNamedProperty extends REToken
boolean retval = matchOneChar (ch);
if (retval)
{
- ++mymatch.index;
- return mymatch;
+ ++mymatch.index;
+ return mymatch;
}
return null;
}
@@ -135,9 +135,9 @@ final class RETokenNamedProperty extends REToken
boolean retval = handler.includes (ch);
if (insens)
{
- retval = retval ||
- handler.includes (toUpperCase (ch, unicodeAware)) ||
- handler.includes (toLowerCase (ch, unicodeAware));
+ retval = retval ||
+ handler.includes (toUpperCase (ch, unicodeAware)) ||
+ handler.includes (toLowerCase (ch, unicodeAware));
}
if (negate)
@@ -156,12 +156,12 @@ final class RETokenNamedProperty extends REToken
int numRepeats = 0;
while (true)
{
- if (numRepeats >= max)
- break;
- char ch = input.charAt (index++);
- if (!matchOneChar (ch))
- break;
- numRepeats++;
+ if (numRepeats >= max)
+ break;
+ char ch = input.charAt (index++);
+ if (!matchOneChar (ch))
+ break;
+ numRepeats++;
}
return numRepeats;
}
@@ -179,37 +179,37 @@ final class RETokenNamedProperty extends REToken
private Handler getHandler (String name) throws REException
{
if (name.equals ("Lower") || name.equals ("Upper") ||
- // name.equals("ASCII") ||
- name.equals ("Alpha") ||
- name.equals ("Digit") ||
- name.equals ("Alnum") ||
- name.equals ("Punct") ||
- name.equals ("Graph") ||
- name.equals ("Print") ||
- name.equals ("Blank") ||
- name.equals ("Cntrl") ||
- name.equals ("XDigit") || name.equals ("Space"))
+ // name.equals("ASCII") ||
+ name.equals ("Alpha") ||
+ name.equals ("Digit") ||
+ name.equals ("Alnum") ||
+ name.equals ("Punct") ||
+ name.equals ("Graph") ||
+ name.equals ("Print") ||
+ name.equals ("Blank") ||
+ name.equals ("Cntrl") ||
+ name.equals ("XDigit") || name.equals ("Space"))
{
- return new POSIXHandler (name);
+ return new POSIXHandler (name);
}
if (name.startsWith ("In"))
{
- try
- {
- name = name.substring (2);
- Character.UnicodeBlock block =
- Character.UnicodeBlock.forName (name);
- return new UnicodeBlockHandler (block);
- }
- catch (IllegalArgumentException e)
- {
- throw new REException ("Invalid Unicode block name: " + name,
- REException.REG_ESCAPE, 0);
- }
+ try
+ {
+ name = name.substring (2);
+ Character.UnicodeBlock block =
+ Character.UnicodeBlock.forName (name);
+ return new UnicodeBlockHandler (block);
+ }
+ catch (IllegalArgumentException e)
+ {
+ throw new REException ("Invalid Unicode block name: " + name,
+ REException.REG_ESCAPE, 0);
+ }
}
if (name.startsWith ("Is"))
{
- name = name.substring (2);
+ name = name.substring (2);
}
// "grouped properties"
@@ -291,27 +291,27 @@ final class RETokenNamedProperty extends REToken
if (name.equals ("all"))
return new Handler ()
{
- public boolean includes (char c)
- {
- return true;
- }
+ public boolean includes (char c)
+ {
+ return true;
+ }
};
if (name.startsWith ("java"))
{
- try
- {
- Method m = Character.class.getMethod ("is" + name.substring (4),
- Character.TYPE);
- return new JavaCategoryHandler (m);
- }
- catch (NoSuchMethodException e)
- {
- throw new REException ("Unsupported Java handler: " + name, e,
- REException.REG_ESCAPE, 0);
- }
+ try
+ {
+ Method m = Character.class.getMethod ("is" + name.substring (4),
+ Character.TYPE);
+ return new JavaCategoryHandler (m);
+ }
+ catch (NoSuchMethodException e)
+ {
+ throw new REException ("Unsupported Java handler: " + name, e,
+ REException.REG_ESCAPE, 0);
+ }
}
throw new REException ("unsupported name " + name, REException.REG_ESCAPE,
- 0);
+ 0);
}
private static class POSIXHandler extends Handler
@@ -321,9 +321,9 @@ final class RETokenNamedProperty extends REToken
{
int posixId = RETokenPOSIX.intValue (name.toLowerCase ());
if (posixId != -1)
- retoken = new RETokenPOSIX (0, posixId, false, false);
+ retoken = new RETokenPOSIX (0, posixId, false, false);
else
- throw new RuntimeException ("Unknown posix ID: " + name);
+ throw new RuntimeException ("Unknown posix ID: " + name);
}
public boolean includes (char c)
{
@@ -355,8 +355,8 @@ final class RETokenNamedProperty extends REToken
{
int category = Character.getType (c);
for (int i = 0; i < categories.length; i++)
- if (category == categories[i])
- return true;
+ if (category == categories[i])
+ return true;
return false;
}
}
@@ -394,15 +394,15 @@ final class RETokenNamedProperty extends REToken
{
try
{
- return (Boolean) method.invoke (null, c);
+ return (Boolean) method.invoke (null, c);
}
catch (IllegalAccessException e)
{
- throw new InternalError ("Unable to access method " + method);
+ throw new InternalError ("Unable to access method " + method);
}
catch (InvocationTargetException e)
{
- throw new InternalError ("Error invoking " + method);
+ throw new InternalError ("Error invoking " + method);
}
}
}
diff --git a/gnu/java/util/regex/RETokenOneOf.java b/gnu/java/util/regex/RETokenOneOf.java
index fcae3c2d1..3bea889ec 100644
--- a/gnu/java/util/regex/RETokenOneOf.java
+++ b/gnu/java/util/regex/RETokenOneOf.java
@@ -59,7 +59,7 @@ final class RETokenOneOf extends REToken
// the basic part /2-7a-c/ is stored in the ArrayList options, and
// the additional part /[f-k][m-z]&&[^p-v][st]/ is stored in the
// ArrayList addition in the following order (Reverse Polish Notation):
- // -- The matching result of the basic part is assumed here.
+ // -- The matching result of the basic part is assumed here.
// [f-k] -- REToken
// "|" -- or
// [m-z] -- REToken
@@ -80,7 +80,7 @@ final class RETokenOneOf extends REToken
// \D --> new RETokenOneOf("0123456789",true, ..)
RETokenOneOf (int subIndex, String optionsStr, boolean negative,
- boolean insens)
+ boolean insens)
{
super (subIndex);
options = new ArrayList < REToken > ();
@@ -97,7 +97,7 @@ final class RETokenOneOf extends REToken
}
RETokenOneOf (int subIndex, List < REToken > options,
- List < Object > addition, boolean negative)
+ List < Object > addition, boolean negative)
{
super (subIndex);
this.options = options;
@@ -114,8 +114,8 @@ final class RETokenOneOf extends REToken
int x;
for (REToken t:options)
{
- if ((x = t.getMinimumLength ()) < min)
- min = x;
+ if ((x = t.getMinimumLength ()) < min)
+ min = x;
}
return min;
}
@@ -128,8 +128,8 @@ final class RETokenOneOf extends REToken
int x;
for (REToken t:options)
{
- if ((x = t.getMaximumLength ()) > max)
- max = x;
+ if ((x = t.getMaximumLength ()) > max)
+ max = x;
}
return max;
}
@@ -149,13 +149,13 @@ final class RETokenOneOf extends REToken
boolean tryOnly;
if (addition == null)
{
- tryMatch = mymatch;
- tryOnly = false;
+ tryMatch = mymatch;
+ tryOnly = false;
}
else
{
- tryMatch = (REMatch) mymatch.clone ();
- tryOnly = true;
+ tryMatch = (REMatch) mymatch.clone ();
+ tryOnly = true;
}
boolean b = negative ?
matchN (input, tryMatch, tryOnly) : matchP (input, tryMatch, tryOnly);
@@ -166,36 +166,36 @@ final class RETokenOneOf extends REToken
stack.push (new Boolean (b));
for (Object obj:addition)
{
- if (obj instanceof REToken)
- {
- b = ((REToken) obj).match (input, (REMatch) mymatch.clone ());
- stack.push (new Boolean (b));
- }
- else if (obj instanceof Boolean)
- {
- stack.push ((Boolean) obj);
- }
- else if (obj.equals ("|"))
- {
- b = stack.pop ();
- b = stack.pop () || b;
- stack.push (new Boolean (b));
- }
- else if (obj.equals ("&"))
- {
- b = stack.pop ();
- b = stack.pop () && b;
- stack.push (new Boolean (b));
- }
- else
- {
- throw new RuntimeException ("Invalid object found");
- }
+ if (obj instanceof REToken)
+ {
+ b = ((REToken) obj).match (input, (REMatch) mymatch.clone ());
+ stack.push (new Boolean (b));
+ }
+ else if (obj instanceof Boolean)
+ {
+ stack.push ((Boolean) obj);
+ }
+ else if (obj.equals ("|"))
+ {
+ b = stack.pop ();
+ b = stack.pop () || b;
+ stack.push (new Boolean (b));
+ }
+ else if (obj.equals ("&"))
+ {
+ b = stack.pop ();
+ b = stack.pop () && b;
+ stack.push (new Boolean (b));
+ }
+ else
+ {
+ throw new RuntimeException ("Invalid object found");
+ }
}
if (stack.pop ())
{
- ++mymatch.index;
- return next (input, mymatch);
+ ++mymatch.index;
+ return next (input, mymatch);
}
return false;
}
@@ -207,12 +207,12 @@ final class RETokenOneOf extends REToken
for (REToken tk:options)
{
- REMatch tryMatch = (REMatch) mymatch.clone ();
- if (tk.match (input, tryMatch))
- { // match was successful
- return false;
- } // is a match
- } // try next option
+ REMatch tryMatch = (REMatch) mymatch.clone ();
+ if (tk.match (input, tryMatch))
+ { // match was successful
+ return false;
+ } // is a match
+ } // try next option
if (tryOnly)
return true;
@@ -224,17 +224,17 @@ final class RETokenOneOf extends REToken
{
for (REToken tk:options)
{
- REMatch tryMatch = (REMatch) mymatch.clone ();
- if (tk.match (input, tryMatch))
- { // match was successful
- if (tryOnly)
- return true;
- if (next (input, tryMatch))
- {
- mymatch.assignFrom (tryMatch);
- return true;
- }
- }
+ REMatch tryMatch = (REMatch) mymatch.clone ();
+ if (tk.match (input, tryMatch))
+ { // match was successful
+ if (tryOnly)
+ return true;
+ if (next (input, tryMatch))
+ {
+ mymatch.assignFrom (tryMatch);
+ return true;
+ }
+ }
}
return false;
}
@@ -244,8 +244,8 @@ final class RETokenOneOf extends REToken
REMatch newMatch = findMatch (input, mymatch);
if (newMatch != null)
{
- mymatch.assignFrom (newMatch);
- return true;
+ mymatch.assignFrom (newMatch);
+ return true;
}
return false;
}
@@ -263,32 +263,32 @@ final class RETokenOneOf extends REToken
}
private REMatch findMatch (CharIndexed input, REMatch mymatch,
- int optionIndex)
+ int optionIndex)
{
for (int i = optionIndex; i < options.size (); i++)
{
- REToken tk = options.get (i);
- tk = (REToken) tk.clone ();
- tk.chain (getNext ());
- REMatch tryMatch = (REMatch) mymatch.clone ();
- if (tryMatch.backtrackStack == null)
- {
- tryMatch.backtrackStack = new BacktrackStack ();
- }
- boolean stackPushed = false;
- if (i + 1 < options.size ())
- {
- tryMatch.backtrackStack.push (new BacktrackStack.
- Backtrack (this, input, mymatch,
- i + 1));
- stackPushed = true;
- }
- if (tk.match (input, tryMatch))
- {
- return tryMatch;
- }
- if (stackPushed)
- tryMatch.backtrackStack.pop ();
+ REToken tk = options.get (i);
+ tk = (REToken) tk.clone ();
+ tk.chain (getNext ());
+ REMatch tryMatch = (REMatch) mymatch.clone ();
+ if (tryMatch.backtrackStack == null)
+ {
+ tryMatch.backtrackStack = new BacktrackStack ();
+ }
+ boolean stackPushed = false;
+ if (i + 1 < options.size ())
+ {
+ tryMatch.backtrackStack.push (new BacktrackStack.
+ Backtrack (this, input, mymatch,
+ i + 1));
+ stackPushed = true;
+ }
+ if (tk.match (input, tryMatch))
+ {
+ return tryMatch;
+ }
+ if (stackPushed)
+ tryMatch.backtrackStack.pop ();
}
return null;
}
@@ -308,12 +308,12 @@ final class RETokenOneOf extends REToken
tk.chain (null);
while (true)
{
- if (numRepeats >= max)
- break;
- m = tk.findMatch (input, m);
- if (m == null)
- break;
- numRepeats++;
+ if (numRepeats >= max)
+ break;
+ m = tk.findMatch (input, m);
+ if (m == null)
+ break;
+ numRepeats++;
}
return numRepeats;
}
@@ -323,9 +323,9 @@ final class RETokenOneOf extends REToken
os.append (negative ? "[^" : "(?:");
for (int i = 0; i < options.size (); i++)
{
- if (!negative && (i > 0))
- os.append ('|');
- options.get (i).dumpAll (os);
+ if (!negative && (i > 0))
+ os.append ('|');
+ options.get (i).dumpAll (os);
}
os.append (negative ? ']' : ')');
}
diff --git a/gnu/java/util/regex/RETokenPOSIX.java b/gnu/java/util/regex/RETokenPOSIX.java
index 2c809570b..f0fd04bd3 100644
--- a/gnu/java/util/regex/RETokenPOSIX.java
+++ b/gnu/java/util/regex/RETokenPOSIX.java
@@ -70,8 +70,8 @@ final class RETokenPOSIX extends REToken
{
for (int i = 0; i < s_nameTable.length; i++)
{
- if (s_nameTable[i].equals (key))
- return i;
+ if (s_nameTable[i].equals (key))
+ return i;
}
return -1;
}
@@ -100,8 +100,8 @@ final class RETokenPOSIX extends REToken
boolean retval = matchOneChar (ch);
if (retval)
{
- ++mymatch.index;
- return mymatch;
+ ++mymatch.index;
+ return mymatch;
}
return null;
}
@@ -115,49 +115,49 @@ final class RETokenPOSIX extends REToken
switch (type)
{
case ALNUM:
- // Note that there is some debate over whether '_' should be included
- retval = Character.isLetterOrDigit (ch) || (ch == '_');
- break;
+ // Note that there is some debate over whether '_' should be included
+ retval = Character.isLetterOrDigit (ch) || (ch == '_');
+ break;
case ALPHA:
- retval = Character.isLetter (ch);
- break;
+ retval = Character.isLetter (ch);
+ break;
case BLANK:
- retval = ((ch == ' ') || (ch == '\t'));
- break;
+ retval = ((ch == ' ') || (ch == '\t'));
+ break;
case CNTRL:
- retval = Character.isISOControl (ch);
- break;
+ retval = Character.isISOControl (ch);
+ break;
case DIGIT:
- retval = Character.isDigit (ch);
- break;
+ retval = Character.isDigit (ch);
+ break;
case GRAPH:
- retval =
- (!(Character.isWhitespace (ch) || Character.isISOControl (ch)));
- break;
+ retval =
+ (!(Character.isWhitespace (ch) || Character.isISOControl (ch)));
+ break;
case LOWER:
- retval = ((insens && Character.isLetter (ch))
- || Character.isLowerCase (ch));
- break;
+ retval = ((insens && Character.isLetter (ch))
+ || Character.isLowerCase (ch));
+ break;
case PRINT:
- retval =
- (!(Character.isWhitespace (ch) || Character.isISOControl (ch)))
- || (ch == ' ');
- break;
+ retval =
+ (!(Character.isWhitespace (ch) || Character.isISOControl (ch)))
+ || (ch == ' ');
+ break;
case PUNCT:
- // This feels sloppy, especially for non-U.S. locales.
- retval = ("`~!@#$%^&*()-_=+[]{}\\|;:'\"/?,.<>".indexOf (ch) != -1);
- break;
+ // This feels sloppy, especially for non-U.S. locales.
+ retval = ("`~!@#$%^&*()-_=+[]{}\\|;:'\"/?,.<>".indexOf (ch) != -1);
+ break;
case SPACE:
- retval = Character.isWhitespace (ch);
- break;
+ retval = Character.isWhitespace (ch);
+ break;
case UPPER:
- retval = ((insens && Character.isLetter (ch))
- || Character.isUpperCase (ch));
- break;
+ retval = ((insens && Character.isLetter (ch))
+ || Character.isUpperCase (ch));
+ break;
case XDIGIT:
- retval = (Character.isDigit (ch)
- || ("abcdefABCDEF".indexOf (ch) != -1));
- break;
+ retval = (Character.isDigit (ch)
+ || ("abcdefABCDEF".indexOf (ch) != -1));
+ break;
}
if (negated)
@@ -176,12 +176,12 @@ final class RETokenPOSIX extends REToken
int numRepeats = 0;
while (true)
{
- if (numRepeats >= max)
- break;
- char ch = input.charAt (index++);
- if (!matchOneChar (ch))
- break;
- numRepeats++;
+ if (numRepeats >= max)
+ break;
+ char ch = input.charAt (index++);
+ if (!matchOneChar (ch))
+ break;
+ numRepeats++;
}
return numRepeats;
}
diff --git a/gnu/java/util/regex/RETokenRange.java b/gnu/java/util/regex/RETokenRange.java
index 2597d4d07..8898ef502 100644
--- a/gnu/java/util/regex/RETokenRange.java
+++ b/gnu/java/util/regex/RETokenRange.java
@@ -67,8 +67,8 @@ final class RETokenRange extends REToken
char c = input.charAt (mymatch.index);
if (matchOneChar (c))
{
- ++mymatch.index;
- return mymatch;
+ ++mymatch.index;
+ return mymatch;
}
return null;
}
@@ -80,13 +80,13 @@ final class RETokenRange extends REToken
boolean matches = (c >= lo) && (c <= hi);
if (!matches && insens)
{
- char c1 = toLowerCase (c, unicodeAware);
- matches = (c1 >= lo) && (c1 <= hi);
- if (!matches)
- {
- c1 = toUpperCase (c, unicodeAware);
- matches = (c1 >= lo) && (c1 <= hi);
- }
+ char c1 = toLowerCase (c, unicodeAware);
+ matches = (c1 >= lo) && (c1 <= hi);
+ if (!matches)
+ {
+ c1 = toUpperCase (c, unicodeAware);
+ matches = (c1 >= lo) && (c1 <= hi);
+ }
}
return matches;
}
@@ -102,12 +102,12 @@ final class RETokenRange extends REToken
int numRepeats = 0;
while (true)
{
- if (numRepeats >= max)
- break;
- char ch = input.charAt (index++);
- if (!matchOneChar (ch))
- break;
- numRepeats++;
+ if (numRepeats >= max)
+ break;
+ char ch = input.charAt (index++);
+ if (!matchOneChar (ch))
+ break;
+ numRepeats++;
}
return numRepeats;
}
diff --git a/gnu/java/util/regex/RETokenRepeated.java b/gnu/java/util/regex/RETokenRepeated.java
index 0ba880d39..cd8635396 100644
--- a/gnu/java/util/regex/RETokenRepeated.java
+++ b/gnu/java/util/regex/RETokenRepeated.java
@@ -59,11 +59,11 @@ final class RETokenRepeated extends REToken
this.max = max;
if (token.returnsFixedLengthMatches ())
{
- tokenFixedLength = token.getMaximumLength ();
+ tokenFixedLength = token.getMaximumLength ();
}
else
{
- tokenFixedLength = -1;
+ tokenFixedLength = -1;
}
}
@@ -125,7 +125,7 @@ final class RETokenRepeated extends REToken
{
this.tk = tk;
this.input = input;
- this.rematch = (REMatch) mymatch.clone (); // MUST make a clone
+ this.rematch = (REMatch) mymatch.clone (); // MUST make a clone
this.rematch.backtrackStack = new BacktrackStack ();
findFirst = true;
}
@@ -135,31 +135,31 @@ final class RETokenRepeated extends REToken
int origin = rematch.index;
REMatch rem;
if (findFirst)
- {
- rem = tk.findMatch (input, rematch);
- findFirst = false;
- }
+ {
+ rem = tk.findMatch (input, rematch);
+ findFirst = false;
+ }
else
- {
- while (true)
- {
- if (rematch.backtrackStack.empty ())
- {
- rem = null;
- break;
- }
- BacktrackStack.Backtrack bt = rematch.backtrackStack.pop ();
- rem = bt.token.backtrack (bt.input, bt.match, bt.param);
- if (rem != null)
- break;
- }
- }
+ {
+ while (true)
+ {
+ if (rematch.backtrackStack.empty ())
+ {
+ rem = null;
+ break;
+ }
+ BacktrackStack.Backtrack bt = rematch.backtrackStack.pop ();
+ rem = bt.token.backtrack (bt.input, bt.match, bt.param);
+ if (rem != null)
+ break;
+ }
+ }
if (rem == null)
- return null;
+ return null;
if (rem.index == origin)
- rem.empty = true;
+ rem.empty = true;
rematch = rem;
- return (REMatch) rem.clone (); // MUST make a clone.
+ return (REMatch) rem.clone (); // MUST make a clone.
}
boolean noMore ()
@@ -190,7 +190,7 @@ final class RETokenRepeated extends REToken
int[] visited;
DoablesFinder finder;
StackedInfo (CharIndexed input, int numRepeats, REMatch match,
- int[]visited, DoablesFinder finder)
+ int[]visited, DoablesFinder finder)
{
super (null, input, match, null);
this.numRepeats = numRepeats;
@@ -214,7 +214,7 @@ final class RETokenRepeated extends REToken
}
private REMatch findMatch (BacktrackStack stack,
- Deque < FindMatchControl > controlStack)
+ Deque < FindMatchControl > controlStack)
{
REMatch result = null;
StackedInfo si = null;
@@ -235,180 +235,180 @@ final class RETokenRepeated extends REToken
while (true)
{
- // This is the second entry point of this method.
- // If you want to call this method recursively but you do not need the
- // result returned, just continue from this point.
+ // This is the second entry point of this method.
+ // If you want to call this method recursively but you do not need the
+ // result returned, just continue from this point.
MAIN_LOOP:
- while (true)
- {
-
- if (stack.empty ())
- break MAIN_LOOP;
- si = (StackedInfo) (stack.peek ());
- input = si.input;
- numRepeats = si.numRepeats;
- mymatch = si.match;
- visited = si.visited;
- finder = si.finder;
-
- if (mymatch.backtrackStack == null)
- mymatch.backtrackStack = new BacktrackStack ();
-
- if (numRepeats >= max)
- {
- stack.pop ();
- REMatch m1 = matchRest (input, mymatch);
- if (m1 != null)
- {
- if (!stack.empty ())
- {
- m1.backtrackStack.push (new BacktrackStack.
- Backtrack (this, input,
- mymatch, stack));
- }
- result = m1;
- break MAIN_LOOP;
- }
- if (stingy)
- {
- continue MAIN_LOOP;
- }
- break MAIN_LOOP;
- }
-
- if (finder == null)
- {
- finder = new DoablesFinder (token, input, mymatch);
- si.finder = finder;
- }
-
- if (numRepeats < min)
- {
- while (true)
- {
- REMatch doable = finder.find ();
- if (doable == null)
- {
- if (stack.empty ())
- return null;
- stack.pop ();
- continue MAIN_LOOP;
- }
- if (finder.noMore ())
- stack.pop ();
- int newNumRepeats = (doable.empty ? min : numRepeats + 1);
- stack.
- push (new
- StackedInfo (input, newNumRepeats, doable,
- visited, null));
- continue MAIN_LOOP;
- }
- }
-
- if (visited == null)
- visited = initVisited ();
-
- if (stingy)
- {
- REMatch nextMatch = finder.find ();
- if (nextMatch != null && !nextMatch.empty)
- {
- stack.
- push (new
- StackedInfo (input, numRepeats + 1, nextMatch,
- visited, null));
- }
- else
- {
- stack.pop ();
- }
- REMatch m1 = matchRest (input, mymatch);
- if (m1 != null)
- {
- if (!stack.empty ())
- {
- m1.backtrackStack.push (new BacktrackStack.
- Backtrack (this, input,
- mymatch, stack));
- }
- result = m1;
- break MAIN_LOOP;
- }
- else
- {
- continue MAIN_LOOP;
- }
- }
-
- visited = addVisited (mymatch.index, visited);
-
- TryAnotherResult taresult =
- tryAnother (stack, input, mymatch, numRepeats, finder, visited);
- visited = taresult.visited;
- switch (taresult.status)
- {
- case TryAnotherResult.TRY_FURTHER:
- controlStack.push (new FindMatchControl (finder));
- continue MAIN_LOOP0;
- case TryAnotherResult.RESULT_FOUND:
- result = taresult.result;
- break MAIN_LOOP;
- }
-
- if (!stack.empty ())
- {
- stack.pop ();
- }
- if (possessive)
- {
- stack.clear ();
- }
- REMatch m1 = matchRest (input, mymatch);
- if (m1 != null)
- {
- if (!stack.empty ())
- {
- m1.backtrackStack.push (new BacktrackStack.
- Backtrack (this, input, mymatch,
- stack));
- }
- result = m1;
- break MAIN_LOOP;
- }
-
- } // MAIN_LOOP
-
- if (controlStack.isEmpty ())
- return result;
- FindMatchControl control = controlStack.pop ();
- if (possessive)
- {
- return result;
- }
- if (result != null)
- {
- result.backtrackStack.push (new BacktrackStack.
- Backtrack (this, input, mymatch,
- stack));
- return result;
- }
-
- finder = control.finder;
-
- TryAnotherResult taresult =
- tryAnother (stack, input, mymatch, numRepeats, finder, visited);
- visited = taresult.visited;
- switch (taresult.status)
- {
- case TryAnotherResult.TRY_FURTHER:
- controlStack.push (new FindMatchControl (finder));
- continue MAIN_LOOP0;
- case TryAnotherResult.RESULT_FOUND:
- return taresult.result;
- }
- continue MAIN_LOOP0;
-
- } // MAIN_LOOP0
+ while (true)
+ {
+
+ if (stack.empty ())
+ break MAIN_LOOP;
+ si = (StackedInfo) (stack.peek ());
+ input = si.input;
+ numRepeats = si.numRepeats;
+ mymatch = si.match;
+ visited = si.visited;
+ finder = si.finder;
+
+ if (mymatch.backtrackStack == null)
+ mymatch.backtrackStack = new BacktrackStack ();
+
+ if (numRepeats >= max)
+ {
+ stack.pop ();
+ REMatch m1 = matchRest (input, mymatch);
+ if (m1 != null)
+ {
+ if (!stack.empty ())
+ {
+ m1.backtrackStack.push (new BacktrackStack.
+ Backtrack (this, input,
+ mymatch, stack));
+ }
+ result = m1;
+ break MAIN_LOOP;
+ }
+ if (stingy)
+ {
+ continue MAIN_LOOP;
+ }
+ break MAIN_LOOP;
+ }
+
+ if (finder == null)
+ {
+ finder = new DoablesFinder (token, input, mymatch);
+ si.finder = finder;
+ }
+
+ if (numRepeats < min)
+ {
+ while (true)
+ {
+ REMatch doable = finder.find ();
+ if (doable == null)
+ {
+ if (stack.empty ())
+ return null;
+ stack.pop ();
+ continue MAIN_LOOP;
+ }
+ if (finder.noMore ())
+ stack.pop ();
+ int newNumRepeats = (doable.empty ? min : numRepeats + 1);
+ stack.
+ push (new
+ StackedInfo (input, newNumRepeats, doable,
+ visited, null));
+ continue MAIN_LOOP;
+ }
+ }
+
+ if (visited == null)
+ visited = initVisited ();
+
+ if (stingy)
+ {
+ REMatch nextMatch = finder.find ();
+ if (nextMatch != null && !nextMatch.empty)
+ {
+ stack.
+ push (new
+ StackedInfo (input, numRepeats + 1, nextMatch,
+ visited, null));
+ }
+ else
+ {
+ stack.pop ();
+ }
+ REMatch m1 = matchRest (input, mymatch);
+ if (m1 != null)
+ {
+ if (!stack.empty ())
+ {
+ m1.backtrackStack.push (new BacktrackStack.
+ Backtrack (this, input,
+ mymatch, stack));
+ }
+ result = m1;
+ break MAIN_LOOP;
+ }
+ else
+ {
+ continue MAIN_LOOP;
+ }
+ }
+
+ visited = addVisited (mymatch.index, visited);
+
+ TryAnotherResult taresult =
+ tryAnother (stack, input, mymatch, numRepeats, finder, visited);
+ visited = taresult.visited;
+ switch (taresult.status)
+ {
+ case TryAnotherResult.TRY_FURTHER:
+ controlStack.push (new FindMatchControl (finder));
+ continue MAIN_LOOP0;
+ case TryAnotherResult.RESULT_FOUND:
+ result = taresult.result;
+ break MAIN_LOOP;
+ }
+
+ if (!stack.empty ())
+ {
+ stack.pop ();
+ }
+ if (possessive)
+ {
+ stack.clear ();
+ }
+ REMatch m1 = matchRest (input, mymatch);
+ if (m1 != null)
+ {
+ if (!stack.empty ())
+ {
+ m1.backtrackStack.push (new BacktrackStack.
+ Backtrack (this, input, mymatch,
+ stack));
+ }
+ result = m1;
+ break MAIN_LOOP;
+ }
+
+ } // MAIN_LOOP
+
+ if (controlStack.isEmpty ())
+ return result;
+ FindMatchControl control = controlStack.pop ();
+ if (possessive)
+ {
+ return result;
+ }
+ if (result != null)
+ {
+ result.backtrackStack.push (new BacktrackStack.
+ Backtrack (this, input, mymatch,
+ stack));
+ return result;
+ }
+
+ finder = control.finder;
+
+ TryAnotherResult taresult =
+ tryAnother (stack, input, mymatch, numRepeats, finder, visited);
+ visited = taresult.visited;
+ switch (taresult.status)
+ {
+ case TryAnotherResult.TRY_FURTHER:
+ controlStack.push (new FindMatchControl (finder));
+ continue MAIN_LOOP0;
+ case TryAnotherResult.RESULT_FOUND:
+ return taresult.result;
+ }
+ continue MAIN_LOOP0;
+
+ } // MAIN_LOOP0
}
private static class TryAnotherResult
@@ -422,9 +422,9 @@ final class RETokenRepeated extends REToken
}
private TryAnotherResult tryAnother (BacktrackStack stack,
- CharIndexed input, REMatch mymatch,
- int numRepeats, DoablesFinder finder,
- int[]visited)
+ CharIndexed input, REMatch mymatch,
+ int numRepeats, DoablesFinder finder,
+ int[]visited)
{
TryAnotherResult taresult = new TryAnotherResult ();
@@ -437,58 +437,58 @@ final class RETokenRepeated extends REToken
DO_ONE_DOABLE:
while (true)
- {
-
- REMatch doable = finder.find ();
- if (doable == null)
- {
- break DO_THIS;
- }
- if (doable.empty)
- emptyMatchFound = true;
-
- if (!emptyMatchFound)
- {
- int n = doable.index;
- if (visitedContains (n, visited))
- {
- continue DO_ONE_DOABLE;
- }
- visited = addVisited (n, visited);
- stack.
- push (new
- StackedInfo (input, numRepeats + 1, doable, visited,
- null));
- taresult.visited = visited;
- taresult.status = TryAnotherResult.TRY_FURTHER;
- return taresult;
- }
- else
- {
- REMatch m1 = matchRest (input, doable);
- if (possessive)
- {
- taresult.result = m1;
- taresult.status = TryAnotherResult.RESULT_FOUND;
- return taresult;
- }
- if (m1 != null)
- {
- if (!stack.empty ())
- {
- m1.backtrackStack.push (new BacktrackStack.
- Backtrack (this, input, mymatch,
- stack));
- }
- taresult.result = m1;
- taresult.status = TryAnotherResult.RESULT_FOUND;
- return taresult;
- }
- }
-
- } // DO_ONE_DOABLE
-
- } // DO_THIS
+ {
+
+ REMatch doable = finder.find ();
+ if (doable == null)
+ {
+ break DO_THIS;
+ }
+ if (doable.empty)
+ emptyMatchFound = true;
+
+ if (!emptyMatchFound)
+ {
+ int n = doable.index;
+ if (visitedContains (n, visited))
+ {
+ continue DO_ONE_DOABLE;
+ }
+ visited = addVisited (n, visited);
+ stack.
+ push (new
+ StackedInfo (input, numRepeats + 1, doable, visited,
+ null));
+ taresult.visited = visited;
+ taresult.status = TryAnotherResult.TRY_FURTHER;
+ return taresult;
+ }
+ else
+ {
+ REMatch m1 = matchRest (input, doable);
+ if (possessive)
+ {
+ taresult.result = m1;
+ taresult.status = TryAnotherResult.RESULT_FOUND;
+ return taresult;
+ }
+ if (m1 != null)
+ {
+ if (!stack.empty ())
+ {
+ m1.backtrackStack.push (new BacktrackStack.
+ Backtrack (this, input, mymatch,
+ stack));
+ }
+ taresult.result = m1;
+ taresult.status = TryAnotherResult.RESULT_FOUND;
+ return taresult;
+ }
+ }
+
+ } // DO_ONE_DOABLE
+
+ } // DO_THIS
taresult.status = TryAnotherResult.NOTHING_FOUND;
return taresult;
@@ -501,8 +501,8 @@ final class RETokenRepeated extends REToken
REMatch m1 = findMatch (input, mymatch);
if (m1 != null)
{
- mymatch.assignFrom (m1);
- return true;
+ mymatch.assignFrom (m1);
+ return true;
}
return false;
}
@@ -523,8 +523,8 @@ final class RETokenRepeated extends REToken
// simple linear search is faster than binary search.
for (int i = 1; i < visited[0]; i++)
{
- if (n == visited[i])
- return true;
+ if (n == visited[i])
+ return true;
}
return false;
}
@@ -535,9 +535,9 @@ final class RETokenRepeated extends REToken
return visited;
if (visited[0] >= visited.length - 1)
{
- int[] newvisited = new int[visited.length + 32];
- System.arraycopy (visited, 0, newvisited, 0, visited.length);
- visited = newvisited;
+ int[] newvisited = new int[visited.length + 32];
+ System.arraycopy (visited, 0, newvisited, 0, visited.length);
+ visited = newvisited;
}
visited[0]++;
visited[visited[0]] = n;
@@ -548,7 +548,7 @@ final class RETokenRepeated extends REToken
{
if (next (input, newMatch))
{
- return newMatch;
+ return newMatch;
}
return null;
}
@@ -573,7 +573,7 @@ final class RETokenRepeated extends REToken
}
private REMatch backtrackFixedLength (CharIndexed input, REMatch mymatch,
- Object param)
+ Object param)
{
int[] params = (int[]) param;
int index = params[0];
@@ -582,34 +582,34 @@ final class RETokenRepeated extends REToken
}
private REMatch findMatchFixedLength (CharIndexed input, REMatch mymatch,
- int index, int count)
+ int index, int count)
{
REMatch tryMatch = (REMatch) mymatch.clone ();
while (true)
{
- tryMatch.index = index;
- REMatch m = matchRest (input, tryMatch);
- count--;
- if (stingy)
- index += tokenFixedLength;
- else
- index -= tokenFixedLength;
- if (possessive)
- return m;
- if (m != null)
- {
- if (count > 0)
- {
- m.backtrackStack.push (new BacktrackStack.
- Backtrack (this, input, mymatch,
- new int[]
- {
- index, count}));
- }
- return m;
- }
- if (count <= 0)
- return null;
+ tryMatch.index = index;
+ REMatch m = matchRest (input, tryMatch);
+ count--;
+ if (stingy)
+ index += tokenFixedLength;
+ else
+ index -= tokenFixedLength;
+ if (possessive)
+ return m;
+ if (m != null)
+ {
+ if (count > 0)
+ {
+ m.backtrackStack.push (new BacktrackStack.
+ Backtrack (this, input, mymatch,
+ new int[]
+ {
+ index, count}));
+ }
+ return m;
+ }
+ if (count <= 0)
+ return null;
}
}
@@ -624,14 +624,14 @@ final class RETokenRepeated extends REToken
os.append ('?');
else
{
- os.append ('{').append (min);
- if (max > min)
- {
- os.append (',');
- if (max != Integer.MAX_VALUE)
- os.append (max);
- }
- os.append ('}');
+ os.append ('{').append (min);
+ if (max > min)
+ {
+ os.append (',');
+ if (max != Integer.MAX_VALUE)
+ os.append (max);
+ }
+ os.append ('}');
}
if (stingy)
os.append ('?');
diff --git a/gnu/java/util/regex/RETokenStart.java b/gnu/java/util/regex/RETokenStart.java
index 6a8d247c9..c57ba9c75 100644
--- a/gnu/java/util/regex/RETokenStart.java
+++ b/gnu/java/util/regex/RETokenStart.java
@@ -41,7 +41,7 @@ import gnu.java.lang.CPStringBuilder;
class RETokenStart extends REToken
{
- private String newline; // matches after a newline
+ private String newline; // matches after a newline
private boolean check_java_line_terminators;
RETokenStart (int subIndex, String newline)
@@ -58,13 +58,13 @@ class RETokenStart extends REToken
this.check_java_line_terminators = b;
}
- @Override
+ @Override
int getMaximumLength ()
{
return 0;
}
- @Override
+ @Override
REMatch matchThis (CharIndexed input, REMatch mymatch)
{
// charAt(index-n) may be unknown on a Reader/InputStream. FIXME
@@ -72,52 +72,52 @@ class RETokenStart extends REToken
if (check_java_line_terminators)
{
- char ch = input.charAt (mymatch.index - 1);
- if (ch != CharIndexed.OUT_OF_BOUNDS)
- {
- if (ch == '\n')
- return mymatch;
- if (ch == '\r')
- {
- char ch1 = input.charAt (mymatch.index);
- if (ch1 != '\n')
- return mymatch;
- return null;
- }
- if (ch == '\u0085')
- return mymatch; // A next-line character
- if (ch == '\u2028')
- return mymatch; // A line-separator character
- if (ch == '\u2029')
- return mymatch; // A paragraph-separator character
- }
+ char ch = input.charAt (mymatch.index - 1);
+ if (ch != CharIndexed.OUT_OF_BOUNDS)
+ {
+ if (ch == '\n')
+ return mymatch;
+ if (ch == '\r')
+ {
+ char ch1 = input.charAt (mymatch.index);
+ if (ch1 != '\n')
+ return mymatch;
+ return null;
+ }
+ if (ch == '\u0085')
+ return mymatch; // A next-line character
+ if (ch == '\u2028')
+ return mymatch; // A line-separator character
+ if (ch == '\u2029')
+ return mymatch; // A paragraph-separator character
+ }
}
if (newline != null)
{
- int len = newline.length ();
- if (mymatch.offset >= len)
- {
- boolean found = true;
- char z;
- int i = 0; // position in REToken.newline
- char ch = input.charAt (mymatch.index - len);
- do
- {
- z = newline.charAt (i);
- if (ch != z)
- {
- found = false;
- break;
- }
- ++i;
- ch = input.charAt (mymatch.index - len + i);
- }
- while (i < len);
-
- if (found)
- return mymatch;
- }
+ int len = newline.length ();
+ if (mymatch.offset >= len)
+ {
+ boolean found = true;
+ char z;
+ int i = 0; // position in REToken.newline
+ char ch = input.charAt (mymatch.index - len);
+ do
+ {
+ z = newline.charAt (i);
+ if (ch != z)
+ {
+ found = false;
+ break;
+ }
+ ++i;
+ ch = input.charAt (mymatch.index - len + i);
+ }
+ while (i < len);
+
+ if (found)
+ return mymatch;
+ }
}
// Don't match at all if REG_NOTBOL is set.
@@ -130,7 +130,7 @@ class RETokenStart extends REToken
return ((mymatch.index == 0) && (mymatch.offset == 0)) ? mymatch : null;
}
- @Override
+ @Override
boolean returnsFixedLengthMatches ()
{
return true;
diff --git a/gnu/java/util/regex/RETokenWordBoundary.java b/gnu/java/util/regex/RETokenWordBoundary.java
index 9f758b635..04fd8391f 100644
--- a/gnu/java/util/regex/RETokenWordBoundary.java
+++ b/gnu/java/util/regex/RETokenWordBoundary.java
@@ -71,24 +71,24 @@ final class RETokenWordBoundary extends REToken
// In the string "one two three", these positions match:
// |o|n|e| |t|w|o| |t|h|r|e|e|
// ^ ^ ^ ^ ^ ^
- boolean after = false; // is current character a letter or digit?
- boolean before = false; // is previous character a letter or digit?
+ boolean after = false; // is current character a letter or digit?
+ boolean before = false; // is previous character a letter or digit?
char ch;
// TODO: Also check REG_ANCHORINDEX vs. anchor
if (((mymatch.eflags & RE.REG_ANCHORINDEX) != RE.REG_ANCHORINDEX)
- || (mymatch.offset + mymatch.index > mymatch.anchor))
+ || (mymatch.offset + mymatch.index > mymatch.anchor))
{
- if ((ch =
- input.charAt (mymatch.index - 1)) != CharIndexed.OUT_OF_BOUNDS)
- {
- before = Character.isLetterOrDigit (ch) || (ch == '_');
- }
+ if ((ch =
+ input.charAt (mymatch.index - 1)) != CharIndexed.OUT_OF_BOUNDS)
+ {
+ before = Character.isLetterOrDigit (ch) || (ch == '_');
+ }
}
if ((ch = input.charAt (mymatch.index)) != CharIndexed.OUT_OF_BOUNDS)
{
- after = Character.isLetterOrDigit (ch) || (ch == '_');
+ after = Character.isLetterOrDigit (ch) || (ch == '_');
}
// if (before) and (!after), we're at end (\>)
@@ -97,11 +97,11 @@ final class RETokenWordBoundary extends REToken
if ((where & BEGIN) == BEGIN)
{
- doNext = after && !before;
+ doNext = after && !before;
}
if ((where & END) == END)
{
- doNext ^= before && !after;
+ doNext ^= before && !after;
}
if (negated)
@@ -127,15 +127,15 @@ final class RETokenWordBoundary extends REToken
{
if (where == (BEGIN | END))
{
- os.append (negated ? "\\B" : "\\b");
+ os.append (negated ? "\\B" : "\\b");
}
else if (where == BEGIN)
{
- os.append ("\\<");
+ os.append ("\\<");
}
else
{
- os.append ("\\>");
+ os.append ("\\>");
}
}
}
diff --git a/gnu/java/util/regex/UncheckedRE.java b/gnu/java/util/regex/UncheckedRE.java
index 5f8c74902..7d215a6c1 100644
--- a/gnu/java/util/regex/UncheckedRE.java
+++ b/gnu/java/util/regex/UncheckedRE.java
@@ -47,11 +47,11 @@ package gnu.java.util.regex;
* <P>
* Note that this makes UncheckedRE dangerous if constructed with
* dynamic data. Do not use UncheckedRE unless you are completely sure
- * that all input being passed to it contains valid, well-formed
+ * that all input being passed to it contains valid, well-formed
* regular expressions for the syntax specified.
*
* @author <A HREF="mailto:wes@cacas.org">Wes Biggs</A>
- * @see gnu.java.util.regex.RE
+ * @see gnu.java.util.regex.RE
* @since gnu.regexp 1.1.4
*/
@@ -105,7 +105,7 @@ public final class UncheckedRE extends RE
try
{
initialize (pattern, cflags, syntax, 0, 0);
- }
+ }
catch (REException e)
{
throw new RuntimeException (e.getMessage ());
diff --git a/gnu/javax/activation/viewers/ImageViewer.java b/gnu/javax/activation/viewers/ImageViewer.java
index 829f40cbf..5bddf7311 100644
--- a/gnu/javax/activation/viewers/ImageViewer.java
+++ b/gnu/javax/activation/viewers/ImageViewer.java
@@ -129,7 +129,7 @@ public class ImageViewer extends Component
if (is.width > -1 && is.height > -1)
{
Dimension cs = getSize();
- g.drawImage(image, 0, 0, cs.width, cs.height,
+ g.drawImage(image, 0, 0, cs.width, cs.height,
0, 0, is.width, is.height, this);
}
}
diff --git a/gnu/javax/activation/viewers/TextEditor.java b/gnu/javax/activation/viewers/TextEditor.java
index 1995ae122..0eedc85db 100644
--- a/gnu/javax/activation/viewers/TextEditor.java
+++ b/gnu/javax/activation/viewers/TextEditor.java
@@ -104,7 +104,7 @@ public class TextEditor extends TextArea
{
try
{
-
+
out.close();
}
catch (IOException e)
@@ -115,5 +115,5 @@ public class TextEditor extends TextArea
}
}
}
-
+
}
diff --git a/gnu/javax/activation/viewers/TextViewer.java b/gnu/javax/activation/viewers/TextViewer.java
index 2b4aa90c5..deac80d5e 100644
--- a/gnu/javax/activation/viewers/TextViewer.java
+++ b/gnu/javax/activation/viewers/TextViewer.java
@@ -77,5 +77,5 @@ public class TextViewer extends TextArea
in.close();
setText(bytes.toString());
}
-
+
}
diff --git a/gnu/javax/crypto/assembly/Assembly.java b/gnu/javax/crypto/assembly/Assembly.java
index 49770675b..f570d2012 100644
--- a/gnu/javax/crypto/assembly/Assembly.java
+++ b/gnu/javax/crypto/assembly/Assembly.java
@@ -1,4 +1,4 @@
-/* Assembly.java --
+/* Assembly.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -49,7 +49,7 @@ import java.util.Map;
* Once constructed, and correctly initialised, the bulk of the methods
* available on the <code>Assembly</code> are delegated to the <i>head</i> of
* the {@link Transformer} chain of the <code>Assembly</code>.
- *
+ *
* @see Transformer
*/
public class Assembly
@@ -79,7 +79,7 @@ public class Assembly
* in pre-processing mode; i.e. it should apply its internal transformation
* algorithm on the input data stream, <b>before</b> it passes that stream to
* the next element in the <i>chain</i>.
- *
+ *
* @param t the {@link Transformer} to add at the head of the current chain.
* @throws IllegalArgumentException if the designated {@link Transformer} has
* a non-null tail; i.e. it is already an element of a chain.
@@ -94,7 +94,7 @@ public class Assembly
* in post-processing mode; i.e. it should apply its internal transformation
* algorithm on the input data stream, <b>after</b> it passes that stream to
* the next element in the <i>chain</i>.
- *
+ *
* @param t the {@link Transformer} to add at the head of the current chain.
* @throws IllegalArgumentException if the designated {@link Transformer} has
* a non-null tail; i.e. it is already an element of a chain.
@@ -107,7 +107,7 @@ public class Assembly
/**
* Initialises the <code>Assembly</code> for operation with specific
* characteristics.
- *
+ *
* @param attributes a set of name-value pairs that describes the desired
* future behaviour of this instance.
* @throws IllegalStateException if the instance is already initialised.
@@ -138,7 +138,7 @@ public class Assembly
* Convenience method that calls the method with same name and three
* arguments, using a byte array of length <code>1</code> whose contents are
* the designated byte.
- *
+ *
* @param b the byte to process.
* @return the result of transformation.
* @throws IllegalStateException if the instance is not initialised.
@@ -155,7 +155,7 @@ public class Assembly
* Convenience method that calls the method with same name and three
* arguments. All bytes in <code>in</code>, starting from index position
* <code>0</code> are considered.
- *
+ *
* @param in the input data bytes.
* @return the result of transformation.
* @throws IllegalStateException if the instance is not initialised.
@@ -170,7 +170,7 @@ public class Assembly
/**
* Processes a designated number of bytes from a given byte array.
- *
+ *
* @param in the input data bytes.
* @param offset index of <code>in</code> from which to start considering
* data.
@@ -191,7 +191,7 @@ public class Assembly
/**
* Convenience method that calls the method with same name and three arguments
* using a 0-long byte array.
- *
+ *
* @return the result of transformation.
* @throws IllegalStateException if the instance is not initialised.
* @throws TransformerException if a transformation-related exception occurs
@@ -207,7 +207,7 @@ public class Assembly
* Convenience method that calls the method with same name and three
* arguments, using a byte array of length <code>1</code> whose contents are
* the designated byte.
- *
+ *
* @param b the byte to process.
* @return the result of transformation.
* @throws IllegalStateException if the instance is not initialised.
@@ -224,7 +224,7 @@ public class Assembly
* Convenience method that calls the method with same name and three
* arguments. All bytes in <code>in</code>, starting from index position
* <code>0</code> are considered.
- *
+ *
* @param in the input data bytes.
* @return the result of transformation.
* @throws IllegalStateException if the instance is not initialised.
@@ -241,7 +241,7 @@ public class Assembly
* Processes a designated number of bytes from a given byte array and signals,
* at the same time, that this is the last <i>push</i> operation for this
* <code>Assembly</code>.
- *
+ *
* @param in the input data bytes.
* @param offset index of <code>in</code> from which to start considering
* data.
diff --git a/gnu/javax/crypto/assembly/Cascade.java b/gnu/javax/crypto/assembly/Cascade.java
index f790956a4..685cef5b2 100644
--- a/gnu/javax/crypto/assembly/Cascade.java
+++ b/gnu/javax/crypto/assembly/Cascade.java
@@ -1,4 +1,4 @@
-/* Cascade.java --
+/* Cascade.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -100,7 +100,7 @@ public class Cascade
/**
* Returns the Least Common Multiple of two integers.
- *
+ *
* @param a the first integer.
* @param b the second integer.
* @return the LCM of <code>abs(a)</code> and <code>abs(b)</code>.
@@ -114,7 +114,7 @@ public class Cascade
/**
* Adds to the end of the current chain, a designated {@link Stage}.
- *
+ *
* @param stage the {@link Stage} to append to the chain.
* @return a unique identifier for this stage, within this cascade.
* @throws IllegalStateException if the instance is already initialised.
@@ -129,7 +129,7 @@ public class Cascade
/**
* Adds to the begining of the current chain, a designated {@link Stage}.
- *
+ *
* @param stage the {@link Stage} to prepend to the chain.
* @return a unique identifier for this stage, within this cascade.
* @throws IllegalStateException if the instance is already initialised.
@@ -145,7 +145,7 @@ public class Cascade
/**
* Inserts a {@link Stage} into the current chain, at the specified index
* (zero-based) position.
- *
+ *
* @param stage the {@link Stage} to insert into the chain.
* @return a unique identifier for this stage, within this cascade.
* @throws IllegalArgumentException if the designated stage is already in the
@@ -187,7 +187,7 @@ public class Cascade
/**
* Returns the current number of stages in this chain.
- *
+ *
* @return the current count of stages in this chain.
*/
public int size()
@@ -199,7 +199,7 @@ public class Cascade
* Returns an {@link Iterator} over the stages contained in this instance.
* Each element of this iterator is a concrete implementation of a {@link
* Stage}.
- *
+ *
* @return an {@link Iterator} over the stages contained in this instance.
* Each element of the returned iterator is a concrete instance of a
* {@link Stage}.
@@ -216,7 +216,7 @@ public class Cascade
* Returns the {@link Set} of supported block sizes for this
* <code>Cascade</code> that are common to all of its chained stages. Each
* element in the returned {@link Set} is an instance of {@link Integer}.
- *
+ *
* @return a {@link Set} of supported block sizes common to all the stages of
* the chain.
*/
@@ -236,7 +236,7 @@ public class Cascade
/**
* Initialises the chain for operation with specific characteristics.
- *
+ *
* @param attributes a set of name-value pairs that describes the desired
* future behaviour of this instance.
* @throws IllegalStateException if the chain, or any of its stages, is
@@ -273,7 +273,7 @@ public class Cascade
/**
* Returns the currently set block size for the chain.
- *
+ *
* @return the current block size for the chain.
* @throws IllegalStateException if the instance is not initialised.
*/
@@ -302,7 +302,7 @@ public class Cascade
* Processes exactly one block of <i>plaintext</i> (if initialised in the
* {@link Direction#FORWARD} state) or <i>ciphertext</i> (if initialised in
* the {@link Direction#REVERSED} state).
- *
+ *
* @param in the plaintext.
* @param inOffset index of <code>in</code> from which to start considering
* data.
@@ -332,7 +332,7 @@ public class Cascade
* encryption / decryption test(s) for all supported block and key sizes of
* underlying block cipher(s) wrapped by Mode leafs. The test also includes
* one (1) variable key Known Answer Test (KAT) for each block cipher.
- *
+ *
* @return <code>true</code> if the implementation passes simple
* <i>correctness</i> tests. Returns <code>false</code> otherwise.
*/
diff --git a/gnu/javax/crypto/assembly/CascadeStage.java b/gnu/javax/crypto/assembly/CascadeStage.java
index b86f42e2a..196edafdf 100644
--- a/gnu/javax/crypto/assembly/CascadeStage.java
+++ b/gnu/javax/crypto/assembly/CascadeStage.java
@@ -1,4 +1,4 @@
-/* CascadeStage.java --
+/* CascadeStage.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/assembly/CascadeTransformer.java b/gnu/javax/crypto/assembly/CascadeTransformer.java
index 5fce51a15..8e3a9a5a1 100644
--- a/gnu/javax/crypto/assembly/CascadeTransformer.java
+++ b/gnu/javax/crypto/assembly/CascadeTransformer.java
@@ -1,4 +1,4 @@
-/* CascadeTransformer.java --
+/* CascadeTransformer.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/assembly/DeflateTransformer.java b/gnu/javax/crypto/assembly/DeflateTransformer.java
index e5c0b7a57..97f9f0365 100644
--- a/gnu/javax/crypto/assembly/DeflateTransformer.java
+++ b/gnu/javax/crypto/assembly/DeflateTransformer.java
@@ -1,4 +1,4 @@
-/* DeflateTransformer.java --
+/* DeflateTransformer.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/assembly/Direction.java b/gnu/javax/crypto/assembly/Direction.java
index 48c74ed1b..40ddfc429 100644
--- a/gnu/javax/crypto/assembly/Direction.java
+++ b/gnu/javax/crypto/assembly/Direction.java
@@ -1,4 +1,4 @@
-/* Direction.java --
+/* Direction.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/assembly/LoopbackTransformer.java b/gnu/javax/crypto/assembly/LoopbackTransformer.java
index bba1da778..5bcfe5ffc 100644
--- a/gnu/javax/crypto/assembly/LoopbackTransformer.java
+++ b/gnu/javax/crypto/assembly/LoopbackTransformer.java
@@ -1,4 +1,4 @@
-/* LoopbackTransformer.java --
+/* LoopbackTransformer.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/assembly/ModeStage.java b/gnu/javax/crypto/assembly/ModeStage.java
index 253ab4ae6..8bdbef7c4 100644
--- a/gnu/javax/crypto/assembly/ModeStage.java
+++ b/gnu/javax/crypto/assembly/ModeStage.java
@@ -1,4 +1,4 @@
-/* ModeStage.java --
+/* ModeStage.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/assembly/Operation.java b/gnu/javax/crypto/assembly/Operation.java
index 28fdf9412..6861a1377 100644
--- a/gnu/javax/crypto/assembly/Operation.java
+++ b/gnu/javax/crypto/assembly/Operation.java
@@ -1,4 +1,4 @@
-/* Operation.java --
+/* Operation.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/assembly/PaddingTransformer.java b/gnu/javax/crypto/assembly/PaddingTransformer.java
index c11f4fe88..494ca34ca 100644
--- a/gnu/javax/crypto/assembly/PaddingTransformer.java
+++ b/gnu/javax/crypto/assembly/PaddingTransformer.java
@@ -1,4 +1,4 @@
-/* PaddingTransformer.java --
+/* PaddingTransformer.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/assembly/Stage.java b/gnu/javax/crypto/assembly/Stage.java
index d023f6283..5d0ab5353 100644
--- a/gnu/javax/crypto/assembly/Stage.java
+++ b/gnu/javax/crypto/assembly/Stage.java
@@ -1,4 +1,4 @@
-/* Stage.java --
+/* Stage.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -56,7 +56,7 @@ import java.util.Set;
* the specification of how to wire the stage into the chain. The following
* diagrams may help understand the paradigme. The first shows two stages
* chained each with a {@link Direction#FORWARD} direction.
- *
+ *
* <pre>
* FORWARD FORWARD
* +------+ +-------+
@@ -67,12 +67,12 @@ import java.util.Set;
* | | | |
* +-------+ +------+
* </pre>
- *
+ *
* <p>
* The second diagram shows two stages, one in a {@link Direction#FORWARD}
* direction, while the other is wired in a {@link Direction#REVERSED}
* direction.
- *
+ *
* <pre>
* FORWARD REVERSED
* +------+ +------+
@@ -83,7 +83,7 @@ import java.util.Set;
* | |
* +---------------+
* </pre>
- *
+ *
* @see ModeStage
* @see CascadeStage
*/
@@ -118,14 +118,14 @@ public abstract class Stage
* Returns the {@link Set} of supported block sizes for this
* <code>Stage</code>. Each element in the returned {@link Set} is an
* instance of {@link Integer}.
- *
+ *
* @return a {@link Set} of supported block sizes.
*/
public abstract Set blockSizes();
/**
* Initialises the stage for operation with specific characteristics.
- *
+ *
* @param attributes a set of name-value pairs that describes the desired
* future behaviour of this instance.
* @throws IllegalStateException if the instance is already initialised.
@@ -147,7 +147,7 @@ public abstract class Stage
/**
* Returns the currently set block size for the stage.
- *
+ *
* @return the current block size for this stage.
* @throws IllegalStateException if the instance is not initialised.
*/
@@ -167,7 +167,7 @@ public abstract class Stage
* Processes exactly one block of <i>plaintext</i> (if initialised in the
* {@link Direction#FORWARD} state) or <i>ciphertext</i> (if initialised in
* the {@link Direction#REVERSED} state).
- *
+ *
* @param in the plaintext.
* @param inOffset index of <code>in</code> from which to start considering
* data.
@@ -187,7 +187,7 @@ public abstract class Stage
* encryption / decryption test(s) for all supported block and key sizes of
* underlying block cipher(s) wrapped by Mode leafs. The test also includes
* one (1) variable key Known Answer Test (KAT) for each block cipher.
- *
+ *
* @return <code>true</code> if the implementation passes simple
* <i>correctness</i> tests. Returns <code>false</code> otherwise.
*/
diff --git a/gnu/javax/crypto/assembly/Transformer.java b/gnu/javax/crypto/assembly/Transformer.java
index 58a991b93..1937f9950 100644
--- a/gnu/javax/crypto/assembly/Transformer.java
+++ b/gnu/javax/crypto/assembly/Transformer.java
@@ -1,4 +1,4 @@
-/* Transformer.java --
+/* Transformer.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -73,7 +73,7 @@ import java.util.Map;
* buffering, from the previous element, is needed --which is independant of
* buffering the input if the <code>Transformer</code> implementation itself
* is block-based.
- *
+ *
* @see CascadeTransformer
* @see PaddingTransformer
* @see DeflateTransformer
@@ -117,7 +117,7 @@ public abstract class Transformer
/**
* Sets the operational mode of this <code>Transformer</code>.
- *
+ *
* @param mode the processing mode this <code>Transformer</code> is required
* to operate in.
* @throws IllegalStateException if this instance has already been assigned an
@@ -133,7 +133,7 @@ public abstract class Transformer
/**
* Returns <code>true</code> if this <code>Transformer</code> was wired in
* pre-processing mode; <code>false</code> otherwise.
- *
+ *
* @return <code>true</code> if this <code>Transformer</code> has been
* wired in pre-processing mode; <code>false</code> otherwise.
* @throws IllegalStateException if this instance has not yet been assigned an
@@ -149,7 +149,7 @@ public abstract class Transformer
/**
* Returns <code>true</code> if this <code>Transformer</code> was wired in
* post-processing mode; <code>false</code> otherwise.
- *
+ *
* @return <code>true</code> if this <code>Transformer</code> has been
* wired in post-processing mode; <code>false</code> otherwise.
* @throws IllegalStateException if this instance has not yet been assigned an
@@ -163,7 +163,7 @@ public abstract class Transformer
/**
* Initialises the <code>Transformer</code> for operation with specific
* characteristics.
- *
+ *
* @param attributes a set of name-value pairs that describes the desired
* future behaviour of this instance.
* @throws IllegalStateException if the instance is already initialised.
@@ -185,7 +185,7 @@ public abstract class Transformer
/**
* Returns the block-size of this <code>Transformer</code>. A value of
* <code>1</code> indicates that this instance is block-agnostic.
- *
+ *
* @return the current minimal required block size.
*/
public int currentBlockSize()
@@ -212,7 +212,7 @@ public abstract class Transformer
* Convenience method that calls the method with same name and three
* arguments, using a byte array of length <code>1</code> whose contents are
* the designated byte.
- *
+ *
* @param b the byte to process.
* @return the result of transformation.
* @throws IllegalStateException if the instance is not initialised.
@@ -229,7 +229,7 @@ public abstract class Transformer
* Convenience method that calls the same method with three arguments. All
* bytes in <code>in</code>, starting from index position <code>0</code>
* are considered.
- *
+ *
* @param in the input data bytes.
* @return the result of transformation.
* @throws IllegalStateException if the instance is not initialised.
@@ -244,7 +244,7 @@ public abstract class Transformer
/**
* Processes a designated number of bytes from a given byte array.
- *
+ *
* @param in the input data bytes.
* @param offset index of <code>in</code> from which to start considering
* data.
@@ -267,7 +267,7 @@ public abstract class Transformer
/**
* Convenience method that calls the same method with three arguments. A
* zero-long byte array is used.
- *
+ *
* @return the result of transformation.
* @throws IllegalStateException if the instance is not initialised.
* @throws TransformerException if a transformation-related exception occurs
@@ -287,7 +287,7 @@ public abstract class Transformer
* Convenience method that calls the method with same name and three
* arguments, using a byte array of length <code>1</code> whose contents are
* the designated byte.
- *
+ *
* @param b the byte to process.
* @return the result of transformation.
* @throws IllegalStateException if the instance is not initialised.
@@ -304,7 +304,7 @@ public abstract class Transformer
* Convenience method that calls the same method with three arguments. All
* bytes in <code>in</code>, starting from index position <code>0</code>
* are considered.
- *
+ *
* @param in the input data bytes.
* @return the result of transformation.
* @throws IllegalStateException if the instance is not initialised.
@@ -321,7 +321,7 @@ public abstract class Transformer
* Processes a designated number of bytes from a given byte array and signals,
* at the same time, that this is the last <i>push</i> operation on this
* <code>Transformer</code>.
- *
+ *
* @param in the input data bytes.
* @param offset index of <code>in</code> from which to start considering
* data.
diff --git a/gnu/javax/crypto/assembly/TransformerException.java b/gnu/javax/crypto/assembly/TransformerException.java
index 4e93322ef..295fded7b 100644
--- a/gnu/javax/crypto/assembly/TransformerException.java
+++ b/gnu/javax/crypto/assembly/TransformerException.java
@@ -1,4 +1,4 @@
-/* TransformerException.java --
+/* TransformerException.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -95,7 +95,7 @@ public class TransformerException
* Prints this exception's stack trace to a print stream. If this exception
* has a root exception; the stack trace of the root exception is also printed
* to the print stream.
- *
+ *
* @param ps the non-null print stream to which to print.
*/
public void printStackTrace(PrintStream ps)
@@ -109,7 +109,7 @@ public class TransformerException
* Prints this exception's stack trace to a print writer. If this exception
* has a root exception; the stack trace of the root exception is also printed
* to the print writer.
- *
+ *
* @param pw the non-null print writer to use for output.
*/
public void printStackTrace(PrintWriter pw)
@@ -125,7 +125,7 @@ public class TransformerException
* and if it has a root exception, the string representation of the root
* exception. This string representation is meant for debugging and not meant
* to be interpreted programmatically.
- *
+ *
* @return the non-null string representation of this exception.
* @see Throwable#getMessage()
*/
diff --git a/gnu/javax/crypto/cipher/Anubis.java b/gnu/javax/crypto/cipher/Anubis.java
index 653957ec6..3526ad612 100644
--- a/gnu/javax/crypto/cipher/Anubis.java
+++ b/gnu/javax/crypto/cipher/Anubis.java
@@ -1,4 +1,4 @@
-/* Anubis.java --
+/* Anubis.java --
Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -315,7 +315,7 @@ public final class Anubis
/**
* Expands a user-supplied key material into a session key for a designated
* <i>block size</i>.
- *
+ *
* @param uk the 32N-bit user-supplied key material; 4 &lt;= N &lt;= 10.
* @param bs the desired block size in bytes.
* @return an Object encapsulating the session key.
diff --git a/gnu/javax/crypto/cipher/BaseCipher.java b/gnu/javax/crypto/cipher/BaseCipher.java
index bae142a63..45aa2d6fd 100644
--- a/gnu/javax/crypto/cipher/BaseCipher.java
+++ b/gnu/javax/crypto/cipher/BaseCipher.java
@@ -1,4 +1,4 @@
-/* BaseCipher.java --
+/* BaseCipher.java --
Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -72,7 +72,7 @@ public abstract class BaseCipher
/**
* Trivial constructor for use by concrete subclasses.
- *
+ *
* @param name the canonical name prefix of this instance.
* @param defaultBlockSize the default block size in bytes.
* @param defaultKeySize the default key size in bytes.
diff --git a/gnu/javax/crypto/cipher/Blowfish.java b/gnu/javax/crypto/cipher/Blowfish.java
index 68722e913..0c6d9b12b 100644
--- a/gnu/javax/crypto/cipher/Blowfish.java
+++ b/gnu/javax/crypto/cipher/Blowfish.java
@@ -1,4 +1,4 @@
-/* Blowfish.java --
+/* Blowfish.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/cipher/Cast5.java b/gnu/javax/crypto/cipher/Cast5.java
index a7521530c..47b29226f 100644
--- a/gnu/javax/crypto/cipher/Cast5.java
+++ b/gnu/javax/crypto/cipher/Cast5.java
@@ -1,4 +1,4 @@
-/* Cast5.java --
+/* Cast5.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/cipher/CipherFactory.java b/gnu/javax/crypto/cipher/CipherFactory.java
index d6bb42253..fc9023626 100644
--- a/gnu/javax/crypto/cipher/CipherFactory.java
+++ b/gnu/javax/crypto/cipher/CipherFactory.java
@@ -1,4 +1,4 @@
-/* CipherFactory.java --
+/* CipherFactory.java --
Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -58,7 +58,7 @@ public class CipherFactory
/**
* Returns an instance of a block cipher given its name.
- *
+ *
* @param name the case-insensitive name of the symmetric-key block cipher
* algorithm.
* @return an instance of the designated cipher algorithm, or
@@ -107,7 +107,7 @@ public class CipherFactory
/**
* Returns a {@link Set} of symmetric key block cipher implementation names
* supported by this <i>Factory</i>.
- *
+ *
* @return a {@link Set} of block cipher names (Strings).
*/
public static final Set getNames()
diff --git a/gnu/javax/crypto/cipher/DES.java b/gnu/javax/crypto/cipher/DES.java
index 3ced62c3f..ce538b75a 100644
--- a/gnu/javax/crypto/cipher/DES.java
+++ b/gnu/javax/crypto/cipher/DES.java
@@ -1,4 +1,4 @@
-/* DES.java --
+/* DES.java --
Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -204,7 +204,7 @@ public class DES
/**
* Weak keys (parity adjusted): If all the bits in each half are either 0
* or 1, then the key used for any cycle of the algorithm is the same as
- * all other cycles.
+ * all other cycles.
*/
public static final byte[][] WEAK_KEYS = {
Util.toBytesFromString("0101010101010101"),
diff --git a/gnu/javax/crypto/cipher/IBlockCipher.java b/gnu/javax/crypto/cipher/IBlockCipher.java
index d1e32ef65..86f8b34e0 100644
--- a/gnu/javax/crypto/cipher/IBlockCipher.java
+++ b/gnu/javax/crypto/cipher/IBlockCipher.java
@@ -1,4 +1,4 @@
-/* IBlockCipher.java --
+/* IBlockCipher.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -88,21 +88,21 @@ public interface IBlockCipher
/**
* Returns the canonical name of this instance.
- *
+ *
* @return the canonical name of this instance.
*/
String name();
/**
* Returns the default value, in bytes, of the algorithm's block size.
- *
+ *
* @return the default value, in bytes, of the algorithm's block size.
*/
int defaultBlockSize();
/**
* Returns the default value, in bytes, of the algorithm's key size.
- *
+ *
* @return the default value, in bytes, of the algorithm's key size.
*/
int defaultKeySize();
@@ -110,7 +110,7 @@ public interface IBlockCipher
/**
* Returns an {@link Iterator} over the supported block sizes. Each element
* returned by this object is an {@link Integer}.
- *
+ *
* @return an {@link Iterator} over the supported block sizes.
*/
Iterator blockSizes();
@@ -118,14 +118,14 @@ public interface IBlockCipher
/**
* Returns an {@link Iterator} over the supported key sizes. Each element
* returned by this object is an {@link Integer}.
- *
+ *
* @return an {@link Iterator} over the supported key sizes.
*/
Iterator keySizes();
/**
* Returns a clone of this instance.
- *
+ *
* @return a clone copy of this instance.
*/
Object clone();
@@ -133,7 +133,7 @@ public interface IBlockCipher
/**
* Initialises the algorithm with designated attributes. Permissible names and
* values are described in the class documentation above.
- *
+ *
* @param attributes a set of name-value pairs that describes the desired
* future behaviour of this instance.
* @exception InvalidKeyException if the key data is invalid.
@@ -145,7 +145,7 @@ public interface IBlockCipher
/**
* Returns the currently set block size for this instance.
- *
+ *
* @return the current block size for this instance.
* @exception IllegalStateException if the instance is not initialised.
*/
@@ -159,7 +159,7 @@ public interface IBlockCipher
/**
* Encrypts exactly one block of plaintext.
- *
+ *
* @param in the plaintext.
* @param inOffset index of <code>in</code> from which to start considering
* data.
@@ -172,7 +172,7 @@ public interface IBlockCipher
/**
* Decrypts exactly one block of ciphertext.
- *
+ *
* @param in the plaintext.
* @param inOffset index of <code>in</code> from which to start considering
* data.
@@ -187,7 +187,7 @@ public interface IBlockCipher
* A <i>correctness</i> test that consists of basic symmetric encryption /
* decryption test(s) for all supported block and key sizes, as well as one
* (1) variable key Known Answer Test (KAT).
- *
+ *
* @return <code>true</code> if the implementation passes simple
* <i>correctness</i> tests. Returns <code>false</code> otherwise.
*/
diff --git a/gnu/javax/crypto/cipher/IBlockCipherSpi.java b/gnu/javax/crypto/cipher/IBlockCipherSpi.java
index 1023b12d8..9b2172158 100644
--- a/gnu/javax/crypto/cipher/IBlockCipherSpi.java
+++ b/gnu/javax/crypto/cipher/IBlockCipherSpi.java
@@ -1,4 +1,4 @@
-/* IBlockCipherSpi.java --
+/* IBlockCipherSpi.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -51,7 +51,7 @@ interface IBlockCipherSpi
/**
* Returns an {@link Iterator} over the supported block sizes. Each element
* returned by this object is a {@link java.lang.Integer}.
- *
+ *
* @return an <code>Iterator</code> over the supported block sizes.
*/
Iterator blockSizes();
@@ -59,7 +59,7 @@ interface IBlockCipherSpi
/**
* Returns an {@link Iterator} over the supported key sizes. Each element
* returned by this object is a {@link java.lang.Integer}.
- *
+ *
* @return an <code>Iterator</code> over the supported key sizes.
*/
Iterator keySizes();
@@ -67,7 +67,7 @@ interface IBlockCipherSpi
/**
* Expands a user-supplied key material into a session key for a designated
* <i>block size</i>.
- *
+ *
* @param k the user-supplied key material.
* @param bs the desired block size in bytes.
* @return an Object encapsulating the session key.
@@ -78,7 +78,7 @@ interface IBlockCipherSpi
/**
* Encrypts exactly one block of plaintext.
- *
+ *
* @param in the plaintext.
* @param inOffset index of <code>in</code> from which to start considering
* data.
@@ -96,7 +96,7 @@ interface IBlockCipherSpi
/**
* Decrypts exactly one block of ciphertext.
- *
+ *
* @param in the ciphertext.
* @param inOffset index of <code>in</code> from which to start considering
* data.
@@ -116,7 +116,7 @@ interface IBlockCipherSpi
* A <i>correctness</i> test that consists of basic symmetric encryption /
* decryption test(s) for all supported block and key sizes, as well as one
* (1) variable key Known Answer Test (KAT).
- *
+ *
* @return <code>true</code> if the implementation passes simple
* <i>correctness</i> tests. Returns <code>false</code> otherwise.
*/
diff --git a/gnu/javax/crypto/cipher/Khazad.java b/gnu/javax/crypto/cipher/Khazad.java
index 491301f5a..55e42628b 100644
--- a/gnu/javax/crypto/cipher/Khazad.java
+++ b/gnu/javax/crypto/cipher/Khazad.java
@@ -1,4 +1,4 @@
-/* Khazad.java --
+/* Khazad.java --
Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -317,7 +317,7 @@ public final class Khazad
/**
* Expands a user-supplied key material into a session key for a designated
* <i>block size</i>.
- *
+ *
* @param uk the 128-bit user-supplied key material.
* @param bs the desired block size in bytes.
* @return an Object encapsulating the session key.
diff --git a/gnu/javax/crypto/cipher/NullCipher.java b/gnu/javax/crypto/cipher/NullCipher.java
index 451555954..f23ea489f 100644
--- a/gnu/javax/crypto/cipher/NullCipher.java
+++ b/gnu/javax/crypto/cipher/NullCipher.java
@@ -1,4 +1,4 @@
-/* NullCipher.java --
+/* NullCipher.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/cipher/Rijndael.java b/gnu/javax/crypto/cipher/Rijndael.java
index d1bc958c3..0463fe51d 100644
--- a/gnu/javax/crypto/cipher/Rijndael.java
+++ b/gnu/javax/crypto/cipher/Rijndael.java
@@ -1,4 +1,4 @@
-/* Rijndael.java --
+/* Rijndael.java --
Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -305,7 +305,7 @@ public final class Rijndael
/**
* Returns the number of rounds for a given Rijndael's key and block sizes.
- *
+ *
* @param ks the size of the user key material in bytes.
* @param bs the desired block size in bytes.
* @return the number of rounds for a given Rijndael's key and block sizes.
@@ -591,7 +591,7 @@ public final class Rijndael
/**
* Expands a user-supplied key material into a session key for a designated
* <i>block size</i>.
- *
+ *
* @param k the 128/192/256-bit user-key to use.
* @param bs the block size in bytes of this Rijndael.
* @return an Object encapsulating the session key.
diff --git a/gnu/javax/crypto/cipher/Serpent.java b/gnu/javax/crypto/cipher/Serpent.java
index 636e311e7..1175fcfd2 100644
--- a/gnu/javax/crypto/cipher/Serpent.java
+++ b/gnu/javax/crypto/cipher/Serpent.java
@@ -1,4 +1,4 @@
-/* Serpent.java --
+/* Serpent.java --
Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/cipher/Square.java b/gnu/javax/crypto/cipher/Square.java
index af738da04..231df0a47 100644
--- a/gnu/javax/crypto/cipher/Square.java
+++ b/gnu/javax/crypto/cipher/Square.java
@@ -1,4 +1,4 @@
-/* Square.java --
+/* Square.java --
Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -271,7 +271,7 @@ public final class Square
/**
* Left rotate a 32-bit chunk.
- *
+ *
* @param x the 32-bit data to rotate
* @param s number of places to left-rotate by
* @return the newly permutated value.
@@ -283,7 +283,7 @@ public final class Square
/**
* Right rotate a 32-bit chunk.
- *
+ *
* @param x the 32-bit data to rotate
* @param s number of places to right-rotate by
* @return the newly permutated value.
@@ -299,7 +299,7 @@ public final class Square
* Field in GF(2**8).
* <p>
* For best performance call it with abs(b) &lt; abs(a).
- *
+ *
* @param a operand for multiply.
* @param b operand for multiply.
* @return the result of (a * b) % ROOT.
diff --git a/gnu/javax/crypto/cipher/TripleDES.java b/gnu/javax/crypto/cipher/TripleDES.java
index 1e98bfc83..1d684c20a 100644
--- a/gnu/javax/crypto/cipher/TripleDES.java
+++ b/gnu/javax/crypto/cipher/TripleDES.java
@@ -1,4 +1,4 @@
-/* TripleDES.java --
+/* TripleDES.java --
Copyright (C) 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -96,7 +96,7 @@ public class TripleDES
/**
* Convenience method which calls the method with same name and three
* arguments, passing <code>3</code> as the value of the first parameter.
- *
+ *
* @param kb The key bytes to adjust.
* @param offset The starting offset into the key bytes.
*/
@@ -108,7 +108,7 @@ public class TripleDES
/**
* Adjusts, in-situ, the parity of the designated bytes, so they can be used
* as DES keys for a 3-DES 1-, 2- or 3-key cipher.
- *
+ *
* @param keyCount the number of independent DES keys. Can be either
* <code>1</code>, <code>2</code> or <code>3</code>. Any other value
* will cause an {@link IllegalArgumentException} to be raised.
@@ -133,7 +133,7 @@ public class TripleDES
/**
* Convenience method which calls the method with same name and three
* arguments, passing <code>3</code> as the value of the first parameter.
- *
+ *
* @param kb The key bytes to test.
* @param offset The starting offset into the key bytes.
* @return <code>true</code> if the bytes in <i>kb</i> starting at
@@ -150,7 +150,7 @@ public class TripleDES
* Tests if enough bytes, expected to be used as DES keys for a 3-DES 1-, 2-
* or 3-key cipher, located in a designated byte array, has already been
* parity adjusted.
- *
+ *
* @param keyCount the number of independent DES keys. Can be either
* <code>1</code>, <code>2</code> or <code>3</code>. Any other value
* will cause an {@link IllegalArgumentException} to be raised.
diff --git a/gnu/javax/crypto/cipher/Twofish.java b/gnu/javax/crypto/cipher/Twofish.java
index b69324428..c9789a699 100644
--- a/gnu/javax/crypto/cipher/Twofish.java
+++ b/gnu/javax/crypto/cipher/Twofish.java
@@ -1,4 +1,4 @@
-/* Twofish.java --
+/* Twofish.java --
Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/cipher/WeakKeyException.java b/gnu/javax/crypto/cipher/WeakKeyException.java
index f89ff54d1..e12f899e4 100644
--- a/gnu/javax/crypto/cipher/WeakKeyException.java
+++ b/gnu/javax/crypto/cipher/WeakKeyException.java
@@ -1,4 +1,4 @@
-/* WeakKeyException.java --
+/* WeakKeyException.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/jce/DiffieHellmanImpl.java b/gnu/javax/crypto/jce/DiffieHellmanImpl.java
index 6a65437d6..205b5ed57 100644
--- a/gnu/javax/crypto/jce/DiffieHellmanImpl.java
+++ b/gnu/javax/crypto/jce/DiffieHellmanImpl.java
@@ -54,7 +54,7 @@ import javax.crypto.spec.SecretKeySpec;
/**
* The JCE implementation of a 2-party Diffie-Hellman key agreement.
- *
+ *
* @author Casey Marshall (csm@gnu.org)
*/
public final class DiffieHellmanImpl
diff --git a/gnu/javax/crypto/jce/GnuCrypto.java b/gnu/javax/crypto/jce/GnuCrypto.java
index 8099fd13d..ec335b735 100644
--- a/gnu/javax/crypto/jce/GnuCrypto.java
+++ b/gnu/javax/crypto/jce/GnuCrypto.java
@@ -1,4 +1,4 @@
-/* GnuCrypto.java --
+/* GnuCrypto.java --
Copyright (C) 2004, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -51,7 +51,7 @@ import java.util.Set;
/**
* The additional GNU algorithm implementation as a Java Cryptographic Extension
* (JCE) Provider.
- *
+ *
* @see java.security.Provider
*/
public final class GnuCrypto
@@ -574,7 +574,7 @@ public final class GnuCrypto
/**
* Returns a {@link Set} of names of symmetric key block cipher algorithms
* available from this {@link Provider}.
- *
+ *
* @return a {@link Set} of cipher names (Strings).
*/
public static final Set getCipherNames()
@@ -588,7 +588,7 @@ public final class GnuCrypto
/**
* Returns a {@link Set} of names of MAC algorithms available from this
* {@link Provider}.
- *
+ *
* @return a {@link Set} of MAC names (Strings).
*/
public static final Set getMacNames()
diff --git a/gnu/javax/crypto/jce/GnuSasl.java b/gnu/javax/crypto/jce/GnuSasl.java
index 923b40a5f..6ab89e2fa 100644
--- a/gnu/javax/crypto/jce/GnuSasl.java
+++ b/gnu/javax/crypto/jce/GnuSasl.java
@@ -103,7 +103,7 @@ public final class GnuSasl
/**
* Returns a {@link Set} of names of SASL Client mechanisms available from
* this {@link Provider}.
- *
+ *
* @return a {@link Set} of SASL Client mechanisms (Strings).
*/
public static final Set getSaslClientMechanismNames()
@@ -114,7 +114,7 @@ public final class GnuSasl
/**
* Returns a {@link Set} of names of SASL Server mechanisms available from
* this {@link Provider}.
- *
+ *
* @return a {@link Set} of SASL Server mechanisms (Strings).
*/
public static final Set getSaslServerMechanismNames()
diff --git a/gnu/javax/crypto/jce/PBKDF2SecretKeyFactory.java b/gnu/javax/crypto/jce/PBKDF2SecretKeyFactory.java
index be7fb18b0..cda8f34e8 100644
--- a/gnu/javax/crypto/jce/PBKDF2SecretKeyFactory.java
+++ b/gnu/javax/crypto/jce/PBKDF2SecretKeyFactory.java
@@ -1,4 +1,4 @@
-/* PBKDF2SecretKeyFactory.java --
+/* PBKDF2SecretKeyFactory.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/jce/cipher/AESKeyWrapSpi.java b/gnu/javax/crypto/jce/cipher/AESKeyWrapSpi.java
index 973f5890b..08f4e7820 100644
--- a/gnu/javax/crypto/jce/cipher/AESKeyWrapSpi.java
+++ b/gnu/javax/crypto/jce/cipher/AESKeyWrapSpi.java
@@ -56,7 +56,7 @@ abstract class AESKeyWrapSpi
* <p>
* In wrapping, the number of 8-byte output blocks is ALWAYS one block longer
* than the input.
- *
+ *
* @param inputLength the size of the plain text.
* @return the size in bytes of <code>n + 1</code> 8-byte blocks where
* <code>n</code> is the smallest number of 8-byte blocks that contain the
@@ -74,7 +74,7 @@ abstract class AESKeyWrapSpi
* <p>
* In unwrapping, the number of 8-byte output blocks is ALWAYS one block
* shorter than the input.
- *
+ *
* @param inputLength the size of the cipher text.
* @return the size in bytes of <code>n - 1</code> 8-byte blocks where
* <code>n</code> is the smallest number of 8-byte blocks that contain the
diff --git a/gnu/javax/crypto/jce/cipher/AESSpi.java b/gnu/javax/crypto/jce/cipher/AESSpi.java
index 1322e5e8a..4c3e1aecc 100644
--- a/gnu/javax/crypto/jce/cipher/AESSpi.java
+++ b/gnu/javax/crypto/jce/cipher/AESSpi.java
@@ -1,4 +1,4 @@
-/* AESSpi.java --
+/* AESSpi.java --
Copyright (C) 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/jce/cipher/ARCFourSpi.java b/gnu/javax/crypto/jce/cipher/ARCFourSpi.java
index abcb486b5..2e1422e6b 100644
--- a/gnu/javax/crypto/jce/cipher/ARCFourSpi.java
+++ b/gnu/javax/crypto/jce/cipher/ARCFourSpi.java
@@ -1,4 +1,4 @@
-/* ARCFourSpi.java --
+/* ARCFourSpi.java --
Copyright (C) 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/jce/cipher/AnubisSpi.java b/gnu/javax/crypto/jce/cipher/AnubisSpi.java
index e35e4e724..ab0c64867 100644
--- a/gnu/javax/crypto/jce/cipher/AnubisSpi.java
+++ b/gnu/javax/crypto/jce/cipher/AnubisSpi.java
@@ -1,4 +1,4 @@
-/* AnubisSpi.java --
+/* AnubisSpi.java --
Copyright (C) 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/jce/cipher/BlowfishSpi.java b/gnu/javax/crypto/jce/cipher/BlowfishSpi.java
index fec200ca6..55d71dbf5 100644
--- a/gnu/javax/crypto/jce/cipher/BlowfishSpi.java
+++ b/gnu/javax/crypto/jce/cipher/BlowfishSpi.java
@@ -1,4 +1,4 @@
-/* BlowfishSpi.java --
+/* BlowfishSpi.java --
Copyright (C) 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/jce/cipher/Cast5Spi.java b/gnu/javax/crypto/jce/cipher/Cast5Spi.java
index bf0803400..95a663e2f 100644
--- a/gnu/javax/crypto/jce/cipher/Cast5Spi.java
+++ b/gnu/javax/crypto/jce/cipher/Cast5Spi.java
@@ -1,4 +1,4 @@
-/* Cast5Spi.java --
+/* Cast5Spi.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/jce/cipher/CipherAdapter.java b/gnu/javax/crypto/jce/cipher/CipherAdapter.java
index 0863b1f1c..0871c5402 100644
--- a/gnu/javax/crypto/jce/cipher/CipherAdapter.java
+++ b/gnu/javax/crypto/jce/cipher/CipherAdapter.java
@@ -1,4 +1,4 @@
-/* CipherAdapter.java --
+/* CipherAdapter.java --
Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -110,7 +110,7 @@ class CipherAdapter
* should be the appropriate one listed in {@link Registry}. The basic cipher
* instance is created, along with an instance of the
* {@link gnu.javax.crypto.mode.ECB} mode and no padding.
- *
+ *
* @param cipherName The cipher to instantiate.
* @param blockLen The block length to use.
*/
@@ -125,7 +125,7 @@ class CipherAdapter
/**
* Creates a new cipher adapter with the default block size.
- *
+ *
* @param cipherName The cipher to instantiate.
*/
protected CipherAdapter(String cipherName)
@@ -236,7 +236,7 @@ class CipherAdapter
/**
* Executes initialization logic after all parameters have been handled by the
* engineInit()s.
- *
+ *
* @param opmode the desired mode of operation for this instance.
* @param key the key material to use for initialization.
* @param random a source of randmoness to use if/when needed.
@@ -288,7 +288,7 @@ class CipherAdapter
// cipher, that is less than or equal to the length of the kb array.
// set keyLen to kbLength. either the cipher implementation will throw
// an InvalidKeyException, or it is implemented in a way which can deal
- // with an unsupported key-size.
+ // with an unsupported key-size.
keyLen = kbLength;
}
if (keyLen < kbLength)
@@ -348,7 +348,7 @@ class CipherAdapter
{
throw new InvalidAlgorithmParameterException();
}
-
+
attributes.put(IMode.IV, ((IvParameterSpec) params).getIV());
blockLen = cipher.defaultBlockSize();
attributes.put(IBlockCipher.CIPHER_BLOCK_SIZE, Integer.valueOf(blockLen));
diff --git a/gnu/javax/crypto/jce/cipher/DESSpi.java b/gnu/javax/crypto/jce/cipher/DESSpi.java
index 21f62b4f0..0da913a44 100644
--- a/gnu/javax/crypto/jce/cipher/DESSpi.java
+++ b/gnu/javax/crypto/jce/cipher/DESSpi.java
@@ -1,4 +1,4 @@
-/* DESSpi.java --
+/* DESSpi.java --
Copyright (C) 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/jce/cipher/KeyWrappingAlgorithmAdapter.java b/gnu/javax/crypto/jce/cipher/KeyWrappingAlgorithmAdapter.java
index 03356a236..97fdd5331 100644
--- a/gnu/javax/crypto/jce/cipher/KeyWrappingAlgorithmAdapter.java
+++ b/gnu/javax/crypto/jce/cipher/KeyWrappingAlgorithmAdapter.java
@@ -94,7 +94,7 @@ abstract class KeyWrappingAlgorithmAdapter
/**
* Creates a new JCE Adapter for the designated Key Wrapping Algorithm name.
- *
+ *
* @param name the canonical name of the key-wrapping algorithm.
* @param blockSize the block size in bytes of the underlying symmetric-key
* block cipher algorithm.
@@ -116,7 +116,7 @@ abstract class KeyWrappingAlgorithmAdapter
/**
* Wraps the encoded form of a designated {@link Key}.
- *
+ *
* @param key the key-material to wrap.
* @return the wrapped key.
* @throws InvalidKeyException If the key cannot be wrapped.
@@ -131,7 +131,7 @@ abstract class KeyWrappingAlgorithmAdapter
/**
* Unwraps a previously-wrapped key-material.
- *
+ *
* @param wrappedKey the wrapped key-material to unwrap.
* @param wrappedKeyAlgorithm the canonical name of the algorithm, which the
* unwrapped key-material represents. This name is used to
@@ -286,7 +286,7 @@ abstract class KeyWrappingAlgorithmAdapter
ivBytes = ((BlockCipherParameterSpec) params).getIV();
else if (params instanceof IvParameterSpec)
ivBytes = ((IvParameterSpec) params).getIV();
-
+
initAlgorithm(opmode, kekBytes, ivBytes, random);
}
@@ -341,7 +341,7 @@ abstract class KeyWrappingAlgorithmAdapter
* <code>kwaBlockSize</code> --passed to this method through its
* constructor-- greater than or equal to the designated
* <code>inputLength</code>.
- *
+ *
* @param inputLength the size of a plain text.
* @return an estimate of the size, in bytes, of the place holder to receive
* the resulting bytes of a wrap method.
@@ -360,7 +360,7 @@ abstract class KeyWrappingAlgorithmAdapter
* <code>paddingBlockSize</code> --passed to this method through its
* constructor-- greater than or equal to the designated
* <code>inputLength</code>.
- *
+ *
* @param inputLength the size of a cipher text.
* @return an estimate of the size, in bytes, of the place holder to receive
* the resulting bytes of an uwrap method.
@@ -383,7 +383,7 @@ abstract class KeyWrappingAlgorithmAdapter
/**
* Returns the key bytes, iff it was in RAW format.
- *
+ *
* @param key the opaque JCE secret key to use as the KEK.
* @return the bytes of the encoded form of the designated kek, iff it was in
* RAW format.
diff --git a/gnu/javax/crypto/jce/cipher/KhazadSpi.java b/gnu/javax/crypto/jce/cipher/KhazadSpi.java
index 6e744a2f2..df0833fb5 100644
--- a/gnu/javax/crypto/jce/cipher/KhazadSpi.java
+++ b/gnu/javax/crypto/jce/cipher/KhazadSpi.java
@@ -1,4 +1,4 @@
-/* KhazadSpi.java --
+/* KhazadSpi.java --
Copyright (C) 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/jce/cipher/NullCipherSpi.java b/gnu/javax/crypto/jce/cipher/NullCipherSpi.java
index e50e00c8e..70ff575da 100644
--- a/gnu/javax/crypto/jce/cipher/NullCipherSpi.java
+++ b/gnu/javax/crypto/jce/cipher/NullCipherSpi.java
@@ -1,4 +1,4 @@
-/* NullCipherSpi.java --
+/* NullCipherSpi.java --
Copyright (C) 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/jce/cipher/PBES2.java b/gnu/javax/crypto/jce/cipher/PBES2.java
index 26a6a2c2d..9961c15b1 100644
--- a/gnu/javax/crypto/jce/cipher/PBES2.java
+++ b/gnu/javax/crypto/jce/cipher/PBES2.java
@@ -1,4 +1,4 @@
-/* PBES2.java --
+/* PBES2.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/jce/cipher/RijndaelSpi.java b/gnu/javax/crypto/jce/cipher/RijndaelSpi.java
index ad61bca59..f25aca028 100644
--- a/gnu/javax/crypto/jce/cipher/RijndaelSpi.java
+++ b/gnu/javax/crypto/jce/cipher/RijndaelSpi.java
@@ -1,4 +1,4 @@
-/* RijndaelSpi.java --
+/* RijndaelSpi.java --
Copyright (C) 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/jce/cipher/SerpentSpi.java b/gnu/javax/crypto/jce/cipher/SerpentSpi.java
index fa65d34a9..1f17b18c8 100644
--- a/gnu/javax/crypto/jce/cipher/SerpentSpi.java
+++ b/gnu/javax/crypto/jce/cipher/SerpentSpi.java
@@ -1,4 +1,4 @@
-/* SerpentSpi.java --
+/* SerpentSpi.java --
Copyright (C) 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/jce/cipher/SquareSpi.java b/gnu/javax/crypto/jce/cipher/SquareSpi.java
index bdc656eae..d08aa2cd3 100644
--- a/gnu/javax/crypto/jce/cipher/SquareSpi.java
+++ b/gnu/javax/crypto/jce/cipher/SquareSpi.java
@@ -1,4 +1,4 @@
-/* SquareSpi.java --
+/* SquareSpi.java --
Copyright (C) 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/jce/cipher/TripleDESSpi.java b/gnu/javax/crypto/jce/cipher/TripleDESSpi.java
index b9ec12b51..c22409020 100644
--- a/gnu/javax/crypto/jce/cipher/TripleDESSpi.java
+++ b/gnu/javax/crypto/jce/cipher/TripleDESSpi.java
@@ -1,4 +1,4 @@
-/* TripleDESSpi.java --
+/* TripleDESSpi.java --
Copyright (C) 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/jce/cipher/TwofishSpi.java b/gnu/javax/crypto/jce/cipher/TwofishSpi.java
index 206e0d9f8..a1bbe4b71 100644
--- a/gnu/javax/crypto/jce/cipher/TwofishSpi.java
+++ b/gnu/javax/crypto/jce/cipher/TwofishSpi.java
@@ -1,4 +1,4 @@
-/* TwofishSpi.java --
+/* TwofishSpi.java --
Copyright (C) 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/jce/key/AnubisSecretKeyFactoryImpl.java b/gnu/javax/crypto/jce/key/AnubisSecretKeyFactoryImpl.java
index bea65a6c6..dc99b332b 100644
--- a/gnu/javax/crypto/jce/key/AnubisSecretKeyFactoryImpl.java
+++ b/gnu/javax/crypto/jce/key/AnubisSecretKeyFactoryImpl.java
@@ -1,4 +1,4 @@
-/* AnubisSecretKeyFactoryImpl.java --
+/* AnubisSecretKeyFactoryImpl.java --
Copyright (C) 2004, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/jce/key/BlowfishSecretKeyFactoryImpl.java b/gnu/javax/crypto/jce/key/BlowfishSecretKeyFactoryImpl.java
index 53fe8b0b4..8d964bb96 100644
--- a/gnu/javax/crypto/jce/key/BlowfishSecretKeyFactoryImpl.java
+++ b/gnu/javax/crypto/jce/key/BlowfishSecretKeyFactoryImpl.java
@@ -1,4 +1,4 @@
-/* BlowfishSecretKeyFactoryImpl.java --
+/* BlowfishSecretKeyFactoryImpl.java --
Copyright (C) 2004, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/jce/key/Cast5SecretKeyFactoryImpl.java b/gnu/javax/crypto/jce/key/Cast5SecretKeyFactoryImpl.java
index fcebb528e..f2681eda1 100644
--- a/gnu/javax/crypto/jce/key/Cast5SecretKeyFactoryImpl.java
+++ b/gnu/javax/crypto/jce/key/Cast5SecretKeyFactoryImpl.java
@@ -1,4 +1,4 @@
-/* Cast5SecretKeyFactoryImpl.java --
+/* Cast5SecretKeyFactoryImpl.java --
Copyright (C) 2004, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/jce/key/SecretKeyGeneratorImpl.java b/gnu/javax/crypto/jce/key/SecretKeyGeneratorImpl.java
index 257c0a243..d2acf8716 100644
--- a/gnu/javax/crypto/jce/key/SecretKeyGeneratorImpl.java
+++ b/gnu/javax/crypto/jce/key/SecretKeyGeneratorImpl.java
@@ -97,8 +97,8 @@ public class SecretKeyGeneratorImpl
{
keySize >>>= 3; // Use bytes.
if (! keySizes.contains(Integer.valueOf(keySize)))
- throw new InvalidParameterException("unsupported key size: " + keySize
- + ", valid sizes are: " + keySizes);
+ throw new InvalidParameterException("unsupported key size: " + keySize
+ + ", valid sizes are: " + keySizes);
currentKeySize = keySize;
this.random = random;
init = true;
diff --git a/gnu/javax/crypto/jce/keyring/GnuKeyring.java b/gnu/javax/crypto/jce/keyring/GnuKeyring.java
index 4fcf2fde7..c30da69a2 100644
--- a/gnu/javax/crypto/jce/keyring/GnuKeyring.java
+++ b/gnu/javax/crypto/jce/keyring/GnuKeyring.java
@@ -263,7 +263,7 @@ public class GnuKeyring
result = privateKR.getPublicKey(alias);
}
else if (privateKR.containsPrivateKey(alias))
- result = privateKR.getPrivateKey(alias, password);
+ result = privateKR.getPrivateKey(alias, password);
if (Configuration.DEBUG)
log.exiting(this.getClass().getName(), "engineGetKey",
@@ -400,7 +400,7 @@ public class GnuKeyring
/**
* Load the private keyring from the designated input stream.
- *
+ *
* @param in the input stream to process.
* @param password the password protecting the keyring.
* @throws MalformedKeyringException if the keyring is not a private one.
@@ -433,7 +433,7 @@ public class GnuKeyring
/**
* Load the public keyring from the designated input stream.
- *
+ *
* @param in the input stream to process.
* @param password the password protecting the keyring.
* @throws MalformedKeyringException if the keyring is not a public one.
@@ -466,7 +466,7 @@ public class GnuKeyring
/**
* Return the creation date of a named alias in a designated keyring.
- *
+ *
* @param alias the alias to look for.
* @param keyring the keyring to search.
* @return the creattion date of the entry named <code>alias</code>. Return
diff --git a/gnu/javax/crypto/jce/mac/HMacHavalSpi.java b/gnu/javax/crypto/jce/mac/HMacHavalSpi.java
index 2967ee900..fc5f3b578 100644
--- a/gnu/javax/crypto/jce/mac/HMacHavalSpi.java
+++ b/gnu/javax/crypto/jce/mac/HMacHavalSpi.java
@@ -1,4 +1,4 @@
-/* HMacHavalSpi.java --
+/* HMacHavalSpi.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/jce/mac/HMacMD2Spi.java b/gnu/javax/crypto/jce/mac/HMacMD2Spi.java
index dd6485866..c50feb8cf 100644
--- a/gnu/javax/crypto/jce/mac/HMacMD2Spi.java
+++ b/gnu/javax/crypto/jce/mac/HMacMD2Spi.java
@@ -1,4 +1,4 @@
-/* HMacMD2Spi.java --
+/* HMacMD2Spi.java --
Copyright (C) 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/jce/mac/HMacMD4Spi.java b/gnu/javax/crypto/jce/mac/HMacMD4Spi.java
index 939851ff5..c0eae5b22 100644
--- a/gnu/javax/crypto/jce/mac/HMacMD4Spi.java
+++ b/gnu/javax/crypto/jce/mac/HMacMD4Spi.java
@@ -1,4 +1,4 @@
-/* HMacMD4Spi.java --
+/* HMacMD4Spi.java --
Copyright (C) 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/jce/mac/HMacMD5Spi.java b/gnu/javax/crypto/jce/mac/HMacMD5Spi.java
index e89fbfdba..78e884761 100644
--- a/gnu/javax/crypto/jce/mac/HMacMD5Spi.java
+++ b/gnu/javax/crypto/jce/mac/HMacMD5Spi.java
@@ -1,4 +1,4 @@
-/* HMacMD5Spi.java --
+/* HMacMD5Spi.java --
Copyright (C) 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/jce/mac/HMacRipeMD128Spi.java b/gnu/javax/crypto/jce/mac/HMacRipeMD128Spi.java
index 834ec849a..b5835177c 100644
--- a/gnu/javax/crypto/jce/mac/HMacRipeMD128Spi.java
+++ b/gnu/javax/crypto/jce/mac/HMacRipeMD128Spi.java
@@ -1,4 +1,4 @@
-/* HMacRipeMD128Spi.java --
+/* HMacRipeMD128Spi.java --
Copyright (C) 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/jce/mac/HMacRipeMD160Spi.java b/gnu/javax/crypto/jce/mac/HMacRipeMD160Spi.java
index b973ea186..4d7c6caec 100644
--- a/gnu/javax/crypto/jce/mac/HMacRipeMD160Spi.java
+++ b/gnu/javax/crypto/jce/mac/HMacRipeMD160Spi.java
@@ -1,4 +1,4 @@
-/* HMacRipeMD160Spi.java --
+/* HMacRipeMD160Spi.java --
Copyright (C) 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/jce/mac/HMacSHA160Spi.java b/gnu/javax/crypto/jce/mac/HMacSHA160Spi.java
index 524aa8233..1c7c9443d 100644
--- a/gnu/javax/crypto/jce/mac/HMacSHA160Spi.java
+++ b/gnu/javax/crypto/jce/mac/HMacSHA160Spi.java
@@ -1,4 +1,4 @@
-/* HMacSHA160Spi.java --
+/* HMacSHA160Spi.java --
Copyright (C) 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/jce/mac/HMacSHA256Spi.java b/gnu/javax/crypto/jce/mac/HMacSHA256Spi.java
index 4b0493bc6..7d7c91de6 100644
--- a/gnu/javax/crypto/jce/mac/HMacSHA256Spi.java
+++ b/gnu/javax/crypto/jce/mac/HMacSHA256Spi.java
@@ -1,4 +1,4 @@
-/* HMacSHA256Spi.java --
+/* HMacSHA256Spi.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/jce/mac/HMacSHA384Spi.java b/gnu/javax/crypto/jce/mac/HMacSHA384Spi.java
index 92a5c9d2c..b66b0f0f3 100644
--- a/gnu/javax/crypto/jce/mac/HMacSHA384Spi.java
+++ b/gnu/javax/crypto/jce/mac/HMacSHA384Spi.java
@@ -1,4 +1,4 @@
-/* HMacSHA384Spi.java --
+/* HMacSHA384Spi.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/jce/mac/HMacSHA512Spi.java b/gnu/javax/crypto/jce/mac/HMacSHA512Spi.java
index f1ecd02e5..c825a14e9 100644
--- a/gnu/javax/crypto/jce/mac/HMacSHA512Spi.java
+++ b/gnu/javax/crypto/jce/mac/HMacSHA512Spi.java
@@ -1,4 +1,4 @@
-/* HMacSHA512Spi.java --
+/* HMacSHA512Spi.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/jce/mac/HMacTigerSpi.java b/gnu/javax/crypto/jce/mac/HMacTigerSpi.java
index 2d417ef4c..0d979f08f 100644
--- a/gnu/javax/crypto/jce/mac/HMacTigerSpi.java
+++ b/gnu/javax/crypto/jce/mac/HMacTigerSpi.java
@@ -1,4 +1,4 @@
-/* HMacTigerSpi.java --
+/* HMacTigerSpi.java --
Copyright (C) 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/jce/mac/HMacWhirlpoolSpi.java b/gnu/javax/crypto/jce/mac/HMacWhirlpoolSpi.java
index 1b936d71a..6dde69b7e 100644
--- a/gnu/javax/crypto/jce/mac/HMacWhirlpoolSpi.java
+++ b/gnu/javax/crypto/jce/mac/HMacWhirlpoolSpi.java
@@ -1,4 +1,4 @@
-/* HMacWhirlpoolSpi.java --
+/* HMacWhirlpoolSpi.java --
Copyright (C) 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/jce/mac/MacAdapter.java b/gnu/javax/crypto/jce/mac/MacAdapter.java
index d8c800ac7..cb3d934fa 100644
--- a/gnu/javax/crypto/jce/mac/MacAdapter.java
+++ b/gnu/javax/crypto/jce/mac/MacAdapter.java
@@ -1,4 +1,4 @@
-/* MacAdapter.java --
+/* MacAdapter.java --
Copyright (C) 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -69,7 +69,7 @@ class MacAdapter
/**
* Creates a new Mac instance for the given name.
- *
+ *
* @param name The name of the mac to create.
*/
protected MacAdapter(String name)
@@ -80,7 +80,7 @@ class MacAdapter
/**
* Private constructor for cloning purposes.
- *
+ *
* @param mac a clone of the internal {@link IMac} instance.
* @param attributes a clone of the current {@link Map} of attributes.
*/
diff --git a/gnu/javax/crypto/jce/mac/TMMH16Spi.java b/gnu/javax/crypto/jce/mac/TMMH16Spi.java
index 8a40f6e70..d610cc0c2 100644
--- a/gnu/javax/crypto/jce/mac/TMMH16Spi.java
+++ b/gnu/javax/crypto/jce/mac/TMMH16Spi.java
@@ -1,4 +1,4 @@
-/* TMMH16Spi.java --
+/* TMMH16Spi.java --
Copyright (C) 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/jce/mac/UHash32Spi.java b/gnu/javax/crypto/jce/mac/UHash32Spi.java
index 825edc173..c6784d633 100644
--- a/gnu/javax/crypto/jce/mac/UHash32Spi.java
+++ b/gnu/javax/crypto/jce/mac/UHash32Spi.java
@@ -1,4 +1,4 @@
-/* UHash32Spi.java --
+/* UHash32Spi.java --
Copyright (C) 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/jce/mac/UMac32Spi.java b/gnu/javax/crypto/jce/mac/UMac32Spi.java
index fc05e5321..85c859c38 100644
--- a/gnu/javax/crypto/jce/mac/UMac32Spi.java
+++ b/gnu/javax/crypto/jce/mac/UMac32Spi.java
@@ -1,4 +1,4 @@
-/* UMac32Spi.java --
+/* UMac32Spi.java --
Copyright (C) 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/jce/params/BlockCipherParameters.java b/gnu/javax/crypto/jce/params/BlockCipherParameters.java
index a85c96223..fde83b1f3 100644
--- a/gnu/javax/crypto/jce/params/BlockCipherParameters.java
+++ b/gnu/javax/crypto/jce/params/BlockCipherParameters.java
@@ -1,4 +1,4 @@
-/* BlockCipherParameters.java --
+/* BlockCipherParameters.java --
Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -74,7 +74,7 @@ public class BlockCipherParameters
* keySize INTEGER,
* initializationVector OCTET STRING OPTIONAL }
* </pre>
- *
+ *
* @return The parameters, encoded an an ASN.1 DER sequence.
* @throws java.io.IOException If encoding these parameters fails.
*/
diff --git a/gnu/javax/crypto/jce/params/DEREncodingException.java b/gnu/javax/crypto/jce/params/DEREncodingException.java
index b89ceda9f..436f5d4cd 100644
--- a/gnu/javax/crypto/jce/params/DEREncodingException.java
+++ b/gnu/javax/crypto/jce/params/DEREncodingException.java
@@ -1,4 +1,4 @@
-/* DEREncodingException.java --
+/* DEREncodingException.java --
Copyright (C) 1999, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/jce/params/DERReader.java b/gnu/javax/crypto/jce/params/DERReader.java
index 68c680279..9fc1e2cd7 100644
--- a/gnu/javax/crypto/jce/params/DERReader.java
+++ b/gnu/javax/crypto/jce/params/DERReader.java
@@ -1,4 +1,4 @@
-/* DERReader.java --
+/* DERReader.java --
Copyright (C) 1999, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/jce/params/DERWriter.java b/gnu/javax/crypto/jce/params/DERWriter.java
index 7bdea10c5..7553e20d2 100644
--- a/gnu/javax/crypto/jce/params/DERWriter.java
+++ b/gnu/javax/crypto/jce/params/DERWriter.java
@@ -1,4 +1,4 @@
-/* DERWriter.java --
+/* DERWriter.java --
Copyright (C) 1999, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/jce/prng/ARCFourRandomSpi.java b/gnu/javax/crypto/jce/prng/ARCFourRandomSpi.java
index 1129d5dfb..3816fb648 100644
--- a/gnu/javax/crypto/jce/prng/ARCFourRandomSpi.java
+++ b/gnu/javax/crypto/jce/prng/ARCFourRandomSpi.java
@@ -1,4 +1,4 @@
-/* ARCFourRandomSpi.java --
+/* ARCFourRandomSpi.java --
Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/jce/prng/CSPRNGSpi.java b/gnu/javax/crypto/jce/prng/CSPRNGSpi.java
index 96d66f052..9a893af9d 100644
--- a/gnu/javax/crypto/jce/prng/CSPRNGSpi.java
+++ b/gnu/javax/crypto/jce/prng/CSPRNGSpi.java
@@ -1,4 +1,4 @@
-/* CSPRNGSpi.java --
+/* CSPRNGSpi.java --
Copyright (C) 2004, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/jce/prng/FortunaImpl.java b/gnu/javax/crypto/jce/prng/FortunaImpl.java
index b18410c09..d2073b98d 100644
--- a/gnu/javax/crypto/jce/prng/FortunaImpl.java
+++ b/gnu/javax/crypto/jce/prng/FortunaImpl.java
@@ -62,8 +62,8 @@ public final class FortunaImpl
{
synchronized (adaptee)
{
- if (virgin)
- {
+ if (virgin)
+ {
adaptee.init (Collections.singletonMap (Fortuna.SEED, seed));
virgin = false;
}
diff --git a/gnu/javax/crypto/jce/prng/ICMRandomSpi.java b/gnu/javax/crypto/jce/prng/ICMRandomSpi.java
index a02fd147e..bbd5d4768 100644
--- a/gnu/javax/crypto/jce/prng/ICMRandomSpi.java
+++ b/gnu/javax/crypto/jce/prng/ICMRandomSpi.java
@@ -1,4 +1,4 @@
-/* ICMRandomSpi.java --
+/* ICMRandomSpi.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/jce/prng/UMacRandomSpi.java b/gnu/javax/crypto/jce/prng/UMacRandomSpi.java
index 2faebe8eb..910e65c70 100644
--- a/gnu/javax/crypto/jce/prng/UMacRandomSpi.java
+++ b/gnu/javax/crypto/jce/prng/UMacRandomSpi.java
@@ -1,4 +1,4 @@
-/* UMacRandomSpi.java --
+/* UMacRandomSpi.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/jce/sig/DHParameters.java b/gnu/javax/crypto/jce/sig/DHParameters.java
index a917e2230..cc656d2c8 100644
--- a/gnu/javax/crypto/jce/sig/DHParameters.java
+++ b/gnu/javax/crypto/jce/sig/DHParameters.java
@@ -92,8 +92,8 @@ public class DHParameters
/**
* Decodes the set of DH parameters as per RFC-2459; i.e. the DER-encoded
- * form of the following ASN.1 construct:
- *
+ * form of the following ASN.1 construct:
+ *
* <pre>
* DhParams ::= SEQUENCE {
* p INTEGER, -- odd prime, p=jq +1
@@ -151,8 +151,8 @@ public class DHParameters
/**
* Encodes the set of DH parameters as per RFC-2459; i.e. as the DER-encoded
- * form of the following ASN.1 construct:
- *
+ * form of the following ASN.1 construct:
+ *
* <pre>
* DhParams ::= SEQUENCE {
* p INTEGER, -- odd prime, p=jq +1
diff --git a/gnu/javax/crypto/jce/spec/BlockCipherParameterSpec.java b/gnu/javax/crypto/jce/spec/BlockCipherParameterSpec.java
index 321b47795..b17fa3497 100644
--- a/gnu/javax/crypto/jce/spec/BlockCipherParameterSpec.java
+++ b/gnu/javax/crypto/jce/spec/BlockCipherParameterSpec.java
@@ -1,4 +1,4 @@
-/* BlockCipherParameterSpec.java --
+/* BlockCipherParameterSpec.java --
Copyright (C) 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -58,7 +58,7 @@ public class BlockCipherParameterSpec
/**
* Create a new parameter specification.
- *
+ *
* @param iv The initialization vector, or <code>null</code> if there is no
* IV.
* @param blockSize The cipher's block size, in bytes.
@@ -73,7 +73,7 @@ public class BlockCipherParameterSpec
/**
* Create a new parameter specification with no IV.
- *
+ *
* @param blockSize The cipher's block size, in bytes.
* @param keySize The cipher's key size, in bytes.
*/
@@ -85,7 +85,7 @@ public class BlockCipherParameterSpec
/**
* Get the initialization vector for the cipher, or <code>null</code> if
* there is no IV.
- *
+ *
* @return The IV.
*/
public byte[] getIV()
@@ -95,7 +95,7 @@ public class BlockCipherParameterSpec
/**
* Get the block size of the cipher these parameters are for.
- *
+ *
* @return The block size.
*/
public int getBlockSize()
@@ -105,7 +105,7 @@ public class BlockCipherParameterSpec
/**
* Get the key size of the cipher these parameters are for.
- *
+ *
* @return The block size.
*/
public int getKeySize()
diff --git a/gnu/javax/crypto/jce/spec/TMMHParameterSpec.java b/gnu/javax/crypto/jce/spec/TMMHParameterSpec.java
index 356437288..31199538c 100644
--- a/gnu/javax/crypto/jce/spec/TMMHParameterSpec.java
+++ b/gnu/javax/crypto/jce/spec/TMMHParameterSpec.java
@@ -1,4 +1,4 @@
-/* TMMHParameterSpec.java --
+/* TMMHParameterSpec.java --
Copyright (C) 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -62,7 +62,7 @@ public class TMMHParameterSpec
/**
* Create a new parameter specification.
- *
+ *
* @param keystream The (PRNG) key stream.
* @param tagLength The tag length.
* @param prefix The prefix.
@@ -76,7 +76,7 @@ public class TMMHParameterSpec
/**
* Create a new parameter specification with no prefix.
- *
+ *
* @param keystream The (PRNG) key stream.
* @param tagLength The tag length.
*/
@@ -87,7 +87,7 @@ public class TMMHParameterSpec
/**
* Return the key stream this specification was initialized with.
- *
+ *
* @return The key stream.
*/
public IRandom getKeystream()
@@ -97,7 +97,7 @@ public class TMMHParameterSpec
/**
* Return the tag length this specification was initialized with.
- *
+ *
* @return The tag length.
*/
public Integer getTagLength()
@@ -107,7 +107,7 @@ public class TMMHParameterSpec
/**
* Return the prefix, or <code>null</code> if no prefix was specified.
- *
+ *
* @return The prefix.
*/
public byte[] getPrefix()
diff --git a/gnu/javax/crypto/jce/spec/UMac32ParameterSpec.java b/gnu/javax/crypto/jce/spec/UMac32ParameterSpec.java
index 0990cc6d4..3c13faf04 100644
--- a/gnu/javax/crypto/jce/spec/UMac32ParameterSpec.java
+++ b/gnu/javax/crypto/jce/spec/UMac32ParameterSpec.java
@@ -1,4 +1,4 @@
-/* UMac32ParameterSpec.java --
+/* UMac32ParameterSpec.java --
Copyright (C) 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -53,7 +53,7 @@ public class UMac32ParameterSpec
/**
* Create a new parameter instance.
- *
+ *
* @param nonce The nonce material.
*/
public UMac32ParameterSpec(byte[] nonce)
@@ -63,7 +63,7 @@ public class UMac32ParameterSpec
/**
* Return the nonce material.
- *
+ *
* @return The nonce material.
*/
public byte[] getNonce()
diff --git a/gnu/javax/crypto/key/BaseKeyAgreementParty.java b/gnu/javax/crypto/key/BaseKeyAgreementParty.java
index fc5ddb714..3f4e0a22c 100644
--- a/gnu/javax/crypto/key/BaseKeyAgreementParty.java
+++ b/gnu/javax/crypto/key/BaseKeyAgreementParty.java
@@ -1,4 +1,4 @@
-/* BaseKeyAgreementParty.java --
+/* BaseKeyAgreementParty.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -137,7 +137,7 @@ public abstract class BaseKeyAgreementParty
/**
* Fills the designated byte array with random data.
- *
+ *
* @param buffer the byte array to fill with random data.
*/
protected void nextRandomBytes(byte[] buffer)
diff --git a/gnu/javax/crypto/key/GnuPBEKey.java b/gnu/javax/crypto/key/GnuPBEKey.java
index 6f4bcb1b3..5642e59ed 100644
--- a/gnu/javax/crypto/key/GnuPBEKey.java
+++ b/gnu/javax/crypto/key/GnuPBEKey.java
@@ -43,7 +43,7 @@ import javax.crypto.spec.PBEKeySpec;
/**
* An implementation of a password-based encryption key.
- *
+ *
* @author Casey Marshall (csm@gnu.org)
*/
public class GnuPBEKey
diff --git a/gnu/javax/crypto/key/GnuSecretKey.java b/gnu/javax/crypto/key/GnuSecretKey.java
index 3063fe406..c8ca1edab 100644
--- a/gnu/javax/crypto/key/GnuSecretKey.java
+++ b/gnu/javax/crypto/key/GnuSecretKey.java
@@ -1,4 +1,4 @@
-/* GnuSecretKey.java --
+/* GnuSecretKey.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -55,7 +55,7 @@ public class GnuSecretKey
/**
* Creates a new secret key. The supplied byte array is copied by this
* constructor.
- *
+ *
* @param key The raw, secret key.
* @param algorithm The algorithm name, which can be null or empty.
*/
@@ -66,7 +66,7 @@ public class GnuSecretKey
/**
* Creates a new secret key from a portion of a byte array.
- *
+ *
* @param key The raw, secret key.
* @param offset The offset at which the key begins.
* @param length The number of bytes that comprise the key.
@@ -81,7 +81,7 @@ public class GnuSecretKey
/**
* Returns the algorithm name, if any.
- *
+ *
* @return The algorithm name.
*/
public String getAlgorithm()
@@ -93,7 +93,7 @@ public class GnuSecretKey
* Returns the encoded key, which is merely the byte array this class was
* created with. A reference to the internal byte array is returned, so the
* caller can delete this key from memory by modifying the returned array.
- *
+ *
* @return The raw key.
*/
public byte[] getEncoded()
@@ -103,7 +103,7 @@ public class GnuSecretKey
/**
* Returns the string "RAW".
- *
+ *
* @return The string "RAW".
*/
public String getFormat()
diff --git a/gnu/javax/crypto/key/IKeyAgreementParty.java b/gnu/javax/crypto/key/IKeyAgreementParty.java
index 280f3f33d..64434212f 100644
--- a/gnu/javax/crypto/key/IKeyAgreementParty.java
+++ b/gnu/javax/crypto/key/IKeyAgreementParty.java
@@ -1,4 +1,4 @@
-/* IKeyAgreementParty.java --
+/* IKeyAgreementParty.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -47,14 +47,14 @@ public interface IKeyAgreementParty
{
/**
* Returns the canonical name of the key agreement protocol.
- *
+ *
* @return the canonical name of the key agreement protocol.
*/
String name();
/**
* Sets up the instance to operate with specific attributes.
- *
+ *
* @param attributes a map of name-values used by concrete implementations.
* @throws KeyAgreementException if an exception occurs during the setup.
*/
@@ -63,7 +63,7 @@ public interface IKeyAgreementParty
/**
* Processes an incoming message at one end, generating a message that will be
* processed by the other party(ies).
- *
+ *
* @param in the incoming message.
* @return an outgoing message, or <code>null</code> if this is an
* intermediary step that does not cause any output.
@@ -79,7 +79,7 @@ public interface IKeyAgreementParty
* exchange has completed its part of the exchange. If this is the case an
* {@link IllegalStateException} is thrown for any method invocation except
* <code>init()</code> or <code>reset()</code>.
- *
+ *
* @return <code>true</code> if this party has completed its part of the key
* agreement protocol exchange; <code>false</code> otherwise.
*/
@@ -88,7 +88,7 @@ public interface IKeyAgreementParty
/**
* Returns the byte array containing the shared secret as generated by this
* party.
- *
+ *
* @return the generated shared secret.
* @throws KeyAgreementException if the key agreement is not yet initialised,
* or is initialised but the exchange is still in progress.
diff --git a/gnu/javax/crypto/key/IncomingMessage.java b/gnu/javax/crypto/key/IncomingMessage.java
index 9701d80a7..3b68392d6 100644
--- a/gnu/javax/crypto/key/IncomingMessage.java
+++ b/gnu/javax/crypto/key/IncomingMessage.java
@@ -1,4 +1,4 @@
-/* IncomingMessage.java --
+/* IncomingMessage.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -71,7 +71,7 @@ public class IncomingMessage
/**
* Constructs an incoming message given the message's encoded form, including
* its header bytes.
- *
+ *
* @param b the encoded form, including the header bytes, of an incoming
* message.
* @throws KeyAgreementException if the buffer is malformed.
@@ -103,7 +103,7 @@ public class IncomingMessage
* <p>
* Calls the method with the same name and three arguments as:
* <code>getInstance(raw, 0, raw.length)</code>.
- *
+ *
* @param raw the encoded form, excluding the header bytes.
* @return a new instance of <code>IncomingMessage</code>.
*/
@@ -115,7 +115,7 @@ public class IncomingMessage
/**
* Returns an instance of a message given its encoded contents, excluding the
* message's header bytes.
- *
+ *
* @param raw the encoded form, excluding the header bytes.
* @param offset offset where to start using raw bytes from.
* @param len number of bytes to use.
@@ -130,7 +130,7 @@ public class IncomingMessage
/**
* Converts two octets into the number that they represent.
- *
+ *
* @param b the two octets.
* @return the length.
*/
@@ -144,7 +144,7 @@ public class IncomingMessage
/**
* Converts four octets into the number that they represent.
- *
+ *
* @param b the four octets.
* @return the length.
*/
@@ -169,7 +169,7 @@ public class IncomingMessage
* <p>
* See {@link OutgoingMessage#writePublicKey(java.security.PublicKey)} for
* more details on the internal format.
- *
+ *
* @throws KeyAgreementException if an encoding size constraint is violated or
* a mismatch was detected in the encoding.
*/
@@ -196,7 +196,7 @@ public class IncomingMessage
* <p>
* See {@link OutgoingMessage#writePrivateKey(java.security.PrivateKey)} for
* more details.
- *
+ *
* @throws KeyAgreementException if an encoding size constraint is violated or
* a mismatch was detected in the encoding.
*/
@@ -220,7 +220,7 @@ public class IncomingMessage
/**
* Decodes an MPI from the current message's contents.
- *
+ *
* @return a native representation of an MPI.
* @throws KeyAgreementException if an encoding exception occurs during the
* operation.
diff --git a/gnu/javax/crypto/key/KeyAgreementException.java b/gnu/javax/crypto/key/KeyAgreementException.java
index 405f011ad..06a7db70b 100644
--- a/gnu/javax/crypto/key/KeyAgreementException.java
+++ b/gnu/javax/crypto/key/KeyAgreementException.java
@@ -1,4 +1,4 @@
-/* KeyAgreementException.java --
+/* KeyAgreementException.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -68,7 +68,7 @@ public class KeyAgreementException
/**
* Constructs a new instance of <code>KeyAgreementException</code> with a
* detailed message. The <i>root</i> exception is <code>null</code>.
- *
+ *
* @param detail a possibly <code>null</code> string containing details of
* the exception.
* @see Throwable#getMessage()
@@ -81,7 +81,7 @@ public class KeyAgreementException
/**
* Constructs a new instance of <code>KeyAgreementException</code> with a
* detailed message and a <i>root</i> exception.
- *
+ *
* @param detail a possibly <code>null</code> string containing details of
* the exception.
* @param cause a possibly <code>null</code> root exception that caused this
@@ -99,7 +99,7 @@ public class KeyAgreementException
* Returns the cause of this throwable or <code>null</code> if the cause is
* nonexistent or unknown. The <i>cause</i> is the throwable that caused this
* exception to be thrown.
- *
+ *
* @return the possibly <code>null</code> exception that caused this one.
*/
public Throwable getCause()
@@ -123,7 +123,7 @@ public class KeyAgreementException
* Prints this exception's stack trace to a print stream. If this exception
* has a <i>root</i> exception; the stack trace of the <i>root</i> exception
* is also printed to the print stream.
- *
+ *
* @param ps the non-null print stream to which to print.
*/
public void printStackTrace(PrintStream ps)
@@ -137,7 +137,7 @@ public class KeyAgreementException
* Prints this exception's stack trace to a print writer. If this exception
* has a <i>root</i> exception; the stack trace of the <i>root</i> exception
* is also printed to the print writer.
- *
+ *
* @param pw the non-null print writer to use for output.
*/
public void printStackTrace(PrintWriter pw)
@@ -153,7 +153,7 @@ public class KeyAgreementException
* and if it has a <i>root</i> exception, the string representation of the
* root exception. This string representation is meant for debugging and is
* not meant to be interpreted programmatically.
- *
+ *
* @return the non-null string representation of this exception.
* @see Throwable#getMessage()
*/
diff --git a/gnu/javax/crypto/key/KeyAgreementFactory.java b/gnu/javax/crypto/key/KeyAgreementFactory.java
index ae9bf36ff..a4e14bc69 100644
--- a/gnu/javax/crypto/key/KeyAgreementFactory.java
+++ b/gnu/javax/crypto/key/KeyAgreementFactory.java
@@ -1,4 +1,4 @@
-/* KeyAgreementFactory.java --
+/* KeyAgreementFactory.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -71,7 +71,7 @@ public class KeyAgreementFactory
* <code>A</code> in a two-party <code>A..B</code> exchange, given the
* canonical name of this protocol. Party <code>A</code> is usually the
* initiator of the exchange.
- *
+ *
* @param name the case-insensitive key agreement protocol name.
* @return an instance of the key agreement protocol handler for party
* <code>A</code>, or <code>null</code> if none found.
@@ -99,7 +99,7 @@ public class KeyAgreementFactory
* Returns an instance of a key agreeent protocol handler, for party
* <code>B</code> in a two-party <code>A..B</code> exchange, given the
* canonical name of this protocol.
- *
+ *
* @param name the case-insensitive key agreement protocol name.
* @return an instance of the key agreement protocol handler for party
* <code>B</code>, or <code>null</code> if none found.
@@ -126,7 +126,7 @@ public class KeyAgreementFactory
/**
* Returns a {@link Set} of key agreement protocol names supported by this
* <i>Factory</i>.
- *
+ *
* @return a {@link Set} of key agreement protocol names (Strings).
*/
public static final Set getNames()
diff --git a/gnu/javax/crypto/key/OutgoingMessage.java b/gnu/javax/crypto/key/OutgoingMessage.java
index 563b3ef5a..e011330fe 100644
--- a/gnu/javax/crypto/key/OutgoingMessage.java
+++ b/gnu/javax/crypto/key/OutgoingMessage.java
@@ -1,4 +1,4 @@
-/* OutgoingMessage.java --
+/* OutgoingMessage.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -70,7 +70,7 @@ public class OutgoingMessage
/**
* Returns the encoded form of the current message including the 4-byte length
* header.
- *
+ *
* @throws KeyAgreementException if an encoding size constraint is violated.
*/
public byte[] toByteArray() throws KeyAgreementException
@@ -89,7 +89,7 @@ public class OutgoingMessage
/**
* Returns the encoded form of the current message excluding the 4-byte length
* header.
- *
+ *
* @throws KeyAgreementException if an encoding size constraint is violated.
*/
public byte[] wrap() throws KeyAgreementException
@@ -114,7 +114,7 @@ public class OutgoingMessage
* <pre>
* key --&gt; 4-byte-length || 1-byte-type-and-format || encoded-key-bytes
* </pre>
- *
+ *
* @param k the public key to encode.
* @throws KeyAgreementException if an encoding size constraint is violated.
*/
@@ -137,7 +137,7 @@ public class OutgoingMessage
* <pre>
* key --&gt; 4-byte-length || 1-byte-type-and-format || encoded-key-bytes
* </pre>
- *
+ *
* @param k the private key to encode.
* @throws KeyAgreementException if an encoding size constraint is violated.
*/
@@ -148,7 +148,7 @@ public class OutgoingMessage
/**
* Encodes an MPI into the message.
- *
+ *
* @param val the MPI to encode.
* @throws KeyAgreementException if an encoding size constraint is violated.
*/
@@ -165,7 +165,7 @@ public class OutgoingMessage
/**
* Encodes a string into the message.
- *
+ *
* @param s the string to encode.
* @throws KeyAgreementException if the UTF8 encoding is not supported on this
* platform, or if an encoding size constraint is violated.
diff --git a/gnu/javax/crypto/key/dh/DHKeyPairPKCS8Codec.java b/gnu/javax/crypto/key/dh/DHKeyPairPKCS8Codec.java
index 98ea47653..8c03cbb00 100644
--- a/gnu/javax/crypto/key/dh/DHKeyPairPKCS8Codec.java
+++ b/gnu/javax/crypto/key/dh/DHKeyPairPKCS8Codec.java
@@ -79,7 +79,7 @@ public class DHKeyPairPKCS8Codec
/**
* Returns the DER-encoded form of the PKCS#8 ASN.1 <i>PrivateKeyInfo</i>
* representation of a DH private key. The ASN.1 specification is as follows:
- *
+ *
* <pre>
* PrivateKeyInfo ::= SEQUENCE {
* version INTEGER, -- MUST be 0
@@ -105,7 +105,7 @@ public class DHKeyPairPKCS8Codec
* parameter. RFC-2631 DOES NOT allow for an <i>optional</i> value for that
* parameter, hence we replace such null values with <code>0</code>, and do
* the reverse in the corresponding decode method.
- *
+ *
* @return the DER encoded form of the ASN.1 representation of the
* <i>PrivateKeyInfo</i> field in an X.509 certificate.
* @throw InvalidParameterException if an error occurs during the marshalling
diff --git a/gnu/javax/crypto/key/dh/DHKeyPairRawCodec.java b/gnu/javax/crypto/key/dh/DHKeyPairRawCodec.java
index aefcd5ff4..4275389ce 100644
--- a/gnu/javax/crypto/key/dh/DHKeyPairRawCodec.java
+++ b/gnu/javax/crypto/key/dh/DHKeyPairRawCodec.java
@@ -1,4 +1,4 @@
-/* DHKeyPairRawCodec.java --
+/* DHKeyPairRawCodec.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -89,7 +89,7 @@ public class DHKeyPairRawCodec
* the <code>toByteArray()</code> method on the DH parameter <code>y</code>,
* </li>
* </ol>
- *
+ *
* @param key the key to encode.
* @return the <i>Raw</i> format encoding of the designated key.
* @throws IllegalArgumentException if the designated key is not a DH one.
@@ -227,7 +227,7 @@ public class DHKeyPairRawCodec
* the <code>toByteArray()</code> method on the DH parameter <code>x</code>,
* </li>
* </ol>
- *
+ *
* @param key the key to encode.
* @return the <i>Raw</i> format encoding of the designated key.
* @throws IllegalArgumentException if the designated key is not a DH one.
diff --git a/gnu/javax/crypto/key/dh/DHKeyPairX509Codec.java b/gnu/javax/crypto/key/dh/DHKeyPairX509Codec.java
index 5da396a1d..893716eef 100644
--- a/gnu/javax/crypto/key/dh/DHKeyPairX509Codec.java
+++ b/gnu/javax/crypto/key/dh/DHKeyPairX509Codec.java
@@ -90,10 +90,10 @@ public class DHKeyPairX509Codec
* q INTEGER -- factor of p-1
* }
* </pre>
- *
+ *
* <p>The <i>subjectPublicKey</i> field, which is a BIT STRING, contains the
* DER-encoded form of the DH public key as an INTEGER.</p>
- *
+ *
* <pre>
* DHPublicKey ::= INTEGER -- public key, y = g^x mod p
* </pre>
@@ -104,7 +104,7 @@ public class DHKeyPairX509Codec
* parameter. RFC-2631 DOES NOT allow for an <i>optional</i> value for that
* parameter, hence we replace such null values with <code>0</code>, and do
* the reverse in the corresponding decode method.
- *
+ *
* @param key the {@link PublicKey} instance to encode. MUST be an instance of
* {@link GnuDHPublicKey}.
* @return the DER-encoded form of the ASN.1 representation of the
diff --git a/gnu/javax/crypto/key/dh/DiffieHellmanKeyAgreement.java b/gnu/javax/crypto/key/dh/DiffieHellmanKeyAgreement.java
index 244395054..893d84d32 100644
--- a/gnu/javax/crypto/key/dh/DiffieHellmanKeyAgreement.java
+++ b/gnu/javax/crypto/key/dh/DiffieHellmanKeyAgreement.java
@@ -1,4 +1,4 @@
-/* DiffieHellmanKeyAgreement.java --
+/* DiffieHellmanKeyAgreement.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -77,7 +77,7 @@ import javax.crypto.interfaces.DHPrivateKey;
* message) in order to ensure that different messages use different
* KEKs. Implementations MAY implement Static-Static mode.&quot;
* </pre>
- *
+ *
* <p>
* Reference:
* <ol>
diff --git a/gnu/javax/crypto/key/dh/DiffieHellmanReceiver.java b/gnu/javax/crypto/key/dh/DiffieHellmanReceiver.java
index ab1023ad3..3194f682d 100644
--- a/gnu/javax/crypto/key/dh/DiffieHellmanReceiver.java
+++ b/gnu/javax/crypto/key/dh/DiffieHellmanReceiver.java
@@ -1,4 +1,4 @@
-/* DiffieHellmanReceiver.java --
+/* DiffieHellmanReceiver.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -53,7 +53,7 @@ import javax.crypto.interfaces.DHPrivateKey;
/**
* This implementation is the receiver's part of the basic version of the
* Diffie-Hellman key agreement exchange (B in [HAC]).
- *
+ *
* @see DiffieHellmanKeyAgreement
*/
public class DiffieHellmanReceiver
diff --git a/gnu/javax/crypto/key/dh/DiffieHellmanSender.java b/gnu/javax/crypto/key/dh/DiffieHellmanSender.java
index 52a030d67..7fc997354 100644
--- a/gnu/javax/crypto/key/dh/DiffieHellmanSender.java
+++ b/gnu/javax/crypto/key/dh/DiffieHellmanSender.java
@@ -1,4 +1,4 @@
-/* DiffieHellmanSender.java --
+/* DiffieHellmanSender.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -53,7 +53,7 @@ import javax.crypto.interfaces.DHPrivateKey;
/**
* This implementation is the sender's part of the basic version of the
* Diffie-Hellman key agreement exchange (A in [HAC]).
- *
+ *
* @see DiffieHellmanKeyAgreement
*/
public class DiffieHellmanSender
diff --git a/gnu/javax/crypto/key/dh/ElGamalKeyAgreement.java b/gnu/javax/crypto/key/dh/ElGamalKeyAgreement.java
index 967eda3f5..4283dc59b 100644
--- a/gnu/javax/crypto/key/dh/ElGamalKeyAgreement.java
+++ b/gnu/javax/crypto/key/dh/ElGamalKeyAgreement.java
@@ -1,4 +1,4 @@
-/* ElGamalKeyAgreement.java --
+/* ElGamalKeyAgreement.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/key/dh/ElGamalReceiver.java b/gnu/javax/crypto/key/dh/ElGamalReceiver.java
index bf9b4fb1f..ad606f6c9 100644
--- a/gnu/javax/crypto/key/dh/ElGamalReceiver.java
+++ b/gnu/javax/crypto/key/dh/ElGamalReceiver.java
@@ -1,4 +1,4 @@
-/* ElGamalReceiver.java --
+/* ElGamalReceiver.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -51,7 +51,7 @@ import javax.crypto.interfaces.DHPrivateKey;
/**
* This implementation is the receiver's part of the ElGamal key agreement
* exchange (B in [HAC]).
- *
+ *
* @see ElGamalKeyAgreement
*/
public class ElGamalReceiver
diff --git a/gnu/javax/crypto/key/dh/ElGamalSender.java b/gnu/javax/crypto/key/dh/ElGamalSender.java
index cdd1ef0da..bc9643500 100644
--- a/gnu/javax/crypto/key/dh/ElGamalSender.java
+++ b/gnu/javax/crypto/key/dh/ElGamalSender.java
@@ -1,4 +1,4 @@
-/* ElGamalSender.java --
+/* ElGamalSender.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -51,7 +51,7 @@ import javax.crypto.interfaces.DHPublicKey;
/**
* This implementation is the sender's part of the ElGamal key agreement
* exchange (A in [HAC]).
- *
+ *
* @see ElGamalKeyAgreement
*/
public class ElGamalSender
diff --git a/gnu/javax/crypto/key/dh/GnuDHKey.java b/gnu/javax/crypto/key/dh/GnuDHKey.java
index 1066830c3..03a18c310 100644
--- a/gnu/javax/crypto/key/dh/GnuDHKey.java
+++ b/gnu/javax/crypto/key/dh/GnuDHKey.java
@@ -1,4 +1,4 @@
-/* GnuDHKey.java --
+/* GnuDHKey.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -86,7 +86,7 @@ public abstract class GnuDHKey
/**
* Trivial protected constructor.
- *
+ *
* @param defaultFormat the identifier of the encoding format to use by
* default when externalizing the key.
* @param q a prime divisor of p-1.
@@ -135,7 +135,7 @@ public abstract class GnuDHKey
/**
* Returns <code>true</code> if the designated object is an instance of
* {@link DHKey} and has the same Diffie-Hellman parameter values as this one.
- *
+ *
* @param obj the other non-null DH key to compare to.
* @return <code>true</code> if the designated object is of the same type
* and value as this one.
diff --git a/gnu/javax/crypto/key/dh/GnuDHKeyPairGenerator.java b/gnu/javax/crypto/key/dh/GnuDHKeyPairGenerator.java
index 13cfd9014..89e9c4c80 100644
--- a/gnu/javax/crypto/key/dh/GnuDHKeyPairGenerator.java
+++ b/gnu/javax/crypto/key/dh/GnuDHKeyPairGenerator.java
@@ -1,4 +1,4 @@
-/* GnuDHKeyPairGenerator.java --
+/* GnuDHKeyPairGenerator.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -214,7 +214,7 @@ public class GnuDHKeyPairGenerator
/**
* Fills the designated byte array with random data.
- *
+ *
* @param buffer the byte array to fill with random data.
*/
private void nextRandomBytes(byte[] buffer)
diff --git a/gnu/javax/crypto/key/dh/GnuDHPrivateKey.java b/gnu/javax/crypto/key/dh/GnuDHPrivateKey.java
index d8150dcdf..881421a74 100644
--- a/gnu/javax/crypto/key/dh/GnuDHPrivateKey.java
+++ b/gnu/javax/crypto/key/dh/GnuDHPrivateKey.java
@@ -1,4 +1,4 @@
-/* GnuDHPrivateKey.java --
+/* GnuDHPrivateKey.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -70,7 +70,7 @@ public class GnuDHPrivateKey
/**
* Convenience constructor. Calls the constructor with five arguments passing
* {@link Registry#RAW_ENCODING_ID} as the value of its first argument.
- *
+ *
* @param q a prime divisor of p-1.
* @param p the public prime.
* @param g the generator of the group.
@@ -84,7 +84,7 @@ public class GnuDHPrivateKey
/**
* Constructs a new instance of <code>GnuDHPrivateKey</code> given the
* designated parameters.
- *
+ *
* @param preferredFormat the identifier of the encoding format to use by
* default when externalizing the key.
* @param q a prime divisor of p-1.
@@ -106,7 +106,7 @@ public class GnuDHPrivateKey
* method of a DH keypair codec object (an instance implementing
* {@link IKeyPairCodec} for DH keys, and re-constructs an instance of this
* object.
- *
+ *
* @param k the contents of a previously encoded instance of this object.
* @exception ArrayIndexOutOfBoundsException if there is not enough bytes, in
* <code>k</code>, to represent a valid encoding of an
@@ -137,7 +137,7 @@ public class GnuDHPrivateKey
/**
* Returns the encoded form of this private key according to the designated
* format.
- *
+ *
* @param format the desired format identifier of the resulting encoding.
* @return the byte sequence encoding this key according to the designated
* format.
@@ -165,7 +165,7 @@ public class GnuDHPrivateKey
/**
* Returns <code>true</code> if the designated object is an instance of
* {@link DHPrivateKey} and has the same parameter values as this one.
- *
+ *
* @param obj the other non-null DH key to compare to.
* @return <code>true</code> if the designated object is of the same type
* and value as this one.
diff --git a/gnu/javax/crypto/key/dh/GnuDHPublicKey.java b/gnu/javax/crypto/key/dh/GnuDHPublicKey.java
index 5fb31f383..5f1771bb0 100644
--- a/gnu/javax/crypto/key/dh/GnuDHPublicKey.java
+++ b/gnu/javax/crypto/key/dh/GnuDHPublicKey.java
@@ -1,4 +1,4 @@
-/* GnuDHPublicKey.java --
+/* GnuDHPublicKey.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -68,7 +68,7 @@ public class GnuDHPublicKey
/**
* Convenience constructor. Calls the constructor with five arguments passing
* {@link Registry#RAW_ENCODING_ID} as the value of its first argument.
- *
+ *
* @param q a prime divisor of p-1.
* @param p the public prime.
* @param g the generator of the group.
@@ -82,7 +82,7 @@ public class GnuDHPublicKey
/**
* Constructs a new instance of <code>GnuDHPublicKey</code> given the
* designated parameters.
- *
+ *
* @param preferredFormat the identifier of the encoding format to use by
* default when externalizing the key.
* @param q a prime divisor of p-1.
@@ -104,7 +104,7 @@ public class GnuDHPublicKey
* method of a DH keypair codec object (an instance implementing
* {@link IKeyPairCodec} for DSS keys, and re-constructs an instance of this
* object.
- *
+ *
* @param k the contents of a previously encoded instance of this object.
* @exception ArrayIndexOutOfBoundsException if there is not enough bytes, in
* <code>k</code>, to represent a valid encoding of an
@@ -135,7 +135,7 @@ public class GnuDHPublicKey
/**
* Returns the encoded form of this public key according to the designated
* format.
- *
+ *
* @param format the desired format identifier of the resulting encoding.
* @return the byte sequence encoding this key according to the designated
* format.
@@ -162,7 +162,7 @@ public class GnuDHPublicKey
/**
* Returns <code>true</code> if the designated object is an instance of
* {@link DHPublicKey} and has the same parameter values as this one.
- *
+ *
* @param obj the other non-null DH key to compare to.
* @return <code>true</code> if the designated object is of the same type
* and value as this one.
diff --git a/gnu/javax/crypto/key/dh/RFC2631.java b/gnu/javax/crypto/key/dh/RFC2631.java
index a814d2c0b..60ef49409 100644
--- a/gnu/javax/crypto/key/dh/RFC2631.java
+++ b/gnu/javax/crypto/key/dh/RFC2631.java
@@ -1,4 +1,4 @@
-/* RFC2631.java --
+/* RFC2631.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/key/srp6/SRP6Host.java b/gnu/javax/crypto/key/srp6/SRP6Host.java
index 44f994673..2c8e66fa2 100644
--- a/gnu/javax/crypto/key/srp6/SRP6Host.java
+++ b/gnu/javax/crypto/key/srp6/SRP6Host.java
@@ -1,4 +1,4 @@
-/* SRP6Host.java --
+/* SRP6Host.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/key/srp6/SRP6KeyAgreement.java b/gnu/javax/crypto/key/srp6/SRP6KeyAgreement.java
index b4264184e..d3d27b381 100644
--- a/gnu/javax/crypto/key/srp6/SRP6KeyAgreement.java
+++ b/gnu/javax/crypto/key/srp6/SRP6KeyAgreement.java
@@ -1,4 +1,4 @@
-/* SRP6KeyAgreement.java --
+/* SRP6KeyAgreement.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -66,23 +66,23 @@ import java.math.BigInteger;
* A,B Public ephemeral values
* x Private key (derived from p and s)
* v Password verifier
- *
+ *
* The host stores passwords using the following formula:
* x = H(s | H(I &quot;:&quot; p)) (s is chosen randomly)
* v = g&circ;x (computes password verifier)
- *
+ *
* The host then keeps {I, s, v} in its password database.
- *
+ *
* The authentication protocol itself goes as follows:
* User -&gt; Host: I, A = g&circ;a (identifies self, a = random number)
* Host -&gt; User: s, B = 3v + g&circ;b (sends salt, b = random number)
- *
+ *
* Both: u = H(A, B)
- *
+ *
* User: x = H(s, p) (user enters password)
* User: S = (B - 3g&circ;x) &circ; (a + ux) (computes session key)
* User: K = H(S)
- *
+ *
* Host: S = (Av&circ;u) &circ; b (computes session key)
* Host: K = H(S)
* </pre>
diff --git a/gnu/javax/crypto/key/srp6/SRP6SaslClient.java b/gnu/javax/crypto/key/srp6/SRP6SaslClient.java
index f5969f0c1..ec5cd7f17 100644
--- a/gnu/javax/crypto/key/srp6/SRP6SaslClient.java
+++ b/gnu/javax/crypto/key/srp6/SRP6SaslClient.java
@@ -1,4 +1,4 @@
-/* SRP6SaslClient.java --
+/* SRP6SaslClient.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -52,13 +52,13 @@ import java.math.BigInteger;
* User (client side).
* <p>
* In this alternative, the exchange goes as follows:
- *
+ *
* <pre>
* C -&gt; S: I (identifies self)
* S -&gt; C: N, g, s, B = 3v + g&circ;b (sends salt, b = random number)
* C -&gt; S: A = g&circ;a (a = random number)
* </pre>
- *
+ *
* <p>
* All elements are computed the same way as in the standard version.
* <p>
diff --git a/gnu/javax/crypto/key/srp6/SRP6SaslServer.java b/gnu/javax/crypto/key/srp6/SRP6SaslServer.java
index 7e68c99c4..a4313f4d3 100644
--- a/gnu/javax/crypto/key/srp6/SRP6SaslServer.java
+++ b/gnu/javax/crypto/key/srp6/SRP6SaslServer.java
@@ -1,4 +1,4 @@
-/* SRP6SaslServer.java --
+/* SRP6SaslServer.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -52,13 +52,13 @@ import java.math.BigInteger;
* Host (server side).
* <p>
* In this alternative, the exchange goes as follows:
- *
+ *
* <pre>
* C -&gt; S: I (identifies self)
* S -&gt; C: N, g, s, B = 3v + g&circ;b (sends salt, b = random number)
* C -&gt; S: A = g&circ;a (a = random number)
* </pre>
- *
+ *
* <p>
* All elements are computed the same way as in the standard version.
* <p>
diff --git a/gnu/javax/crypto/key/srp6/SRP6TLSClient.java b/gnu/javax/crypto/key/srp6/SRP6TLSClient.java
index af0be02df..c2459f620 100644
--- a/gnu/javax/crypto/key/srp6/SRP6TLSClient.java
+++ b/gnu/javax/crypto/key/srp6/SRP6TLSClient.java
@@ -1,4 +1,4 @@
-/* SRP6TLSClient.java --
+/* SRP6TLSClient.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/key/srp6/SRP6TLSServer.java b/gnu/javax/crypto/key/srp6/SRP6TLSServer.java
index f91cffd00..42e3d9cb1 100644
--- a/gnu/javax/crypto/key/srp6/SRP6TLSServer.java
+++ b/gnu/javax/crypto/key/srp6/SRP6TLSServer.java
@@ -1,4 +1,4 @@
-/* SRP6TLSServer.java --
+/* SRP6TLSServer.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/key/srp6/SRP6User.java b/gnu/javax/crypto/key/srp6/SRP6User.java
index 7c97e7697..4a1e8dda9 100644
--- a/gnu/javax/crypto/key/srp6/SRP6User.java
+++ b/gnu/javax/crypto/key/srp6/SRP6User.java
@@ -1,4 +1,4 @@
-/* SRP6User.java --
+/* SRP6User.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/key/srp6/SRPAlgorithm.java b/gnu/javax/crypto/key/srp6/SRPAlgorithm.java
index 85b3b1139..fb8249e05 100644
--- a/gnu/javax/crypto/key/srp6/SRPAlgorithm.java
+++ b/gnu/javax/crypto/key/srp6/SRPAlgorithm.java
@@ -1,4 +1,4 @@
-/* SRPAlgorithm.java --
+/* SRPAlgorithm.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/key/srp6/SRPKey.java b/gnu/javax/crypto/key/srp6/SRPKey.java
index 06ba47a9f..72ce8d2cf 100644
--- a/gnu/javax/crypto/key/srp6/SRPKey.java
+++ b/gnu/javax/crypto/key/srp6/SRPKey.java
@@ -1,4 +1,4 @@
-/* SRPKey.java --
+/* SRPKey.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -80,7 +80,7 @@ public abstract class SRPKey
/**
* Returns the standard algorithm name for this key.
- *
+ *
* @return the standard algorithm name for this key.
*/
public String getAlgorithm()
@@ -97,7 +97,7 @@ public abstract class SRPKey
/**
* Returns {@link Registry#RAW_ENCODING_SHORT_NAME} which is the sole format
* supported for this type of keys.
- *
+ *
* @return {@link Registry#RAW_ENCODING_SHORT_NAME} ALWAYS.
*/
public String getFormat()
@@ -107,7 +107,7 @@ public abstract class SRPKey
/**
* Returns the public shared modulus.
- *
+ *
* @return <code>N</code>.
*/
public BigInteger getN()
@@ -117,7 +117,7 @@ public abstract class SRPKey
/**
* Returns the generator.
- *
+ *
* @return <code>g</code>.
*/
public BigInteger getG()
@@ -128,7 +128,7 @@ public abstract class SRPKey
/**
* Returns <code>true</code> if the designated object is an instance of
* <code>SRPKey</code> and has the same SRP parameter values as this one.
- *
+ *
* @param obj the other non-null SRP key to compare to.
* @return <code>true</code> if the designated object is of the same type
* and value as this one.
diff --git a/gnu/javax/crypto/key/srp6/SRPKeyPairGenerator.java b/gnu/javax/crypto/key/srp6/SRPKeyPairGenerator.java
index 8d50c9b71..59e5bc943 100644
--- a/gnu/javax/crypto/key/srp6/SRPKeyPairGenerator.java
+++ b/gnu/javax/crypto/key/srp6/SRPKeyPairGenerator.java
@@ -1,4 +1,4 @@
-/* SRPKeyPairGenerator.java --
+/* SRPKeyPairGenerator.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/key/srp6/SRPKeyPairRawCodec.java b/gnu/javax/crypto/key/srp6/SRPKeyPairRawCodec.java
index 555dc23cf..b7cc53693 100644
--- a/gnu/javax/crypto/key/srp6/SRPKeyPairRawCodec.java
+++ b/gnu/javax/crypto/key/srp6/SRPKeyPairRawCodec.java
@@ -1,4 +1,4 @@
-/* SRPKeyPairRawCodec.java --
+/* SRPKeyPairRawCodec.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -92,7 +92,7 @@ public class SRPKeyPairRawCodec
* the <code>toByteArray()</code> method on the SRP parameter <code>y</code>,
* </li>
* </ol>
- *
+ *
* @param key the key to encode.
* @return the <i>Raw</i> format encoding of the designated key.
* @throws IllegalArgumentException if the designated key is not an SRP one.
@@ -215,7 +215,7 @@ public class SRPKeyPairRawCodec
* the <code>toByteArray()</code> method on the SRP parameter <code>v</code>,
* </li>
* </ol>
- *
+ *
* @param key the key to encode.
* @return the <i>Raw</i> format encoding of the designated key.
* @throws IllegalArgumentException if the designated key is not an SRP one.
diff --git a/gnu/javax/crypto/key/srp6/SRPPrivateKey.java b/gnu/javax/crypto/key/srp6/SRPPrivateKey.java
index d5ade07d7..c2e13be82 100644
--- a/gnu/javax/crypto/key/srp6/SRPPrivateKey.java
+++ b/gnu/javax/crypto/key/srp6/SRPPrivateKey.java
@@ -1,4 +1,4 @@
-/* SRPPrivateKey.java --
+/* SRPPrivateKey.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -71,7 +71,7 @@ public class SRPPrivateKey
/**
* Public constructor for use from outside this package.
- *
+ *
* @param N the public shared modulus.
* @param g the generator.
* @param x the private exponent of the ephemeral key.
@@ -83,7 +83,7 @@ public class SRPPrivateKey
/**
* Public constructor for use from outside this package.
- *
+ *
* @param N the public shared modulus.
* @param g the generator.
* @param x the private exponent of the ephemeral key.
@@ -100,7 +100,7 @@ public class SRPPrivateKey
/**
* Default constructor. Assumes N and g are already validated.
- *
+ *
* @param params an array of either 3 or 4 values representing N, g, and
* either v and X for the server, or just X for the client. Those
* values represent the following:
@@ -133,7 +133,7 @@ public class SRPPrivateKey
* method of an SRP keypair codec object (an instance implementing
* {@link IKeyPairCodec} for DSS keys, and re-constructs an instance of this
* object.
- *
+ *
* @param k the contents of a previously encoded instance of this object.
* @throws ArrayIndexOutOfBoundsException if there is not enough bytes, in
* <code>k</code>, to represent a valid encoding of an instance
@@ -160,7 +160,7 @@ public class SRPPrivateKey
/**
* Returns the private exponent of the key as a {@link BigInteger}.
- *
+ *
* @return the private exponent of the key as a {@link BigInteger}.
*/
public BigInteger getX()
@@ -170,7 +170,7 @@ public class SRPPrivateKey
/**
* Returns the user's verifier as a {@link BigInteger}.
- *
+ *
* @return the user's verifier as a {@link BigInteger} if this is an SRP
* private key of a Host, or <code>null</code> if this is a private
* SRP key for a User.
@@ -183,7 +183,7 @@ public class SRPPrivateKey
/**
* Returns the encoded form of this private key according to the designated
* format.
- *
+ *
* @param format the desired format identifier of the resulting encoding.
* @return the byte sequence encoding this key according to the designated
* format.
@@ -207,7 +207,7 @@ public class SRPPrivateKey
* Returns <code>true</code> if the designated object is an instance of
* <code>SRPPrivateKey</code> and has the same SRP parameter values as this
* one.
- *
+ *
* @param obj the other non-null SRP key to compare to.
* @return <code>true</code> if the designated object is of the same type
* and value as this one.
diff --git a/gnu/javax/crypto/key/srp6/SRPPublicKey.java b/gnu/javax/crypto/key/srp6/SRPPublicKey.java
index 04a949211..2db13ff4c 100644
--- a/gnu/javax/crypto/key/srp6/SRPPublicKey.java
+++ b/gnu/javax/crypto/key/srp6/SRPPublicKey.java
@@ -1,4 +1,4 @@
-/* SRPPublicKey.java --
+/* SRPPublicKey.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -65,7 +65,7 @@ public class SRPPublicKey
/**
* Public constructor for use from outside this package.
- *
+ *
* @param N the public shared modulus.
* @param g the generator.
* @param Y the public exponent of the ephemeral key.
@@ -80,7 +80,7 @@ public class SRPPublicKey
/**
* Default constructor. Assumes that N and g are already validated.
- *
+ *
* @param params an array of 3 values representing N, g and Y; the latter
* being the client's or server's public exponent.
*/
@@ -96,7 +96,7 @@ public class SRPPublicKey
* method of an SRP keypair codec object (an instance implementing
* {@link IKeyPairCodec} for SRP keys, and re-constructs an instance of this
* object.
- *
+ *
* @param k the contents of a previously encoded instance of this object.
* @throws ArrayIndexOutOfBoundsException if there is not enough bytes, in
* <code>k</code>, to represent a valid encoding of an instance
@@ -123,7 +123,7 @@ public class SRPPublicKey
/**
* Returns the public exponent of the key as a {@link BigInteger}.
- *
+ *
* @return the public exponent of the key as a {@link BigInteger}.
*/
public BigInteger getY()
@@ -134,7 +134,7 @@ public class SRPPublicKey
/**
* Returns the encoded form of this public key according to the designated
* format.
- *
+ *
* @param format the desired format identifier of the resulting encoding.
* @return the byte sequence encoding this key according to the designated
* format.
@@ -158,7 +158,7 @@ public class SRPPublicKey
* Returns <code>true</code> if the designated object is an instance of
* <code>SRPPublicKey</code>and has the same SRP parameter values as this
* one.
- *
+ *
* @param obj the other non-null SRP key to compare to.
* @return <code>true</code> if the designated object is of the same type
* and value as this one.
diff --git a/gnu/javax/crypto/keyring/AuthenticatedEntry.java b/gnu/javax/crypto/keyring/AuthenticatedEntry.java
index cd2e5868d..91c3bc6e2 100644
--- a/gnu/javax/crypto/keyring/AuthenticatedEntry.java
+++ b/gnu/javax/crypto/keyring/AuthenticatedEntry.java
@@ -1,4 +1,4 @@
-/* AuthenticatedEntry.java --
+/* AuthenticatedEntry.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -90,7 +90,7 @@ public final class AuthenticatedEntry
/**
* Computes the mac over this envelope's data. This method <b>must</b> be
* called before this entry in encoded.
- *
+ *
* @param key The key to authenticate with.
* @throws IOException If encoding fails.
* @throws InvalidKeyException If the supplied key is bad.
@@ -115,7 +115,7 @@ public final class AuthenticatedEntry
/**
* Verifies this entry's payload. This method will unmask this entry, thus it
* must be called before accessing its contents.
- *
+ *
* @param key The key to use to authenticate.
* @throws InvalidKeyException If the given key is improper.
*/
diff --git a/gnu/javax/crypto/keyring/BaseKeyring.java b/gnu/javax/crypto/keyring/BaseKeyring.java
index 369507d4c..e93ca8fa3 100644
--- a/gnu/javax/crypto/keyring/BaseKeyring.java
+++ b/gnu/javax/crypto/keyring/BaseKeyring.java
@@ -1,4 +1,4 @@
-/* BaseKeyring.java --
+/* BaseKeyring.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/keyring/BinaryDataEntry.java b/gnu/javax/crypto/keyring/BinaryDataEntry.java
index e694487e1..8fb1e0f39 100644
--- a/gnu/javax/crypto/keyring/BinaryDataEntry.java
+++ b/gnu/javax/crypto/keyring/BinaryDataEntry.java
@@ -1,4 +1,4 @@
-/* BinaryDataEntry.java --
+/* BinaryDataEntry.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -53,7 +53,7 @@ public class BinaryDataEntry
/**
* Creates a new binary data entry.
- *
+ *
* @param contentType The content type of this entry. This parameter can be
* <code>null</code> if no content type is needed.
* @param data The data.
@@ -86,7 +86,7 @@ public class BinaryDataEntry
/**
* Returns the content type of this entry, or <code>null</code> if this
* property is not set.
- *
+ *
* @return The content type.
*/
public String getContentType()
@@ -96,7 +96,7 @@ public class BinaryDataEntry
/**
* Returns this object's data field.
- *
+ *
* @return The data.
*/
public byte[] getData()
diff --git a/gnu/javax/crypto/keyring/CertPathEntry.java b/gnu/javax/crypto/keyring/CertPathEntry.java
index 32b86084f..e798a93ce 100644
--- a/gnu/javax/crypto/keyring/CertPathEntry.java
+++ b/gnu/javax/crypto/keyring/CertPathEntry.java
@@ -1,4 +1,4 @@
-/* CertPathEntry.java --
+/* CertPathEntry.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/keyring/CertificateEntry.java b/gnu/javax/crypto/keyring/CertificateEntry.java
index 661758442..f574a4fe4 100644
--- a/gnu/javax/crypto/keyring/CertificateEntry.java
+++ b/gnu/javax/crypto/keyring/CertificateEntry.java
@@ -1,4 +1,4 @@
-/* CertificateEntry.java --
+/* CertificateEntry.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -58,7 +58,7 @@ public final class CertificateEntry
/**
* Creates a new certificate entry.
- *
+ *
* @param certificate The certificate.
* @param creationDate The creation date.
* @param properties The alias.
@@ -106,7 +106,7 @@ public final class CertificateEntry
/**
* Returns this entry's certificate.
- *
+ *
* @return The certificate.
*/
public Certificate getCertificate()
diff --git a/gnu/javax/crypto/keyring/CompressedEntry.java b/gnu/javax/crypto/keyring/CompressedEntry.java
index b24c6715a..8949a41e9 100644
--- a/gnu/javax/crypto/keyring/CompressedEntry.java
+++ b/gnu/javax/crypto/keyring/CompressedEntry.java
@@ -1,4 +1,4 @@
-/* CompressedEntry.java --
+/* CompressedEntry.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/keyring/EncryptedEntry.java b/gnu/javax/crypto/keyring/EncryptedEntry.java
index f0693cc91..68a6c2c8a 100644
--- a/gnu/javax/crypto/keyring/EncryptedEntry.java
+++ b/gnu/javax/crypto/keyring/EncryptedEntry.java
@@ -1,4 +1,4 @@
-/* EncryptedEntry.java --
+/* EncryptedEntry.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/keyring/Entry.java b/gnu/javax/crypto/keyring/Entry.java
index ef225db95..d45924940 100644
--- a/gnu/javax/crypto/keyring/Entry.java
+++ b/gnu/javax/crypto/keyring/Entry.java
@@ -1,4 +1,4 @@
-/* Entry.java --
+/* Entry.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -71,7 +71,7 @@ public abstract class Entry
/**
* Creates a new Entry.
- *
+ *
* @param type This entry's type.
* @param properties This entry's properties.
* @throws IllegalArgumentException If the properties argument is null, or if
@@ -101,7 +101,7 @@ public abstract class Entry
/**
* Returns this entry's properties object. The properties are cloned before
* being returned.
- *
+ *
* @return The properties.
*/
public Properties getProperties()
@@ -122,7 +122,7 @@ public abstract class Entry
/**
* This method is called when this entry needs to be written to an output
* stream.
- *
+ *
* @param out The stream to write to.
* @throws IOException If an I/O exception occurs.
*/
diff --git a/gnu/javax/crypto/keyring/EnvelopeEntry.java b/gnu/javax/crypto/keyring/EnvelopeEntry.java
index fe39091b0..76aba7d7b 100644
--- a/gnu/javax/crypto/keyring/EnvelopeEntry.java
+++ b/gnu/javax/crypto/keyring/EnvelopeEntry.java
@@ -1,4 +1,4 @@
-/* EnvelopeEntry.java --
+/* EnvelopeEntry.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -80,7 +80,7 @@ public abstract class EnvelopeEntry
/**
* Adds an entry to this envelope.
- *
+ *
* @param entry The entry to add.
*/
public void add(Entry entry)
@@ -102,7 +102,7 @@ public abstract class EnvelopeEntry
/**
* Tests if this envelope contains a primitive entry with the given alias.
- *
+ *
* @param alias The alias to test.
* @return True if this envelope (or one of the contained envelopes) contains
* a primitive entry with the given alias.
@@ -133,7 +133,7 @@ public abstract class EnvelopeEntry
/**
* Tests if this envelope contains the given entry.
- *
+ *
* @param entry The entry to test.
* @return True if this envelope contains the given entry.
*/
@@ -156,7 +156,7 @@ public abstract class EnvelopeEntry
/**
* Returns a copy of all entries this envelope contains.
- *
+ *
* @return All contained entries.
*/
public List getEntries()
@@ -167,7 +167,7 @@ public abstract class EnvelopeEntry
/**
* Gets all primitive entries that have the given alias. If there are any
* masked entries that contain the given alias, they will be returned as well.
- *
+ *
* @param alias The alias of the entries to get.
* @return A list of all primitive entries that have the given alias.
*/
@@ -214,7 +214,7 @@ public abstract class EnvelopeEntry
/**
* Returns the list of all aliases contained by this envelope, separated by a
* semicolon (';').
- *
+ *
* @return The list of aliases.
*/
public String getAliasList()
@@ -228,7 +228,7 @@ public abstract class EnvelopeEntry
/**
* Removes the specified entry.
- *
+ *
* @param entry The entry.
* @return True if an entry was removed.
*/
@@ -280,7 +280,7 @@ public abstract class EnvelopeEntry
/**
* Removes all primitive entries that have the specified alias.
- *
+ *
* @param alias The alias of the entries to remove.
* @return <code>true</code> if <code>alias</code> was present and was
* successfully trmoved. Returns <code>false</code> if
diff --git a/gnu/javax/crypto/keyring/GnuPrivateKeyring.java b/gnu/javax/crypto/keyring/GnuPrivateKeyring.java
index 2ccdad6b3..ab3933972 100644
--- a/gnu/javax/crypto/keyring/GnuPrivateKeyring.java
+++ b/gnu/javax/crypto/keyring/GnuPrivateKeyring.java
@@ -1,4 +1,4 @@
-/* GnuPrivateKeyring.java --
+/* GnuPrivateKeyring.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -56,7 +56,7 @@ import java.util.logging.Level;
import java.util.logging.Logger;
/**
- *
+ *
*/
public class GnuPrivateKeyring
extends BaseKeyring
diff --git a/gnu/javax/crypto/keyring/GnuPublicKeyring.java b/gnu/javax/crypto/keyring/GnuPublicKeyring.java
index 5243919c3..d7387f892 100644
--- a/gnu/javax/crypto/keyring/GnuPublicKeyring.java
+++ b/gnu/javax/crypto/keyring/GnuPublicKeyring.java
@@ -1,4 +1,4 @@
-/* GnuPublicKeyring.java --
+/* GnuPublicKeyring.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/keyring/IKeyring.java b/gnu/javax/crypto/keyring/IKeyring.java
index 44d537700..141f2dcd4 100644
--- a/gnu/javax/crypto/keyring/IKeyring.java
+++ b/gnu/javax/crypto/keyring/IKeyring.java
@@ -1,4 +1,4 @@
-/* IKeyring.java --
+/* IKeyring.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -79,7 +79,7 @@ public interface IKeyring
* <p>
* What happens to the current contents of this keyring? are the new ones
* merged with the current ones or do they simply replace them?
- *
+ *
* @param attributes The attributes that designate the source where the store
* is to be loaded from. What happens
* @throws IllegalArgumentException If the attributes are inappropriate.
@@ -92,7 +92,7 @@ public interface IKeyring
/**
* Stores the contents of this keyring to persistent storage as specified by
* the designated <code>attributes</code>.
- *
+ *
* @param attributes the attributes that define where the contents of this
* keyring will be stored.
* @throws IOException if an exception occurs during the process.
@@ -107,7 +107,7 @@ public interface IKeyring
/**
* Returns the number of entries in this keyring.
- *
+ *
* @return The number of current entries in this keyring.
*/
int size();
@@ -115,7 +115,7 @@ public interface IKeyring
/**
* Returns an {@link Enumeration} of all aliases (instances of {@link String})
* in this keyring.
- *
+ *
* @return The enumeration of {@link String}s each representing an <i>alias</i>
* found in this keyring.
*/
@@ -123,7 +123,7 @@ public interface IKeyring
/**
* Tests whether or not this keyring contains the given alias.
- *
+ *
* @param alias The alias to check.
* @return true if this keyring contains the alias.
*/
@@ -133,7 +133,7 @@ public interface IKeyring
* Returns a {@link List} of entries (instances of {@link Entry}) for the
* given <code>alias</code>, or <code>null</code> if there no such entry
* exists.
- *
+ *
* @param alias The alias of the entry(ies) to return.
* @return A list of all entries (instances of {@link Entry} that have the
* given <code>alias</code>, or <code>null</code> if no one
@@ -145,7 +145,7 @@ public interface IKeyring
* Adds a designated {@link Entry} to this keyring.
* <p>
* What happens if there is already an entry with the same alias?
- *
+ *
* @param entry The entry to put in this keyring.
*/
void add(Entry entry);
@@ -155,7 +155,7 @@ public interface IKeyring
* keyring. Does nothing if there was no such entry.
* <p>
* What happens if there are more than one?
- *
+ *
* @param alias The alias of the entry to remove.
*/
void remove(String alias);
diff --git a/gnu/javax/crypto/keyring/IPrivateKeyring.java b/gnu/javax/crypto/keyring/IPrivateKeyring.java
index 9e2ceab9b..3bfa10098 100644
--- a/gnu/javax/crypto/keyring/IPrivateKeyring.java
+++ b/gnu/javax/crypto/keyring/IPrivateKeyring.java
@@ -1,4 +1,4 @@
-/* IPrivateKeyring.java --
+/* IPrivateKeyring.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -56,7 +56,7 @@ public interface IPrivateKeyring
/**
* Tests if this keyring contains a private key entry with the given
* <code>alias</code>.
- *
+ *
* @param alias The alias to check.
* @return <code>true</code> if this keyring contains a private key with the
* given <code>alias</code>; <code>false</code> otherwise.
@@ -65,7 +65,7 @@ public interface IPrivateKeyring
/**
* Returns the private key with the given <code>alias</code>.
- *
+ *
* @param alias The alias of the private key to find.
* @param password The password of the private key.
* @return The private, or secret, key if one is found; <code>null</code> if
@@ -78,7 +78,7 @@ public interface IPrivateKeyring
/**
* Adds a private key to this keyring.
- *
+ *
* @param alias The alias of the private key.
* @param key The private key.
* @param password The password used to protect this private key.
@@ -88,7 +88,7 @@ public interface IPrivateKeyring
/**
* Checks if this keyring contains a public key with the given
* <code>alias</code>.
- *
+ *
* @param alias The alias to test.
* @return <code>true</code> if this keyring contains a public key entry
* with the given <code>alias</code>; <code>false</code>
@@ -99,7 +99,7 @@ public interface IPrivateKeyring
/**
* Returns the public key with the given <code>alias</code>, or
* <code>null</code> if there is no such entry.
- *
+ *
* @param alias The alias of the public key to find.
* @return The public key; or <code>null</code> if none were found.
*/
@@ -107,7 +107,7 @@ public interface IPrivateKeyring
/**
* Sets a public key entry.
- *
+ *
* @param alias The alias for this public key.
* @param key The public key.
*/
@@ -116,7 +116,7 @@ public interface IPrivateKeyring
/**
* Checks if this keyring contains a certificate path with the given
* <code>alias</code>.
- *
+ *
* @param alias The alias to check.
* @return <code>true</code> if this keyring contains a certificate path
* with the given <code>alias</code>; <code>false</code>
@@ -127,7 +127,7 @@ public interface IPrivateKeyring
/**
* Returns the certificate path with the given <code>alias</code>, or
* <code>null</code> if there is no such entry.
- *
+ *
* @param alias The alias of the certificate path to find.
* @return The certificate path for the designated <code>alias</code>; or
* <code>null</code> if none were found.
@@ -136,7 +136,7 @@ public interface IPrivateKeyring
/**
* Sets a certificate path entry.
- *
+ *
* @param alias The alias for this certificate path.
* @param path The certificate path.
*/
diff --git a/gnu/javax/crypto/keyring/IPublicKeyring.java b/gnu/javax/crypto/keyring/IPublicKeyring.java
index efe568f18..d723f5ae9 100644
--- a/gnu/javax/crypto/keyring/IPublicKeyring.java
+++ b/gnu/javax/crypto/keyring/IPublicKeyring.java
@@ -1,4 +1,4 @@
-/* IPublicKeyring.java --
+/* IPublicKeyring.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -43,7 +43,7 @@ import java.security.cert.Certificate;
/**
* An interface for keyrings that contain trusted (by the owner) public
* credentials (incl. certificates).
- *
+ *
* @see IKeyring
*/
public interface IPublicKeyring
@@ -52,7 +52,7 @@ public interface IPublicKeyring
/**
* Tests if this keyring contains a certificate entry with the specified
* <code>alias</code>.
- *
+ *
* @param alias The alias of the certificate to check.
* @return <code>true</code> if this keyring contains a certificate entry
* that has the given <code>alias</code>; <code>false</code>
@@ -63,7 +63,7 @@ public interface IPublicKeyring
/**
* Returns a certificate that has the given <code>alias</code>, or
* <code>null</code> if this keyring has no such entry.
- *
+ *
* @param alias The alias of the certificate to find.
* @return The certificate with the designated <code>alias</code>, or
* <code>null</code> if none found.
@@ -74,7 +74,7 @@ public interface IPublicKeyring
* Adds a certificate in this keyring, with the given <code>alias</code>.
* <p>
* What happens if there is already a certificate entry with this alias?
- *
+ *
* @param alias The alias of this certificate entry.
* @param cert The certificate.
*/
diff --git a/gnu/javax/crypto/keyring/MalformedKeyringException.java b/gnu/javax/crypto/keyring/MalformedKeyringException.java
index 0dab3a764..f6b9d189b 100644
--- a/gnu/javax/crypto/keyring/MalformedKeyringException.java
+++ b/gnu/javax/crypto/keyring/MalformedKeyringException.java
@@ -1,4 +1,4 @@
-/* MalformedKeyringException.java --
+/* MalformedKeyringException.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/keyring/MaskableEnvelopeEntry.java b/gnu/javax/crypto/keyring/MaskableEnvelopeEntry.java
index 5206a5e07..58254a437 100644
--- a/gnu/javax/crypto/keyring/MaskableEnvelopeEntry.java
+++ b/gnu/javax/crypto/keyring/MaskableEnvelopeEntry.java
@@ -1,4 +1,4 @@
-/* MaskableEnvelopeEntry.java --
+/* MaskableEnvelopeEntry.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -64,7 +64,7 @@ public abstract class MaskableEnvelopeEntry
/**
* Sets the masked state to the specified value.
- *
+ *
* @param masked The new masked state.
*/
protected final void setMasked(boolean masked)
@@ -75,7 +75,7 @@ public abstract class MaskableEnvelopeEntry
/**
* Gets the masked state of this object. Certain operations on this object
* will fail if it is masked.
- *
+ *
* @return The current masked state.
*/
public boolean isMasked()
diff --git a/gnu/javax/crypto/keyring/MeteredInputStream.java b/gnu/javax/crypto/keyring/MeteredInputStream.java
index 330e4b20f..65f263359 100644
--- a/gnu/javax/crypto/keyring/MeteredInputStream.java
+++ b/gnu/javax/crypto/keyring/MeteredInputStream.java
@@ -1,4 +1,4 @@
-/* MeteredInputStream.java --
+/* MeteredInputStream.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -59,7 +59,7 @@ final class MeteredInputStream
/**
* Tests if the number of bytes read has reached the limit.
- *
+ *
* @return True if the limit has been reached.
*/
public boolean limitReached()
diff --git a/gnu/javax/crypto/keyring/PasswordAuthenticatedEntry.java b/gnu/javax/crypto/keyring/PasswordAuthenticatedEntry.java
index be10029c8..d67300442 100644
--- a/gnu/javax/crypto/keyring/PasswordAuthenticatedEntry.java
+++ b/gnu/javax/crypto/keyring/PasswordAuthenticatedEntry.java
@@ -1,4 +1,4 @@
-/* PasswordAuthenticatedEntry.java --
+/* PasswordAuthenticatedEntry.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/keyring/PasswordEncryptedEntry.java b/gnu/javax/crypto/keyring/PasswordEncryptedEntry.java
index 00031cbf1..0fa7431a8 100644
--- a/gnu/javax/crypto/keyring/PasswordEncryptedEntry.java
+++ b/gnu/javax/crypto/keyring/PasswordEncryptedEntry.java
@@ -1,4 +1,4 @@
-/* PasswordEncryptedEntry.java --
+/* PasswordEncryptedEntry.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/keyring/PasswordProtectedEntry.java b/gnu/javax/crypto/keyring/PasswordProtectedEntry.java
index 5eff63792..a95f2e4a4 100644
--- a/gnu/javax/crypto/keyring/PasswordProtectedEntry.java
+++ b/gnu/javax/crypto/keyring/PasswordProtectedEntry.java
@@ -1,4 +1,4 @@
-/* PasswordProtectedEntry.java --
+/* PasswordProtectedEntry.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -48,7 +48,7 @@ public interface PasswordProtectedEntry
/**
* Encodes this entry, protected by a password.
- *
+ *
* @param out The output stream to encode to.
* @param password The password.
* @throws IOException If an I/O error occurs.
diff --git a/gnu/javax/crypto/keyring/PrimitiveEntry.java b/gnu/javax/crypto/keyring/PrimitiveEntry.java
index 194fe9eee..8993de716 100644
--- a/gnu/javax/crypto/keyring/PrimitiveEntry.java
+++ b/gnu/javax/crypto/keyring/PrimitiveEntry.java
@@ -1,4 +1,4 @@
-/* PrimitiveEntry.java --
+/* PrimitiveEntry.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -70,7 +70,7 @@ public abstract class PrimitiveEntry
/**
* Returns the alias of this primitive entry.
- *
+ *
* @return The alias.
*/
public String getAlias()
@@ -80,7 +80,7 @@ public abstract class PrimitiveEntry
/**
* Returns the creation date of this primitive entry.
- *
+ *
* @return The creation date.
*/
public Date getCreationDate()
diff --git a/gnu/javax/crypto/keyring/PrivateKeyEntry.java b/gnu/javax/crypto/keyring/PrivateKeyEntry.java
index 23244afee..b2637316e 100644
--- a/gnu/javax/crypto/keyring/PrivateKeyEntry.java
+++ b/gnu/javax/crypto/keyring/PrivateKeyEntry.java
@@ -1,4 +1,4 @@
-/* PrivateKeyEntry.java --
+/* PrivateKeyEntry.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -65,7 +65,7 @@ public final class PrivateKeyEntry
/**
* Creates a new key entry.
- *
+ *
* @param key The key.
* @param creationDate The entry creation date.
* @param properties The entry properties.
@@ -143,7 +143,7 @@ public final class PrivateKeyEntry
/**
* Returns this entry's key.
- *
+ *
* @return The key.
*/
public Key getKey()
diff --git a/gnu/javax/crypto/keyring/Properties.java b/gnu/javax/crypto/keyring/Properties.java
index b833a74ae..f25c82e36 100644
--- a/gnu/javax/crypto/keyring/Properties.java
+++ b/gnu/javax/crypto/keyring/Properties.java
@@ -1,4 +1,4 @@
-/* Properties.java --
+/* Properties.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -74,7 +74,7 @@ public class Properties
/**
* Creates a copy of this properties object.
- *
+ *
* @return The copy.
*/
public Object clone()
@@ -86,7 +86,7 @@ public class Properties
/**
* Tests if this object contains a given property name.
- *
+ *
* @param key The key to test.
* @return True if this object contains the given key.
*/
@@ -99,7 +99,7 @@ public class Properties
/**
* Tests if this object contains a given property value.
- *
+ *
* @param value The value to test.
* @return True if this object contains the given value.
*/
@@ -112,7 +112,7 @@ public class Properties
/**
* Adds a new property to this object.
- *
+ *
* @param key The key, which can neither be null nor empty.
* @param value The value, which cannot be null.
* @return The old value mapped by the key, if any.
@@ -129,7 +129,7 @@ public class Properties
/**
* Returns the value mapped by the given key, or null if there is no such
* mapping.
- *
+ *
* @param key
*/
public String get(String key)
@@ -141,7 +141,7 @@ public class Properties
/**
* Removes a key and its value from this object.
- *
+ *
* @param key The key of the property to remove.
* @return The old value mapped by the key, if any.
*/
@@ -154,7 +154,7 @@ public class Properties
/**
* Decodes a set of properties from the given input stream.
- *
+ *
* @param in The input stream.
* @throws IOException If an I/O error occurs.
*/
@@ -173,7 +173,7 @@ public class Properties
/**
* Encodes this set of properties to the given output stream.
- *
+ *
* @param out The output stream to encode to.
* @throws IOException If an I/O error occurs.
*/
diff --git a/gnu/javax/crypto/keyring/PublicKeyEntry.java b/gnu/javax/crypto/keyring/PublicKeyEntry.java
index 3e7f54d3e..837706d19 100644
--- a/gnu/javax/crypto/keyring/PublicKeyEntry.java
+++ b/gnu/javax/crypto/keyring/PublicKeyEntry.java
@@ -1,4 +1,4 @@
-/* PublicKeyEntry.java --
+/* PublicKeyEntry.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -123,7 +123,7 @@ public final class PublicKeyEntry
/**
* Returns the public key.
- *
+ *
* @return The public key.
*/
public PublicKey getKey()
diff --git a/gnu/javax/crypto/kwa/BaseKeyWrappingAlgorithm.java b/gnu/javax/crypto/kwa/BaseKeyWrappingAlgorithm.java
index 206e01d13..80b114a02 100644
--- a/gnu/javax/crypto/kwa/BaseKeyWrappingAlgorithm.java
+++ b/gnu/javax/crypto/kwa/BaseKeyWrappingAlgorithm.java
@@ -60,7 +60,7 @@ public abstract class BaseKeyWrappingAlgorithm
/**
* Protected constructor.
- *
+ *
* @param name the key wrapping algorithm canonical name.
*/
protected BaseKeyWrappingAlgorithm(String name)
diff --git a/gnu/javax/crypto/kwa/IKeyWrappingAlgorithm.java b/gnu/javax/crypto/kwa/IKeyWrappingAlgorithm.java
index d9c2bed14..271ec5c1b 100644
--- a/gnu/javax/crypto/kwa/IKeyWrappingAlgorithm.java
+++ b/gnu/javax/crypto/kwa/IKeyWrappingAlgorithm.java
@@ -71,7 +71,7 @@ public interface IKeyWrappingAlgorithm
/**
* Returns the canonical name of this Key Wrapping Algorithm.
- *
+ *
* @return the canonical name of this Key Wrapping Algorithm.
*/
String name();
@@ -79,7 +79,7 @@ public interface IKeyWrappingAlgorithm
/**
* Initializes this instance with the designated algorithm specific
* attributes.
- *
+ *
* @param attributes a map of name-to-value pairs the Key Wrapping Algorithm
* must use for its setup.
* @throws InvalidKeyException if an exception is encountered while seting up
@@ -89,7 +89,7 @@ public interface IKeyWrappingAlgorithm
/**
* Wraps the designated plain text bytes.
- *
+ *
* @param in the input byte array containing the plain text.
* @param inOffset the offset into <code>in</code> where the first byte of
* the plain text (key material) to wrap is located.
@@ -110,7 +110,7 @@ public interface IKeyWrappingAlgorithm
/**
* Wraps the designated plain text bytes.
- *
+ *
* @param in the input byte array containing the plain text.
* @param inOffset the offset into <code>in</code> where the first byte of
* the plain text (key material) to wrap is located.
@@ -121,7 +121,7 @@ public interface IKeyWrappingAlgorithm
/**
* Unwraps the designated cipher text bytes.
- *
+ *
* @param in the input byte array containing the cipher text.
* @param inOffset the offset into <code>in</code> where the first byte of
* the cipher text (already wrapped key material) to unwrap is
@@ -145,7 +145,7 @@ public interface IKeyWrappingAlgorithm
/**
* Unwraps the designated cipher text bytes.
- *
+ *
* @param in the input byte array containing the cipher text.
* @param inOffset the offset into <code>in</code> where the first byte of
* the cipher text (already wrapped key material) to unwrap is
diff --git a/gnu/javax/crypto/kwa/KeyWrappingAlgorithmFactory.java b/gnu/javax/crypto/kwa/KeyWrappingAlgorithmFactory.java
index 6f6cd1219..abd208c07 100644
--- a/gnu/javax/crypto/kwa/KeyWrappingAlgorithmFactory.java
+++ b/gnu/javax/crypto/kwa/KeyWrappingAlgorithmFactory.java
@@ -51,7 +51,7 @@ public class KeyWrappingAlgorithmFactory
{
/** Names of Key Wrapping Algorihms cached for speed. */
private static Set names;
-
+
/** Trivial constructor to enforce Singleton pattern. */
private KeyWrappingAlgorithmFactory()
{
@@ -60,7 +60,7 @@ public class KeyWrappingAlgorithmFactory
/**
* Returns an instance of a key-wrapping algorithm given its name.
- *
+ *
* @param name the case-insensitive name of the key-wrapping algorithm.
* @return an instance of the designated key-wrapping algorithm, or
* <code>null</code> if none was found.
@@ -88,7 +88,7 @@ public class KeyWrappingAlgorithmFactory
/**
* Returns a {@link Set} of key wrapping algorithm names supported by this
* <i>Factory</i>.
- *
+ *
* @return a {@link Set} of key wrapping algorithm names (Strings).
*/
public static synchronized final Set getNames()
diff --git a/gnu/javax/crypto/kwa/TripleDESKeyWrap.java b/gnu/javax/crypto/kwa/TripleDESKeyWrap.java
index 71562bd75..28b16cf31 100644
--- a/gnu/javax/crypto/kwa/TripleDESKeyWrap.java
+++ b/gnu/javax/crypto/kwa/TripleDESKeyWrap.java
@@ -124,7 +124,7 @@ public class TripleDESKeyWrap
}
else
System.arraycopy(in, inOffset, CEK, 0, 24);
-
+
// TODO: check for the following:
// However, a Two-key Triple-DES key MUST NOT be used to wrap a Three-
// key Triple-DES key that is comprised of three unique DES keys.
@@ -276,10 +276,10 @@ public class TripleDESKeyWrap
// 9. Use CEK as a Triple-DES key.
return CEK;
}
-
+
/**
* Fills the designated byte array with random data.
- *
+ *
* @param buffer the byte array to fill with random data.
*/
private void nextRandomBytes(byte[] buffer)
diff --git a/gnu/javax/crypto/mac/BaseMac.java b/gnu/javax/crypto/mac/BaseMac.java
index 16922130f..4c524e905 100644
--- a/gnu/javax/crypto/mac/BaseMac.java
+++ b/gnu/javax/crypto/mac/BaseMac.java
@@ -1,4 +1,4 @@
-/* BaseMac.java --
+/* BaseMac.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -59,7 +59,7 @@ public abstract class BaseMac
/**
* Trivial constructor for use by concrete subclasses.
- *
+ *
* @param name the canonical name of this instance.
*/
protected BaseMac(String name)
@@ -71,7 +71,7 @@ public abstract class BaseMac
/**
* Trivial constructor for use by concrete subclasses.
- *
+ *
* @param name the canonical name of this instance.
* @param underlyingHash the underlying message digest algorithm instance.
*/
diff --git a/gnu/javax/crypto/mac/HMac.java b/gnu/javax/crypto/mac/HMac.java
index f0e588d18..ae2cd3ce2 100644
--- a/gnu/javax/crypto/mac/HMac.java
+++ b/gnu/javax/crypto/mac/HMac.java
@@ -1,4 +1,4 @@
-/* HMac.java --
+/* HMac.java --
Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/mac/HMacFactory.java b/gnu/javax/crypto/mac/HMacFactory.java
index bc70e8b66..0afd8c6ac 100644
--- a/gnu/javax/crypto/mac/HMacFactory.java
+++ b/gnu/javax/crypto/mac/HMacFactory.java
@@ -1,4 +1,4 @@
-/* HMacFactory.java --
+/* HMacFactory.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -63,7 +63,7 @@ public class HMacFactory
* Return an instance of a <i>HMAC</i> algorithm given the name of its
* underlying hash function, prefixed with the literal defined in
* {@link Registry#HMAC_NAME_PREFIX}.
- *
+ *
* @param name the fully qualified name of the underlying algorithm: composed
* as the concatenation of a literal prefix (see
* {@link Registry#HMAC_NAME_PREFIX}) and the name of the underlying
@@ -96,7 +96,7 @@ public class HMacFactory
* Returns a {@link java.util.Set} of names of <i>HMAC</i> algorithms
* supported by this <i>Factory</i>.
* </p>
- *
+ *
* @return a {@link java.util.Set} of HMAC algorithm names (Strings).
*/
public static final Set getNames()
diff --git a/gnu/javax/crypto/mac/IMac.java b/gnu/javax/crypto/mac/IMac.java
index a9da9eefb..a9582564d 100644
--- a/gnu/javax/crypto/mac/IMac.java
+++ b/gnu/javax/crypto/mac/IMac.java
@@ -1,4 +1,4 @@
-/* IMac.java --
+/* IMac.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -107,14 +107,14 @@ public interface IMac
/**
* Returns the canonical name of this algorithm.
- *
+ *
* @return the canonical name of this algorithm.
*/
String name();
/**
* Returns the output length in bytes of this <i>MAC</i> algorithm.
- *
+ *
* @return the output length in bytes of this <i>MAC</i> algorithm.
*/
int macSize();
@@ -122,7 +122,7 @@ public interface IMac
/**
* Initialises the algorithm with designated attributes. Permissible names and
* values are described in the class documentation above.
- *
+ *
* @param attributes a set of name-value pairs that describe the desired
* future instance behaviour.
* @exception InvalidKeyException if the key data is invalid.
@@ -133,7 +133,7 @@ public interface IMac
/**
* Continues a <i>MAC</i> operation using the input byte.
- *
+ *
* @param b the input byte to digest.
*/
void update(byte b);
@@ -142,7 +142,7 @@ public interface IMac
* Continues a <i>MAC</i> operation, by filling the buffer, processing data
* in the algorithm's MAC_SIZE-bit block(s), updating the context and count,
* and buffering the remaining bytes in buffer for the next operation.
- *
+ *
* @param in the input block.
* @param offset start of meaningful bytes in input block.
* @param length number of bytes, in input block, to consider.
@@ -152,7 +152,7 @@ public interface IMac
/**
* Completes the <i>MAC</i> by performing final operations such as padding
* and resetting the instance.
- *
+ *
* @return the array of bytes representing the <i>MAC</i> value.
*/
byte[] digest();
@@ -166,7 +166,7 @@ public interface IMac
/**
* A basic test. Ensures that the MAC of a pre-determined message is equal to
* a known pre-computed value.
- *
+ *
* @return <code>true</code> if the implementation passes a basic self-test.
* Returns <code>false</code> otherwise.
*/
@@ -174,7 +174,7 @@ public interface IMac
/**
* Returns a clone copy of this instance.
- *
+ *
* @return a clone copy of this instance.
*/
Object clone() throws CloneNotSupportedException;
diff --git a/gnu/javax/crypto/mac/MacFactory.java b/gnu/javax/crypto/mac/MacFactory.java
index 5d4a56182..5e3b50f7f 100644
--- a/gnu/javax/crypto/mac/MacFactory.java
+++ b/gnu/javax/crypto/mac/MacFactory.java
@@ -1,4 +1,4 @@
-/* MacFactory.java --
+/* MacFactory.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -64,7 +64,7 @@ public class MacFactory
/**
* Returns an instance of a <i>MAC</i> algorithm given its name.
- *
+ *
* @param name the name of the MAC algorithm.
* @return an instance of the <i>MAC</i> algorithm, or <code>null</code> if
* none can be constructed.
@@ -105,7 +105,7 @@ public class MacFactory
/**
* Returns a {@link Set} of names of <i>MAC</i> algorithms supported by this
* <i>Factory</i>.
- *
+ *
* @return a {@link Set} of MAC names (Strings).
*/
public static final Set getNames()
diff --git a/gnu/javax/crypto/mac/MacInputStream.java b/gnu/javax/crypto/mac/MacInputStream.java
index e734b1bbb..7ea808aa9 100644
--- a/gnu/javax/crypto/mac/MacInputStream.java
+++ b/gnu/javax/crypto/mac/MacInputStream.java
@@ -1,4 +1,4 @@
-/* MacInputStream.java --
+/* MacInputStream.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -58,7 +58,7 @@ public class MacInputStream
* Creates a new MacInputStream. The stream is initially set to digest data
* written, the <i>mac</i> argument must have already been initialized, and
* the <i>mac</i> argument is <b>not</b> cloned.
- *
+ *
* @param in The underlying input stream.
* @param mac The mac instance to use.
*/
@@ -73,7 +73,7 @@ public class MacInputStream
/**
* Returns the MAC this stream is updating.
- *
+ *
* @return The MAC.
*/
public IMac getMac()
@@ -84,7 +84,7 @@ public class MacInputStream
/**
* Sets the MAC this stream is updating, which must have already been
* initialized. The argument is not cloned by this method.
- *
+ *
* @param mac The new MAC.
* @throws NullPointerException If the argument is null.
*/
@@ -98,7 +98,7 @@ public class MacInputStream
/**
* Turns the digesting state on or off. When off, the MAC will not be updated
* when data is written to the stream.
- *
+ *
* @param flag The new digesting state.
*/
public void on(boolean flag)
diff --git a/gnu/javax/crypto/mac/MacOutputStream.java b/gnu/javax/crypto/mac/MacOutputStream.java
index 739a78497..2aa352d75 100644
--- a/gnu/javax/crypto/mac/MacOutputStream.java
+++ b/gnu/javax/crypto/mac/MacOutputStream.java
@@ -1,4 +1,4 @@
-/* MacOutputStream.java --
+/* MacOutputStream.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -59,7 +59,7 @@ public class MacOutputStream
* to digest data written, the <code>mac</code> argument must have already
* been initialized, and the <code>mac</code> argument is <b>not</b>
* cloned.
- *
+ *
* @param out The underlying output stream.
* @param mac The mac instance to use.
*/
@@ -74,7 +74,7 @@ public class MacOutputStream
/**
* Returns the MAC this stream is updating.
- *
+ *
* @return The MAC.
*/
public IMac getMac()
@@ -85,7 +85,7 @@ public class MacOutputStream
/**
* Sets the MAC this stream is updating, which must have already been
* initialized. The argument is not cloned by this method.
- *
+ *
* @param mac The non-null new MAC.
* @throws NullPointerException If the argument is null.
*/
@@ -99,7 +99,7 @@ public class MacOutputStream
/**
* Turns the digesting state on or off. When off, the MAC will not be updated
* when data is written to the stream.
- *
+ *
* @param flag The new digesting state.
*/
public void on(boolean flag)
diff --git a/gnu/javax/crypto/mac/OMAC.java b/gnu/javax/crypto/mac/OMAC.java
index cd753acaf..6758b314f 100644
--- a/gnu/javax/crypto/mac/OMAC.java
+++ b/gnu/javax/crypto/mac/OMAC.java
@@ -1,4 +1,4 @@
-/* OMAC.java --
+/* OMAC.java --
Copyright (C) 2004, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/mac/TMMH16.java b/gnu/javax/crypto/mac/TMMH16.java
index 0a7b4a6ca..3427317ab 100644
--- a/gnu/javax/crypto/mac/TMMH16.java
+++ b/gnu/javax/crypto/mac/TMMH16.java
@@ -1,4 +1,4 @@
-/* TMMH16.java --
+/* TMMH16.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -243,7 +243,7 @@ public class TMMH16
/**
* Similar to the same method with one argument, but uses the designated
* random number generator to compute needed keying material.
- *
+ *
* @param b the byte to process.
* @param prng the source of randomness to use.
*/
@@ -271,7 +271,7 @@ public class TMMH16
/**
* Similar to the same method with three arguments, but uses the designated
* random number generator to compute needed keying material.
- *
+ *
* @param b the byte array to process.
* @param offset the starting offset in <code>b</code> to start considering
* the bytes to process.
@@ -288,7 +288,7 @@ public class TMMH16
/**
* Similar to the same method with no arguments, but uses the designated
* random number generator to compute needed keying material.
- *
+ *
* @param prng the source of randomness to use.
* @return the final result of the algorithm.
*/
diff --git a/gnu/javax/crypto/mac/UHash32.java b/gnu/javax/crypto/mac/UHash32.java
index 737e9ce24..53513eda9 100644
--- a/gnu/javax/crypto/mac/UHash32.java
+++ b/gnu/javax/crypto/mac/UHash32.java
@@ -1,4 +1,4 @@
-/* UHash32.java --
+/* UHash32.java --
Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -632,7 +632,7 @@ public class UHash32
/**
* 5.3 POLY: Polynomial hash Function Name: POLY
- *
+ *
* @param wordbits positive integer divisible by 8: called with 64 or 128.
* @param maxwordrange positive integer less than 2**wordbits.
* @param k integer in the range 0 .. prime(wordbits) - 1.
diff --git a/gnu/javax/crypto/mac/UMac32.java b/gnu/javax/crypto/mac/UMac32.java
index 8e913db71..6f53424ea 100644
--- a/gnu/javax/crypto/mac/UMac32.java
+++ b/gnu/javax/crypto/mac/UMac32.java
@@ -1,4 +1,4 @@
-/* UMac32.java --
+/* UMac32.java --
Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -160,7 +160,7 @@ public class UMac32
/**
* Private constructor for cloning purposes.
- *
+ *
* @param that the instance to clone.
*/
private UMac32(UMac32 that)
@@ -218,7 +218,7 @@ public class UMac32
* (from an earlier invocation of this method). If a <i>Key Material</i> can
* be used, but no <i>Nonce Material</i> is defined or previously
* set/defined, then a default value of all-zeroes shall be used.
- *
+ *
* @param attributes one or both of required parameters.
* @throws InvalidKeyException the key material specified is not of the
* correct length.
diff --git a/gnu/javax/crypto/mode/BaseMode.java b/gnu/javax/crypto/mode/BaseMode.java
index 02e432290..831dd9664 100644
--- a/gnu/javax/crypto/mode/BaseMode.java
+++ b/gnu/javax/crypto/mode/BaseMode.java
@@ -1,4 +1,4 @@
-/* BaseMode.java --
+/* BaseMode.java --
Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -74,7 +74,7 @@ public abstract class BaseMode
/**
* Trivial constructor for use by concrete subclasses.
- *
+ *
* @param name the canonical name prefix of this mode.
* @param underlyingCipher the implementation of the underlying cipher.
* @param cipherBlockSize the block size, in bytes, in which to operate the
@@ -124,7 +124,7 @@ public abstract class BaseMode
* the same block size as its underlying block cipher. As mentioned earlier,
* the block size of the underlying block cipher itself is specified in one of
* the method(s) available in the factory class.
- *
+ *
* @return the default value, in bytes, of the mode's block size.
* @see ModeFactory
*/
@@ -136,7 +136,7 @@ public abstract class BaseMode
/**
* Returns the default value, in bytes, of the underlying block cipher key
* size.
- *
+ *
* @return the default value, in bytes, of the underlying cipher's key size.
*/
public int defaultKeySize()
@@ -152,7 +152,7 @@ public abstract class BaseMode
* is that currently configured for the underlying block cipher. Concrete
* implementations may override this behaviour to signal their ability to
* support other values.
- *
+ *
* @return an {@link Iterator} over the supported block sizes.
*/
public Iterator blockSizes()
@@ -166,7 +166,7 @@ public abstract class BaseMode
* Returns an {@link Iterator} over the supported underlying block cipher key
* sizes. Each element returned by this object is an instance of
* {@link Integer}.
- *
+ *
* @return an {@link Iterator} over the supported key sizes.
*/
public Iterator keySizes()
diff --git a/gnu/javax/crypto/mode/CBC.java b/gnu/javax/crypto/mode/CBC.java
index f3b3fb331..31c445f4e 100644
--- a/gnu/javax/crypto/mode/CBC.java
+++ b/gnu/javax/crypto/mode/CBC.java
@@ -1,4 +1,4 @@
-/* CBC.java --
+/* CBC.java --
Copyright (C) 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -45,7 +45,7 @@ import gnu.javax.crypto.cipher.IBlockCipher;
* The Cipher Block Chaining mode. This mode introduces feedback into the cipher
* by XORing the previous ciphertext block with the plaintext block before
* encipherment. That is, encrypting looks like this:
- *
+ *
* <pre>
* C<sub>i</sub> = E<sub>K</sub>(P<sub>i</sub>&circ; C<sub>i-1</sub>)
* </pre>
@@ -66,7 +66,7 @@ public class CBC
/**
* Package-private constructor for the factory class.
- *
+ *
* @param underlyingCipher The cipher implementation.
* @param cipherBlockSize The cipher's block size.
*/
diff --git a/gnu/javax/crypto/mode/CFB.java b/gnu/javax/crypto/mode/CFB.java
index 6fc006373..c5f06e11c 100644
--- a/gnu/javax/crypto/mode/CFB.java
+++ b/gnu/javax/crypto/mode/CFB.java
@@ -1,4 +1,4 @@
-/* CFB.java --
+/* CFB.java --
Copyright (C) 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -83,7 +83,7 @@ public class CFB
/**
* Package-private constructor for the factory class.
- *
+ *
* @param underlyingCipher The cipher implementation.
* @param cipherBlockSize The cipher's block size.
*/
@@ -94,7 +94,7 @@ public class CFB
/**
* Cloneing constructor.
- *
+ *
* @param that The instance being cloned.
*/
private CFB(CFB that)
diff --git a/gnu/javax/crypto/mode/CTR.java b/gnu/javax/crypto/mode/CTR.java
index 0c856b483..56ea58c25 100644
--- a/gnu/javax/crypto/mode/CTR.java
+++ b/gnu/javax/crypto/mode/CTR.java
@@ -1,4 +1,4 @@
-/* CTR.java --
+/* CTR.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -49,14 +49,14 @@ import java.util.Iterator;
* The implementation of the Counter Mode.
* <p>
* The algorithm steps are formally described as follows:
- *
+ *
* <pre>
* CTR Encryption: O[j] = E(K)(T[j]); for j = 1, 2...n;
* C[j] = P[j] &circ; O[j]; for j = 1, 2...n.
* CTR Decryption: O[j] = E(K)(T[j]); for j = 1, 2...n;
* P[j] = C[j] &circ; O[j]; for j = 1, 2...n.
* </pre>
- *
+ *
* <p>
* where <code>P</code> is the plaintext, <code>C</code> is the ciphertext,
* <code>E(K)</code> is the underlying block cipher encryption function
@@ -83,7 +83,7 @@ public class CTR
/**
* Trivial package-private constructor for use by the Factory class.
- *
+ *
* @param underlyingCipher the underlying cipher implementation.
* @param cipherBlockSize the underlying cipher block size to use.
*/
@@ -94,7 +94,7 @@ public class CTR
/**
* Private constructor for cloning purposes.
- *
+ *
* @param that the instance to clone.
*/
private CTR(CTR that)
diff --git a/gnu/javax/crypto/mode/EAX.java b/gnu/javax/crypto/mode/EAX.java
index 401616b9f..b3e4a6a4e 100644
--- a/gnu/javax/crypto/mode/EAX.java
+++ b/gnu/javax/crypto/mode/EAX.java
@@ -1,4 +1,4 @@
-/* EAX.java --
+/* EAX.java --
Copyright (C) 2004, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/mode/ECB.java b/gnu/javax/crypto/mode/ECB.java
index 665e526ca..7e02b0187 100644
--- a/gnu/javax/crypto/mode/ECB.java
+++ b/gnu/javax/crypto/mode/ECB.java
@@ -1,4 +1,4 @@
-/* ECB.java --
+/* ECB.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -75,7 +75,7 @@ public class ECB
{
/**
* Trivial package-private constructor for use by the Factory class.
- *
+ *
* @param underlyingCipher the underlying cipher implementation.
* @param cipherBlockSize the underlying cipher block size to use.
*/
@@ -86,7 +86,7 @@ public class ECB
/**
* Private constructor for cloning purposes.
- *
+ *
* @param that the mode to clone.
*/
private ECB(ECB that)
diff --git a/gnu/javax/crypto/mode/IAuthenticatedMode.java b/gnu/javax/crypto/mode/IAuthenticatedMode.java
index 703679dc0..51a5547f2 100644
--- a/gnu/javax/crypto/mode/IAuthenticatedMode.java
+++ b/gnu/javax/crypto/mode/IAuthenticatedMode.java
@@ -1,4 +1,4 @@
-/* IAuthenticatedMode.java --
+/* IAuthenticatedMode.java --
Copyright (C) 2004, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/mode/ICM.java b/gnu/javax/crypto/mode/ICM.java
index 833ddb18f..a4737bcdf 100644
--- a/gnu/javax/crypto/mode/ICM.java
+++ b/gnu/javax/crypto/mode/ICM.java
@@ -1,4 +1,4 @@
-/* ICM.java --
+/* ICM.java --
Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -103,7 +103,7 @@ public class ICM
/**
* Trivial package-private constructor for use by the Factory class.
- *
+ *
* @param underlyingCipher the underlying cipher implementation.
* @param cipherBlockSize the underlying cipher block size to use.
*/
@@ -114,7 +114,7 @@ public class ICM
/**
* Private constructor for cloning purposes.
- *
+ *
* @param that the instance to clone.
*/
private ICM(ICM that)
diff --git a/gnu/javax/crypto/mode/IMode.java b/gnu/javax/crypto/mode/IMode.java
index 30485117d..72c99ba73 100644
--- a/gnu/javax/crypto/mode/IMode.java
+++ b/gnu/javax/crypto/mode/IMode.java
@@ -1,4 +1,4 @@
-/* IMode.java --
+/* IMode.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -110,7 +110,7 @@ public interface IMode
* A convenience method. Effectively invokes the <code>encryptBlock()</code>
* or <code>decryptBlock()</code> method depending on the operational state
* of the instance.
- *
+ *
* @param in the plaintext.
* @param inOffset index of <code>in</code> from which to start considering
* data.
diff --git a/gnu/javax/crypto/mode/ModeFactory.java b/gnu/javax/crypto/mode/ModeFactory.java
index d1acdf4e5..c1108ea11 100644
--- a/gnu/javax/crypto/mode/ModeFactory.java
+++ b/gnu/javax/crypto/mode/ModeFactory.java
@@ -1,4 +1,4 @@
-/* ModeFactory.java --
+/* ModeFactory.java --
Copyright (C) 2001, 2002, 2004, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -65,7 +65,7 @@ public class ModeFactory
/**
* Returns an instance of a block cipher mode of operations given its name and
* characteristics of the underlying block cipher.
- *
+ *
* @param mode the case-insensitive name of the mode of operations.
* @param cipher the case-insensitive name of the block cipher.
* @param cipherBlockSize the block size, in bytes, of the underlying cipher.
@@ -126,7 +126,7 @@ public class ModeFactory
/**
* Returns a {@link Set} of names of mode supported by this <i>Factory</i>.
- *
+ *
* @return a {@link Set} of mode names (Strings).
*/
public static final Set getNames()
diff --git a/gnu/javax/crypto/mode/OFB.java b/gnu/javax/crypto/mode/OFB.java
index c8b6d7e97..087f99132 100644
--- a/gnu/javax/crypto/mode/OFB.java
+++ b/gnu/javax/crypto/mode/OFB.java
@@ -1,4 +1,4 @@
-/* OFB.java --
+/* OFB.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -125,7 +125,7 @@ public class OFB
/**
* Trivial package-private constructor for use by the Factory class.
- *
+ *
* @param underlyingCipher the underlying cipher implementation.
* @param cipherBlockSize the underlying cipher block size to use.
*/
@@ -136,7 +136,7 @@ public class OFB
/**
* Private constructor for cloning purposes.
- *
+ *
* @param that the mode to clone.
*/
private OFB(OFB that)
diff --git a/gnu/javax/crypto/pad/BasePad.java b/gnu/javax/crypto/pad/BasePad.java
index adc2c9bbc..feeaca2f0 100644
--- a/gnu/javax/crypto/pad/BasePad.java
+++ b/gnu/javax/crypto/pad/BasePad.java
@@ -1,4 +1,4 @@
-/* BasePad.java --
+/* BasePad.java --
Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -94,7 +94,7 @@ public abstract class BasePad
* an {@link UnsupportedOperationException}. Concrete padding algorithms MUST
* override this method if they wish to offer an initialisation method that
* allows for other than the padding block size parameter to be specified.
- *
+ *
* @param attributes a set of name-value pairs that describes the desired
* future behaviour of this instance.
* @exception IllegalStateException if the instance is already initialised.
@@ -113,7 +113,7 @@ public abstract class BasePad
/**
* A default implementation of a correctness test that exercises the padder
* implementation, using block sizes varying from 2 to 256 bytes.
- *
+ *
* @return <code>true</code> if the concrete implementation correctly unpads
* what it pads for all tested block sizes. Returns <code>false</code>
* if the test fails for any block size.
@@ -132,7 +132,7 @@ public abstract class BasePad
* <p>
* The code ensures that the implementation is capable of unpadding what it
* pads.
- *
+ *
* @param size the block size to test.
* @param buffer a work buffer. It is exposed as an argument for this method
* to reduce un-necessary object allocations.
diff --git a/gnu/javax/crypto/pad/IPad.java b/gnu/javax/crypto/pad/IPad.java
index 0e3db7db1..f5160e078 100644
--- a/gnu/javax/crypto/pad/IPad.java
+++ b/gnu/javax/crypto/pad/IPad.java
@@ -1,4 +1,4 @@
-/* IPad.java --
+/* IPad.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -53,7 +53,7 @@ public interface IPad
{
/**
* Property name of the block size in which to operate the padding algorithm.
- * The value associated with this property name is taken to be a positive
+ * The value associated with this property name is taken to be a positive
* {@link Integer} greater than zero.
*/
String PADDING_BLOCK_SIZE = "gnu.crypto.pad.block.size";
@@ -63,7 +63,7 @@ public interface IPad
/**
* Initialises the padding scheme with a designated block size.
- *
+ *
* @param bs the designated block size.
* @exception IllegalStateException if the instance is already initialised.
* @exception IllegalArgumentException if the block size value is invalid.
@@ -75,7 +75,7 @@ public interface IPad
* recognisable by all concrete implementations are described in the class
* documentation above. Other algorithm-specific attributes MUST be documented
* in the implementation class of that padding algorithm.
- *
+ *
* @param attributes a set of name-value pairs that describes the desired
* future behaviour of this instance.
* @exception IllegalStateException if the instance is already initialised.
@@ -85,7 +85,7 @@ public interface IPad
/**
* Returns the byte sequence that should be appended to the designated input.
- *
+ *
* @param in the input buffer containing the bytes to pad.
* @param offset the starting index of meaningful data in <i>in</i>.
* @param length the number of meaningful bytes in <i>in</i>.
@@ -96,7 +96,7 @@ public interface IPad
/**
* Returns the number of bytes to discard from a designated input buffer.
- *
+ *
* @param in the input buffer containing the bytes to unpad.
* @param offset the starting index of meaningful data in <i>in</i>.
* @param length the number of meaningful bytes in <i>in</i>.
@@ -119,7 +119,7 @@ public interface IPad
/**
* A basic symmetric pad/unpad test.
- *
+ *
* @return <code>true</code> if the implementation passes a basic symmetric
* self-test. Returns <code>false</code> otherwise.
*/
diff --git a/gnu/javax/crypto/pad/PKCS1_V1_5.java b/gnu/javax/crypto/pad/PKCS1_V1_5.java
index 9ddc60989..e303264ae 100644
--- a/gnu/javax/crypto/pad/PKCS1_V1_5.java
+++ b/gnu/javax/crypto/pad/PKCS1_V1_5.java
@@ -1,4 +1,4 @@
-/* PKCS1_V1_5.java --
+/* PKCS1_V1_5.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -60,7 +60,7 @@ import java.util.logging.Logger;
* RSA Cryptography Specifications Version 2.1.<br>
* Jakob Jonsson and Burt Kaliski.</li>
* </ol>
- *
+ *
* @see EME_PKCS1_V1_5
*/
public class PKCS1_V1_5
diff --git a/gnu/javax/crypto/pad/PKCS7.java b/gnu/javax/crypto/pad/PKCS7.java
index 8fce5b8b0..9dd67fc81 100644
--- a/gnu/javax/crypto/pad/PKCS7.java
+++ b/gnu/javax/crypto/pad/PKCS7.java
@@ -1,4 +1,4 @@
-/* PKCS7.java --
+/* PKCS7.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -69,7 +69,7 @@ public final class PKCS7
/**
* Trivial package-private constructor for use by the <i>Factory</i> class.
- *
+ *
* @see PadFactory
*/
PKCS7()
diff --git a/gnu/javax/crypto/pad/PadFactory.java b/gnu/javax/crypto/pad/PadFactory.java
index eaa78112e..2df2029fa 100644
--- a/gnu/javax/crypto/pad/PadFactory.java
+++ b/gnu/javax/crypto/pad/PadFactory.java
@@ -1,4 +1,4 @@
-/* PadFactory.java --
+/* PadFactory.java --
Copyright (C) 2001, 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -61,7 +61,7 @@ public class PadFactory
/**
* Returns an instance of a padding algorithm given its name.
- *
+ *
* @param pad the case-insensitive name of the padding algorithm.
* @return an instance of the padding algorithm, operating with a given block
* size, or <code>null</code> if none found.
@@ -98,7 +98,7 @@ public class PadFactory
/**
* Returns a {@link Set} of names of padding algorithms supported by this
* <i>Factory</i>.
- *
+ *
* @return a {@link Set} of padding algorithm names (Strings).
*/
public static final Set getNames()
diff --git a/gnu/javax/crypto/pad/TBC.java b/gnu/javax/crypto/pad/TBC.java
index e5ff4b5dc..5cd177058 100644
--- a/gnu/javax/crypto/pad/TBC.java
+++ b/gnu/javax/crypto/pad/TBC.java
@@ -1,4 +1,4 @@
-/* TBC.java --
+/* TBC.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -68,7 +68,7 @@ public final class TBC
/**
* Trivial package-private constructor for use by the <i>Factory</i> class.
- *
+ *
* @see PadFactory
*/
TBC()
diff --git a/gnu/javax/crypto/pad/WrongPaddingException.java b/gnu/javax/crypto/pad/WrongPaddingException.java
index 090d021eb..d15723faf 100644
--- a/gnu/javax/crypto/pad/WrongPaddingException.java
+++ b/gnu/javax/crypto/pad/WrongPaddingException.java
@@ -1,4 +1,4 @@
-/* WrongPaddingException.java --
+/* WrongPaddingException.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/prng/ARCFour.java b/gnu/javax/crypto/prng/ARCFour.java
index b72652942..60464d5ba 100644
--- a/gnu/javax/crypto/prng/ARCFour.java
+++ b/gnu/javax/crypto/prng/ARCFour.java
@@ -1,4 +1,4 @@
-/* ARCFour.java --
+/* ARCFour.java --
Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/prng/CSPRNG.java b/gnu/javax/crypto/prng/CSPRNG.java
index 2cf75a966..ecea2f469 100644
--- a/gnu/javax/crypto/prng/CSPRNG.java
+++ b/gnu/javax/crypto/prng/CSPRNG.java
@@ -99,7 +99,7 @@ public class CSPRNG
* <li>An {@link Integer}, indicating the number of bytes to read.</li>
* <li>A {@link String}, indicating the path to the file.</li>
* </ol>
- *
+ *
* @see gnu.java.security.util.SimpleList
*/
public static final String FILE_SOURCES = "gnu.crypto.prng.pool.files";
@@ -268,16 +268,16 @@ public class CSPRNG
* An example of valid properties would be:
* <pre>
* gnu.crypto.csprng.blocking=true
- *
+ *
* gnu.crypto.csprng.file.1=75.0;0;256;/dev/random
* gnu.crypto.csprng.file.2=10.0;0;100;/home/user/file
- *
+ *
* gnu.crypto.csprng.url.1=5.0;0;256;http://www.random.org/cgi-bin/randbyte?nbytes=256
* gnu.crypto.csprng.url.2=0;256;256;http://slashdot.org/
- *
+ *
* gnu.crypto.csprng.program.1=0.5;0;10;last -n 50
* gnu.crypto.csprng.program.2=0.5;0;10;tcpdump -c 5
- *
+ *
* gnu.crypto.csprng.other.1=foo.bar.MyEntropySource
* gnu.crypto.csprng.other.2=com.company.OtherEntropySource
* </pre>
@@ -592,7 +592,7 @@ public class CSPRNG
* Add an array of bytes into the randomness pool. Note that this method will
* <i>not</i> increment the pool's quality counter (this can only be done via
* a source provided to the setup method).
- *
+ *
* @param buf The byte array.
* @param off The offset from whence to start reading bytes.
* @param len The number of bytes to add.
@@ -624,7 +624,7 @@ public class CSPRNG
* Add a single random byte to the randomness pool. Note that this method will
* <i>not</i> increment the pool's quality counter (this can only be done via
* a source provided to the setup method).
- *
+ *
* @param b The byte to add.
*/
public synchronized void addRandomByte(byte b)
diff --git a/gnu/javax/crypto/prng/ICMGenerator.java b/gnu/javax/crypto/prng/ICMGenerator.java
index d8205cfb4..a4df5b964 100644
--- a/gnu/javax/crypto/prng/ICMGenerator.java
+++ b/gnu/javax/crypto/prng/ICMGenerator.java
@@ -1,4 +1,4 @@
-/* ICMGenerator.java --
+/* ICMGenerator.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -269,8 +269,8 @@ public class ICMGenerator
}
catch (LimitReachedException impossible)
{
- throw (InternalError)
- new InternalError().initCause(impossible);
+ throw (InternalError)
+ new InternalError().initCause(impossible);
}
}
diff --git a/gnu/javax/crypto/prng/IPBE.java b/gnu/javax/crypto/prng/IPBE.java
index 66921d635..8138b7b9a 100644
--- a/gnu/javax/crypto/prng/IPBE.java
+++ b/gnu/javax/crypto/prng/IPBE.java
@@ -1,4 +1,4 @@
-/* IPBE.java --
+/* IPBE.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/prng/PBKDF2.java b/gnu/javax/crypto/prng/PBKDF2.java
index 0f91d4add..22fcd5504 100644
--- a/gnu/javax/crypto/prng/PBKDF2.java
+++ b/gnu/javax/crypto/prng/PBKDF2.java
@@ -1,4 +1,4 @@
-/* PBKDF2.java --
+/* PBKDF2.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -84,7 +84,7 @@ public class PBKDF2
/**
* Creates a new PBKDF2 object. The argument is the MAC that will serve as the
* pseudo-random function. The MAC does not need to be initialized.
- *
+ *
* @param mac The pseudo-random function.
*/
public PBKDF2(IMac mac)
diff --git a/gnu/javax/crypto/prng/PRNGFactory.java b/gnu/javax/crypto/prng/PRNGFactory.java
index ee75f8d8a..0a7c5e377 100644
--- a/gnu/javax/crypto/prng/PRNGFactory.java
+++ b/gnu/javax/crypto/prng/PRNGFactory.java
@@ -1,4 +1,4 @@
-/* PRNGFactory.java --
+/* PRNGFactory.java --
Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -62,7 +62,7 @@ public class PRNGFactory
/**
* Returns an instance of a padding algorithm given its name.
- *
+ *
* @param prng the case-insensitive name of the PRNG.
* @return an instance of the pseudo-random number generator.
* @exception InternalError if the implementation does not pass its self-
@@ -98,7 +98,7 @@ public class PRNGFactory
/**
* Returns a {@link Set} of names of padding algorithms supported by this
* <i>Factory</i>.
- *
+ *
* @return a {@link Set} of pseudo-random number generator algorithm names
* (Strings).
*/
diff --git a/gnu/javax/crypto/prng/UMacGenerator.java b/gnu/javax/crypto/prng/UMacGenerator.java
index 39c99f73a..1ee449223 100644
--- a/gnu/javax/crypto/prng/UMacGenerator.java
+++ b/gnu/javax/crypto/prng/UMacGenerator.java
@@ -1,4 +1,4 @@
-/* UMacGenerator.java --
+/* UMacGenerator.java --
Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/sasl/AuthInfo.java b/gnu/javax/crypto/sasl/AuthInfo.java
index 733d2f0bf..37c1e0852 100644
--- a/gnu/javax/crypto/sasl/AuthInfo.java
+++ b/gnu/javax/crypto/sasl/AuthInfo.java
@@ -1,4 +1,4 @@
-/* AuthInfo.java --
+/* AuthInfo.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -110,7 +110,7 @@ public class AuthInfo
* factories, one at a time, and attempts to return a new instance of the
* provider for the designated mechanism. It stops at the first factory
* returning a non-null provider.
- *
+ *
* @param mechanism the name of a SASL mechanism.
* @return an implementation that provides {@link IAuthInfoProvider} for that
* mechanism; or <code>null</code> if none found.
diff --git a/gnu/javax/crypto/sasl/AuthInfoProviderFactory.java b/gnu/javax/crypto/sasl/AuthInfoProviderFactory.java
index c4fc816dc..f881e6e11 100644
--- a/gnu/javax/crypto/sasl/AuthInfoProviderFactory.java
+++ b/gnu/javax/crypto/sasl/AuthInfoProviderFactory.java
@@ -1,4 +1,4 @@
-/* AuthInfoProviderFactory.java --
+/* AuthInfoProviderFactory.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/sasl/ClientFactory.java b/gnu/javax/crypto/sasl/ClientFactory.java
index 84acfcd14..30309d2c7 100644
--- a/gnu/javax/crypto/sasl/ClientFactory.java
+++ b/gnu/javax/crypto/sasl/ClientFactory.java
@@ -1,4 +1,4 @@
-/* ClientFactory.java --
+/* ClientFactory.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/sasl/ClientMechanism.java b/gnu/javax/crypto/sasl/ClientMechanism.java
index 7f8e9c120..5e0dcd096 100644
--- a/gnu/javax/crypto/sasl/ClientMechanism.java
+++ b/gnu/javax/crypto/sasl/ClientMechanism.java
@@ -1,4 +1,4 @@
-/* ClientMechanism.java --
+/* ClientMechanism.java --
Copyright (C) 2003, 2005, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -235,7 +235,7 @@ public abstract class ClientMechanism
/**
* Initialises the mechanism with designated attributes. Permissible names and
* values are mechanism specific.
- *
+ *
* @param attributes a set of name-value pairs that describes the desired
* future behaviour of this instance.
* @throws IllegalMechanismStateException if the instance is already
@@ -278,7 +278,7 @@ public abstract class ClientMechanism
/**
* Resets the mechanism instance for re-initialisation and use with other
* characteristics.
- *
+ *
* @throws SaslException if an exception occurs during the process.
*/
public void reset() throws SaslException
diff --git a/gnu/javax/crypto/sasl/ConfidentialityException.java b/gnu/javax/crypto/sasl/ConfidentialityException.java
index 62b685725..85bd2ae18 100644
--- a/gnu/javax/crypto/sasl/ConfidentialityException.java
+++ b/gnu/javax/crypto/sasl/ConfidentialityException.java
@@ -1,4 +1,4 @@
-/* ConfidentialityException.java --
+/* ConfidentialityException.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -60,7 +60,7 @@ public class ConfidentialityException
/**
* Constructs a new instance of <code>ConfidentialityException</code> with
* the specified detail message.
- *
+ *
* @param s the detail message.
*/
public ConfidentialityException(String s)
@@ -71,7 +71,7 @@ public class ConfidentialityException
/**
* Constructs a new instance of <code>ConfidentialityException</code> with a
* detailed message and a root exception.
- *
+ *
* @param s possibly null additional detail about the exception.
* @param x a possibly null root exception that caused this one.
*/
diff --git a/gnu/javax/crypto/sasl/IAuthInfoProvider.java b/gnu/javax/crypto/sasl/IAuthInfoProvider.java
index 60c50d5d4..88acc2d0a 100644
--- a/gnu/javax/crypto/sasl/IAuthInfoProvider.java
+++ b/gnu/javax/crypto/sasl/IAuthInfoProvider.java
@@ -1,4 +1,4 @@
-/* IAuthInfoProvider.java --
+/* IAuthInfoProvider.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -50,7 +50,7 @@ public interface IAuthInfoProvider
/**
* Activates (initialises) this provider instance. SHOULD be the first method
* invoked on the provider.
- *
+ *
* @param context a collection of name-value bindings describing the
* activation context.
* @throws AuthenticationException if an exception occurs during the
@@ -62,7 +62,7 @@ public interface IAuthInfoProvider
* Passivates (releases) this provider instance. SHOULD be the last method
* invoked on the provider. Once it is done, no other method may be invoked on
* the same instance before it is <i>activated</i> agains.
- *
+ *
* @throws AuthenticationException if an exception occurs during the
* operation.
*/
@@ -70,7 +70,7 @@ public interface IAuthInfoProvider
/**
* Checks if a user with a designated name is known to this provider.
- *
+ *
* @param userName the name of a user to check.
* @return <code>true</code> if the user with the designated name is known
* to this provider; <code>false</code> otherwise.
@@ -82,7 +82,7 @@ public interface IAuthInfoProvider
/**
* Returns a collection of information about a designated user. The contents
* of the returned map is provider-specific of name-to-value mappings.
- *
+ *
* @param userID a map of name-to-value bindings that fully describe a user.
* @return a collection of information about the designated user.
* @throws AuthenticationException if an exception occurs during the
@@ -92,7 +92,7 @@ public interface IAuthInfoProvider
/**
* Updates the credentials of a designated user.
- *
+ *
* @param userCredentials a map of name-to-value bindings that fully describe
* a user, including per new credentials.
* @throws AuthenticationException if an exception occurs during the
@@ -105,7 +105,7 @@ public interface IAuthInfoProvider
* credentials computed in more than one message digest algorithm. This method
* returns the set of name-to-value bindings describing the mode of the
* provider.
- *
+ *
* @param mode a unique identifier describing the operational mode.
* @return a collection of name-to-value bindings describing the designated
* mode.
diff --git a/gnu/javax/crypto/sasl/IAuthInfoProviderFactory.java b/gnu/javax/crypto/sasl/IAuthInfoProviderFactory.java
index b6dc775d8..2a0b5bfec 100644
--- a/gnu/javax/crypto/sasl/IAuthInfoProviderFactory.java
+++ b/gnu/javax/crypto/sasl/IAuthInfoProviderFactory.java
@@ -1,4 +1,4 @@
-/* IAuthInfoProviderFactory.java --
+/* IAuthInfoProviderFactory.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -46,7 +46,7 @@ public interface IAuthInfoProviderFactory
/**
* Returns an implementation of a provider for a designated mechanism capable
* of honouring {@link IAuthInfoProvider} requests.
- *
+ *
* @param mechanism the unique name of a mechanism.
* @return an implementation of {@link IAuthInfoProvider} for that mechanism
* or <code>null</code> if none found.
diff --git a/gnu/javax/crypto/sasl/IllegalMechanismStateException.java b/gnu/javax/crypto/sasl/IllegalMechanismStateException.java
index 547ac4103..fade7792c 100644
--- a/gnu/javax/crypto/sasl/IllegalMechanismStateException.java
+++ b/gnu/javax/crypto/sasl/IllegalMechanismStateException.java
@@ -1,4 +1,4 @@
-/* IllegalMechanismStateException.java --
+/* IllegalMechanismStateException.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -62,7 +62,7 @@ public class IllegalMechanismStateException
/**
* Constructs a new instance of <code>IllegalMechanismStateException</code>
* with the specified detail message.
- *
+ *
* @param detail the detail message.
*/
public IllegalMechanismStateException(String detail)
@@ -73,7 +73,7 @@ public class IllegalMechanismStateException
/**
* Constructs a new instance of <code>IllegalMechanismStateException</code>
* with the specified detail message, and cause.
- *
+ *
* @param detail the detail message.
* @param ex the original cause.
*/
diff --git a/gnu/javax/crypto/sasl/InputBuffer.java b/gnu/javax/crypto/sasl/InputBuffer.java
index d676a595d..f15205765 100644
--- a/gnu/javax/crypto/sasl/InputBuffer.java
+++ b/gnu/javax/crypto/sasl/InputBuffer.java
@@ -1,4 +1,4 @@
-/* InputBuffer.java --
+/* InputBuffer.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -69,7 +69,7 @@ public class InputBuffer
/**
* Constructs a SASL buffer given the buffer's encoded form, including its
* header bytes.
- *
+ *
* @param frame the encoded form, including the header bytes, of a SASL
* buffer.
* @throws SaslEncodingException if the buffer is malformed.
@@ -101,7 +101,7 @@ public class InputBuffer
* <p>
* Calls the method with the same name and three arguments as:
* <code>getInstance(raw, 0, raw.length)</code>.
- *
+ *
* @param raw the encoded form, excluding the header bytes, of a SASL buffer.
* @return a new instance of {@link InputBuffer}.
*/
@@ -113,7 +113,7 @@ public class InputBuffer
/**
* Returns an instance of a SASL buffer given the buffer's encoded contents,
* excluding the buffer's header bytes.
- *
+ *
* @param raw the encoded form, excluding the header bytes, of a SASL buffer.
* @param offset offset where to start using raw bytes from.
* @param len number of bytes to use.
@@ -128,7 +128,7 @@ public class InputBuffer
/**
* Converts two octets into the number that they represent.
- *
+ *
* @param b the two octets.
* @return the length.
*/
@@ -148,7 +148,7 @@ public class InputBuffer
/**
* Decodes a SASL scalar quantity, <code>count</code>-octet long, from the
* current buffer.
- *
+ *
* @param count the number of octets of this scalar quantity.
* @return a native representation of a SASL scalar (unsigned integer)
* quantity.
@@ -178,7 +178,7 @@ public class InputBuffer
/**
* Decodes a SASL OS from the current buffer.
- *
+ *
* @return a native representation of a SASL OS.
* @throws SaslEncodingException if an encoding exception occurs during the
* operation.
@@ -201,7 +201,7 @@ public class InputBuffer
/**
* Decodes a SASL EOS from the current buffer.
- *
+ *
* @return a native representation of a SASL EOS.
* @throws SaslEncodingException if an encoding exception occurs during the
* operation.
@@ -225,7 +225,7 @@ public class InputBuffer
/**
* Decodes a SASL MPI from the current buffer.
- *
+ *
* @return a native representation of a SASL MPI.
* @throws SaslEncodingException if an encoding exception occurs during the
* operation.
@@ -248,7 +248,7 @@ public class InputBuffer
/**
* Decodes a SASL Text from the current buffer.
- *
+ *
* @return a native representation of a SASL Text.
* @throws SaslEncodingException if an encoding exception occurs during the
* operation.
diff --git a/gnu/javax/crypto/sasl/IntegrityException.java b/gnu/javax/crypto/sasl/IntegrityException.java
index 9b793ce3e..ce1b359de 100644
--- a/gnu/javax/crypto/sasl/IntegrityException.java
+++ b/gnu/javax/crypto/sasl/IntegrityException.java
@@ -1,4 +1,4 @@
-/* IntegrityException.java --
+/* IntegrityException.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -61,7 +61,7 @@ public class IntegrityException
/**
* Constructs a new instance of <code>IntegrityException</code> with the
* specified detail message.
- *
+ *
* @param s the detail message.
*/
public IntegrityException(String s)
@@ -72,7 +72,7 @@ public class IntegrityException
/**
* Constructs a new instance of <code>IntegrityException</code> with a
* detailed message and a root exception.
- *
+ *
* @param s possibly null additional detail about the exception.
* @param x a possibly null root exception that caused this one.
*/
diff --git a/gnu/javax/crypto/sasl/NoSuchMechanismException.java b/gnu/javax/crypto/sasl/NoSuchMechanismException.java
index 5b16a788c..d22bff894 100644
--- a/gnu/javax/crypto/sasl/NoSuchMechanismException.java
+++ b/gnu/javax/crypto/sasl/NoSuchMechanismException.java
@@ -1,4 +1,4 @@
-/* NoSuchMechanismException.java --
+/* NoSuchMechanismException.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -51,7 +51,7 @@ public class NoSuchMechanismException
* Constructs a <code>NoSuchMechanismException</code> with the specified
* detail message. In the case of this exception, the detail message
* designates the offending mechanism name.
- *
+ *
* @param arg the detail message, which in this case is the offending
* mechanism name.
*/
diff --git a/gnu/javax/crypto/sasl/NoSuchUserException.java b/gnu/javax/crypto/sasl/NoSuchUserException.java
index 387339f60..447c7b919 100644
--- a/gnu/javax/crypto/sasl/NoSuchUserException.java
+++ b/gnu/javax/crypto/sasl/NoSuchUserException.java
@@ -1,4 +1,4 @@
-/* NoSuchUserException.java --
+/* NoSuchUserException.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -57,7 +57,7 @@ public class NoSuchUserException
* Constructs a <code>NoSuchUserException</code> with the specified detail
* message. In the case of this exception, the detail message designates the
* offending username.
- *
+ *
* @param arg the detail message, which in this case is the username.
*/
public NoSuchUserException(String arg)
diff --git a/gnu/javax/crypto/sasl/OutputBuffer.java b/gnu/javax/crypto/sasl/OutputBuffer.java
index 92e34dfbf..4bb3b0ec2 100644
--- a/gnu/javax/crypto/sasl/OutputBuffer.java
+++ b/gnu/javax/crypto/sasl/OutputBuffer.java
@@ -1,4 +1,4 @@
-/* OutputBuffer.java --
+/* OutputBuffer.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -75,7 +75,7 @@ public class OutputBuffer
/**
* Encodes a SASL scalar quantity, <code>count</code>-octet long, to the
* current buffer.
- *
+ *
* @param count number of octets to encode <code>b</code> with.
* @param b the scalar quantity.
* @throws SaslEncodingException if an encoding size constraint is violated.
@@ -94,7 +94,7 @@ public class OutputBuffer
/**
* Encodes a SASL OS to the current buffer.
- *
+ *
* @param b the OS element.
* @throws SaslEncodingException if an encoding size constraint is violated.
* @throws IOException if any other I/O exception occurs during the operation.
@@ -110,7 +110,7 @@ public class OutputBuffer
/**
* Encodes a SASL EOS to the current buffer.
- *
+ *
* @param b the EOS element.
* @throws SaslEncodingException if an encoding size constraint is violated.
* @throws IOException if any other I/O exception occurs during the operation.
@@ -127,7 +127,7 @@ public class OutputBuffer
/**
* Encodes a SASL MPI to the current buffer.
- *
+ *
* @param val the MPI element.
* @throws SaslEncodingException if an encoding size constraint is violated.
* @throws IOException if any other I/O exception occurs during the operation.
@@ -145,7 +145,7 @@ public class OutputBuffer
/**
* Encodes a SASL Text to the current buffer.
- *
+ *
* @param str the Text element.
* @throws SaslEncodingException if an encoding size constraint is violated.
* @throws SaslEncodingException if the UTF-8 encoding is not supported on
@@ -166,7 +166,7 @@ public class OutputBuffer
/**
* Returns the encoded form of the current buffer including the 4-byte length
* header.
- *
+ *
* @throws SaslEncodingException if an encoding size constraint is violated.
*/
public byte[] encode() throws SaslEncodingException
@@ -185,7 +185,7 @@ public class OutputBuffer
/**
* Returns the encoded form of the current buffer excluding the 4-byte length
* header.
- *
+ *
* @throws SaslEncodingException if an encoding size constraint is violated.
*/
public byte[] wrap() throws SaslEncodingException
diff --git a/gnu/javax/crypto/sasl/SaslEncodingException.java b/gnu/javax/crypto/sasl/SaslEncodingException.java
index f6a74641d..5836270ac 100644
--- a/gnu/javax/crypto/sasl/SaslEncodingException.java
+++ b/gnu/javax/crypto/sasl/SaslEncodingException.java
@@ -1,4 +1,4 @@
-/* SaslEncodingException.java --
+/* SaslEncodingException.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -56,7 +56,7 @@ public class SaslEncodingException
/**
* Constructs a <code>SaslEncodingException</code> with the specified detail
* message.
- *
+ *
* @param s the detail message.
*/
public SaslEncodingException(String s)
diff --git a/gnu/javax/crypto/sasl/SaslInputStream.java b/gnu/javax/crypto/sasl/SaslInputStream.java
index d127bf5ba..6a6c85751 100644
--- a/gnu/javax/crypto/sasl/SaslInputStream.java
+++ b/gnu/javax/crypto/sasl/SaslInputStream.java
@@ -1,4 +1,4 @@
-/* SaslInputStream.java --
+/* SaslInputStream.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -115,7 +115,7 @@ public class SaslInputStream
* the protocol driver's request for a single octet from the stream might;
* i.e. an invocation of this method, may result in an entire SASL buffer
* being read and processed before that single octet can be returned.
- *
+ *
* @return the next byte of data, or <code>-1</code> if the end of the
* stream is reached.
* @throws IOException if an I/O error occurs.
@@ -190,7 +190,7 @@ public class SaslInputStream
* driver's request for a single octet from the stream might result in an
* entire SASL buffer being read and processed before that single octet can be
* returned.
- *
+ *
* @param b the buffer into which the data is read.
* @param off the start offset in array <code>b</code> at which the data is
* wricodeen.
@@ -317,7 +317,7 @@ public class SaslInputStream
/**
* Reads a SASL buffer from the underlying source if at least 4 bytes are
* available.
- *
+ *
* @return the byte[] of decoded buffer contents, or null if the underlying
* source was exhausted.
* @throws IOException if an I/O exception occurs during the operation.
diff --git a/gnu/javax/crypto/sasl/SaslOutputStream.java b/gnu/javax/crypto/sasl/SaslOutputStream.java
index d21f1f37a..0de1ce850 100644
--- a/gnu/javax/crypto/sasl/SaslOutputStream.java
+++ b/gnu/javax/crypto/sasl/SaslOutputStream.java
@@ -1,4 +1,4 @@
-/* SaslOutputStream.java --
+/* SaslOutputStream.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/sasl/SaslUtil.java b/gnu/javax/crypto/sasl/SaslUtil.java
index 4b0b697fe..b17d9536e 100644
--- a/gnu/javax/crypto/sasl/SaslUtil.java
+++ b/gnu/javax/crypto/sasl/SaslUtil.java
@@ -1,4 +1,4 @@
-/* SaslUtil.java --
+/* SaslUtil.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/sasl/ServerFactory.java b/gnu/javax/crypto/sasl/ServerFactory.java
index 7aa379628..6df44c08c 100644
--- a/gnu/javax/crypto/sasl/ServerFactory.java
+++ b/gnu/javax/crypto/sasl/ServerFactory.java
@@ -1,4 +1,4 @@
-/* ServerFactory.java --
+/* ServerFactory.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/sasl/ServerMechanism.java b/gnu/javax/crypto/sasl/ServerMechanism.java
index 75603a14a..71dfdd4e0 100644
--- a/gnu/javax/crypto/sasl/ServerMechanism.java
+++ b/gnu/javax/crypto/sasl/ServerMechanism.java
@@ -1,4 +1,4 @@
-/* ServerMechanism.java --
+/* ServerMechanism.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -236,7 +236,7 @@ public abstract class ServerMechanism
/**
* Initialises the mechanism with designated attributes. Permissible names and
* values are mechanism specific.
- *
+ *
* @param attributes a set of name-value pairs that describes the desired
* future behaviour of this instance.
* @throws IllegalMechanismStateException if the instance is already
@@ -277,7 +277,7 @@ public abstract class ServerMechanism
/**
* Resets the mechanism instance for re-initialisation and use with other
* characteristics.
- *
+ *
* @throws SaslException if an exception occurs during the process.
*/
public void reset() throws SaslException
diff --git a/gnu/javax/crypto/sasl/UserAlreadyExistsException.java b/gnu/javax/crypto/sasl/UserAlreadyExistsException.java
index 1563be917..615fabb57 100644
--- a/gnu/javax/crypto/sasl/UserAlreadyExistsException.java
+++ b/gnu/javax/crypto/sasl/UserAlreadyExistsException.java
@@ -1,4 +1,4 @@
-/* UserAlreadyExistsException.java --
+/* UserAlreadyExistsException.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -60,7 +60,7 @@ public class UserAlreadyExistsException
* Constructs a <code>UserAlreadyExistsException</code> with the specified
* detail message. In the case of this exception, the detail message
* designates the offending username.
- *
+ *
* @param userName the detail message, which in this case is the username.
*/
public UserAlreadyExistsException(String userName)
diff --git a/gnu/javax/crypto/sasl/anonymous/AnonymousClient.java b/gnu/javax/crypto/sasl/anonymous/AnonymousClient.java
index 87f5e5fb5..860efb4f9 100644
--- a/gnu/javax/crypto/sasl/anonymous/AnonymousClient.java
+++ b/gnu/javax/crypto/sasl/anonymous/AnonymousClient.java
@@ -1,4 +1,4 @@
-/* AnonymousClient.java --
+/* AnonymousClient.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/sasl/anonymous/AnonymousServer.java b/gnu/javax/crypto/sasl/anonymous/AnonymousServer.java
index 76456044c..675194caa 100644
--- a/gnu/javax/crypto/sasl/anonymous/AnonymousServer.java
+++ b/gnu/javax/crypto/sasl/anonymous/AnonymousServer.java
@@ -1,4 +1,4 @@
-/* AnonymousServer.java --
+/* AnonymousServer.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/sasl/anonymous/AnonymousUtil.java b/gnu/javax/crypto/sasl/anonymous/AnonymousUtil.java
index 9047ebd5c..bb59779d6 100644
--- a/gnu/javax/crypto/sasl/anonymous/AnonymousUtil.java
+++ b/gnu/javax/crypto/sasl/anonymous/AnonymousUtil.java
@@ -1,4 +1,4 @@
-/* AnonymousUtil.java --
+/* AnonymousUtil.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/sasl/crammd5/CramMD5AuthInfoProvider.java b/gnu/javax/crypto/sasl/crammd5/CramMD5AuthInfoProvider.java
index dec0366c0..e3d8b8f08 100644
--- a/gnu/javax/crypto/sasl/crammd5/CramMD5AuthInfoProvider.java
+++ b/gnu/javax/crypto/sasl/crammd5/CramMD5AuthInfoProvider.java
@@ -1,4 +1,4 @@
-/* CramMD5AuthInfoProvider.java --
+/* CramMD5AuthInfoProvider.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/sasl/crammd5/CramMD5Client.java b/gnu/javax/crypto/sasl/crammd5/CramMD5Client.java
index c90cbe986..44f694e5c 100644
--- a/gnu/javax/crypto/sasl/crammd5/CramMD5Client.java
+++ b/gnu/javax/crypto/sasl/crammd5/CramMD5Client.java
@@ -1,4 +1,4 @@
-/* CramMD5Client.java --
+/* CramMD5Client.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/sasl/crammd5/CramMD5Registry.java b/gnu/javax/crypto/sasl/crammd5/CramMD5Registry.java
index bbd46a3f2..560eb854e 100644
--- a/gnu/javax/crypto/sasl/crammd5/CramMD5Registry.java
+++ b/gnu/javax/crypto/sasl/crammd5/CramMD5Registry.java
@@ -1,4 +1,4 @@
-/* CramMD5Registry.java --
+/* CramMD5Registry.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/sasl/crammd5/CramMD5Server.java b/gnu/javax/crypto/sasl/crammd5/CramMD5Server.java
index 9be03414b..1522f6b35 100644
--- a/gnu/javax/crypto/sasl/crammd5/CramMD5Server.java
+++ b/gnu/javax/crypto/sasl/crammd5/CramMD5Server.java
@@ -1,4 +1,4 @@
-/* CramMD5Server.java --
+/* CramMD5Server.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/sasl/crammd5/CramMD5Util.java b/gnu/javax/crypto/sasl/crammd5/CramMD5Util.java
index a6a06b6b8..a85c4c721 100644
--- a/gnu/javax/crypto/sasl/crammd5/CramMD5Util.java
+++ b/gnu/javax/crypto/sasl/crammd5/CramMD5Util.java
@@ -1,4 +1,4 @@
-/* CramMD5Util.java --
+/* CramMD5Util.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/sasl/crammd5/PasswordFile.java b/gnu/javax/crypto/sasl/crammd5/PasswordFile.java
index 4900842a7..65da4afdd 100644
--- a/gnu/javax/crypto/sasl/crammd5/PasswordFile.java
+++ b/gnu/javax/crypto/sasl/crammd5/PasswordFile.java
@@ -1,4 +1,4 @@
-/* PasswordFile.java --
+/* PasswordFile.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/sasl/plain/PasswordFile.java b/gnu/javax/crypto/sasl/plain/PasswordFile.java
index 4888214d8..51542d2b2 100644
--- a/gnu/javax/crypto/sasl/plain/PasswordFile.java
+++ b/gnu/javax/crypto/sasl/plain/PasswordFile.java
@@ -1,4 +1,4 @@
-/* PasswordFile.java --
+/* PasswordFile.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/sasl/plain/PlainAuthInfoProvider.java b/gnu/javax/crypto/sasl/plain/PlainAuthInfoProvider.java
index e0cf82fb6..5f35c455b 100644
--- a/gnu/javax/crypto/sasl/plain/PlainAuthInfoProvider.java
+++ b/gnu/javax/crypto/sasl/plain/PlainAuthInfoProvider.java
@@ -1,4 +1,4 @@
-/* PlainAuthInfoProvider.java --
+/* PlainAuthInfoProvider.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/sasl/plain/PlainClient.java b/gnu/javax/crypto/sasl/plain/PlainClient.java
index 87fffa01e..f984ed13f 100644
--- a/gnu/javax/crypto/sasl/plain/PlainClient.java
+++ b/gnu/javax/crypto/sasl/plain/PlainClient.java
@@ -1,4 +1,4 @@
-/* PlainClient.java --
+/* PlainClient.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/sasl/plain/PlainRegistry.java b/gnu/javax/crypto/sasl/plain/PlainRegistry.java
index 84e176053..68b121d96 100644
--- a/gnu/javax/crypto/sasl/plain/PlainRegistry.java
+++ b/gnu/javax/crypto/sasl/plain/PlainRegistry.java
@@ -1,4 +1,4 @@
-/* PlainRegistry.java --
+/* PlainRegistry.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/sasl/plain/PlainServer.java b/gnu/javax/crypto/sasl/plain/PlainServer.java
index 52deef51e..9d97bc029 100644
--- a/gnu/javax/crypto/sasl/plain/PlainServer.java
+++ b/gnu/javax/crypto/sasl/plain/PlainServer.java
@@ -1,4 +1,4 @@
-/* PlainServer.java --
+/* PlainServer.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/sasl/srp/CALG.java b/gnu/javax/crypto/sasl/srp/CALG.java
index 308543230..22f9c9751 100644
--- a/gnu/javax/crypto/sasl/srp/CALG.java
+++ b/gnu/javax/crypto/sasl/srp/CALG.java
@@ -1,4 +1,4 @@
-/* CALG.java --
+/* CALG.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -86,7 +86,7 @@ import javax.security.sasl.SaslException;
* other words, the input is padded at the trailing end with one of the
* following sequences:
* <pre>
- *
+ *
* 01 -- if l mod k = k-1
* 02 02 -- if l mod k = k-2
* ...
@@ -121,7 +121,7 @@ public final class CALG
/**
* Returns an instance of a SASL-SRP CALG implementation.
- *
+ *
* @param algorithm the name of the symmetric cipher algorithm.
* @return an instance of this object.
*/
@@ -145,7 +145,7 @@ public final class CALG
/**
* Initialises a SASL-SRP CALG implementation.
- *
+ *
* @param kdf the key derivation function.
* @param iv the initial vector value to use.
* @param dir whether this CALG is used for encryption or decryption.
@@ -184,7 +184,7 @@ public final class CALG
/**
* Encrypts or decrypts, depending on the mode already set, a designated array
* of bytes and returns the result.
- *
+ *
* @param data the data to encrypt/decrypt.
* @return the decrypted/encrypted result.
* @throws ConfidentialityException if an exception occurs duirng the process.
@@ -197,7 +197,7 @@ public final class CALG
/**
* Encrypts or decrypts, depending on the mode already set, a designated array
* of bytes and returns the result.
- *
+ *
* @param data the data to encrypt/decrypt.
* @param offset where to start in <code>data</code>.
* @param length how many bytes to consider in <code>data</code>.
diff --git a/gnu/javax/crypto/sasl/srp/ClientStore.java b/gnu/javax/crypto/sasl/srp/ClientStore.java
index 866e610d8..1d27137d1 100644
--- a/gnu/javax/crypto/sasl/srp/ClientStore.java
+++ b/gnu/javax/crypto/sasl/srp/ClientStore.java
@@ -1,4 +1,4 @@
-/* ClientStore.java --
+/* ClientStore.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -64,7 +64,7 @@ public class ClientStore
/**
* Returns the classloader Singleton.
- *
+ *
* @return the classloader Singleton instance.
*/
static synchronized final ClientStore instance()
@@ -77,7 +77,7 @@ public class ClientStore
/**
* Returns a boolean flag indicating if the designated client's session is
* still alive or not.
- *
+ *
* @param uid the identifier of the client whose session to check.
* @return <code>true</code> if the designated client's session is still
* alive. <code>false</code> otherwise.
@@ -105,7 +105,7 @@ public class ClientStore
/**
* Records a mapping between a client's unique identifier and its security
* context.
- *
+ *
* @param uid the unique identifier of the SRP client for which the session is
* to be cached.
* @param ttl the session's Time-To-Live indicator (in seconds).
@@ -123,7 +123,7 @@ public class ClientStore
/**
* Removes the mapping between the designated SRP client unique identifier and
* the its session security context (and other timing information).
- *
+ *
* @param uid the identifier of the client whose session is to invalidate.
*/
void invalidateSession(final String uid)
@@ -138,7 +138,7 @@ public class ClientStore
/**
* Returns an SRP client's security context record mapped by that client's
* unique identifier.
- *
+ *
* @param uid the identifier of the client whose session is to restore.
* @return the SRP client's security context.
*/
diff --git a/gnu/javax/crypto/sasl/srp/IALG.java b/gnu/javax/crypto/sasl/srp/IALG.java
index 85c93700f..d0c92ea68 100644
--- a/gnu/javax/crypto/sasl/srp/IALG.java
+++ b/gnu/javax/crypto/sasl/srp/IALG.java
@@ -1,4 +1,4 @@
-/* IALG.java --
+/* IALG.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -66,7 +66,7 @@ public final class IALG
/**
* Returns an instance of a SASL-SRP IALG implementation.
- *
+ *
* @param algorithm the name of the HMAC algorithm.
* @return an instance of this object.
*/
@@ -118,7 +118,7 @@ public final class IALG
/**
* Returns the length (in bytes) of this SASL SRP Integrity Algorithm.
- *
+ *
* @return the length, in bytes, of this integrity protection algorithm.
*/
public int length()
diff --git a/gnu/javax/crypto/sasl/srp/KDF.java b/gnu/javax/crypto/sasl/srp/KDF.java
index aa3edac0c..513aafb94 100644
--- a/gnu/javax/crypto/sasl/srp/KDF.java
+++ b/gnu/javax/crypto/sasl/srp/KDF.java
@@ -1,4 +1,4 @@
-/* KDF.java --
+/* KDF.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -63,7 +63,7 @@ public class KDF
/**
* Constructs an instance of the <code>KDF</code> initialised with the
* designated shared secret bytes.
- *
+ *
* @param keyMaterial the SASL SRP shared secret (K) bytes.
*/
private KDF(final byte[] keyMaterial, final int ndx)
@@ -84,7 +84,7 @@ public class KDF
/**
* A Factory mehod that returns an instance of a <code>KDF</code> based on
* supplied seed data.
- *
+ *
* @param K the SASL SRP shared secret for a <code>KDF</code> to be used for
* <i>CALG</i> and <i>IALG</i> setup. <code>null</code> otherwise.
* @return an instance of a <code>KDF</code>.
@@ -116,7 +116,7 @@ public class KDF
/**
* Returns a designated number of bytes suitable for use in the SASL SRP
* mechanism.
- *
+ *
* @param length the number of bytes needed.
* @return a byte array containing the generated/selected bytes.
*/
diff --git a/gnu/javax/crypto/sasl/srp/PasswordFile.java b/gnu/javax/crypto/sasl/srp/PasswordFile.java
index 7946e84fb..c13c2fa71 100644
--- a/gnu/javax/crypto/sasl/srp/PasswordFile.java
+++ b/gnu/javax/crypto/sasl/srp/PasswordFile.java
@@ -1,4 +1,4 @@
-/* PasswordFile.java --
+/* PasswordFile.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -190,7 +190,7 @@ public class PasswordFile
/**
* Returns a string representing the decimal value of an integer identifying
* the message digest algorithm to use for the SRP computations.
- *
+ *
* @param mdName the canonical name of a message digest algorithm.
* @return a string representing the decimal value of an ID for that
* algorithm.
@@ -219,7 +219,7 @@ public class PasswordFile
/**
* Checks if the current configuration file contains the &lt;N, g> pair for
* the designated <code>index</code>.
- *
+ *
* @param index a string representing 1-digit identification of an &lt;N, g>
* pair used.
* @return <code>true</code> if the designated <code>index</code> is that
@@ -243,7 +243,7 @@ public class PasswordFile
/**
* Returns a pair of strings representing the pair of <code>N</code> and
* <code>g</code> MPIs for the designated <code>index</code>.
- *
+ *
* @param index a string representing 1-digit identification of an &lt;N, g>
* pair to look up.
* @return a pair of strings, arranged in an array, where the first (at index
@@ -362,7 +362,7 @@ public class PasswordFile
* Returns the triplet: verifier, salt and configuration file index, of a
* designated user, and a designated message digest algorithm name, as an
* array of strings.
- *
+ *
* @param user the username.
* @param mdName the canonical name of the SRP's message digest algorithm.
* @return a string array containing, in this order, the BASE-64 encodings of
@@ -465,7 +465,7 @@ public class PasswordFile
* <b>IMPORTANT:</b> This method computes the verifiers as described in
* RFC-2945, which differs from the description given on the web page for
* SRP-6.
- *
+ *
* @param user the user's name.
* @param s the user's salt.
* @param password the user's password
diff --git a/gnu/javax/crypto/sasl/srp/SRP.java b/gnu/javax/crypto/sasl/srp/SRP.java
index 437e42a5a..569855dd7 100644
--- a/gnu/javax/crypto/sasl/srp/SRP.java
+++ b/gnu/javax/crypto/sasl/srp/SRP.java
@@ -1,4 +1,4 @@
-/* SRP.java --
+/* SRP.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -70,7 +70,7 @@ public final class SRP
/**
* Returns an instance of this object that uses the designated message digest
* algorithm as its digest function.
- *
+ *
* @return an instance of this object for the designated digest name.
*/
public static synchronized SRP instance(String mdName)
@@ -108,7 +108,7 @@ public final class SRP
* Returns a new instance of the SRP message digest algorithm --which is
* SHA-160 by default, but could be anything else provided the proper
* conditions as specified in the SRP specifications.
- *
+ *
* @return a new instance of the underlying SRP message digest algorithm.
* @throws RuntimeException if the implementation of the message digest
* algorithm does not support cloning.
@@ -121,7 +121,7 @@ public final class SRP
/**
* Convenience method to return the result of digesting the designated input
* with a new instance of the SRP message digest algorithm.
- *
+ *
* @param src some bytes to digest.
* @return the bytes constituting the result of digesting the designated input
* with a new instance of the SRP message digest algorithm.
@@ -136,7 +136,7 @@ public final class SRP
/**
* Convenience method to return the result of digesting the designated input
* with a new instance of the SRP message digest algorithm.
- *
+ *
* @param src a String whose bytes (using US-ASCII encoding) are to be
* digested.
* @return the bytes constituting the result of digesting the designated input
@@ -151,7 +151,7 @@ public final class SRP
/**
* Convenience method to XOR N bytes from two arrays; N being the output size
* of the SRP message digest algorithm.
- *
+ *
* @param a the first byte array.
* @param b the second one.
* @return N bytes which are the result of the XOR operations on the first N
diff --git a/gnu/javax/crypto/sasl/srp/SRPAuthInfoProvider.java b/gnu/javax/crypto/sasl/srp/SRPAuthInfoProvider.java
index 3a43a94a0..e42cfffa9 100644
--- a/gnu/javax/crypto/sasl/srp/SRPAuthInfoProvider.java
+++ b/gnu/javax/crypto/sasl/srp/SRPAuthInfoProvider.java
@@ -1,4 +1,4 @@
-/* SRPAuthInfoProvider.java --
+/* SRPAuthInfoProvider.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/sasl/srp/SRPClient.java b/gnu/javax/crypto/sasl/srp/SRPClient.java
index 3406c14ce..8e44e4ead 100644
--- a/gnu/javax/crypto/sasl/srp/SRPClient.java
+++ b/gnu/javax/crypto/sasl/srp/SRPClient.java
@@ -1,4 +1,4 @@
-/* SRPClient.java --
+/* SRPClient.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/sasl/srp/SRPRegistry.java b/gnu/javax/crypto/sasl/srp/SRPRegistry.java
index d474cb6f8..b6d24cf14 100644
--- a/gnu/javax/crypto/sasl/srp/SRPRegistry.java
+++ b/gnu/javax/crypto/sasl/srp/SRPRegistry.java
@@ -1,4 +1,4 @@
-/* SRPRegistry.java --
+/* SRPRegistry.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/sasl/srp/SRPServer.java b/gnu/javax/crypto/sasl/srp/SRPServer.java
index 3f000deef..fca5c3bf3 100644
--- a/gnu/javax/crypto/sasl/srp/SRPServer.java
+++ b/gnu/javax/crypto/sasl/srp/SRPServer.java
@@ -1,4 +1,4 @@
-/* SRPServer.java --
+/* SRPServer.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/sasl/srp/SecurityContext.java b/gnu/javax/crypto/sasl/srp/SecurityContext.java
index 1111d95b4..41ec57c81 100644
--- a/gnu/javax/crypto/sasl/srp/SecurityContext.java
+++ b/gnu/javax/crypto/sasl/srp/SecurityContext.java
@@ -1,4 +1,4 @@
-/* SecurityContext.java --
+/* SecurityContext.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/crypto/sasl/srp/ServerStore.java b/gnu/javax/crypto/sasl/srp/ServerStore.java
index 9fa83295a..d98747324 100644
--- a/gnu/javax/crypto/sasl/srp/ServerStore.java
+++ b/gnu/javax/crypto/sasl/srp/ServerStore.java
@@ -1,4 +1,4 @@
-/* ServerStore.java --
+/* ServerStore.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -68,7 +68,7 @@ public class ServerStore
/**
* Returns the classloader Singleton.
- *
+ *
* @return the classloader Singleton instance.
*/
static synchronized final ServerStore instance()
@@ -80,7 +80,7 @@ public class ServerStore
/**
* Returns a legible new session identifier.
- *
+ *
* @return a new session identifier.
*/
static synchronized final byte[] getNewSessionID()
@@ -94,7 +94,7 @@ public class ServerStore
/**
* Returns a boolean flag indicating if the designated session is still alive
* or not.
- *
+ *
* @param sid the identifier of the session to check.
* @return <code>true</code> if the designated session is still alive.
* <code>false</code> otherwise.
@@ -125,7 +125,7 @@ public class ServerStore
/**
* Records a mapping between a session identifier and the Security Context of
* the designated SRP server mechanism instance.
- *
+ *
* @param ttl the session's Time-To-Live indicator (in seconds).
* @param ctx the server's security context.
*/
@@ -144,7 +144,7 @@ public class ServerStore
* designated server's SASL Security Context. In the process, computes and
* return the underlying mechanism server's evidence that shall be returned to
* the client in a session re-use exchange.
- *
+ *
* @param sid the identifier of the session to restore.
* @return an SRP server's security context.
*/
@@ -162,7 +162,7 @@ public class ServerStore
/**
* Removes all information related to the designated session ID.
- *
+ *
* @param sid the identifier of the seesion to invalidate.
*/
void invalidateSession(final byte[] sid)
diff --git a/gnu/javax/crypto/sasl/srp/StoreEntry.java b/gnu/javax/crypto/sasl/srp/StoreEntry.java
index 130678ebd..ae64fa774 100644
--- a/gnu/javax/crypto/sasl/srp/StoreEntry.java
+++ b/gnu/javax/crypto/sasl/srp/StoreEntry.java
@@ -1,4 +1,4 @@
-/* StoreEntry.java --
+/* StoreEntry.java --
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -64,7 +64,7 @@ class StoreEntry
/**
* Returns <code>true</code> if the Time-To_live period has not elapsed.
- *
+ *
* @return <code>true</code> if the Time-To-Live period (in seconds) has not
* elapsed yet; <code>false</code> otherwise.
*/
diff --git a/gnu/javax/imageio/IIOInputStream.java b/gnu/javax/imageio/IIOInputStream.java
index 2638e2fe2..1ede75f78 100644
--- a/gnu/javax/imageio/IIOInputStream.java
+++ b/gnu/javax/imageio/IIOInputStream.java
@@ -77,7 +77,7 @@ public class IIOInputStream extends InputStream
public int read() throws IOException
{
- return is.read();
+ return is.read();
}
public int read(byte[] b) throws IOException
diff --git a/gnu/javax/imageio/bmp/BMPDecoder.java b/gnu/javax/imageio/bmp/BMPDecoder.java
index df53f2e3d..108461931 100644
--- a/gnu/javax/imageio/bmp/BMPDecoder.java
+++ b/gnu/javax/imageio/bmp/BMPDecoder.java
@@ -49,11 +49,11 @@ public abstract class BMPDecoder {
protected BMPInfoHeader infoHeader;
protected BMPFileHeader fileHeader;
protected long offset;
-
+
public BMPDecoder(BMPFileHeader fh, BMPInfoHeader ih){
- fileHeader = fh;
- infoHeader = ih;
- offset = BMPFileHeader.SIZE + BMPInfoHeader.SIZE;
+ fileHeader = fh;
+ infoHeader = ih;
+ offset = BMPFileHeader.SIZE + BMPInfoHeader.SIZE;
}
/**
@@ -61,108 +61,108 @@ public abstract class BMPDecoder {
* decoder.
*/
public static BMPDecoder getDecoder(BMPFileHeader fh, BMPInfoHeader ih){
- switch(ih.getCompression()){
- case BMPInfoHeader.BI_RGB: // uncompressed RGB
- switch(ih.getBitCount()){
- case 32:
- return new DecodeBF32(fh, ih, true);
+ switch(ih.getCompression()){
+ case BMPInfoHeader.BI_RGB: // uncompressed RGB
+ switch(ih.getBitCount()){
+ case 32:
+ return new DecodeBF32(fh, ih, true);
+
+ case 24:
+ return new DecodeRGB24(fh, ih);
- case 24:
- return new DecodeRGB24(fh, ih);
+ case 16:
+ return new DecodeBF16(fh, ih, true);
- case 16:
- return new DecodeBF16(fh, ih, true);
+ case 8:
+ return new DecodeRGB8(fh, ih);
- case 8:
- return new DecodeRGB8(fh, ih);
+ case 4:
+ return new DecodeRGB4(fh, ih);
- case 4:
- return new DecodeRGB4(fh, ih);
+ case 1:
+ return new DecodeRGB1(fh, ih);
- case 1:
- return new DecodeRGB1(fh, ih);
+ default:
+ return null;
+ }
- default:
- return null;
- }
+ case BMPInfoHeader.BI_RLE8:
+ return new DecodeRLE8(fh, ih);
- case BMPInfoHeader.BI_RLE8:
- return new DecodeRLE8(fh, ih);
+ case BMPInfoHeader.BI_RLE4:
+ return new DecodeRLE4(fh, ih);
- case BMPInfoHeader.BI_RLE4:
- return new DecodeRLE4(fh, ih);
+ case BMPInfoHeader.BI_BITFIELDS:
+ switch(ih.getBitCount()){
+ case 16:
+ return new DecodeBF16(fh, ih, false);
- case BMPInfoHeader.BI_BITFIELDS:
- switch(ih.getBitCount()){
- case 16:
- return new DecodeBF16(fh, ih, false);
+ case 32:
+ return new DecodeBF32(fh, ih, false);
- case 32:
- return new DecodeBF32(fh, ih, false);
+ default:
+ return null;
+ }
- default:
- return null;
- }
-
- default:
- return null;
- }
+ default:
+ return null;
+ }
}
/**
* The image decoder.
*/
- public abstract BufferedImage decode(ImageInputStream in)
- throws IOException, BMPException;
+ public abstract BufferedImage decode(ImageInputStream in)
+ throws IOException, BMPException;
/**
* Reads r,g,b bit masks from an inputstream
*/
protected int[] readBitMasks(ImageInputStream in) throws IOException {
- int[] bitmasks = new int[3];
- byte[] temp = new byte[12];
- if(in.read(temp) != 12)
- throw new IOException("Couldn't read bit masks.");
- offset += 12;
-
- ByteBuffer buf = ByteBuffer.wrap(temp);
- buf.order(ByteOrder.LITTLE_ENDIAN);
- bitmasks[0] = buf.getInt();
- bitmasks[1] = buf.getInt();
- bitmasks[2] = buf.getInt();
- return bitmasks;
+ int[] bitmasks = new int[3];
+ byte[] temp = new byte[12];
+ if(in.read(temp) != 12)
+ throw new IOException("Couldn't read bit masks.");
+ offset += 12;
+
+ ByteBuffer buf = ByteBuffer.wrap(temp);
+ buf.order(ByteOrder.LITTLE_ENDIAN);
+ bitmasks[0] = buf.getInt();
+ bitmasks[1] = buf.getInt();
+ bitmasks[2] = buf.getInt();
+ return bitmasks;
}
/**
- * Reads an N-color palette from an inputstream in RGBQUAD format and
+ * Reads an N-color palette from an inputstream in RGBQUAD format and
* returns an equivalent ColorModel object
*/
protected IndexColorModel readPalette(ImageInputStream in) throws IOException {
- int N = infoHeader.getNumberOfPaletteEntries();
- byte[] r = new byte[N];
- byte[] g = new byte[N];
- byte[] b = new byte[N];
- for(int i=0;i<N;i++){
- byte[] RGBquad = new byte[4];
- if(in.read(RGBquad) != 4)
- throw new IOException("Error reading palette information.");
- // RGBQUAD structure is b,g,r,0
- r[i] = RGBquad[2];
- g[i] = RGBquad[1];
- b[i] = RGBquad[0];
- }
-
- offset += 4*N;
- return new IndexColorModel(8, N, r, g, b);
+ int N = infoHeader.getNumberOfPaletteEntries();
+ byte[] r = new byte[N];
+ byte[] g = new byte[N];
+ byte[] b = new byte[N];
+ for(int i=0;i<N;i++){
+ byte[] RGBquad = new byte[4];
+ if(in.read(RGBquad) != 4)
+ throw new IOException("Error reading palette information.");
+ // RGBQUAD structure is b,g,r,0
+ r[i] = RGBquad[2];
+ g[i] = RGBquad[1];
+ b[i] = RGBquad[0];
+ }
+
+ offset += 4*N;
+ return new IndexColorModel(8, N, r, g, b);
}
/**
* Read bytes to the start of the image data
*/
protected void skipToImage(ImageInputStream in) throws IOException {
- byte[] d = new byte[1];
- long n = fileHeader.getOffset() - offset;
- for(int i=0;i<n;i++)
- in.read(d);
+ byte[] d = new byte[1];
+ long n = fileHeader.getOffset() - offset;
+ for(int i=0;i<n;i++)
+ in.read(d);
}
}
diff --git a/gnu/javax/imageio/bmp/BMPEncoder.java b/gnu/javax/imageio/bmp/BMPEncoder.java
index fc8dcf00f..d7c54c0d6 100644
--- a/gnu/javax/imageio/bmp/BMPEncoder.java
+++ b/gnu/javax/imageio/bmp/BMPEncoder.java
@@ -1,4 +1,4 @@
-/* BMPEncoder.java --
+/* BMPEncoder.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -59,7 +59,7 @@ public abstract class BMPEncoder
/**
* Determines the coding type of the bitmap and returns the corresponding
* encoder.
- *
+ *
* @param fh - the file header
* @param ih - the info header
* @return the appropriate encoder
@@ -94,17 +94,17 @@ public abstract class BMPEncoder
}
case BMPInfoHeader.BI_RLE4:
return new EncodeRLE4(fh, ih);
-
+
case BMPInfoHeader.BI_RLE8:
return new EncodeRLE8(fh, ih);
default:
return null;
}
}
-
+
/**
* The image encoder.
- *
+ *
* @param o - the image output stream
* @param streamMetadata - metadata associated with this stream, or
* null
diff --git a/gnu/javax/imageio/bmp/BMPException.java b/gnu/javax/imageio/bmp/BMPException.java
index d3c62e759..0ba3c6c74 100644
--- a/gnu/javax/imageio/bmp/BMPException.java
+++ b/gnu/javax/imageio/bmp/BMPException.java
@@ -42,6 +42,6 @@ import javax.imageio.IIOException;
public class BMPException extends IIOException {
public BMPException(String message){
- super(message);
+ super(message);
}
}
diff --git a/gnu/javax/imageio/bmp/BMPFileHeader.java b/gnu/javax/imageio/bmp/BMPFileHeader.java
index 4ba32d3c3..0cfd72323 100644
--- a/gnu/javax/imageio/bmp/BMPFileHeader.java
+++ b/gnu/javax/imageio/bmp/BMPFileHeader.java
@@ -52,45 +52,45 @@ public class BMPFileHeader {
/** Bitmap file size, in bytes. */
protected long bfSize;
-
+
/** Offset from the beginning of the file to the bitmap data */
protected long bfOffBits;
/** BITMAPFILEHEADER is 14 bytes */
public static final int SIZE = 14;
private static final int BITMAPINFOHEADER_SIZE = 40;
-
+
/**
* Creates the header from an input stream, which is not closed.
- *
+ *
* @throws IOException if an I/O error occured.
* @throws BMPException if the header was invalid
*/
public BMPFileHeader(ImageInputStream in) throws IOException, BMPException {
byte[] data = new byte[SIZE];
- if (in.read(data) != SIZE)
- throw new IOException("Couldn't read header.");
- ByteBuffer buf = ByteBuffer.wrap(data);
+ if (in.read(data) != SIZE)
+ throw new IOException("Couldn't read header.");
+ ByteBuffer buf = ByteBuffer.wrap(data);
- if(buf.getShort(0) != bfType)
- throw new BMPException("Not a BMP file.");
+ if(buf.getShort(0) != bfType)
+ throw new BMPException("Not a BMP file.");
- buf.order(ByteOrder.LITTLE_ENDIAN);
+ buf.order(ByteOrder.LITTLE_ENDIAN);
- // get size (keep unsigned)
- bfSize = ((long)buf.getInt(2) & (0xFFFFFFFF));
+ // get size (keep unsigned)
+ bfSize = ((long)buf.getInt(2) & (0xFFFFFFFF));
- // Two reserved shorts are here, and should be zero,
- // perhaps they should be tested to be zero, but I don't
- // feel this strictness is necessary.
-
- bfOffBits = ((long)buf.getInt(10) & (0xFFFFFFFF));
+ // Two reserved shorts are here, and should be zero,
+ // perhaps they should be tested to be zero, but I don't
+ // feel this strictness is necessary.
+
+ bfOffBits = ((long)buf.getInt(10) & (0xFFFFFFFF));
}
-
+
/**
* Creates the header from an output stream, which is not closed.
- *
+ *
* @param out - the image output stream
* @param im - the image
* @throws IOException if an I/O error occured.
@@ -100,7 +100,7 @@ public class BMPFileHeader {
RenderedImage img = im.getRenderedImage();
int w = img.getWidth();
int h = img.getHeight();
-
+
bfOffBits = SIZE + BITMAPINFOHEADER_SIZE;
bfSize = ((w * h) * 3) + ((4 - ((w * 3) % 4)) * h) + bfOffBits;
@@ -109,45 +109,43 @@ public class BMPFileHeader {
/**
* Writes the header to an output stream, which is not closed or flushed.
- *
+ *
* @throws IOException if an I/O error occured.
*/
public void write(ImageOutputStream out) throws IOException {
- ByteBuffer buf = ByteBuffer.allocate(SIZE);
- buf.putShort(0, bfType); // ID
- buf.putInt(2, (int)(bfSize & (0xFFFFFFFF))); // size
- buf.putInt(6, 0); // 4 reserved bytes set to zero
- buf.putInt(7, (int)(bfOffBits & (0xFFFFFFFF))); // size
- out.write(buf.array());
+ ByteBuffer buf = ByteBuffer.allocate(SIZE);
+ buf.putShort(0, bfType); // ID
+ buf.putInt(2, (int)(bfSize & (0xFFFFFFFF))); // size
+ buf.putInt(6, 0); // 4 reserved bytes set to zero
+ buf.putInt(7, (int)(bfOffBits & (0xFFFFFFFF))); // size
+ out.write(buf.array());
}
-
+
/**
* Sets the file size
*/
public void setSize(long size){
- bfSize = size;
+ bfSize = size;
}
/**
* Sets the bitmap offset within the file
*/
public void setOffset(long offset){
- bfOffBits = offset;
+ bfOffBits = offset;
}
/**
* Gets the file size
*/
public long getSize(){
- return bfSize;
+ return bfSize;
}
/**
* Gets the bitmap offset within the file
*/
public long getOffset(){
- return bfOffBits;
+ return bfOffBits;
}
}
-
-
diff --git a/gnu/javax/imageio/bmp/BMPImageReader.java b/gnu/javax/imageio/bmp/BMPImageReader.java
index f1359da6a..7b136bdf5 100644
--- a/gnu/javax/imageio/bmp/BMPImageReader.java
+++ b/gnu/javax/imageio/bmp/BMPImageReader.java
@@ -51,101 +51,98 @@ public class BMPImageReader extends ImageReader {
private BMPDecoder decoder;
protected BMPImageReader(ImageReaderSpi originatingProvider){
- super(originatingProvider);
- infoHeader = null;
- fileHeader = null;
- decoder = null;
+ super(originatingProvider);
+ infoHeader = null;
+ fileHeader = null;
+ decoder = null;
}
- private void validateIndex(int imageIndex)
- throws IndexOutOfBoundsException {
- if (imageIndex != 0)
- throw new IndexOutOfBoundsException("Invalid image index.");
+ private void validateIndex(int imageIndex)
+ throws IndexOutOfBoundsException {
+ if (imageIndex != 0)
+ throw new IndexOutOfBoundsException("Invalid image index.");
}
public void setInput(Object input) {
- super.setInput(input);
+ super.setInput(input);
}
- public void setInput(Object input,
- boolean seekForwardOnly,
- boolean ignoreMetadata) {
- super.setInput(input, seekForwardOnly, ignoreMetadata);
+ public void setInput(Object input,
+ boolean seekForwardOnly,
+ boolean ignoreMetadata) {
+ super.setInput(input, seekForwardOnly, ignoreMetadata);
}
-
+
public void setInput(Object input, boolean isStreamable) {
- super.setInput(input, isStreamable);
-
- if (!(input instanceof ImageInputStream))
- throw new IllegalArgumentException("Input not an ImageInputStream.");
+ super.setInput(input, isStreamable);
+
+ if (!(input instanceof ImageInputStream))
+ throw new IllegalArgumentException("Input not an ImageInputStream.");
}
private void checkStream() throws IOException {
- if (!(input instanceof ImageInputStream))
- throw new IllegalStateException("Input not an ImageInputStream.");
- if(input == null)
- throw new IllegalStateException("No input stream.");
+ if (!(input instanceof ImageInputStream))
+ throw new IllegalStateException("Input not an ImageInputStream.");
+ if(input == null)
+ throw new IllegalStateException("No input stream.");
}
private void readHeaders() throws IOException, IIOException {
- if(fileHeader != null)
- return;
+ if(fileHeader != null)
+ return;
- checkStream();
+ checkStream();
- fileHeader = new BMPFileHeader((ImageInputStream)input);
- infoHeader = new BMPInfoHeader((ImageInputStream)input);
- decoder = BMPDecoder.getDecoder(fileHeader, infoHeader);
+ fileHeader = new BMPFileHeader((ImageInputStream)input);
+ infoHeader = new BMPInfoHeader((ImageInputStream)input);
+ decoder = BMPDecoder.getDecoder(fileHeader, infoHeader);
}
-
+
public int getWidth(int imageIndex) throws IOException {
- validateIndex(imageIndex);
- readHeaders();
- return infoHeader.getWidth();
+ validateIndex(imageIndex);
+ readHeaders();
+ return infoHeader.getWidth();
}
public int getHeight(int imageIndex) throws IOException {
- validateIndex(imageIndex);
- readHeaders();
- return infoHeader.getHeight();
+ validateIndex(imageIndex);
+ readHeaders();
+ return infoHeader.getHeight();
}
public Iterator getImageTypes(int imageIndex){
- validateIndex(imageIndex);
- return null;
+ validateIndex(imageIndex);
+ return null;
}
/**
* Returns the number of images. BMP files can only contain a single one.
*/
public int getNumImages(boolean allowSearch){
- return 1;
+ return 1;
}
// FIXME: Support metadata
public IIOMetadata getImageMetadata(int imageIndex){
- validateIndex(imageIndex);
- return null;
+ validateIndex(imageIndex);
+ return null;
}
// FIXME: Support metadata
public IIOMetadata getStreamMetadata(){
- return null;
+ return null;
}
/**
- * Reads the image indexed by imageIndex and returns it as
+ * Reads the image indexed by imageIndex and returns it as
* a complete BufferedImage, using a supplied ImageReadParam.
- */
- public BufferedImage read(int imageIndex, ImageReadParam param)
- throws IOException, IIOException {
- validateIndex(imageIndex);
- readHeaders();
- return decoder.decode((ImageInputStream)input);
+ */
+ public BufferedImage read(int imageIndex, ImageReadParam param)
+ throws IOException, IIOException {
+ validateIndex(imageIndex);
+ readHeaders();
+ return decoder.decode((ImageInputStream)input);
}
}
-
-
-
diff --git a/gnu/javax/imageio/bmp/BMPImageReaderSpi.java b/gnu/javax/imageio/bmp/BMPImageReaderSpi.java
index cf8547c71..5d027963a 100644
--- a/gnu/javax/imageio/bmp/BMPImageReaderSpi.java
+++ b/gnu/javax/imageio/bmp/BMPImageReaderSpi.java
@@ -48,15 +48,15 @@ public class BMPImageReaderSpi extends ImageReaderSpi {
static final String vendorName = "GNU";
static final String version = "0.1";
static final String readerClassName =
- "gnu.javax.imageio.bmp.BMPImageReader";
+ "gnu.javax.imageio.bmp.BMPImageReader";
static final String[] names = { "Microsoft Windows BMP" };
static final String[] suffixes = { ".bmp", ".bm" };
static final String[] MIMETypes = {
- "image/bmp",
- "image/x-windows-bmp"};
- static final String[] writerSpiNames =
+ "image/bmp",
+ "image/x-windows-bmp"};
+ static final String[] writerSpiNames =
{ "gnu.javax.imageio.bmp.BMPImageWriterSpi" };
-
+
static final boolean supportsStandardStreamMetadataFormat = false;
static final String nativeStreamMetadataFormatName = null;
static final String nativeStreamMetadataFormatClassName = null;
@@ -67,50 +67,50 @@ public class BMPImageReaderSpi extends ImageReaderSpi {
static final String nativeImageMetadataFormatClassName = null;
static final String[] extraImageMetadataFormatNames = null;
static final String[] extraImageMetadataFormatClassNames = null;
-
+
public BMPImageReaderSpi() {
- super(vendorName, version,
- names, suffixes, MIMETypes,
- readerClassName,
- STANDARD_INPUT_TYPE, // Accept ImageInputStreams
- writerSpiNames,
- supportsStandardStreamMetadataFormat,
- nativeStreamMetadataFormatName,
- nativeStreamMetadataFormatClassName,
- extraStreamMetadataFormatNames,
- extraStreamMetadataFormatClassNames,
- supportsStandardImageMetadataFormat,
- nativeImageMetadataFormatName,
- nativeImageMetadataFormatClassName,
- extraImageMetadataFormatNames,
- extraImageMetadataFormatClassNames);
+ super(vendorName, version,
+ names, suffixes, MIMETypes,
+ readerClassName,
+ STANDARD_INPUT_TYPE, // Accept ImageInputStreams
+ writerSpiNames,
+ supportsStandardStreamMetadataFormat,
+ nativeStreamMetadataFormatName,
+ nativeStreamMetadataFormatClassName,
+ extraStreamMetadataFormatNames,
+ extraStreamMetadataFormatClassNames,
+ supportsStandardImageMetadataFormat,
+ nativeImageMetadataFormatName,
+ nativeImageMetadataFormatClassName,
+ extraImageMetadataFormatNames,
+ extraImageMetadataFormatClassNames);
}
-
+
public String getDescription(Locale locale) {
- return "Microsoft BMP v3";
+ return "Microsoft BMP v3";
}
-
+
public boolean canDecodeInput(Object input)
- throws IOException {
- if (!(input instanceof ImageInputStream))
- return false;
-
- ImageInputStream in = (ImageInputStream)input;
- boolean retval;
-
- in.mark();
- try {
- new BMPFileHeader(in);
- retval = true;
- } catch(BMPException e){
- retval = false;
- }
- in.reset();
-
- return retval;
+ throws IOException {
+ if (!(input instanceof ImageInputStream))
+ return false;
+
+ ImageInputStream in = (ImageInputStream)input;
+ boolean retval;
+
+ in.mark();
+ try {
+ new BMPFileHeader(in);
+ retval = true;
+ } catch(BMPException e){
+ retval = false;
+ }
+ in.reset();
+
+ return retval;
}
-
+
public ImageReader createReaderInstance(Object extension) {
- return new BMPImageReader(this);
+ return new BMPImageReader(this);
}
}
diff --git a/gnu/javax/imageio/bmp/BMPImageWriter.java b/gnu/javax/imageio/bmp/BMPImageWriter.java
index be42ffae1..407e66a72 100644
--- a/gnu/javax/imageio/bmp/BMPImageWriter.java
+++ b/gnu/javax/imageio/bmp/BMPImageWriter.java
@@ -1,4 +1,4 @@
-/* BMPImageWriter.java --
+/* BMPImageWriter.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -57,7 +57,7 @@ public class BMPImageWriter
/**
* Construct an bmp image writer.
- *
+ *
* @param originatingProvider - the provider that is constructing this image
* writer, or null
*/
@@ -68,13 +68,13 @@ public class BMPImageWriter
fileHeader = null;
infoHeader = null;
}
-
+
/**
* Convert IIOMetadata from an input reader format, returning an IIOMetadata
* suitable for use by an image writer. The ImageTypeSpecifier specifies the
* destination image type. An optional ImageWriteParam argument is available
* in case the image writing parameters affect the metadata conversion.
- *
+ *
* @param inData - the metadata coming from an image reader
* @param imageType - the output image type of the writer
* @param param - the image writing parameters or null
@@ -91,7 +91,7 @@ public class BMPImageWriter
throw new IllegalArgumentException("IIOMetadata and ImageTypeSpecifier cannot be null.");
return null;
}
-
+
/**
* Convert IIOMetadata from an input stream format, returning an
* IIOMetadata suitable for use by an image writer.
@@ -115,7 +115,7 @@ public class BMPImageWriter
throw new IllegalArgumentException("IIOMetadata cannot be null.");
return null;
}
-
+
/**
* Get a metadata object appropriate for encoding an image specified
* by the given image type specifier and optional image write
@@ -131,7 +131,7 @@ public class BMPImageWriter
// FIXME: Support metadata.
return null;
}
-
+
/**
* Get a metadata object appropriate for encoding the default image
* type handled by this writer, optionally considering image write
@@ -146,7 +146,7 @@ public class BMPImageWriter
// FIXME: Support metadata.
return null;
}
-
+
/**
* Write an image stream, including thumbnails and metadata to the
* output stream. The output must have been set prior to this
@@ -173,16 +173,16 @@ public class BMPImageWriter
fileHeader = new BMPFileHeader(out, image);
infoHeader = new BMPInfoHeader(out, image, param);
encoder = BMPEncoder.getEncoder(fileHeader, infoHeader);
-
+
if (encoder != null)
encoder.encode(out, streamMetadata, image, param);
else
throw new BMPException("Encoder has not been initialized.");
}
-
+
/**
* Checks the output stream.
- *
+ *
* @throws IOException if there is an error with the output stream
*/
private void checkStream() throws IOException
diff --git a/gnu/javax/imageio/bmp/BMPImageWriterSpi.java b/gnu/javax/imageio/bmp/BMPImageWriterSpi.java
index 32f9f59d1..e158dcfd7 100644
--- a/gnu/javax/imageio/bmp/BMPImageWriterSpi.java
+++ b/gnu/javax/imageio/bmp/BMPImageWriterSpi.java
@@ -1,4 +1,4 @@
-/* BMPImageWriterSpi.java --
+/* BMPImageWriterSpi.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -55,7 +55,7 @@ public class BMPImageWriterSpi
static final String[] suffixes = { ".bmp", ".bm" };
static final String[] MIMETypes = { "image/bmp", "image/x-windows-bmp" };
static final String[] readerSpiNames = { "gnu.javax.imageio.bmp.BMPImageReaderSpi" };
-
+
static final boolean supportsStandardStreamMetadataFormat = false;
static final String nativeStreamMetadataFormatName = null;
static final String nativeStreamMetadataFormatClassName = null;
@@ -66,9 +66,9 @@ public class BMPImageWriterSpi
static final String nativeImageMetadataFormatClassName = null;
static final String[] extraImageMetadataFormatNames = null;
static final String[] extraImageMetadataFormatClassNames = null;
-
+
private BMPImageWriter writerInstance;
-
+
public BMPImageWriterSpi()
{
super(vendorName, version, names, suffixes, MIMETypes, writerClassName,
@@ -79,10 +79,10 @@ public class BMPImageWriterSpi
nativeImageMetadataFormatClassName, extraImageMetadataFormatNames,
extraImageMetadataFormatClassNames);
}
-
+
/**
* Returns true if the image can be encoded.
- *
+ *
* @param type - the image type specifier.
* @return true if image can be encoded, otherwise false.
*/
@@ -90,7 +90,7 @@ public class BMPImageWriterSpi
{
if (type == null)
return false;
-
+
BMPInfoHeader ih = writerInstance.infoHeader;
if (ih != null)
{
@@ -101,7 +101,7 @@ public class BMPImageWriterSpi
|| bytes != 4
|| bytes != 8
|| bytes != 16
- || bytes != 24
+ || bytes != 24
|| bytes != 32))))
return false;
}
@@ -110,7 +110,7 @@ public class BMPImageWriterSpi
/**
* Creates an instance of ImageWriter using the given extension.
- *
+ *
* @param extension - the provider that is constructing this image writer, or
* null
*/
@@ -122,7 +122,7 @@ public class BMPImageWriterSpi
writerInstance = new BMPImageWriter(this);
return writerInstance;
}
-
+
/**
* Gets the instance of ImageWriter, if already created.
*/
diff --git a/gnu/javax/imageio/bmp/BMPInfoHeader.java b/gnu/javax/imageio/bmp/BMPInfoHeader.java
index a9f1ffda7..e14afdb04 100644
--- a/gnu/javax/imageio/bmp/BMPInfoHeader.java
+++ b/gnu/javax/imageio/bmp/BMPInfoHeader.java
@@ -49,7 +49,7 @@ import javax.imageio.ImageWriteParam;
import javax.imageio.stream.ImageInputStream;
import javax.imageio.stream.ImageOutputStream;
-public class BMPInfoHeader
+public class BMPInfoHeader
{
/** Size of the bitmap info header */
protected int biSize;
@@ -97,7 +97,7 @@ public class BMPInfoHeader
/**
* Creates the header from an input stream, which is not closed.
- *
+ *
* @param in - the image input stream
* @throws IOException if an I/O error occured.
* @throws BMPException if the header was invalid
@@ -126,10 +126,10 @@ public class BMPInfoHeader
biClrUsed = buf.getInt();
biClrImportant = buf.getInt();
}
-
+
/**
* Creates the info header from an output stream, which is not closed.
- *
+ *
* @param out - the image output stream
* @param im - the image
* @param param - the image write param.
@@ -139,12 +139,12 @@ public class BMPInfoHeader
{
RenderedImage img = im.getRenderedImage();
ColorModel cMod = img.getColorModel();
-
+
biSize = SIZE;
biWidth = img.getWidth();
biHeight = img.getHeight();
biPlanes = 1;
-
+
if (param != null && param.canWriteCompressed())
{
String compType = param.getCompressionType();
@@ -167,9 +167,9 @@ public class BMPInfoHeader
else
{
biBitCount = (short) cMod.getPixelSize();
- biCompression = BI_RGB;
+ biCompression = BI_RGB;
}
-
+
biXPelsPerMeter = 0x0;
biYPelsPerMeter = 0x0;
biClrUsed = 0;
@@ -188,13 +188,13 @@ public class BMPInfoHeader
out.write(intToDWord(biClrUsed));
out.write(intToDWord(biClrImportant));
}
-
+
/**
* Converts an int to a word, where the return value is stored in a
* 2-byte array.
- *
+ *
* @param val - the value to convert
- * @return the array
+ * @return the array
*/
private byte[] intToWord(int val)
{
@@ -207,9 +207,9 @@ public class BMPInfoHeader
/**
* Converts an int to a double word, where the return value is
* stored in a 4-byte array.
- *
+ *
* @param val - the value to convert
- * @return the array
+ * @return the array
*/
private byte[] intToDWord(int val)
{
@@ -221,7 +221,7 @@ public class BMPInfoHeader
return b;
}
-
+
public void setBitCount(short bitcount) throws BMPException
{
switch (bitcount)
diff --git a/gnu/javax/imageio/bmp/DecodeBF16.java b/gnu/javax/imageio/bmp/DecodeBF16.java
index 397b857aa..2f94ac613 100644
--- a/gnu/javax/imageio/bmp/DecodeBF16.java
+++ b/gnu/javax/imageio/bmp/DecodeBF16.java
@@ -54,49 +54,46 @@ public class DecodeBF16 extends BMPDecoder {
private int[] bitmasks;
private boolean useDefaultMasks;
- public DecodeBF16(BMPFileHeader fh, BMPInfoHeader ih,
- boolean udm){
- super(fh,ih);
+ public DecodeBF16(BMPFileHeader fh, BMPInfoHeader ih,
+ boolean udm){
+ super(fh,ih);
- useDefaultMasks = udm;
- if(useDefaultMasks) // 5-6-5 mask, B,G,R
- bitmasks = new int[] { 0x00F800, 0x0007E0, 0x00001F };
+ useDefaultMasks = udm;
+ if(useDefaultMasks) // 5-6-5 mask, B,G,R
+ bitmasks = new int[] { 0x00F800, 0x0007E0, 0x00001F };
}
public BufferedImage decode(ImageInputStream in) throws IOException, BMPException {
- if(!useDefaultMasks)
- bitmasks = readBitMasks(in);
- skipToImage(in);
-
- Dimension d = infoHeader.getSize();
- int h = (int)d.getHeight();
- int w = (int)d.getWidth();
-
- // BMP scanlines are padded to dword offsets
- int scansize = (w + (w&1)) << 1;
- short[] data = new short[w*h];
-
- for(int y=h-1;y>=0;y--){
- byte[] scanline = new byte[scansize];
- if(in.read(scanline) != scansize)
- throw new IOException("Couldn't read image data.");
-
- for(int x=0;x<w;x++)
- data[x + y*w] = (short)((scanline[x*2] & (0xFF)) |
- ((scanline[x*2+1] & (0xFF)) << 8));
- }
-
- ColorModel cm = new DirectColorModel(16,
- bitmasks[0], bitmasks[1], bitmasks[2]);
- SampleModel sm = new SinglePixelPackedSampleModel(DataBuffer.TYPE_USHORT,
- w, h,
- bitmasks);
- DataBuffer db = new DataBufferUShort(data, w*h, 0);
- WritableRaster raster = Raster.createWritableRaster(sm, db, null);
- return new BufferedImage(cm, raster, false, null);
+ if(!useDefaultMasks)
+ bitmasks = readBitMasks(in);
+ skipToImage(in);
+
+ Dimension d = infoHeader.getSize();
+ int h = (int)d.getHeight();
+ int w = (int)d.getWidth();
+
+ // BMP scanlines are padded to dword offsets
+ int scansize = (w + (w&1)) << 1;
+ short[] data = new short[w*h];
+
+ for(int y=h-1;y>=0;y--){
+ byte[] scanline = new byte[scansize];
+ if(in.read(scanline) != scansize)
+ throw new IOException("Couldn't read image data.");
+
+ for(int x=0;x<w;x++)
+ data[x + y*w] = (short)((scanline[x*2] & (0xFF)) |
+ ((scanline[x*2+1] & (0xFF)) << 8));
+ }
+
+ ColorModel cm = new DirectColorModel(16,
+ bitmasks[0], bitmasks[1], bitmasks[2]);
+ SampleModel sm = new SinglePixelPackedSampleModel(DataBuffer.TYPE_USHORT,
+ w, h,
+ bitmasks);
+ DataBuffer db = new DataBufferUShort(data, w*h, 0);
+ WritableRaster raster = Raster.createWritableRaster(sm, db, null);
+ return new BufferedImage(cm, raster, false, null);
}
}
-
-
-
diff --git a/gnu/javax/imageio/bmp/DecodeBF32.java b/gnu/javax/imageio/bmp/DecodeBF32.java
index 47ce8cc76..bfa469488 100644
--- a/gnu/javax/imageio/bmp/DecodeBF32.java
+++ b/gnu/javax/imageio/bmp/DecodeBF32.java
@@ -54,53 +54,50 @@ public class DecodeBF32 extends BMPDecoder {
private int[] bitmasks;
private boolean useDefaultMasks;
- public DecodeBF32(BMPFileHeader fh, BMPInfoHeader ih,
- boolean udm){
- super(fh,ih);
+ public DecodeBF32(BMPFileHeader fh, BMPInfoHeader ih,
+ boolean udm){
+ super(fh,ih);
- useDefaultMasks = udm;
- if(useDefaultMasks)
- bitmasks = new int[] { 0x00FF0000, 0x0000FF00, 0x000000FF };
+ useDefaultMasks = udm;
+ if(useDefaultMasks)
+ bitmasks = new int[] { 0x00FF0000, 0x0000FF00, 0x000000FF };
}
public BufferedImage decode(ImageInputStream in) throws IOException, BMPException {
- if(!useDefaultMasks)
- bitmasks = readBitMasks(in);
- skipToImage(in);
-
- Dimension d = infoHeader.getSize();
- int h = (int)d.getHeight();
- int w = (int)d.getWidth();
-
- // BMP scanlines are padded to dword offsets
- int scansize = w << 2;
- int[] data = new int[w*h];
-
-
- for(int y=h-1;y>=0;y--){
- byte[] scanline = new byte[scansize];
- if(in.read(scanline) != scansize)
- throw new IOException("Couldn't read image data.");
-
- for(int x=0;x<w;x++)
- data[x + y*w] = ((scanline[x<<2] & (0xFF)) |
- ((scanline[(x<<2)+1] & (0xFF)) << 8) |
- ((scanline[(x<<2)+2] & (0xFF)) << 16) |
- ((scanline[(x<<2)+3] & (0xFF)) << 24));
- }
-
- ColorModel cm = new DirectColorModel(32,
- bitmasks[0], bitmasks[1], bitmasks[2]);
- SampleModel sm = new SinglePixelPackedSampleModel(DataBuffer.TYPE_INT,
- w, h,
- bitmasks);
- DataBuffer db = new DataBufferInt(data, w*h);
- WritableRaster raster = Raster.createWritableRaster(sm, db, null);
-
- return new BufferedImage(cm, raster, false, null);
+ if(!useDefaultMasks)
+ bitmasks = readBitMasks(in);
+ skipToImage(in);
+
+ Dimension d = infoHeader.getSize();
+ int h = (int)d.getHeight();
+ int w = (int)d.getWidth();
+
+ // BMP scanlines are padded to dword offsets
+ int scansize = w << 2;
+ int[] data = new int[w*h];
+
+
+ for(int y=h-1;y>=0;y--){
+ byte[] scanline = new byte[scansize];
+ if(in.read(scanline) != scansize)
+ throw new IOException("Couldn't read image data.");
+
+ for(int x=0;x<w;x++)
+ data[x + y*w] = ((scanline[x<<2] & (0xFF)) |
+ ((scanline[(x<<2)+1] & (0xFF)) << 8) |
+ ((scanline[(x<<2)+2] & (0xFF)) << 16) |
+ ((scanline[(x<<2)+3] & (0xFF)) << 24));
+ }
+
+ ColorModel cm = new DirectColorModel(32,
+ bitmasks[0], bitmasks[1], bitmasks[2]);
+ SampleModel sm = new SinglePixelPackedSampleModel(DataBuffer.TYPE_INT,
+ w, h,
+ bitmasks);
+ DataBuffer db = new DataBufferInt(data, w*h);
+ WritableRaster raster = Raster.createWritableRaster(sm, db, null);
+
+ return new BufferedImage(cm, raster, false, null);
}
}
-
-
-
diff --git a/gnu/javax/imageio/bmp/DecodeRGB1.java b/gnu/javax/imageio/bmp/DecodeRGB1.java
index 9ca82d9ee..ca81bc433 100644
--- a/gnu/javax/imageio/bmp/DecodeRGB1.java
+++ b/gnu/javax/imageio/bmp/DecodeRGB1.java
@@ -52,45 +52,43 @@ import java.awt.Dimension;
public class DecodeRGB1 extends BMPDecoder {
public DecodeRGB1(BMPFileHeader fh, BMPInfoHeader ih){
- super(fh, ih);
+ super(fh, ih);
}
- public BufferedImage decode(ImageInputStream in)
- throws IOException, BMPException {
+ public BufferedImage decode(ImageInputStream in)
+ throws IOException, BMPException {
- IndexColorModel palette = readPalette(in);
- skipToImage(in);
+ IndexColorModel palette = readPalette(in);
+ skipToImage(in);
- Dimension d = infoHeader.getSize();
- int h = (int)d.getHeight();
- int w = (int)d.getWidth();
- int size = (w*h)>>3;
+ Dimension d = infoHeader.getSize();
+ int h = (int)d.getHeight();
+ int w = (int)d.getWidth();
+ int size = (w*h)>>3;
- int scansize = w>>3;
- byte[] data = new byte[size];
+ int scansize = w>>3;
+ byte[] data = new byte[size];
- for(int y=h-1;y>=0;y--){
- // Scanlines are padded to dword boundries
- int readsize = scansize;
- if((readsize & 3) != 0) readsize += (4 - (scansize & 3));
+ for(int y=h-1;y>=0;y--){
+ // Scanlines are padded to dword boundries
+ int readsize = scansize;
+ if((readsize & 3) != 0) readsize += (4 - (scansize & 3));
- byte[] scanline = new byte[readsize];
- if(in.read(scanline) != readsize)
- throw new IOException("Couldn't read image data.");
+ byte[] scanline = new byte[readsize];
+ if(in.read(scanline) != readsize)
+ throw new IOException("Couldn't read image data.");
- for(int x=0;x<scansize;x++)
- data[x + y*scansize] = scanline[x];
- }
+ for(int x=0;x<scansize;x++)
+ data[x + y*scansize] = scanline[x];
+ }
- SampleModel sm = new MultiPixelPackedSampleModel(DataBuffer.TYPE_BYTE,
- w, h, 1);
+ SampleModel sm = new MultiPixelPackedSampleModel(DataBuffer.TYPE_BYTE,
+ w, h, 1);
- DataBuffer db = new DataBufferByte(data, size, 0);
- WritableRaster raster = Raster.createWritableRaster(sm, db, null);
-
- return new BufferedImage(palette, raster, false, null);
+ DataBuffer db = new DataBufferByte(data, size, 0);
+ WritableRaster raster = Raster.createWritableRaster(sm, db, null);
+
+ return new BufferedImage(palette, raster, false, null);
}
}
-
-
diff --git a/gnu/javax/imageio/bmp/DecodeRGB24.java b/gnu/javax/imageio/bmp/DecodeRGB24.java
index 2b7f99be1..0ddcc434e 100644
--- a/gnu/javax/imageio/bmp/DecodeRGB24.java
+++ b/gnu/javax/imageio/bmp/DecodeRGB24.java
@@ -45,33 +45,33 @@ import java.awt.Dimension;
public class DecodeRGB24 extends BMPDecoder {
public DecodeRGB24(BMPFileHeader fh, BMPInfoHeader ih){
- super(fh, ih);
+ super(fh, ih);
}
public BufferedImage decode(ImageInputStream in) throws IOException, BMPException {
- skipToImage(in);
-
- Dimension d = infoHeader.getSize();
- int h = (int)d.getHeight();
- int w = (int)d.getWidth();
- BufferedImage image = new BufferedImage(w, h,
- BufferedImage.TYPE_INT_RGB);
- // BMP scanlines are padded to dword offsets
- int scansize = ((w*3 & 3) != 0)? w*3 + 4 - (w*3 & 3): w*3;
- int[] data = new int[w*h];
+ skipToImage(in);
- for(int y=h-1;y>=0;y--){
- byte[] scanline = new byte[scansize];
- if(in.read(scanline) != scansize)
- throw new IOException("Couldn't read image data.");
+ Dimension d = infoHeader.getSize();
+ int h = (int)d.getHeight();
+ int w = (int)d.getWidth();
+ BufferedImage image = new BufferedImage(w, h,
+ BufferedImage.TYPE_INT_RGB);
+ // BMP scanlines are padded to dword offsets
+ int scansize = ((w*3 & 3) != 0)? w*3 + 4 - (w*3 & 3): w*3;
+ int[] data = new int[w*h];
- for(int x=0;x<w;x++)
- data[x + y*w] = scanline[x*3] +
- (scanline[x*3+1] << 8) +
- (scanline[x*3+2] << 16);
- }
- image.setRGB(0, 0, w, h, data, 0, w);
- return image;
+ for(int y=h-1;y>=0;y--){
+ byte[] scanline = new byte[scansize];
+ if(in.read(scanline) != scansize)
+ throw new IOException("Couldn't read image data.");
+
+ for(int x=0;x<w;x++)
+ data[x + y*w] = scanline[x*3] +
+ (scanline[x*3+1] << 8) +
+ (scanline[x*3+2] << 16);
+ }
+ image.setRGB(0, 0, w, h, data, 0, w);
+ return image;
}
}
diff --git a/gnu/javax/imageio/bmp/DecodeRGB4.java b/gnu/javax/imageio/bmp/DecodeRGB4.java
index a10d390ab..a904ef745 100644
--- a/gnu/javax/imageio/bmp/DecodeRGB4.java
+++ b/gnu/javax/imageio/bmp/DecodeRGB4.java
@@ -52,41 +52,39 @@ import java.awt.Dimension;
public class DecodeRGB4 extends BMPDecoder {
public DecodeRGB4(BMPFileHeader fh, BMPInfoHeader ih){
- super(fh, ih);
+ super(fh, ih);
}
public BufferedImage decode(ImageInputStream in) throws IOException, BMPException {
- IndexColorModel palette = readPalette(in);
- skipToImage(in);
-
- Dimension d = infoHeader.getSize();
- int h = (int)d.getHeight();
- int w = (int)d.getWidth();
- int size = (w*h) >> 1;
-
- // Scanline padded to dword offsets
- int wbytes = (w + (w & 1)) >> 1;
- int scansize = ((wbytes & 3) != 0)? (wbytes + 4 - (wbytes&3)) : wbytes;
-
- byte[] data = new byte[wbytes*h];
-
- for(int y=h-1;y>=0;y--){
- byte[] scanline = new byte[scansize];
- if(in.read(scanline) != scansize)
- throw new IOException("Couldn't read image data.");
-
- for(int x=0;x<wbytes;x++)
- data[x + y*wbytes] = scanline[x];
- }
- SampleModel sm = new MultiPixelPackedSampleModel(DataBuffer.TYPE_BYTE,
- w, h, 4);
-
- DataBuffer db = new DataBufferByte(data, w*h, 0);
- WritableRaster raster = Raster.createWritableRaster(sm, db, null);
-
- return new BufferedImage(palette, raster, false, null);
- }
+ IndexColorModel palette = readPalette(in);
+ skipToImage(in);
-}
+ Dimension d = infoHeader.getSize();
+ int h = (int)d.getHeight();
+ int w = (int)d.getWidth();
+ int size = (w*h) >> 1;
+
+ // Scanline padded to dword offsets
+ int wbytes = (w + (w & 1)) >> 1;
+ int scansize = ((wbytes & 3) != 0)? (wbytes + 4 - (wbytes&3)) : wbytes;
+
+ byte[] data = new byte[wbytes*h];
+
+ for(int y=h-1;y>=0;y--){
+ byte[] scanline = new byte[scansize];
+ if(in.read(scanline) != scansize)
+ throw new IOException("Couldn't read image data.");
+ for(int x=0;x<wbytes;x++)
+ data[x + y*wbytes] = scanline[x];
+ }
+ SampleModel sm = new MultiPixelPackedSampleModel(DataBuffer.TYPE_BYTE,
+ w, h, 4);
+ DataBuffer db = new DataBufferByte(data, w*h, 0);
+ WritableRaster raster = Raster.createWritableRaster(sm, db, null);
+
+ return new BufferedImage(palette, raster, false, null);
+ }
+
+}
diff --git a/gnu/javax/imageio/bmp/DecodeRGB8.java b/gnu/javax/imageio/bmp/DecodeRGB8.java
index dfe4a19e8..218047e5d 100644
--- a/gnu/javax/imageio/bmp/DecodeRGB8.java
+++ b/gnu/javax/imageio/bmp/DecodeRGB8.java
@@ -52,39 +52,37 @@ import java.awt.Dimension;
public class DecodeRGB8 extends BMPDecoder {
public DecodeRGB8(BMPFileHeader fh, BMPInfoHeader ih){
- super(fh, ih);
+ super(fh, ih);
}
public BufferedImage decode(ImageInputStream in) throws IOException, BMPException {
- IndexColorModel palette = readPalette(in);
- skipToImage(in);
-
- Dimension d = infoHeader.getSize();
- int h = (int)d.getHeight();
- int w = (int)d.getWidth();
-
- // BMP scanlines are padded to dword offsets
- int scansize = ((w & 3) != 0)? w + 4 - (w & 3): w;
- byte[] data = new byte[w*h];
-
- for(int y=h-1;y>=0;y--){
- byte[] scanline = new byte[scansize];
- if(in.read(scanline) != scansize)
- throw new IOException("Couldn't read image data.");
-
- for(int x=0;x<w;x++)
- data[x + y*w] = scanline[x];
- }
-
- SampleModel sm = new SinglePixelPackedSampleModel(DataBuffer.TYPE_BYTE,
- w, h,
- new int[] {0xFF});
- DataBuffer db = new DataBufferByte(data, w*h, 0);
- WritableRaster raster = Raster.createWritableRaster(sm, db, null);
-
- return new BufferedImage(palette, raster, false, null);
- }
+ IndexColorModel palette = readPalette(in);
+ skipToImage(in);
-}
+ Dimension d = infoHeader.getSize();
+ int h = (int)d.getHeight();
+ int w = (int)d.getWidth();
+
+ // BMP scanlines are padded to dword offsets
+ int scansize = ((w & 3) != 0)? w + 4 - (w & 3): w;
+ byte[] data = new byte[w*h];
+
+ for(int y=h-1;y>=0;y--){
+ byte[] scanline = new byte[scansize];
+ if(in.read(scanline) != scansize)
+ throw new IOException("Couldn't read image data.");
+ for(int x=0;x<w;x++)
+ data[x + y*w] = scanline[x];
+ }
+ SampleModel sm = new SinglePixelPackedSampleModel(DataBuffer.TYPE_BYTE,
+ w, h,
+ new int[] {0xFF});
+ DataBuffer db = new DataBufferByte(data, w*h, 0);
+ WritableRaster raster = Raster.createWritableRaster(sm, db, null);
+
+ return new BufferedImage(palette, raster, false, null);
+ }
+
+}
diff --git a/gnu/javax/imageio/bmp/DecodeRLE4.java b/gnu/javax/imageio/bmp/DecodeRLE4.java
index 55d314f05..1c116c247 100644
--- a/gnu/javax/imageio/bmp/DecodeRLE4.java
+++ b/gnu/javax/imageio/bmp/DecodeRLE4.java
@@ -52,7 +52,7 @@ import java.awt.Dimension;
public class DecodeRLE4 extends BMPDecoder {
public DecodeRLE4(BMPFileHeader fh, BMPInfoHeader ih){
- super(fh, ih);
+ super(fh, ih);
}
/**
@@ -62,115 +62,114 @@ public class DecodeRLE4 extends BMPDecoder {
private static final byte EOL = (byte)0; // end of line
private static final byte EOB = (byte)1; // end of bitmap
private static final byte DELTA = (byte)2; // delta
-
+
public BufferedImage decode(ImageInputStream in) throws IOException, BMPException {
- IndexColorModel palette = readPalette(in);
- skipToImage(in);
+ IndexColorModel palette = readPalette(in);
+ skipToImage(in);
+
+ Dimension d = infoHeader.getSize();
+ int h = (int)d.getHeight();
+ int w = (int)d.getWidth();
- Dimension d = infoHeader.getSize();
- int h = (int)d.getHeight();
- int w = (int)d.getWidth();
+ byte[] data = uncompress(w, h, in);
+ SampleModel sm = new MultiPixelPackedSampleModel(DataBuffer.TYPE_BYTE,
+ w, h, 4);
- byte[] data = uncompress(w, h, in);
- SampleModel sm = new MultiPixelPackedSampleModel(DataBuffer.TYPE_BYTE,
- w, h, 4);
+ DataBuffer db = new DataBufferByte(data, w*h, 0);
+ WritableRaster raster = Raster.createWritableRaster(sm, db, null);
- DataBuffer db = new DataBufferByte(data, w*h, 0);
- WritableRaster raster = Raster.createWritableRaster(sm, db, null);
-
- return new BufferedImage(palette, raster, false, null);
+ return new BufferedImage(palette, raster, false, null);
}
-
- private byte[] uncompress(int w, int h, ImageInputStream in)
- throws BMPException, IOException {
- byte[] cmd = new byte[2];
- byte[] data = new byte[w*h>>1];
- int offIn = 0;
- int x=0,y=0;
-
- // width in bytes
- w += (w&1);
- w = w >> 1;
-
- try {
- while(((x>>1) + y*w) < w*h){
- if(in.read(cmd) != 2)
- throw new IOException("Error reading compressed data.");
-
- if(cmd[0] == ESCAPE){
- switch(cmd[1]){
- case EOB: // end of bitmap
- return data;
- case EOL: // end of line
- x = 0;
- y++;
- break;
- case DELTA: // delta
- if(in.read(cmd) != 2)
- throw new IOException("Error reading compressed data.");
- int dx = cmd[0] & (0xFF);
- int dy = cmd[1] & (0xFF);
- x += dx;
- y += dy;
- break;
-
- default:
- // decode a literal run
- int length = cmd[1] & (0xFF);
-
- // size of run, which is word aligned.
- int bytesize = length;
- bytesize += (bytesize & 1);
- bytesize >>= 1;
- bytesize += (bytesize & 1);
-
- byte[] run = new byte[bytesize];
- if(in.read(run) != bytesize)
- throw new IOException("Error reading compressed data.");
-
- if((x&1) == 0){
- length += (length&1);
- length >>= 1;
- System.arraycopy(run, 0, data, ((x>>1) + w*(h-y-1)),
- length);
- } else {
- for(int i=0;i<length;i++){
- if((i&1) == 0) // copy high to low
- data[((x+i)>>1) + w*(h-y-1)]
- |= ((run[i>>1]&0xF0) >> 4);
- else // copy low to high
- data[((x+i)>>1) + w*(h-y-1)]
- |= ((run[i>>1]&0x0F) << 4);
- }
- }
- x += cmd[1] & (0xFF);
- break;
- }
- } else {
- // decode a byte run
- int length = cmd[0] & (0xFF);
- if((x&1) == 0){
- length += (length&1);
- length >>= 1;
- for(int i=0;i<length;i++)
- data[(h-y-1)*w + i + (x >> 1)] = cmd[1];
- } else {
- for(int i=0;i<length;i++){
- if((i&1) == 0) // copy high to low
- data[((x+i)>>1) + w*(h-y-1)]
- |= ((cmd[1]&0xF0) >> 4);
- else // copy low to high
- data[((x+i)>>1) + w*(h-y-1)]
- |= ((cmd[1]&0x0F) << 4);
- }
- }
- x += cmd[0] & (0xFF);
- }
- }
- return data;
- } catch(ArrayIndexOutOfBoundsException e){
- throw new BMPException("Invalid RLE data.");
- }
+
+ private byte[] uncompress(int w, int h, ImageInputStream in)
+ throws BMPException, IOException {
+ byte[] cmd = new byte[2];
+ byte[] data = new byte[w*h>>1];
+ int offIn = 0;
+ int x=0,y=0;
+
+ // width in bytes
+ w += (w&1);
+ w = w >> 1;
+
+ try {
+ while(((x>>1) + y*w) < w*h){
+ if(in.read(cmd) != 2)
+ throw new IOException("Error reading compressed data.");
+
+ if(cmd[0] == ESCAPE){
+ switch(cmd[1]){
+ case EOB: // end of bitmap
+ return data;
+ case EOL: // end of line
+ x = 0;
+ y++;
+ break;
+ case DELTA: // delta
+ if(in.read(cmd) != 2)
+ throw new IOException("Error reading compressed data.");
+ int dx = cmd[0] & (0xFF);
+ int dy = cmd[1] & (0xFF);
+ x += dx;
+ y += dy;
+ break;
+
+ default:
+ // decode a literal run
+ int length = cmd[1] & (0xFF);
+
+ // size of run, which is word aligned.
+ int bytesize = length;
+ bytesize += (bytesize & 1);
+ bytesize >>= 1;
+ bytesize += (bytesize & 1);
+
+ byte[] run = new byte[bytesize];
+ if(in.read(run) != bytesize)
+ throw new IOException("Error reading compressed data.");
+
+ if((x&1) == 0){
+ length += (length&1);
+ length >>= 1;
+ System.arraycopy(run, 0, data, ((x>>1) + w*(h-y-1)),
+ length);
+ } else {
+ for(int i=0;i<length;i++){
+ if((i&1) == 0) // copy high to low
+ data[((x+i)>>1) + w*(h-y-1)]
+ |= ((run[i>>1]&0xF0) >> 4);
+ else // copy low to high
+ data[((x+i)>>1) + w*(h-y-1)]
+ |= ((run[i>>1]&0x0F) << 4);
+ }
+ }
+ x += cmd[1] & (0xFF);
+ break;
+ }
+ } else {
+ // decode a byte run
+ int length = cmd[0] & (0xFF);
+ if((x&1) == 0){
+ length += (length&1);
+ length >>= 1;
+ for(int i=0;i<length;i++)
+ data[(h-y-1)*w + i + (x >> 1)] = cmd[1];
+ } else {
+ for(int i=0;i<length;i++){
+ if((i&1) == 0) // copy high to low
+ data[((x+i)>>1) + w*(h-y-1)]
+ |= ((cmd[1]&0xF0) >> 4);
+ else // copy low to high
+ data[((x+i)>>1) + w*(h-y-1)]
+ |= ((cmd[1]&0x0F) << 4);
+ }
+ }
+ x += cmd[0] & (0xFF);
+ }
+ }
+ return data;
+ } catch(ArrayIndexOutOfBoundsException e){
+ throw new BMPException("Invalid RLE data.");
+ }
}
}
-
diff --git a/gnu/javax/imageio/bmp/DecodeRLE8.java b/gnu/javax/imageio/bmp/DecodeRLE8.java
index 1d00e6751..afc3da89e 100644
--- a/gnu/javax/imageio/bmp/DecodeRLE8.java
+++ b/gnu/javax/imageio/bmp/DecodeRLE8.java
@@ -52,7 +52,7 @@ import java.awt.Dimension;
public class DecodeRLE8 extends BMPDecoder {
public DecodeRLE8(BMPFileHeader fh, BMPInfoHeader ih){
- super(fh, ih);
+ super(fh, ih);
}
/**
@@ -62,82 +62,81 @@ public class DecodeRLE8 extends BMPDecoder {
private static final byte EOL = (byte)0; // end of line
private static final byte EOB = (byte)1; // end of bitmap
private static final byte DELTA = (byte)2; // delta
-
+
public BufferedImage decode(ImageInputStream in) throws IOException, BMPException {
- IndexColorModel palette = readPalette(in);
- skipToImage(in);
-
- Dimension d = infoHeader.getSize();
- int h = (int)d.getHeight();
- int w = (int)d.getWidth();
-
- byte[] data = uncompress(w, h, in);
- SampleModel sm = new SinglePixelPackedSampleModel(DataBuffer.TYPE_BYTE,
- w, h,
- new int[] {0xFF});
- DataBuffer db = new DataBufferByte(data, w*h, 0);
- WritableRaster raster = Raster.createWritableRaster(sm, db, null);
-
- return new BufferedImage(palette, raster, false, null);
+ IndexColorModel palette = readPalette(in);
+ skipToImage(in);
+
+ Dimension d = infoHeader.getSize();
+ int h = (int)d.getHeight();
+ int w = (int)d.getWidth();
+
+ byte[] data = uncompress(w, h, in);
+ SampleModel sm = new SinglePixelPackedSampleModel(DataBuffer.TYPE_BYTE,
+ w, h,
+ new int[] {0xFF});
+ DataBuffer db = new DataBufferByte(data, w*h, 0);
+ WritableRaster raster = Raster.createWritableRaster(sm, db, null);
+
+ return new BufferedImage(palette, raster, false, null);
}
-
- private byte[] uncompress(int w, int h, ImageInputStream in)
- throws BMPException, IOException {
- byte[] cmd = new byte[2];
- byte[] data = new byte[w*h];
- int offIn = 0;
- int x=0,y=0;
-
- try {
- while((x + y*w) < w*h){
- if(in.read(cmd) != 2)
- throw new IOException("Error reading compressed data.");
-
- if(cmd[0] == ESCAPE){
- switch(cmd[1]){
- case EOB: // end of bitmap
- return data;
- case EOL: // end of line
- x = 0;
- y++;
- break;
- case DELTA: // delta
- if(in.read(cmd) != 2)
- throw new IOException("Error reading compressed data.");
- int dx = cmd[0] & (0xFF);
- int dy = cmd[1] & (0xFF);
- x += dx;
- y += dy;
- break;
-
- default:
- // decode a literal run
- int length = cmd[1] & (0xFF);
- int copylength = length;
-
- // absolute mode must be word-aligned
- length += (length & 1);
-
- byte[] run = new byte[length];
- if(in.read(run) != length)
- throw new IOException("Error reading compressed data.");
-
- System.arraycopy(run, 0, data, (x+w*(h-y-1)),
- copylength);
- x += copylength;
- break;
- }
- } else {
- // decode a byte run
- int length = cmd[0] & (0xFF);
- for(int i=0;i<length;i++)
- data[(h-y-1)*w + x++] = cmd[1];
- }
- }
- return data;
- } catch(ArrayIndexOutOfBoundsException e){
- throw new BMPException("Invalid RLE data.");
- }
+
+ private byte[] uncompress(int w, int h, ImageInputStream in)
+ throws BMPException, IOException {
+ byte[] cmd = new byte[2];
+ byte[] data = new byte[w*h];
+ int offIn = 0;
+ int x=0,y=0;
+
+ try {
+ while((x + y*w) < w*h){
+ if(in.read(cmd) != 2)
+ throw new IOException("Error reading compressed data.");
+
+ if(cmd[0] == ESCAPE){
+ switch(cmd[1]){
+ case EOB: // end of bitmap
+ return data;
+ case EOL: // end of line
+ x = 0;
+ y++;
+ break;
+ case DELTA: // delta
+ if(in.read(cmd) != 2)
+ throw new IOException("Error reading compressed data.");
+ int dx = cmd[0] & (0xFF);
+ int dy = cmd[1] & (0xFF);
+ x += dx;
+ y += dy;
+ break;
+
+ default:
+ // decode a literal run
+ int length = cmd[1] & (0xFF);
+ int copylength = length;
+
+ // absolute mode must be word-aligned
+ length += (length & 1);
+
+ byte[] run = new byte[length];
+ if(in.read(run) != length)
+ throw new IOException("Error reading compressed data.");
+
+ System.arraycopy(run, 0, data, (x+w*(h-y-1)),
+ copylength);
+ x += copylength;
+ break;
+ }
+ } else {
+ // decode a byte run
+ int length = cmd[0] & (0xFF);
+ for(int i=0;i<length;i++)
+ data[(h-y-1)*w + x++] = cmd[1];
+ }
+ }
+ return data;
+ } catch(ArrayIndexOutOfBoundsException e){
+ throw new BMPException("Invalid RLE data.");
+ }
}
}
-
diff --git a/gnu/javax/imageio/bmp/EncodeRGB1.java b/gnu/javax/imageio/bmp/EncodeRGB1.java
index 293aba810..ffe671dc0 100644
--- a/gnu/javax/imageio/bmp/EncodeRGB1.java
+++ b/gnu/javax/imageio/bmp/EncodeRGB1.java
@@ -56,7 +56,7 @@ public class EncodeRGB1
/**
* Constructs an instance of this class.
- *
+ *
* @param fh - the file header to use.
* @param ih - the info header to use.
*/
@@ -70,7 +70,7 @@ public class EncodeRGB1
/**
* The image encoder.
- *
+ *
* @param o - the image output stream
* @param streamMetadata - metadata associated with this stream, or
* null
@@ -101,13 +101,13 @@ public class EncodeRGB1
infoHeader.biHeight, bitmap, 0,
infoHeader.biWidth);
pg.grabPixels();
-
+
for (j = 0; j < size; j++)
{
value = bitmap[rowIndex];
rgb[0] = (byte) (value & 0xFF);
-
+
o.write(rgb);
if (rowCount == infoHeader.biWidth)
{
diff --git a/gnu/javax/imageio/bmp/EncodeRGB16.java b/gnu/javax/imageio/bmp/EncodeRGB16.java
index 3e9912855..a5450cc67 100644
--- a/gnu/javax/imageio/bmp/EncodeRGB16.java
+++ b/gnu/javax/imageio/bmp/EncodeRGB16.java
@@ -1,4 +1,4 @@
-/* EncodeRGB16.java --
+/* EncodeRGB16.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -56,7 +56,7 @@ public class EncodeRGB16
/**
* Constructs an instance of this class.
- *
+ *
* @param fh - the file header to use.
* @param ih - the info header to use.
*/
@@ -67,10 +67,10 @@ public class EncodeRGB16
infoHeader = ih;
offset = BMPFileHeader.SIZE + BMPInfoHeader.SIZE;
}
-
+
/**
* The image encoder.
- *
+ *
* @param o - the image output stream
* @param streamMetadata - metadata associated with this stream, or
* null
@@ -101,14 +101,14 @@ public class EncodeRGB16
infoHeader.biHeight, bitmap, 0,
infoHeader.biWidth);
pg.grabPixels();
-
+
for (j = 0; j < size; j++)
{
value = bitmap[rowIndex];
rgb[0] = (byte) (value & 0xFF);
rgb[1] = (byte) (value >> 8 & 0xFF);
-
+
o.write(rgb);
if (rowCount == infoHeader.biWidth)
{
diff --git a/gnu/javax/imageio/bmp/EncodeRGB24.java b/gnu/javax/imageio/bmp/EncodeRGB24.java
index 10c1abee8..7fbc83e2e 100644
--- a/gnu/javax/imageio/bmp/EncodeRGB24.java
+++ b/gnu/javax/imageio/bmp/EncodeRGB24.java
@@ -56,7 +56,7 @@ public class EncodeRGB24
/**
* Constructs an instance of this class.
- *
+ *
* @param fh - the file header to use.
* @param ih - the info header to use.
*/
@@ -67,10 +67,10 @@ public class EncodeRGB24
infoHeader = ih;
offset = BMPFileHeader.SIZE + BMPInfoHeader.SIZE;
}
-
+
/**
* The image encoder.
- *
+ *
* @param o - the image output stream
* @param streamMetadata - metadata associated with this stream, or
* null
@@ -101,7 +101,7 @@ public class EncodeRGB24
infoHeader.biHeight, bitmap, 0,
infoHeader.biWidth);
pg.grabPixels();
-
+
for (j = 0; j < size; j++)
{
value = bitmap[rowIndex];
diff --git a/gnu/javax/imageio/bmp/EncodeRGB32.java b/gnu/javax/imageio/bmp/EncodeRGB32.java
index 4aa1cd5d2..7deca3049 100644
--- a/gnu/javax/imageio/bmp/EncodeRGB32.java
+++ b/gnu/javax/imageio/bmp/EncodeRGB32.java
@@ -1,4 +1,4 @@
-/* EncodeRGB32.java --
+/* EncodeRGB32.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -56,7 +56,7 @@ public class EncodeRGB32
/**
* Constructs an instance of this class.
- *
+ *
* @param fh - the file header to use.
* @param ih - the info header to use.
*/
@@ -67,10 +67,10 @@ public class EncodeRGB32
infoHeader = ih;
offset = BMPFileHeader.SIZE + BMPInfoHeader.SIZE;
}
-
+
/**
* The image encoder.
- *
+ *
* @param o - the image output stream
* @param streamMetadata - metadata associated with this stream, or null
* @param image - an IIOImage containing image data.
@@ -100,7 +100,7 @@ public class EncodeRGB32
infoHeader.biHeight, bitmap, 0,
infoHeader.biWidth);
pg.grabPixels();
-
+
for (j = 0; j < size; j++)
{
value = bitmap[rowIndex];
diff --git a/gnu/javax/imageio/bmp/EncodeRGB4.java b/gnu/javax/imageio/bmp/EncodeRGB4.java
index f1903541f..b62283a7d 100644
--- a/gnu/javax/imageio/bmp/EncodeRGB4.java
+++ b/gnu/javax/imageio/bmp/EncodeRGB4.java
@@ -56,7 +56,7 @@ public class EncodeRGB4
/**
* Constructs an instance of this class.
- *
+ *
* @param fh - the file header to use.
* @param ih - the info header to use.
*/
@@ -70,7 +70,7 @@ public class EncodeRGB4
/**
* The image encoder.
- *
+ *
* @param o - the image output stream
* @param streamMetadata - metadata associated with this stream, or
* null
@@ -101,13 +101,13 @@ public class EncodeRGB4
infoHeader.biHeight, bitmap, 0,
infoHeader.biWidth);
pg.grabPixels();
-
+
for (j = 0; j < size; j++)
{
value = bitmap[rowIndex];
rgb[0] = (byte) (value & 0xFF);
-
+
o.write(rgb);
if (rowCount == infoHeader.biWidth)
{
diff --git a/gnu/javax/imageio/bmp/EncodeRGB8.java b/gnu/javax/imageio/bmp/EncodeRGB8.java
index dd7387a9a..ef0594a5f 100644
--- a/gnu/javax/imageio/bmp/EncodeRGB8.java
+++ b/gnu/javax/imageio/bmp/EncodeRGB8.java
@@ -56,7 +56,7 @@ public class EncodeRGB8
/**
* Constructs an instance of this class.
- *
+ *
* @param fh - the file header to use.
* @param ih - the info header to use.
*/
@@ -70,7 +70,7 @@ public class EncodeRGB8
/**
* The image encoder.
- *
+ *
* @param o - the image output stream
* @param streamMetadata - metadata associated with this stream, or
* null
@@ -101,7 +101,7 @@ public class EncodeRGB8
infoHeader.biHeight, bitmap, 0,
infoHeader.biWidth);
pg.grabPixels();
-
+
for (j = 0; j < size; j++)
{
value = bitmap[rowIndex];
diff --git a/gnu/javax/imageio/bmp/EncodeRLE4.java b/gnu/javax/imageio/bmp/EncodeRLE4.java
index 3674c4d78..c54c3ca87 100644
--- a/gnu/javax/imageio/bmp/EncodeRLE4.java
+++ b/gnu/javax/imageio/bmp/EncodeRLE4.java
@@ -1,4 +1,4 @@
-/* EncodeRLE4.java --
+/* EncodeRLE4.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -63,10 +63,10 @@ public class EncodeRLE4
private static final byte EOL = (byte)0; // end of line
private static final byte EOB = (byte)1; // end of bitmap
private static final byte DELTA = (byte)2; // delta
-
+
/**
* Constructs an instance of this class.
- *
+ *
* @param fh - the file header to use.
* @param ih - the info header to use.
*/
@@ -77,10 +77,10 @@ public class EncodeRLE4
infoHeader = ih;
offset = BMPFileHeader.SIZE + BMPInfoHeader.SIZE;
}
-
+
/**
* The image encoder.
- *
+ *
* @param o - the image output stream
* @param streamMetadata - metadata associated with this stream, or
* null
@@ -111,12 +111,12 @@ public class EncodeRLE4
infoHeader.biHeight, bitmap, 0,
infoHeader.biWidth);
pg.grabPixels();
-
+
for (j = 0; j < size; j++)
{
value = bitmap[rowIndex];
buf.put((byte) (value & 0xFF));
-
+
if (rowCount == infoHeader.biWidth)
{
rowCount = 1;
@@ -127,7 +127,7 @@ public class EncodeRLE4
rowCount++;
rowIndex++;
}
-
+
buf.flip();
o.write(uncompress(infoHeader.biWidth, infoHeader.biHeight, buf));
}
@@ -136,10 +136,10 @@ public class EncodeRLE4
wb.printStackTrace();
}
}
-
+
/**
* Uncompresses the image stored in the buffer.
- *
+ *
* @param w - the width of the image
* @param h - the height of the image
* @param buf - the ByteBuffer containing the pixel values.
@@ -190,7 +190,7 @@ public class EncodeRLE4
{
throw new IOException("Error reading compressed data.");
}
-
+
int dx = cmd[0] & (0xFF);
int dy = cmd[1] & (0xFF);
x += dx;
diff --git a/gnu/javax/imageio/bmp/EncodeRLE8.java b/gnu/javax/imageio/bmp/EncodeRLE8.java
index dbbaeb269..62277ef90 100644
--- a/gnu/javax/imageio/bmp/EncodeRLE8.java
+++ b/gnu/javax/imageio/bmp/EncodeRLE8.java
@@ -1,4 +1,4 @@
-/* EncodeRGB32.java --
+/* EncodeRGB32.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -55,7 +55,7 @@ public class EncodeRLE8
protected BMPInfoHeader infoHeader;
protected BMPFileHeader fileHeader;
protected long offset;
-
+
/**
* RLE control codes
*/
@@ -66,7 +66,7 @@ public class EncodeRLE8
/**
* Constructs an instance of this class.
- *
+ *
* @param fh - the file header to use.
* @param ih - the info header to use.
*/
@@ -77,10 +77,10 @@ public class EncodeRLE8
infoHeader = ih;
offset = BMPFileHeader.SIZE + BMPInfoHeader.SIZE;
}
-
+
/**
* The image encoder.
- *
+ *
* @param o - the image output stream
* @param streamMetadata - metadata associated with this stream, or
* null
@@ -111,12 +111,12 @@ public class EncodeRLE8
infoHeader.biHeight, bitmap, 0,
infoHeader.biWidth);
pg.grabPixels();
-
+
for (j = 0; j < size; j++)
{
value = bitmap[rowIndex];
buf.put((byte) (value & 0xFF));
-
+
if (rowCount == infoHeader.biWidth)
{
rowCount = 1;
@@ -127,7 +127,7 @@ public class EncodeRLE8
rowCount++;
rowIndex++;
}
-
+
buf.flip();
o.write(uncompress(infoHeader.biWidth, infoHeader.biHeight, buf));
}
@@ -136,11 +136,11 @@ public class EncodeRLE8
wb.printStackTrace();
}
}
-
+
/**
* Uncompresses the image stored in the buffer.
- *
+ *
* @param w - the width of the image
* @param h - the height of the image
* @param buf - the ByteBuffer containing the pixel values.
@@ -187,7 +187,7 @@ public class EncodeRLE8
{
throw new IOException("Error reading compressed data.");
}
-
+
int dx = cmd[0] & (0xFF);
int dy = cmd[1] & (0xFF);
x += dx;
diff --git a/gnu/javax/imageio/gif/GIFFile.java b/gnu/javax/imageio/gif/GIFFile.java
index ec0a3103d..941397a0e 100644
--- a/gnu/javax/imageio/gif/GIFFile.java
+++ b/gnu/javax/imageio/gif/GIFFile.java
@@ -43,14 +43,14 @@ import java.util.Vector;
/**
* GIFFile - reads a GIF file.
- *
+ *
* This class only does the bare minimum work, and returns the data in raw
* formats (described below). The class is J2ME compatible, and hopefully
* we can keep it that way without any significant overhead.
*
- * @author Sven de Marothy.
+ * @author Sven de Marothy.
*/
-public class GIFFile
+public class GIFFile
{
// "NETSCAPE2.0" - identifier
private final static byte[] nsBlock = new byte[]
@@ -67,7 +67,7 @@ public class GIFFile
* Extension block types
*/
private final static int EXTENSION_COMMENT = 254;
- private final static int EXTENSION_GCONTROL = 249;
+ private final static int EXTENSION_GCONTROL = 249;
private final static int EXTENSION_APPLICATION = 255;
/**
@@ -75,7 +75,7 @@ public class GIFFile
*/
private final static int UNDRAW_OVERWRITE = 1;
private final static int UNDRAW_RESTORE_BACKGROUND = 2;
- private final static int UNDRAW_RESTORE_PREVIOUS = 3;
+ private final static int UNDRAW_RESTORE_PREVIOUS = 3;
/**
* Image position and dimensions (images may be partial)
@@ -121,7 +121,7 @@ public class GIFFile
* Has transparency?
*/
private boolean hasTransparency;
-
+
/**
* Undraw mode (animations)
*/
@@ -181,7 +181,7 @@ public class GIFFile
* @throws IOException if an I/O error occured.
* @throws GIFException if some file parsing error occured
*/
- public GIFFile(InputStream in) throws IOException, GIFException
+ public GIFFile(InputStream in) throws IOException, GIFException
{
// Validate the signature
if( !readSignature( in ) )
@@ -190,7 +190,7 @@ public class GIFFile
{
byte[] data = new byte[7];
if (in.read(data) != 7)
- throw new IOException("Couldn't read global descriptor.");
+ throw new IOException("Couldn't read global descriptor.");
globalWidth = ((data[1] & 0xFF) << 8) | (data[0] & 0xFF);
globalHeight = ((data[3] & 0xFF) << 8) | (data[2] & 0xFF);
@@ -202,37 +202,37 @@ public class GIFFile
if( hasGlobalColorMap )
{
- globalPalette = new byte[ nColors * 3 ];
- if( in.read( globalPalette ) != nColors * 3 )
- throw new IOException("Couldn't read color map.");
+ globalPalette = new byte[ nColors * 3 ];
+ if( in.read( globalPalette ) != nColors * 3 )
+ throw new IOException("Couldn't read color map.");
}
-
+
int c = in.read();
while( c == EXTENSION )
{
- readExtension( in );
- c = in.read();
+ readExtension( in );
+ c = in.read();
}
-
+
if( c != LOCAL )
throw new GIFException("Extension blocks not followed by a local descriptor ("+c+")");
loadImage( in );
- c = in.read();
+ c = in.read();
if( c == TERMINATOR ) // Not an animated GIF.
return;
- // Load animation frames. Just quit if an error occurs instead
+ // Load animation frames. Just quit if an error occurs instead
// of throwing an exception.
animationFrames = new Vector();
- try
+ try
{
- while( c != TERMINATOR )
- {
- animationFrames.add( new GIFFile( this, in, c ) );
- c = in.read();
- }
+ while( c != TERMINATOR )
+ {
+ animationFrames.add( new GIFFile( this, in, c ) );
+ c = in.read();
+ }
}
catch(IOException ioe)
{
@@ -245,8 +245,8 @@ public class GIFFile
/**
* Constructor for additional animation frames.
*/
- private GIFFile(GIFFile parent, InputStream in, int c)
- throws IOException, GIFException
+ private GIFFile(GIFFile parent, InputStream in, int c)
+ throws IOException, GIFException
{
// Copy global properties.
globalWidth = parent.globalWidth;
@@ -261,10 +261,10 @@ public class GIFFile
while( c == EXTENSION )
{
- readExtension( in );
+ readExtension( in );
c = in.read();
}
-
+
if( c != LOCAL )
throw new GIFException("Extension blocks not followed by a local descriptor ("+c+")");
@@ -279,21 +279,21 @@ public class GIFFile
* @throws IOException if the signature could not be read.
*/
public static boolean readSignature( InputStream in ) throws IOException
- {
+ {
byte[] data = new byte[6];
if (in.read(data) != 6)
throw new IOException("Couldn't read signature.");
if( data[0] != 0x47 || data[1] != 0x49 || data[2] != 0x46 ||
- data[3] != 0x38 ) // GIF8
+ data[3] != 0x38 ) // GIF8
return false;
if( (data[4] != 0x39 && data[4] != 0x37) || // 7 | 9
- (data[5] != 0x61 && data[5] != 0x62) ) // 'a' or 'b'
+ (data[5] != 0x61 && data[5] != 0x62) ) // 'a' or 'b'
return false;
return true;
}
-
+
/**
* Loads the image local descriptor and then loads/decodes the image raster,
@@ -306,13 +306,13 @@ public class GIFFile
try
{
- decodeRaster( in );
+ decodeRaster( in );
}
catch(ArrayIndexOutOfBoundsException aioobe)
{
- throw new GIFException("Error decompressing image.");
+ throw new GIFException("Error decompressing image.");
}
-
+
if( interlaced ) // Clean up
deinterlace();
packPixels();
@@ -330,31 +330,31 @@ public class GIFFile
return;
int nbits = 1;
- int ppbyte = 8;
+ int ppbyte = 8;
if( nColors == 4 )
{
- nbits = 2;
- ppbyte = 4;
+ nbits = 2;
+ ppbyte = 4;
}
else if( nColors == 16 )
{
- nbits = 4;
- ppbyte = 2;
+ nbits = 4;
+ ppbyte = 2;
}
int rem = (width & (ppbyte - 1));
- int w = ( rem == 0 ) ? (width / ppbyte) :
- ((width + ppbyte - rem) / ppbyte);
+ int w = ( rem == 0 ) ? (width / ppbyte) :
+ ((width + ppbyte - rem) / ppbyte);
byte[] nr = new byte[ w * height ];
for(int j = 0; j < height; j++)
{
- for(int i = 0; i < width - ppbyte; i += ppbyte)
- for(int k = 0; k < ppbyte; k++)
- nr[ j * w + (i / ppbyte) ] |= (byte)((raster[ width * j + i + k ]
- << (8 - nbits * (1 + k))));
- for(int i = 0; i < rem; i++)
- nr[ j * w + w - 1 ] |= (byte)((raster[ width * j + width - rem + i ]
- << (nbits * (rem - i))));
+ for(int i = 0; i < width - ppbyte; i += ppbyte)
+ for(int k = 0; k < ppbyte; k++)
+ nr[ j * w + (i / ppbyte) ] |= (byte)((raster[ width * j + i + k ]
+ << (8 - nbits * (1 + k))));
+ for(int i = 0; i < rem; i++)
+ nr[ j * w + w - 1 ] |= (byte)((raster[ width * j + width - rem + i ]
+ << (nbits * (rem - i))));
}
raster = nr;
}
@@ -424,23 +424,23 @@ public class GIFFile
int n = 0;
for(int i = 0; i < ((height + 7) >> 3); i++)
{
- System.arraycopy( raster, n, nr, width * i * 8, width );
- n += width;
+ System.arraycopy( raster, n, nr, width * i * 8, width );
+ n += width;
}
for(int i = 0; i < ((height + 3) >> 3); i++)
{
- System.arraycopy( raster, n, nr, width * ( 8 * i + 4 ), width );
- n += width;
+ System.arraycopy( raster, n, nr, width * ( 8 * i + 4 ), width );
+ n += width;
}
for(int i = 0; i < (height >> 2); i++)
{
- System.arraycopy( raster, n, nr, width * (4 * i + 2), width );
- n += width;
+ System.arraycopy( raster, n, nr, width * (4 * i + 2), width );
+ n += width;
}
for(int i = 0; i < (height >> 1); i++)
{
- System.arraycopy( raster, n, nr, width * (2 * i + 1), width );
- n += width;
+ System.arraycopy( raster, n, nr, width * (2 * i + 1), width );
+ n += width;
}
raster = nr;
}
@@ -461,17 +461,17 @@ public class GIFFile
interlaced = (( flags & 0x40 ) != 0);
if( (flags & 0x80) != 0 )
{ // has a local color map
- int nLocalColors = (1 << (( flags & 0x07) + 1));
- if( !hasGlobalColorMap )
- nColors = nLocalColors;
- localPalette = new byte[ nLocalColors * 3 ];
- if( in.read( localPalette ) != nLocalColors * 3 )
- throw new IOException("Couldn't read color map.");
+ int nLocalColors = (1 << (( flags & 0x07) + 1));
+ if( !hasGlobalColorMap )
+ nColors = nLocalColors;
+ localPalette = new byte[ nLocalColors * 3 ];
+ if( in.read( localPalette ) != nLocalColors * 3 )
+ throw new IOException("Couldn't read color map.");
}
- }
+ }
/**
- * Returns the image's palette in raw format
+ * Returns the image's palette in raw format
* (r0,g0,b0,r1,g1,b2..r(Ncolors-1),g(Ncolors-1),b(Ncolors-1))
*/
public byte[] getRawPalette()
@@ -514,41 +514,41 @@ public class GIFFile
/**
* Handles extension blocks.
*/
- private void readExtension(InputStream in) throws IOException, GIFException
+ private void readExtension(InputStream in) throws IOException, GIFException
{
int functionCode = in.read();
byte[] data = readData(in);
switch( functionCode )
{
case EXTENSION_COMMENT: // comment block
- comment = new String(data, "8859_1");
- break;
+ comment = new String(data, "8859_1");
+ break;
case EXTENSION_GCONTROL: // Graphics control extension
- undraw = (data[0] & 0x1C) >> 2;
- // allegedly there can be bad values of this.
- if( undraw < 1 && undraw > 3 ) undraw = 1;
- hasTransparency = ((data[0] & 0x01) == 1);
- transparentIndex = (data[3] & 0xFF);
- duration = ((data[2] & 0xFF) << 8) | (data[1] & 0xFF);
- break;
-
- // Application extension. We only parse the Netscape animation
- // extension here. Which is the only one most use anyway.
+ undraw = (data[0] & 0x1C) >> 2;
+ // allegedly there can be bad values of this.
+ if( undraw < 1 && undraw > 3 ) undraw = 1;
+ hasTransparency = ((data[0] & 0x01) == 1);
+ transparentIndex = (data[3] & 0xFF);
+ duration = ((data[2] & 0xFF) << 8) | (data[1] & 0xFF);
+ break;
+
+ // Application extension. We only parse the Netscape animation
+ // extension here. Which is the only one most use anyway.
case EXTENSION_APPLICATION:
- boolean isNS = true;
- for(int i = 0; i < nsBlock.length; i++ )
- if( nsBlock[i] != data[i] )
- isNS = false;
- if( isNS )
- {
- isLooped = true;
- loops = ((data[12] & 0xFF) << 8) | (data[13] & 0xFF);
- }
- break;
+ boolean isNS = true;
+ for(int i = 0; i < nsBlock.length; i++ )
+ if( nsBlock[i] != data[i] )
+ isNS = false;
+ if( isNS )
+ {
+ isLooped = true;
+ loops = ((data[12] & 0xFF) << 8) | (data[13] & 0xFF);
+ }
+ break;
default:
- break;
+ break;
}
}
@@ -563,11 +563,11 @@ public class GIFFile
int n = in.read();
do
{
- totalBytes += n;
- byte[] block = new byte[ n ];
- in.read(block);
- v.add(block);
- n = in.read();
+ totalBytes += n;
+ byte[] block = new byte[ n ];
+ in.read(block);
+ v.add(block);
+ n = in.read();
}
while( n > 0 );
@@ -575,9 +575,9 @@ public class GIFFile
byte[] bigBuffer = new byte[ totalBytes ];
for( int i = 0; i < v.size(); i++ )
{
- byte[] block = (byte[])v.elementAt(i);
- System.arraycopy(block, 0, bigBuffer, n, block.length);
- n += block.length;
+ byte[] block = (byte[])v.elementAt(i);
+ System.arraycopy(block, 0, bigBuffer, n, block.length);
+ n += block.length;
}
return bigBuffer;
}
@@ -617,65 +617,65 @@ public class GIFFile
for(short i = 0; i < nColors; i ++ )
{
- dictionary[i][0] = i; // color index
- dictionary[i][1] = -1; // parent
- dictionary[i][2] = i; // first
- dictionary[i][3] = 1; // depth
+ dictionary[i][0] = i; // color index
+ dictionary[i][1] = -1; // parent
+ dictionary[i][2] = i; // first
+ dictionary[i][3] = 1; // depth
}
code = getBits( codeSize ); // get second code
raster[ rasterIndex++ ] = (byte)dictionary[code][0];
- int old = code;
+ int old = code;
code = getBits( codeSize ); // start at the third code
int c;
do
{
- if( code == clearCode )
- {
- codeSize = initialCodeSize + 1;
- nextCode = endCode + 1;
- // get and output second code
- code = getBits( codeSize );
- raster[ rasterIndex++ ] = (byte)dictionary[code][0];
- old = code;
- }
- else
- {
- dictionary[nextCode][1] = (short)old; // parent = old
- dictionary[nextCode][2] = dictionary[old][2]; // first pixel
- dictionary[nextCode][3] = (short)(dictionary[old][3] + 1); // depth
-
- // appended pixel = first pixel of c
- if( code < nextCode )
- {
- dictionary[nextCode][0] = dictionary[code][2];
- old = code;
- }
- else // first of old
- {
- dictionary[nextCode][0] = dictionary[old][2];
- old = nextCode;
- }
-
- c = old;
- // output the code c
- int depth = dictionary[c][3];
- for( int i = depth - 1; i >= 0; i-- )
- {
- raster[ rasterIndex + i ] = (byte)dictionary[c][0];
- c = dictionary[c][1]; // go to parent.
- }
- rasterIndex += depth;
- nextCode ++;
-
- if( codeSize < 12 && nextCode >= (1 << codeSize) )
- codeSize++;
- }
- code = getBits( codeSize );
+ if( code == clearCode )
+ {
+ codeSize = initialCodeSize + 1;
+ nextCode = endCode + 1;
+ // get and output second code
+ code = getBits( codeSize );
+ raster[ rasterIndex++ ] = (byte)dictionary[code][0];
+ old = code;
+ }
+ else
+ {
+ dictionary[nextCode][1] = (short)old; // parent = old
+ dictionary[nextCode][2] = dictionary[old][2]; // first pixel
+ dictionary[nextCode][3] = (short)(dictionary[old][3] + 1); // depth
+
+ // appended pixel = first pixel of c
+ if( code < nextCode )
+ {
+ dictionary[nextCode][0] = dictionary[code][2];
+ old = code;
+ }
+ else // first of old
+ {
+ dictionary[nextCode][0] = dictionary[old][2];
+ old = nextCode;
+ }
+
+ c = old;
+ // output the code c
+ int depth = dictionary[c][3];
+ for( int i = depth - 1; i >= 0; i-- )
+ {
+ raster[ rasterIndex + i ] = (byte)dictionary[c][0];
+ c = dictionary[c][1]; // go to parent.
+ }
+ rasterIndex += depth;
+ nextCode ++;
+
+ if( codeSize < 12 && nextCode >= (1 << codeSize) )
+ codeSize++;
+ }
+ code = getBits( codeSize );
}
while( code != endCode && dataBlockIndex < compressedData.length );
-
+
compressedData = null; // throw away compressed data.
}
@@ -686,9 +686,9 @@ public class GIFFile
{
while( nbits > remainingBits )
{
- int c = (compressedData[ dataBlockIndex++ ] & 0xFF) << remainingBits;
- currentBits |= c;
- remainingBits += 8;
+ int c = (compressedData[ dataBlockIndex++ ] & 0xFF) << remainingBits;
+ currentBits |= c;
+ remainingBits += 8;
}
int rval = (currentBits & ((1 << nbits) - 1));
currentBits = (currentBits >> nbits);
@@ -699,7 +699,7 @@ public class GIFFile
/**
* Generic exception used by GIFFile to report decoding errors.
*/
- public static class GIFException extends Exception
+ public static class GIFException extends Exception
{
public GIFException(String message)
{
diff --git a/gnu/javax/imageio/gif/GIFImageReader.java b/gnu/javax/imageio/gif/GIFImageReader.java
index 47108dd0c..2cb59226b 100644
--- a/gnu/javax/imageio/gif/GIFImageReader.java
+++ b/gnu/javax/imageio/gif/GIFImageReader.java
@@ -56,7 +56,7 @@ import java.awt.image.DataBufferByte;
import java.awt.image.Raster;
import java.awt.image.WritableRaster;
-public class GIFImageReader extends ImageReader
+public class GIFImageReader extends ImageReader
{
private GIFFile file;
@@ -65,7 +65,7 @@ public class GIFImageReader extends ImageReader
super( originatingProvider );
file = null;
}
-
+
private void readImage() throws IOException
{
if( file != null )
@@ -73,14 +73,14 @@ public class GIFImageReader extends ImageReader
try
{
- if( input instanceof InputStream )
- file = new GIFFile( (InputStream)input );
- else
- file = new GIFFile( new IIOInputStream((ImageInputStream)input) );
+ if( input instanceof InputStream )
+ file = new GIFFile( (InputStream)input );
+ else
+ file = new GIFFile( new IIOInputStream((ImageInputStream)input) );
}
catch(GIFFile.GIFException ge)
{
- throw new IIOException(ge.getMessage());
+ throw new IIOException(ge.getMessage());
}
}
@@ -98,68 +98,68 @@ public class GIFImageReader extends ImageReader
for(int i = 0; i < nc; i ++ )
{
- r[i] = data[ i * 3 ];
- g[i] = data[ i * 3 + 1 ];
- b[i] = data[ i * 3 + 2 ];
+ r[i] = data[ i * 3 ];
+ g[i] = data[ i * 3 + 1 ];
+ b[i] = data[ i * 3 + 2 ];
}
if( f.hasTransparency() )
{
- byte[] a = new byte[nc];
- for(int i = 0; i < nc; i ++ )
- a[i] = (byte)0xFF;
- a[f.getTransparentIndex()] = 0;
- return new IndexColorModel(8, nc, r, g, b, a);
+ byte[] a = new byte[nc];
+ for(int i = 0; i < nc; i ++ )
+ a[i] = (byte)0xFF;
+ a[f.getTransparentIndex()] = 0;
+ return new IndexColorModel(8, nc, r, g, b, a);
}
-
+
return new IndexColorModel(8, nc, r, g, b);
}
- private void validateIndex(int imageIndex)
- throws IndexOutOfBoundsException
+ private void validateIndex(int imageIndex)
+ throws IndexOutOfBoundsException
{
if( imageIndex < 0 || imageIndex >= getNumImages(false) )
throw new IndexOutOfBoundsException("Invalid image index.");
}
- public void setInput(Object input)
+ public void setInput(Object input)
{
super.setInput(input);
}
- public void setInput(Object input,
- boolean seekForwardOnly,
- boolean ignoreMetadata)
+ public void setInput(Object input,
+ boolean seekForwardOnly,
+ boolean ignoreMetadata)
{
super.setInput(input, seekForwardOnly, ignoreMetadata);
}
-
- public void setInput(Object input, boolean isStreamable)
+
+ public void setInput(Object input, boolean isStreamable)
{
super.setInput(input, isStreamable);
-
- if (!(input instanceof ImageInputStream) &&
- !(input instanceof InputStream))
+
+ if (!(input instanceof ImageInputStream) &&
+ !(input instanceof InputStream))
throw new IllegalArgumentException("Input not an ImageInputStream.");
}
- private void checkStream() throws IOException
+ private void checkStream() throws IOException
{
if (!(input instanceof ImageInputStream) &&
- !(input instanceof InputStream))
+ !(input instanceof InputStream))
throw new IllegalStateException("Input not an ImageInputStream or InputStream.");
if(input == null)
throw new IllegalStateException("No input stream.");
}
- public int getWidth(int imageIndex) throws IOException
+ public int getWidth(int imageIndex) throws IOException
{
validateIndex( imageIndex );
return file.getImage( imageIndex ).getWidth();
}
- public int getHeight(int imageIndex) throws IOException
+ public int getHeight(int imageIndex) throws IOException
{
validateIndex( imageIndex );
return file.getImage( imageIndex ).getHeight();
@@ -172,17 +172,17 @@ public class GIFImageReader extends ImageReader
}
/**
- * Returns the number of images.
+ * Returns the number of images.
*/
public int getNumImages(boolean allowSearch)
{
try // Image should be loaded here already. But just in case:
{
- readImage();
+ readImage();
}
catch(IOException ioe)
{
- return 0; // Well, now we're in trouble. But return something anyway.
+ return 0; // Well, now we're in trouble. But return something anyway.
}
return file.nImages();
}
@@ -202,11 +202,11 @@ public class GIFImageReader extends ImageReader
}
/**
- * Reads the image indexed by imageIndex and returns it as
+ * Reads the image indexed by imageIndex and returns it as
* a complete BufferedImage, using a supplied ImageReadParam.
- */
- public BufferedImage read(int imageIndex, ImageReadParam param)
- throws IOException, IIOException
+ */
+ public BufferedImage read(int imageIndex, ImageReadParam param)
+ throws IOException, IIOException
{
validateIndex( imageIndex );
GIFFile f = file.getImage( imageIndex );
@@ -216,26 +216,26 @@ public class GIFImageReader extends ImageReader
switch( f.getNColors() )
{
case 16:
- sm = new MultiPixelPackedSampleModel(DataBuffer.TYPE_BYTE,
- width, height, 4);
- break;
+ sm = new MultiPixelPackedSampleModel(DataBuffer.TYPE_BYTE,
+ width, height, 4);
+ break;
case 4:
- sm = new MultiPixelPackedSampleModel(DataBuffer.TYPE_BYTE,
- width, height, 2);
- break;
+ sm = new MultiPixelPackedSampleModel(DataBuffer.TYPE_BYTE,
+ width, height, 2);
+ break;
case 2:
- sm = new MultiPixelPackedSampleModel(DataBuffer.TYPE_BYTE,
- width, height, 1);
- break;
+ sm = new MultiPixelPackedSampleModel(DataBuffer.TYPE_BYTE,
+ width, height, 1);
+ break;
default:
- sm = new SinglePixelPackedSampleModel(DataBuffer.TYPE_BYTE,
- width, height,
- new int[] {0xFF});
- break;
+ sm = new SinglePixelPackedSampleModel(DataBuffer.TYPE_BYTE,
+ width, height,
+ new int[] {0xFF});
+ break;
}
DataBuffer db = new DataBufferByte(f.getRawImage(), width * height, 0);
WritableRaster raster = Raster.createWritableRaster(sm, db, null);
-
+
return new BufferedImage(getPalette( imageIndex ), raster, false, null);
}
}
diff --git a/gnu/javax/imageio/gif/GIFImageReaderSpi.java b/gnu/javax/imageio/gif/GIFImageReaderSpi.java
index a31848623..285ca42e4 100644
--- a/gnu/javax/imageio/gif/GIFImageReaderSpi.java
+++ b/gnu/javax/imageio/gif/GIFImageReaderSpi.java
@@ -46,7 +46,7 @@ import javax.imageio.ImageReader;
import javax.imageio.spi.ImageReaderSpi;
import javax.imageio.stream.ImageInputStream;
-public class GIFImageReaderSpi extends ImageReaderSpi
+public class GIFImageReaderSpi extends ImageReaderSpi
{
static final String vendorName = "GNU";
static final String version = "0.1";
@@ -68,39 +68,39 @@ public class GIFImageReaderSpi extends ImageReaderSpi
static final String nativeImageMetadataFormatClassName = null;
static final String[] extraImageMetadataFormatNames = null;
static final String[] extraImageMetadataFormatClassNames = null;
-
- public GIFImageReaderSpi()
+
+ public GIFImageReaderSpi()
{
super(vendorName, version,
- names, suffixes, MIMETypes,
- readerClassName,
- new Class[]{ ImageInputStream.class, InputStream.class },
- writerSpiNames,
- supportsStandardStreamMetadataFormat,
- nativeStreamMetadataFormatName,
- nativeStreamMetadataFormatClassName,
- extraStreamMetadataFormatNames,
- extraStreamMetadataFormatClassNames,
- supportsStandardImageMetadataFormat,
- nativeImageMetadataFormatName,
- nativeImageMetadataFormatClassName,
- extraImageMetadataFormatNames,
- extraImageMetadataFormatClassNames);
+ names, suffixes, MIMETypes,
+ readerClassName,
+ new Class[]{ ImageInputStream.class, InputStream.class },
+ writerSpiNames,
+ supportsStandardStreamMetadataFormat,
+ nativeStreamMetadataFormatName,
+ nativeStreamMetadataFormatClassName,
+ extraStreamMetadataFormatNames,
+ extraStreamMetadataFormatClassNames,
+ supportsStandardImageMetadataFormat,
+ nativeImageMetadataFormatName,
+ nativeImageMetadataFormatClassName,
+ extraImageMetadataFormatNames,
+ extraImageMetadataFormatClassNames);
}
-
- public String getDescription(Locale locale)
+
+ public String getDescription(Locale locale)
{
return "Compuserve GIF";
}
-
+
public boolean canDecodeInput(Object input)
- throws IOException
+ throws IOException
{
if( input == null )
throw new IllegalArgumentException("Input object cannot be null.");
- if( !(input instanceof ImageInputStream) &&
- !(input instanceof InputStream))
+ if( !(input instanceof ImageInputStream) &&
+ !(input instanceof InputStream))
return false;
boolean retval;
@@ -116,8 +116,8 @@ public class GIFImageReaderSpi extends ImageReaderSpi
return retval;
}
-
- public ImageReader createReaderInstance(Object extension)
+
+ public ImageReader createReaderInstance(Object extension)
{
return new GIFImageReader(this);
}
diff --git a/gnu/javax/imageio/jpeg/DCT.java b/gnu/javax/imageio/jpeg/DCT.java
index 91b6eb88f..fda52e5f5 100644
--- a/gnu/javax/imageio/jpeg/DCT.java
+++ b/gnu/javax/imageio/jpeg/DCT.java
@@ -61,7 +61,7 @@ public class DCT
/**
* Figure A.3.3 IDCT, Cu Cv on A-5 of the ISO DIS 10918-1. Requirements and
* Guidelines.
- *
+ *
* @param u
* @return
*/
@@ -100,7 +100,7 @@ public class DCT
* slow_idct - Figure A.3.3 IDCT (informative) on A-5 of the ISO DIS
* 10918-1. Requirements and Guidelines. This is a slow IDCT, there are
* better algorithms to use, it's fairly expensive with processor speed.
- *
+ *
* @param matrix
* @return
*/
@@ -199,7 +199,7 @@ public class DCT
* effecient and only inaccurate at about 1/1000th of a percent of values
* analyzed. Cannot be static because initMatrix must run before any
* fast_idct values can be computed.
- *
+ *
* @param input
* @return
*/
@@ -255,7 +255,7 @@ public class DCT
{
output[i][j] = ((double) input[i][j] - (double) 128.0);
// input[i][j] -= 128;
-
+
}
}
diff --git a/gnu/javax/imageio/jpeg/JPEGComponent.java b/gnu/javax/imageio/jpeg/JPEGComponent.java
index d07bb34e9..7be67a02a 100644
--- a/gnu/javax/imageio/jpeg/JPEGComponent.java
+++ b/gnu/javax/imageio/jpeg/JPEGComponent.java
@@ -59,7 +59,7 @@ public class JPEGComponent
/**
* Initializes the component
- *
+ *
* @param id
* @param factorHorizontal
* @param factorVertical
@@ -78,7 +78,7 @@ public class JPEGComponent
* If a restart marker is found with too little of an MCU count (i.e. our
* Restart Interval is 63 and we have 61 we copy the last MCU until it's
* full)
- *
+ *
* @param index
* @param length
*/
@@ -180,7 +180,7 @@ public class JPEGComponent
/**
* This write the block of data to the raster throwing out anything that
* spills over the raster width or height.
- *
+ *
* @param raster
* @param data
* @param compIndex
@@ -210,7 +210,7 @@ public class JPEGComponent
* but it writes the data to the raster block by factor size in a zig zag
* fashion. This has the helper function writeBlock which does the actual
* writing.
- *
+ *
* @param raster
* @param componentIndex
*/
@@ -263,7 +263,7 @@ public class JPEGComponent
/**
* Set the quantization table for this component.
- *
+ *
* @param quanttable
*/
public void setQuantizationTable(int[] quanttable)
@@ -273,7 +273,7 @@ public class JPEGComponent
/**
* Read in a partial MCU for this component
- *
+ *
* @param stream TODO
* @throws JPEGException TODO
* @throws IOException TODO
@@ -293,7 +293,7 @@ public class JPEGComponent
/**
* Generated from text on F-22, F.2.2.1 - Huffman decoding of DC
* coefficients on ISO DIS 10918-1. Requirements and Guidelines.
- *
+ *
* @param JPEGStream TODO
*
* @return TODO
@@ -301,7 +301,7 @@ public class JPEGComponent
* @throws IOException TODO
*/
public double decode_dc_coefficient(JPEGImageInputStream JPEGStream)
- throws JPEGException, IOException
+ throws JPEGException, IOException
{
int t = DCTable.decode(JPEGStream);
double diff = JPEGStream.readBits(t);
@@ -314,7 +314,7 @@ public class JPEGComponent
/**
* Generated from text on F-23, F.13 - Huffman decoded of AC coefficients
* on ISO DIS 10918-1. Requirements and Guidelines.
- *
+ *
* @param JPEGStream TODO
* @return TODO
*
diff --git a/gnu/javax/imageio/jpeg/JPEGDecoder.java b/gnu/javax/imageio/jpeg/JPEGDecoder.java
index 0f2a3f2b9..11d547f4d 100644
--- a/gnu/javax/imageio/jpeg/JPEGDecoder.java
+++ b/gnu/javax/imageio/jpeg/JPEGDecoder.java
@@ -68,7 +68,7 @@ public class JPEGDecoder
BufferedImage image;
int width;
int height;
-
+
byte marker;
/**
@@ -100,7 +100,7 @@ public class JPEGDecoder
{
return height;
}
-
+
public int getWidth()
{
return width;
@@ -333,7 +333,7 @@ public class JPEGDecoder
{
for (int i = 0; i < 64; i++)
quantData[i] = jpegStream.readByte();
-
+
}
else if ((byte) (quantSpecs >> 4) == 1)
// Precision 16 bit.
@@ -370,7 +370,7 @@ public class JPEGDecoder
byte endSpectralSelection = jpegStream.readByte();
byte successiveApproximation = jpegStream.readByte();
- int mcuIndex = 0;
+ int mcuIndex = 0;
int mcuTotalIndex = 0;
// This loops through until a MarkerTagFound exception is
// found, if the marker tag is a RST (Restart Marker) it
@@ -541,7 +541,7 @@ public class JPEGDecoder
throw new JPEGException("Unsupported Codec Type: Extended "
+ "Sequential DCT JPEG's Not-Supported");
//case JPEGMarker.SOF2:
- // throw new JPEGException("Unsupported Codec Type: Progressive DCT JPEG's Not-Supported");
+ // throw new JPEGException("Unsupported Codec Type: Progressive DCT JPEG's Not-Supported");
case JPEGMarker.SOF3:
throw new JPEGException("Unsupported Codec Type:"
+ " Lossless (sequential)");
diff --git a/gnu/javax/imageio/jpeg/JPEGImageInputStream.java b/gnu/javax/imageio/jpeg/JPEGImageInputStream.java
index 29a12f346..f2c26d9d5 100644
--- a/gnu/javax/imageio/jpeg/JPEGImageInputStream.java
+++ b/gnu/javax/imageio/jpeg/JPEGImageInputStream.java
@@ -47,7 +47,7 @@ public class JPEGImageInputStream
private ImageInputStream in;
byte marker;
-
+
public JPEGImageInputStream(ImageInputStream in)
{
super();
@@ -68,7 +68,7 @@ public class JPEGImageInputStream
setBitOffset(0);
return in.read(data, offset, len);
}
-
+
/**
* Pull a byte from the stream, this checks to see if the byte is 0xff
* and if the next byte isn't 0x00 (stuffed byte) it errors out. If it's
@@ -117,7 +117,7 @@ public class JPEGImageInputStream
* @return the amount of bits specified by l as an integer
*
* @throws IOException TODO
- * @throws JPEGMarkerFoundException
+ * @throws JPEGMarkerFoundException
* @throws BitStreamException TODO
*/
public int readBit()
@@ -129,7 +129,7 @@ public class JPEGImageInputStream
int newOffset = (bitOffset + 1) & 0x7;
byte data = pullByte();
-
+
if (bitOffset != 0)
{
seek(getStreamPosition() - 1);
diff --git a/gnu/javax/imageio/jpeg/JPEGImageReader.java b/gnu/javax/imageio/jpeg/JPEGImageReader.java
index 51bc0ce37..5ecbe0f8c 100644
--- a/gnu/javax/imageio/jpeg/JPEGImageReader.java
+++ b/gnu/javax/imageio/jpeg/JPEGImageReader.java
@@ -117,7 +117,7 @@ public class JPEGImageReader extends ImageReader
private void checkStream() throws IOException
{
- if (!(input instanceof ImageInputStream))
+ if (!(input instanceof ImageInputStream))
throw new IllegalStateException("Input not an ImageInputStream.");
if(input == null)
throw new IllegalStateException("No input stream.");
diff --git a/gnu/javax/imageio/jpeg/JPEGImageReaderSpi.java b/gnu/javax/imageio/jpeg/JPEGImageReaderSpi.java
index c1e9adf60..c45b818c7 100644
--- a/gnu/javax/imageio/jpeg/JPEGImageReaderSpi.java
+++ b/gnu/javax/imageio/jpeg/JPEGImageReaderSpi.java
@@ -88,16 +88,16 @@ public class JPEGImageReaderSpi extends ImageReaderSpi
extraImageMetadataFormatClassNames);
System.out.println ("JPEGImageReaderSPI!!!");
}
-
+
public String getDescription(Locale locale)
{
return "JPEG ISO 10918-1, JFIF V1.02";
}
-
+
public boolean canDecodeInput(Object input)
throws IOException
{
- if (!(input instanceof ImageInputStream))
+ if (!(input instanceof ImageInputStream))
return false;
ImageInputStream in = (ImageInputStream) input;
@@ -117,7 +117,7 @@ public class JPEGImageReaderSpi extends ImageReaderSpi
return retval;
}
-
+
public ImageReader createReaderInstance(Object extension)
{
return new JPEGImageReader(this);
diff --git a/gnu/javax/imageio/jpeg/JPEGMarker.java b/gnu/javax/imageio/jpeg/JPEGMarker.java
index c80a0ca78..bc6350fbc 100644
--- a/gnu/javax/imageio/jpeg/JPEGMarker.java
+++ b/gnu/javax/imageio/jpeg/JPEGMarker.java
@@ -172,7 +172,7 @@ public class JPEGMarker
* Quantization Table.
*/
public final static byte DQT = (byte) 0xdb;
-
+
/**
* Start of Scan.
*/
diff --git a/gnu/javax/imageio/jpeg/ZigZag.java b/gnu/javax/imageio/jpeg/ZigZag.java
index 0c19d74ff..9aac0df40 100644
--- a/gnu/javax/imageio/jpeg/ZigZag.java
+++ b/gnu/javax/imageio/jpeg/ZigZag.java
@@ -63,7 +63,7 @@ public class ZigZag
/**
* Encodes a matrix of equal width and height to a byte array.
- *
+ *
* @param matrix
*
* @return
@@ -114,7 +114,7 @@ public class ZigZag
/**
* Encodes a matrix of equal width and height to a double array
- *
+ *
* @param matrix
*
* @return
@@ -165,7 +165,7 @@ public class ZigZag
/**
* Encodes a matrix of equal width and height to a float array
- *
+ *
* @param matrix
*
* @return
@@ -216,7 +216,7 @@ public class ZigZag
/**
* Encodes a matrix of equal width and height to a float array
- *
+ *
* @param matrix
*
* @return
@@ -268,7 +268,7 @@ public class ZigZag
/**
* Convert a double array into a matrix with the same amount of columns and
* rows with length sqrt(double array length)
- *
+ *
* @param data
*
* @return
@@ -282,7 +282,7 @@ public class ZigZag
/**
* Convert a byte array into a matrix with the same amount of columns and
* rows with length sqrt(double array length)
- *
+ *
* @param data
*
* @return
@@ -314,7 +314,7 @@ public class ZigZag
{
buffer[yindex][xindex] = data[dataindex];
dataindex++;
-
+
if (dir == ZigZag.ZIGZAG_FORWARD)
{
if (yindex == 0 || xindex == (width - 1))
@@ -408,19 +408,19 @@ public class ZigZag
public static float[][] decode(float[] data, int width, int height)
{
float[][] buffer = new float[height][width];
-
+
for (int v = 0; v < height; v++)
for (int z = 0; z < width; z++)
buffer[v][z] = 11;
-
+
boolean dir = ZigZag.ZIGZAG_FORWARD;
int xindex = 0, yindex = 0, dataindex = 0;
-
+
while (xindex < width && yindex < height && dataindex < data.length)
{
buffer[yindex][xindex] = data[dataindex];
dataindex++;
-
+
if (dir == ZigZag.ZIGZAG_FORWARD)
{
if (yindex == 0 || xindex == (width - 1))
diff --git a/gnu/javax/imageio/png/PNGChunk.java b/gnu/javax/imageio/png/PNGChunk.java
index 8efbeea72..ade0999fe 100644
--- a/gnu/javax/imageio/png/PNGChunk.java
+++ b/gnu/javax/imageio/png/PNGChunk.java
@@ -52,20 +52,20 @@ public class PNGChunk
*/
private static long[] crcTable;
- static
+ static
{
long c;
crcTable = new long[256];
-
+
for(int i = 0; i < 256; i++)
{
- c = i;
- for(int j = 0; j < 8; j++)
- if( (c & 1) == 1 )
- c = 0xEDB88320L ^ (c >> 1);
- else
- c = c >> 1;
- crcTable[i] = c;
+ c = i;
+ for(int j = 0; j < 8; j++)
+ if( (c & 1) == 1 )
+ c = 0xEDB88320L ^ (c >> 1);
+ else
+ c = c >> 1;
+ crcTable[i] = c;
}
}
@@ -90,7 +90,7 @@ public class PNGChunk
* The chunk data
*/
protected byte[] data;
-
+
/**
* The chunk's crc
*/
@@ -107,7 +107,7 @@ public class PNGChunk
}
/**
- * Constructor for creating new chunks.
+ * Constructor for creating new chunks.
* (only used by subclasses - creating a generic chunk is rather useless)
*/
protected PNGChunk( int type )
@@ -122,44 +122,44 @@ public class PNGChunk
* @param strict - if true, a PNGException is thrown on all invalid chunks,
* if false, only critical chunks will throw PNGExceptions.
*/
- public static PNGChunk readChunk(InputStream in, boolean strict)
+ public static PNGChunk readChunk(InputStream in, boolean strict)
throws IOException, PNGException
{
byte data[] = new byte[4];
if( in.read( data ) != 4 )
throw new IOException("Could not read chunk length.");
- int length = ((data[0] & 0xFF) << 24) | ((data[1] & 0xFF) << 16 ) |
+ int length = ((data[0] & 0xFF) << 24) | ((data[1] & 0xFF) << 16 ) |
((data[2] & 0xFF) << 8) | (data[3] & 0xFF);
if( in.read( data ) != 4 )
throw new IOException("Could not read chunk type.");
- int type = ((data[0] & 0xFF) << 24) | ((data[1] & 0xFF) << 16 ) |
+ int type = ((data[0] & 0xFF) << 24) | ((data[1] & 0xFF) << 16 ) |
((data[2] & 0xFF) << 8) | (data[3] & 0xFF);
byte[] chkdata = new byte[ length ];
if( in.read( chkdata ) != length )
throw new IOException("Could not read chunk data.");
-
+
if( in.read( data ) != 4 )
throw new IOException("Could not read chunk CRC.");
-
- int crc = ((data[0] & 0xFF) << 24) | ( (data[1] & 0xFF) << 16 ) |
+
+ int crc = ((data[0] & 0xFF) << 24) | ( (data[1] & 0xFF) << 16 ) |
((data[2] & 0xFF) << 8) | (data[3] & 0xFF);
if( strict )
return getChunk( type, chkdata, crc );
else
{
- try
- {
- return getChunk( type, chkdata, crc );
- }
- catch(PNGException pnge)
- {
- if( isEssentialChunk( type ) )
- throw pnge;
- return null;
- }
+ try
+ {
+ return getChunk( type, chkdata, crc );
+ }
+ catch(PNGException pnge)
+ {
+ if( isEssentialChunk( type ) )
+ throw pnge;
+ return null;
+ }
}
}
@@ -172,21 +172,21 @@ public class PNGChunk
switch( type )
{
case TYPE_HEADER:
- return new PNGHeader( type, data, crc );
+ return new PNGHeader( type, data, crc );
case TYPE_DATA:
- return new PNGData( type, data, crc );
+ return new PNGData( type, data, crc );
case TYPE_PALETTE:
- return new PNGPalette( type, data, crc );
+ return new PNGPalette( type, data, crc );
case TYPE_TIME:
- return new PNGTime( type, data, crc );
+ return new PNGTime( type, data, crc );
case TYPE_PHYS:
- return new PNGPhys( type, data, crc );
+ return new PNGPhys( type, data, crc );
case TYPE_GAMMA:
- return new PNGGamma( type, data, crc );
+ return new PNGGamma( type, data, crc );
case TYPE_PROFILE:
- return new PNGICCProfile( type, data, crc );
+ return new PNGICCProfile( type, data, crc );
default:
- return new PNGChunk( type, data, crc );
+ return new PNGChunk( type, data, crc );
}
}
@@ -201,9 +201,9 @@ public class PNGChunk
case TYPE_DATA:
case TYPE_PALETTE:
case TYPE_END:
- return true;
+ return true;
default:
- return false;
+ return false;
}
}
@@ -224,7 +224,7 @@ public class PNGChunk
}
/**
- * Writes a PNG chunk to an output stream,
+ * Writes a PNG chunk to an output stream,
* performing the CRC calculation as well.
*/
public void writeChunk(OutputStream out) throws IOException
@@ -267,7 +267,7 @@ public class PNGChunk
byte[] t = getInt( type );
for(int i = 0; i < 4; i++)
c = crcTable[ (int)((c ^ t[i]) & 0xFF) ] ^ (c >> 8);
-
+
for(int i = 0; i < data.length; i++)
c = crcTable[ (int)((c ^ data[i]) & 0xFF) ] ^ (c >> 8);
@@ -276,8 +276,8 @@ public class PNGChunk
public String toString()
{
- return "PNG Chunk. Type: " + new String( getInt(type) ) + " , CRC: " +
+ return "PNG Chunk. Type: " + new String( getInt(type) ) + " , CRC: " +
crc + " , calculated CRC: "+calcCRC();
}
-
+
}
diff --git a/gnu/javax/imageio/png/PNGData.java b/gnu/javax/imageio/png/PNGData.java
index 2a8f8aa2d..08d765f66 100644
--- a/gnu/javax/imageio/png/PNGData.java
+++ b/gnu/javax/imageio/png/PNGData.java
@@ -43,8 +43,8 @@ import java.util.zip.Deflater;
/**
* A PNG IDAT (data) chunk.
*/
-public class PNGData extends PNGChunk
-{
+public class PNGData extends PNGChunk
+{
private int offset;
protected PNGData( int type, byte[] data, int crc )
@@ -65,7 +65,7 @@ public class PNGData extends PNGChunk
* @return true if the chunk is filled and no more data can be written,
* false otherwise.
*/
- public void deflateToChunk( Deflater def )
+ public void deflateToChunk( Deflater def )
{
offset += def.deflate( data, offset, data.length - offset );
}
@@ -80,7 +80,7 @@ public class PNGData extends PNGChunk
/**
* Shrink the chunk to offset size, used for the last chunk in a stream
- * (no trailing data!)
+ * (no trailing data!)
*/
public void shrink()
{
@@ -92,7 +92,7 @@ public class PNGData extends PNGChunk
/**
* Feeds the data in the chunk to a ZIP inflater object.
*/
- public void feedToInflater( Inflater inf )
+ public void feedToInflater( Inflater inf )
{
inf.setInput( data );
}
diff --git a/gnu/javax/imageio/png/PNGDecoder.java b/gnu/javax/imageio/png/PNGDecoder.java
index 652f59d35..4481107c4 100644
--- a/gnu/javax/imageio/png/PNGDecoder.java
+++ b/gnu/javax/imageio/png/PNGDecoder.java
@@ -92,11 +92,11 @@ public class PNGDecoder
{
try
{
- return inflater.inflate( buf, offset, buf.length - offset);
+ return inflater.inflate( buf, offset, buf.length - offset);
}
catch(DataFormatException dfe)
{
- throw new PNGException("Error inflating data.");
+ throw new PNGException("Error inflating data.");
}
}
@@ -111,29 +111,29 @@ public class PNGDecoder
chunk.feedToInflater( inflater );
do
{
- if( readFilter )
- if( getBytes( filterType, 0 ) < 1 )
- return;
-
- n = getBytes( scanline, offset );
-
- if( offset + n < stride )
- {
- offset += n;
- readFilter = false;
- }
- else
- {
- scanline = PNGFilter.unFilterScanline( filterType[0], scanline,
- lastScanline, bpp );
- System.arraycopy( scanline, 0,
- raster, currentScanline * stride, stride );
- lastScanline = scanline;
- scanline = new byte[scanline.length];
- currentScanline++;
- readFilter = true;
- offset = 0;
- }
+ if( readFilter )
+ if( getBytes( filterType, 0 ) < 1 )
+ return;
+
+ n = getBytes( scanline, offset );
+
+ if( offset + n < stride )
+ {
+ offset += n;
+ readFilter = false;
+ }
+ else
+ {
+ scanline = PNGFilter.unFilterScanline( filterType[0], scanline,
+ lastScanline, bpp );
+ System.arraycopy( scanline, 0,
+ raster, currentScanline * stride, stride );
+ lastScanline = scanline;
+ scanline = new byte[scanline.length];
+ currentScanline++;
+ readFilter = true;
+ offset = 0;
+ }
}
while( n > 0 && currentScanline < header.getHeight() );
}
@@ -154,86 +154,86 @@ public class PNGDecoder
switch( header.getColorType() )
{
case PNGHeader.GRAYSCALE_WITH_ALPHA:
- if( depth == 8 )
- {
- t = DataBuffer.TYPE_BYTE;
- db = getByteBuffer();
- }
- else
- {
- t = DataBuffer.TYPE_USHORT;
- db = getShortBuffer();
- }
- sm = new ComponentSampleModel(t, width, height, 2, width * 2,
- new int[]{0, 1});
- break;
+ if( depth == 8 )
+ {
+ t = DataBuffer.TYPE_BYTE;
+ db = getByteBuffer();
+ }
+ else
+ {
+ t = DataBuffer.TYPE_USHORT;
+ db = getShortBuffer();
+ }
+ sm = new ComponentSampleModel(t, width, height, 2, width * 2,
+ new int[]{0, 1});
+ break;
case PNGHeader.GRAYSCALE:
- switch( depth )
- {
- case 16:
- sm = new ComponentSampleModel(DataBuffer.TYPE_USHORT,
- width, height, 1, width,
- new int[]{ 0 });
- db = getShortBuffer();
- break;
-
- case 8:
- sm = new ComponentSampleModel(DataBuffer.TYPE_BYTE,
- width, height, 1, width,
- new int[]{ 0 });
- db = getByteBuffer();
- break;
-
- default:
- sm = new MultiPixelPackedSampleModel(DataBuffer.TYPE_BYTE,
- width, height, depth);
- db = getByteBuffer();
- break;
- }
- break;
+ switch( depth )
+ {
+ case 16:
+ sm = new ComponentSampleModel(DataBuffer.TYPE_USHORT,
+ width, height, 1, width,
+ new int[]{ 0 });
+ db = getShortBuffer();
+ break;
+
+ case 8:
+ sm = new ComponentSampleModel(DataBuffer.TYPE_BYTE,
+ width, height, 1, width,
+ new int[]{ 0 });
+ db = getByteBuffer();
+ break;
+
+ default:
+ sm = new MultiPixelPackedSampleModel(DataBuffer.TYPE_BYTE,
+ width, height, depth);
+ db = getByteBuffer();
+ break;
+ }
+ break;
case PNGHeader.RGB:
- if( depth == 8 )
- {
- t = DataBuffer.TYPE_BYTE;
- db = getByteBuffer();
- }
- else
- {
- t = DataBuffer.TYPE_USHORT;
- db = getShortBuffer();
- }
- sm = new ComponentSampleModel(t, width, height, 3, 3 * width,
- new int[]{0, 1, 2});
- break;
+ if( depth == 8 )
+ {
+ t = DataBuffer.TYPE_BYTE;
+ db = getByteBuffer();
+ }
+ else
+ {
+ t = DataBuffer.TYPE_USHORT;
+ db = getShortBuffer();
+ }
+ sm = new ComponentSampleModel(t, width, height, 3, 3 * width,
+ new int[]{0, 1, 2});
+ break;
case PNGHeader.RGB_WITH_ALPHA:
- if( depth == 8 )
- {
- t = DataBuffer.TYPE_BYTE;
- db = getByteBuffer();
- }
- else
- {
- t = DataBuffer.TYPE_USHORT;
- db = getShortBuffer();
- }
-
- sm = new ComponentSampleModel(t, width, height, 4, width * 4,
- new int[]{0, 1, 2, 3});
- break;
-
+ if( depth == 8 )
+ {
+ t = DataBuffer.TYPE_BYTE;
+ db = getByteBuffer();
+ }
+ else
+ {
+ t = DataBuffer.TYPE_USHORT;
+ db = getShortBuffer();
+ }
+
+ sm = new ComponentSampleModel(t, width, height, 4, width * 4,
+ new int[]{0, 1, 2, 3});
+ break;
+
case PNGHeader.INDEXED:
- if( depth == 8 )
- sm = new SinglePixelPackedSampleModel(DataBuffer.TYPE_BYTE,
- width, height,
- new int[] {0xFF});
- else
- sm = new MultiPixelPackedSampleModel(DataBuffer.TYPE_BYTE,
- width, height, depth);
- db = getByteBuffer();
- break;
+ if( depth == 8 )
+ sm = new SinglePixelPackedSampleModel(DataBuffer.TYPE_BYTE,
+ width, height,
+ new int[] {0xFF});
+ else
+ sm = new MultiPixelPackedSampleModel(DataBuffer.TYPE_BYTE,
+ width, height, depth);
+ db = getByteBuffer();
+ break;
}
return Raster.createWritableRaster(sm, db, null);
@@ -247,8 +247,8 @@ public class PNGDecoder
{
short[] data = new short[(raster.length >> 1)];
for( int i = 0; i < data.length; i++ )
- data[i] = (short)(((raster[i * 2] & 0xFF) << 8) |
- (raster[i * 2 + 1] & 0xFF));
+ data[i] = (short)(((raster[i * 2] & 0xFF) << 8) |
+ (raster[i * 2 + 1] & 0xFF));
return new DataBufferUShort( data, data.length );
}
@@ -260,8 +260,8 @@ public class PNGDecoder
return new DataBufferByte( raster, raster.length );
}
- public ColorModel getColorModel( ColorSpace cs,
- int colorType, int depth )
+ public ColorModel getColorModel( ColorSpace cs,
+ int colorType, int depth )
{
int[] bits;
boolean hasAlpha = false;
@@ -270,49 +270,49 @@ public class PNGDecoder
switch( colorType )
{
case PNGHeader.GRAYSCALE_WITH_ALPHA:
- if( cs == null )
- cs = ColorSpace.getInstance( ColorSpace.CS_GRAY );
- hasAlpha = true;
- bits = new int[]{ depth, depth };
- break;
-
+ if( cs == null )
+ cs = ColorSpace.getInstance( ColorSpace.CS_GRAY );
+ hasAlpha = true;
+ bits = new int[]{ depth, depth };
+ break;
+
case PNGHeader.RGB:
- bits = new int[]{ depth, depth, depth };
- break;
+ bits = new int[]{ depth, depth, depth };
+ break;
case PNGHeader.RGB_WITH_ALPHA:
- hasAlpha = true;
- bits = new int[]{ depth, depth, depth, depth };
- break;
+ hasAlpha = true;
+ bits = new int[]{ depth, depth, depth, depth };
+ break;
case PNGHeader.GRAYSCALE:
- if( depth < 8 )
- return grayPalette( depth );
+ if( depth < 8 )
+ return grayPalette( depth );
- if( cs == null )
- cs = ColorSpace.getInstance( ColorSpace.CS_GRAY );
- bits = new int[]{ depth };
- break;
+ if( cs == null )
+ cs = ColorSpace.getInstance( ColorSpace.CS_GRAY );
+ bits = new int[]{ depth };
+ break;
default:
case PNGHeader.INDEXED:
- return null; // Handled by the palette chunk.
+ return null; // Handled by the palette chunk.
}
if( cs == null )
cs = ColorSpace.getInstance( ColorSpace.CS_sRGB );
- return new ComponentColorModel(cs, bits, hasAlpha, false,
- (hasAlpha ?
- ComponentColorModel.TRANSLUCENT :
- ComponentColorModel.OPAQUE),
- ((depth == 16) ? DataBuffer.TYPE_USHORT :
- DataBuffer.TYPE_BYTE));
+ return new ComponentColorModel(cs, bits, hasAlpha, false,
+ (hasAlpha ?
+ ComponentColorModel.TRANSLUCENT :
+ ComponentColorModel.OPAQUE),
+ ((depth == 16) ? DataBuffer.TYPE_USHORT :
+ DataBuffer.TYPE_BYTE));
}
private IndexColorModel grayPalette(int depth)
- {
+ {
byte[] c = new byte[ (1 << depth) ];
for(int i = 0; i < c.length; i++)
c[i] = (byte)(255.0 * (((double)i) / ((double)c.length - 1.0)));
diff --git a/gnu/javax/imageio/png/PNGEncoder.java b/gnu/javax/imageio/png/PNGEncoder.java
index b8441c4e3..b31787635 100644
--- a/gnu/javax/imageio/png/PNGEncoder.java
+++ b/gnu/javax/imageio/png/PNGEncoder.java
@@ -49,7 +49,7 @@ import java.awt.image.DataBufferUShort;
import java.awt.image.IndexColorModel;
import java.awt.image.WritableRaster;
-public class PNGEncoder
+public class PNGEncoder
{
/**
* The default data chunk size. 8 kb.
@@ -65,7 +65,7 @@ public class PNGEncoder
public PNGEncoder( BufferedImage bi ) throws PNGException
{
ColorModel c = bi.getColorModel();
- int width = bi.getWidth();
+ int width = bi.getWidth();
int height = bi.getHeight();
int depth = 0;
int colorType;
@@ -73,49 +73,49 @@ public class PNGEncoder
if( c instanceof IndexColorModel )
{
- colorType = PNGHeader.INDEXED;
- int n = ((IndexColorModel)c).getMapSize();
- if( n <= 2 )
- depth = 1;
- else if( n <= 4 )
- depth = 2;
- else if( n <= 16 )
- depth = 4;
- else if( n <= 256 )
- depth = 8;
- else
- throw new PNGException("Depth must be <= 8 bits for indexed color.");
- palette = new PNGPalette( ((IndexColorModel)c) );
+ colorType = PNGHeader.INDEXED;
+ int n = ((IndexColorModel)c).getMapSize();
+ if( n <= 2 )
+ depth = 1;
+ else if( n <= 4 )
+ depth = 2;
+ else if( n <= 16 )
+ depth = 4;
+ else if( n <= 256 )
+ depth = 8;
+ else
+ throw new PNGException("Depth must be <= 8 bits for indexed color.");
+ palette = new PNGPalette( ((IndexColorModel)c) );
}
else
- {
- ColorSpace cs = c.getColorSpace();
- ColorSpace grayCS = ColorSpace.getInstance( ColorSpace.CS_GRAY );
- if( cs == grayCS || bi.getType() == BufferedImage.TYPE_BYTE_GRAY
- || bi.getType() == BufferedImage.TYPE_USHORT_GRAY )
- colorType = c.hasAlpha() ? PNGHeader.GRAYSCALE_WITH_ALPHA :
- PNGHeader.GRAYSCALE;
- else
- colorType = c.hasAlpha() ? PNGHeader.RGB_WITH_ALPHA : PNGHeader.RGB;
- // Figure out the depth
- int[] bits = c.getComponentSize();
- depth = bits[0];
- for(int i = 1; i < bits.length; i++ )
- if( bits[i] > depth ) depth = bits[i];
- if( (cs != grayCS && !cs.isCS_sRGB()) && cs instanceof ICC_ColorSpace )
- profile = new PNGICCProfile( ((ICC_ColorSpace)cs).getProfile() );
+ {
+ ColorSpace cs = c.getColorSpace();
+ ColorSpace grayCS = ColorSpace.getInstance( ColorSpace.CS_GRAY );
+ if( cs == grayCS || bi.getType() == BufferedImage.TYPE_BYTE_GRAY
+ || bi.getType() == BufferedImage.TYPE_USHORT_GRAY )
+ colorType = c.hasAlpha() ? PNGHeader.GRAYSCALE_WITH_ALPHA :
+ PNGHeader.GRAYSCALE;
+ else
+ colorType = c.hasAlpha() ? PNGHeader.RGB_WITH_ALPHA : PNGHeader.RGB;
+ // Figure out the depth
+ int[] bits = c.getComponentSize();
+ depth = bits[0];
+ for(int i = 1; i < bits.length; i++ )
+ if( bits[i] > depth ) depth = bits[i];
+ if( (cs != grayCS && !cs.isCS_sRGB()) && cs instanceof ICC_ColorSpace )
+ profile = new PNGICCProfile( ((ICC_ColorSpace)cs).getProfile() );
}
header = new PNGHeader(width, height, depth, colorType, interlace);
- stride = header.getScanlineStride(); // scanline stride
+ stride = header.getScanlineStride(); // scanline stride
bpp = header.bytesPerPixel(); // bytes per pixel
getRawData( bi );
}
/**
* Returns the generated header.
- */
+ */
public PNGHeader getHeader()
{
return header;
@@ -123,7 +123,7 @@ public class PNGEncoder
/**
* Returns the generated palette.
- */
+ */
public PNGPalette getPalette()
{
return palette;
@@ -131,7 +131,7 @@ public class PNGEncoder
/**
* Returns the associated ICC profile, if any.
- */
+ */
public PNGICCProfile getProfile()
{
return profile;
@@ -151,29 +151,29 @@ public class PNGEncoder
byte filterByte = PNGFilter.FILTER_NONE;
for( int i = 0; i < header.getHeight(); i++)
{
- byte[] scanline = new byte[ stride ];
- System.arraycopy(rawData, (i * stride), scanline, 0, stride);
- if( useFilter && i > 0)
- filterByte = PNGFilter.chooseFilter( scanline, lastScanline, bpp);
-
- byte[] filtered = PNGFilter.filterScanline( filterByte, scanline,
- lastScanline, bpp );
- data[i * (stride + 1)] = filterByte;
- System.arraycopy(filtered, 0, data, 1 + (i * (stride + 1)), stride);
-
- lastScanline = scanline;
+ byte[] scanline = new byte[ stride ];
+ System.arraycopy(rawData, (i * stride), scanline, 0, stride);
+ if( useFilter && i > 0)
+ filterByte = PNGFilter.chooseFilter( scanline, lastScanline, bpp);
+
+ byte[] filtered = PNGFilter.filterScanline( filterByte, scanline,
+ lastScanline, bpp );
+ data[i * (stride + 1)] = filterByte;
+ System.arraycopy(filtered, 0, data, 1 + (i * (stride + 1)), stride);
+
+ lastScanline = scanline;
}
- deflater.setInput( data );
+ deflater.setInput( data );
deflater.finish();
PNGData chunk;
Vector chunks = new Vector();
do
{
- chunk = new PNGData( defaultChunkSize );
- chunk.deflateToChunk( deflater );
- chunks.add( chunk );
+ chunk = new PNGData( defaultChunkSize );
+ chunk.deflateToChunk( deflater );
+ chunks.add( chunk );
}
while( chunk.chunkFull() );
chunk.shrink(); // Shrink the last chunk.
@@ -190,28 +190,28 @@ public class PNGEncoder
rawData = new byte[ stride * header.getHeight() ];
if( header.isIndexed() )
{
- DataBuffer db = raster.getDataBuffer();
- if( !( db instanceof DataBufferByte ) )
- throw new PNGException("Unexpected DataBuffer for an IndexColorModel.");
- byte[] data = ((DataBufferByte)db).getData();
- for(int i = 0; i < header.getHeight(); i++ )
- System.arraycopy( data, i * stride, rawData, i * stride, stride );
- return;
+ DataBuffer db = raster.getDataBuffer();
+ if( !( db instanceof DataBufferByte ) )
+ throw new PNGException("Unexpected DataBuffer for an IndexColorModel.");
+ byte[] data = ((DataBufferByte)db).getData();
+ for(int i = 0; i < header.getHeight(); i++ )
+ System.arraycopy( data, i * stride, rawData, i * stride, stride );
+ return;
}
if( header.getDepth() == 16 )
{
- DataBuffer db = raster.getDataBuffer();
- if( !( db instanceof DataBufferUShort ) )
- throw new PNGException("Unexpected DataBuffer for 16-bit.");
- short[] data = ((DataBufferUShort)db).getData();
- for(int i = 0; i < header.getHeight(); i++ )
- for(int j = 0; j < ( stride >> 1); j++)
- {
- rawData[ j * 2 + i * stride ] = (byte)((data[j + i * (stride >> 1 )] & 0xFF00) >> 8);
- rawData[ j * 2 + i * stride + 1 ] = (byte)(data[j + i * (stride >> 1 )] & 0xFF);
- }
- return;
+ DataBuffer db = raster.getDataBuffer();
+ if( !( db instanceof DataBufferUShort ) )
+ throw new PNGException("Unexpected DataBuffer for 16-bit.");
+ short[] data = ((DataBufferUShort)db).getData();
+ for(int i = 0; i < header.getHeight(); i++ )
+ for(int j = 0; j < ( stride >> 1); j++)
+ {
+ rawData[ j * 2 + i * stride ] = (byte)((data[j + i * (stride >> 1 )] & 0xFF00) >> 8);
+ rawData[ j * 2 + i * stride + 1 ] = (byte)(data[j + i * (stride >> 1 )] & 0xFF);
+ }
+ return;
}
int size = ( header.getColorType() == PNGHeader.RGB_WITH_ALPHA ) ? 4 : 3;
@@ -221,13 +221,13 @@ public class PNGEncoder
for( int i = 0; i < width * height; i++ )
{
- rawData[ i * size ] = (byte)((pixels[i] & 0xFF0000) >> 16);
- rawData[ i * size + 1 ] = (byte)((pixels[i] & 0xFF00) >> 8);
- rawData[ i * size + 2 ] = (byte)(pixels[i] & 0xFF);
+ rawData[ i * size ] = (byte)((pixels[i] & 0xFF0000) >> 16);
+ rawData[ i * size + 1 ] = (byte)((pixels[i] & 0xFF00) >> 8);
+ rawData[ i * size + 2 ] = (byte)(pixels[i] & 0xFF);
}
if( size == 4 )
for( int i = 0; i < width * height; i++ )
- rawData[ i * size + 3 ] = (byte)((pixels[i] & 0xFF000000) >> 24);
+ rawData[ i * size + 3 ] = (byte)((pixels[i] & 0xFF000000) >> 24);
}
}
diff --git a/gnu/javax/imageio/png/PNGException.java b/gnu/javax/imageio/png/PNGException.java
index 67486e579..ef5342cf8 100644
--- a/gnu/javax/imageio/png/PNGException.java
+++ b/gnu/javax/imageio/png/PNGException.java
@@ -1,4 +1,4 @@
-/* PNGException.java --
+/* PNGException.java --
Copyright (C) 2006 Free Software Foundation
This file is part of GNU Classpath.
@@ -39,7 +39,7 @@ package gnu.javax.imageio.png;
import java.io.IOException;
-public class PNGException extends IOException
+public class PNGException extends IOException
{
public PNGException(String msg)
{
diff --git a/gnu/javax/imageio/png/PNGFile.java b/gnu/javax/imageio/png/PNGFile.java
index 96e8f9ce7..76154cc66 100644
--- a/gnu/javax/imageio/png/PNGFile.java
+++ b/gnu/javax/imageio/png/PNGFile.java
@@ -46,7 +46,7 @@ import java.awt.image.WritableRaster;
import java.awt.image.ColorModel;
import java.awt.color.ColorSpace;
-public class PNGFile
+public class PNGFile
{
/**
* The PNG file signature.
@@ -59,7 +59,7 @@ public class PNGFile
* 0 bytes of length, the "IEND" tag and its CRC.
*/
private static final byte[] endChunk = new byte[]
- { 0, 0, 0, 0, (byte)0x49, (byte)0x45, (byte)0x4E, (byte)0x44,
+ { 0, 0, 0, 0, (byte)0x49, (byte)0x45, (byte)0x4E, (byte)0x44,
(byte)0xAE, (byte)0x42, (byte)0x60, (byte)0x82 };
/**
@@ -91,7 +91,7 @@ public class PNGFile
* The encoder, if any. (Either this or the above must exist).
*/
private PNGEncoder encoder;
-
+
/**
* The source of this PNG (if encoding)
*/
@@ -104,7 +104,7 @@ public class PNGFile
{
PNGChunk chunk;
byte[] fileHdr = new byte[8];
- chunks = new Vector();
+ chunks = new Vector();
hasPalette = false;
if( in.read( fileHdr ) != 8 )
@@ -124,24 +124,24 @@ public class PNGFile
// Read chunks.
do
{
- chunk = PNGChunk.readChunk( in, false );
- /*
- * We could exit here or output some kind of warning.
- * But in the meantime, we'll just silently drop invalid chunks.
- */
- if( chunk.isValidChunk() )
- {
- if( chunk instanceof PNGData )
- decoder.addData( (PNGData)chunk );
- else // Silently ignore multiple headers, and use only the first.
- if( chunk.getType() != PNGChunk.TYPE_END )
- {
- chunks.add( chunk );
- hasPalette |= ( chunk instanceof PNGPalette );
- }
- }
- else
- System.out.println("WARNING: Invalid chunk!");
+ chunk = PNGChunk.readChunk( in, false );
+ /*
+ * We could exit here or output some kind of warning.
+ * But in the meantime, we'll just silently drop invalid chunks.
+ */
+ if( chunk.isValidChunk() )
+ {
+ if( chunk instanceof PNGData )
+ decoder.addData( (PNGData)chunk );
+ else // Silently ignore multiple headers, and use only the first.
+ if( chunk.getType() != PNGChunk.TYPE_END )
+ {
+ chunks.add( chunk );
+ hasPalette |= ( chunk instanceof PNGPalette );
+ }
+ }
+ else
+ System.out.println("WARNING: Invalid chunk!");
}
while( chunk.getType() != PNGChunk.TYPE_END );
@@ -163,7 +163,7 @@ public class PNGFile
chunks = new Vector();
encoder = new PNGEncoder( bi );
header = encoder.getHeader();
- if( header.isIndexed() )
+ if( header.isIndexed() )
chunks.add( encoder.getPalette() );
// Do the compression and put the data chunks in the list.
@@ -179,8 +179,8 @@ public class PNGFile
header.writeChunk( out );
for( int i = 0; i < chunks.size(); i++ )
{
- PNGChunk chunk = ((PNGChunk)chunks.elementAt(i));
- chunk.writeChunk( out );
+ PNGChunk chunk = ((PNGChunk)chunks.elementAt(i));
+ chunk.writeChunk( out );
}
out.write( endChunk );
}
@@ -194,7 +194,7 @@ public class PNGFile
return false;
for( int i = 0; i < 8; i++ )
if( signature[i] != hdr[i] )
- return false;
+ return false;
return true;
}
@@ -210,16 +210,16 @@ public class PNGFile
ColorModel cm;
if( header.isIndexed() )
{
- PNGPalette pngp = getPalette();
- cm = pngp.getPalette( getColorSpace() );
+ PNGPalette pngp = getPalette();
+ cm = pngp.getPalette( getColorSpace() );
}
else
- cm = decoder.getColorModel( getColorSpace(),
- header.getColorType(),
- header.getDepth() );
-
+ cm = decoder.getColorModel( getColorSpace(),
+ header.getColorType(),
+ header.getDepth() );
+
return new BufferedImage(cm, r, false, null);
- }
+ }
/**
* Find the palette chunk and return it
@@ -228,7 +228,7 @@ public class PNGFile
{
for(int i = 0; i < chunks.size(); i++ )
if( chunks.elementAt(i) instanceof PNGPalette )
- return ((PNGPalette)chunks.elementAt(i));
+ return ((PNGPalette)chunks.elementAt(i));
return null;
}
@@ -242,10 +242,10 @@ public class PNGFile
PNGGamma gamma = null;
for(int i = 0; i < chunks.size(); i++ )
{
- if( chunks.elementAt(i) instanceof PNGICCProfile )
- icc = ((PNGICCProfile)chunks.elementAt(i));
- else if(chunks.elementAt(i) instanceof PNGGamma )
- gamma = ((PNGGamma)chunks.elementAt(i));
+ if( chunks.elementAt(i) instanceof PNGICCProfile )
+ icc = ((PNGICCProfile)chunks.elementAt(i));
+ else if(chunks.elementAt(i) instanceof PNGGamma )
+ gamma = ((PNGGamma)chunks.elementAt(i));
}
if( icc != null )
diff --git a/gnu/javax/imageio/png/PNGFilter.java b/gnu/javax/imageio/png/PNGFilter.java
index 63af19929..9be7b9127 100644
--- a/gnu/javax/imageio/png/PNGFilter.java
+++ b/gnu/javax/imageio/png/PNGFilter.java
@@ -58,16 +58,16 @@ public class PNGFilter
switch( header.getColorType() )
{
case PNGHeader.INDEXED:
- return false;
-
+ return false;
+
case PNGHeader.GRAYSCALE:
case PNGHeader.RGB:
- if( header.bytesPerPixel() <= 1 )
- return false;
+ if( header.bytesPerPixel() <= 1 )
+ return false;
case PNGHeader.GRAYSCALE_WITH_ALPHA:
case PNGHeader.RGB_WITH_ALPHA:
default:
- return true;
+ return true;
}
}
@@ -76,20 +76,20 @@ public class PNGFilter
* suggested in the PNG spec.
* @return a fiter type.
*/
- public static byte chooseFilter( byte[] scanline, byte[] lastScanline,
- int bpp)
-
+ public static byte chooseFilter( byte[] scanline, byte[] lastScanline,
+ int bpp)
+
{
long[] values = new long[5];
int idx = 0;
for( int i = 0; i < 5; i++ )
{
- byte[] filtered = filterScanline((byte)i, scanline, lastScanline, bpp);
- values[i] = 0;
- for(int j = 0; j < filtered.length; j++ )
- values[i] += (int)(filtered[j] & 0xFF);
- if( values[ idx ] > values[i] )
- idx = i;
+ byte[] filtered = filterScanline((byte)i, scanline, lastScanline, bpp);
+ values[i] = 0;
+ for(int j = 0; j < filtered.length; j++ )
+ values[i] += (int)(filtered[j] & 0xFF);
+ if( values[ idx ] > values[i] )
+ idx = i;
}
return (byte)idx;
}
@@ -97,69 +97,69 @@ public class PNGFilter
/**
* Filter a scanline.
*/
- public static byte[] filterScanline( byte filtertype, byte[] scanline,
- byte[] lastScanline, int bpp)
+ public static byte[] filterScanline( byte filtertype, byte[] scanline,
+ byte[] lastScanline, int bpp)
{
int stride = scanline.length;
byte[] out = new byte[ stride ];
switch( filtertype )
{
case FILTER_SUB:
- for( int i = 0; i < bpp; i++)
- out[ i ] = scanline[ i ];
-
- for( int i = bpp; i < stride; i++ )
- out[i] = (byte)(scanline[ i ] -
- scanline[ i - bpp ]);
- break;
+ for( int i = 0; i < bpp; i++)
+ out[ i ] = scanline[ i ];
+
+ for( int i = bpp; i < stride; i++ )
+ out[i] = (byte)(scanline[ i ] -
+ scanline[ i - bpp ]);
+ break;
case FILTER_UP:
- for( int i = 0; i < stride; i++ )
- out[ i ] = (byte)(scanline[ i ] - lastScanline[ i ]);
- break;
+ for( int i = 0; i < stride; i++ )
+ out[ i ] = (byte)(scanline[ i ] - lastScanline[ i ]);
+ break;
case FILTER_AVERAGE:
- for( int i = 0; i < bpp; i++)
- out[ i ] = (byte)((scanline[ i ] & 0xFF) - ((lastScanline[ i ] & 0xFF) >> 1));
- for( int i = bpp; i < stride; i++ )
- out[ i ] = (byte)((scanline[ i ] & 0xFF) -
- (((scanline[ i - bpp ] & 0xFF) +
- (lastScanline[ i ] & 0xFF)) >> 1));
- break;
+ for( int i = 0; i < bpp; i++)
+ out[ i ] = (byte)((scanline[ i ] & 0xFF) - ((lastScanline[ i ] & 0xFF) >> 1));
+ for( int i = bpp; i < stride; i++ )
+ out[ i ] = (byte)((scanline[ i ] & 0xFF) -
+ (((scanline[ i - bpp ] & 0xFF) +
+ (lastScanline[ i ] & 0xFF)) >> 1));
+ break;
case FILTER_PAETH:
- for( int i = 0; i < stride; i++ )
- {
- int x;
- {
- int a, b, c;
- if( i >= bpp )
- {
- a = (scanline[ i - bpp ] & 0xFF); // left
- c = (lastScanline[ i - bpp ] & 0xFF); // upper-left
- }
- else
- a = c = 0;
- b = (lastScanline[ i ] & 0xFF); // up
-
- int p = (a + b - c); // initial estimate
- // distances to a, b, c
- int pa = (p > a) ? p - a : a - p;
- int pb = (p > b) ? p - b : b - p;
- int pc = (p > c) ? p - c : c - p;
- // return nearest of a,b,c,
- // breaking ties in order a,b,c.
- if( pa <= pb && pa <= pc ) x = a;
- else { if( pb <= pc ) x = b;
- else x = c;
- }
- }
- out[ i ] = (byte)(scanline[ i ] - x);
- }
- break;
+ for( int i = 0; i < stride; i++ )
+ {
+ int x;
+ {
+ int a, b, c;
+ if( i >= bpp )
+ {
+ a = (scanline[ i - bpp ] & 0xFF); // left
+ c = (lastScanline[ i - bpp ] & 0xFF); // upper-left
+ }
+ else
+ a = c = 0;
+ b = (lastScanline[ i ] & 0xFF); // up
+
+ int p = (a + b - c); // initial estimate
+ // distances to a, b, c
+ int pa = (p > a) ? p - a : a - p;
+ int pb = (p > b) ? p - b : b - p;
+ int pc = (p > c) ? p - c : c - p;
+ // return nearest of a,b,c,
+ // breaking ties in order a,b,c.
+ if( pa <= pb && pa <= pc ) x = a;
+ else { if( pb <= pc ) x = b;
+ else x = c;
+ }
+ }
+ out[ i ] = (byte)(scanline[ i ] - x);
+ }
+ break;
default:
case FILTER_NONE:
- return scanline;
+ return scanline;
}
return out;
}
@@ -167,8 +167,8 @@ public class PNGFilter
/**
* Unfilter a scanline.
*/
- public static byte[] unFilterScanline( int filtertype, byte[] scanline,
- byte[] lastScanline, int bpp)
+ public static byte[] unFilterScanline( int filtertype, byte[] scanline,
+ byte[] lastScanline, int bpp)
{
int stride = scanline.length;
byte[] out = new byte[ stride ];
@@ -176,62 +176,62 @@ public class PNGFilter
{
case FILTER_NONE:
- System.arraycopy( scanline, 0, out, 0, stride );
- break;
-
+ System.arraycopy( scanline, 0, out, 0, stride );
+ break;
+
case FILTER_SUB:
- for( int i = 0; i < bpp; i++)
- out[ i ] = scanline[ i ];
-
- for( int i = bpp; i < stride; i++ )
- out[ i ] = (byte)(scanline[ i ] +
- out[ i - bpp ]);
- break;
+ for( int i = 0; i < bpp; i++)
+ out[ i ] = scanline[ i ];
+
+ for( int i = bpp; i < stride; i++ )
+ out[ i ] = (byte)(scanline[ i ] +
+ out[ i - bpp ]);
+ break;
case FILTER_UP:
- for( int i = 0; i < stride; i++ )
- out[ i ] = (byte)(scanline[ i ] + lastScanline[ i ]);
- break;
+ for( int i = 0; i < stride; i++ )
+ out[ i ] = (byte)(scanline[ i ] + lastScanline[ i ]);
+ break;
case FILTER_AVERAGE:
- for( int i = 0; i < bpp; i++)
- out[ i ] = (byte)((scanline[ i ] & 0xFF) + ((lastScanline[ i ] & 0xFF) >> 1));
- for( int i = bpp; i < stride; i++ )
- out[ i ] = (byte)((scanline[ i ] & 0xFF) +
- (((out[ i - bpp ] & 0xFF) + (lastScanline[ i ] & 0xFF)) >> 1));
- break;
+ for( int i = 0; i < bpp; i++)
+ out[ i ] = (byte)((scanline[ i ] & 0xFF) + ((lastScanline[ i ] & 0xFF) >> 1));
+ for( int i = bpp; i < stride; i++ )
+ out[ i ] = (byte)((scanline[ i ] & 0xFF) +
+ (((out[ i - bpp ] & 0xFF) + (lastScanline[ i ] & 0xFF)) >> 1));
+ break;
case FILTER_PAETH:
- for( int i = 0; i < stride; i++ )
- {
- int x;
- {
- int a, b, c;
- if( i >= bpp )
- {
- a = (out[ i - bpp ] & 0xFF); // left
- c = (lastScanline[ i - bpp ] & 0xFF); // upper-left
- }
- else
- a = c = 0;
- b = (lastScanline[ i ] & 0xFF); // up
-
- int p = (a + b - c); // initial estimate
- // distances to a, b, c
- int pa = (p > a) ? p - a : a - p;
- int pb = (p > b) ? p - b : b - p;
- int pc = (p > c) ? p - c : c - p;
- // return nearest of a,b,c,
- // breaking ties in order a,b,c.
- if( pa <= pb && pa <= pc ) x = a;
- else { if( pb <= pc ) x = b;
- else x = c;
- }
- }
- out[ i ] = (byte)(scanline[ i ] + x);
- }
- break;
+ for( int i = 0; i < stride; i++ )
+ {
+ int x;
+ {
+ int a, b, c;
+ if( i >= bpp )
+ {
+ a = (out[ i - bpp ] & 0xFF); // left
+ c = (lastScanline[ i - bpp ] & 0xFF); // upper-left
+ }
+ else
+ a = c = 0;
+ b = (lastScanline[ i ] & 0xFF); // up
+
+ int p = (a + b - c); // initial estimate
+ // distances to a, b, c
+ int pa = (p > a) ? p - a : a - p;
+ int pb = (p > b) ? p - b : b - p;
+ int pc = (p > c) ? p - c : c - p;
+ // return nearest of a,b,c,
+ // breaking ties in order a,b,c.
+ if( pa <= pb && pa <= pc ) x = a;
+ else { if( pb <= pc ) x = b;
+ else x = c;
+ }
+ }
+ out[ i ] = (byte)(scanline[ i ] + x);
+ }
+ break;
}
return out;
}
-} \ No newline at end of file
+}
diff --git a/gnu/javax/imageio/png/PNGGamma.java b/gnu/javax/imageio/png/PNGGamma.java
index d9cacea46..b9c3f21c3 100644
--- a/gnu/javax/imageio/png/PNGGamma.java
+++ b/gnu/javax/imageio/png/PNGGamma.java
@@ -42,8 +42,8 @@ import java.awt.color.ColorSpace;
/**
* A PNG gAMA (gamma) chunk.
*/
-public class PNGGamma extends PNGChunk
-{
+public class PNGGamma extends PNGChunk
+{
private double gamma;
protected PNGGamma( int type, byte[] data, int crc ) throws PNGException
@@ -51,10 +51,10 @@ public class PNGGamma extends PNGChunk
super( type, data, crc );
if( data.length < 4 )
throw new PNGException("Unexpectedly short time chunk. ("+data.length+" bytes)");
- long g = ((data[0] & 0xFF) << 24) | ( (data[1] & 0xFF) << 16 ) |
+ long g = ((data[0] & 0xFF) << 24) | ( (data[1] & 0xFF) << 16 ) |
((data[2] & 0xFF) << 8) | (data[3] & 0xFF);
gamma = (double)g;
- gamma = 100000.0/gamma;
+ gamma = 100000.0/gamma;
}
public PNGGamma( double g )
diff --git a/gnu/javax/imageio/png/PNGHeader.java b/gnu/javax/imageio/png/PNGHeader.java
index c9ef2dc37..115e50311 100644
--- a/gnu/javax/imageio/png/PNGHeader.java
+++ b/gnu/javax/imageio/png/PNGHeader.java
@@ -40,8 +40,8 @@ package gnu.javax.imageio.png;
/**
* A PNG Header chunk.
*/
-public class PNGHeader extends PNGChunk
-{
+public class PNGHeader extends PNGChunk
+{
private int width, height, depth;
private int colorType, compression, filter, interlace;
@@ -68,11 +68,11 @@ public class PNGHeader extends PNGChunk
super( type, data, crc );
if( data.length < 13 )
throw new PNGException("Unexpectedly short header chunk. (" + data.length
- + " bytes)");
+ + " bytes)");
- width = ((data[0] & 0xFF) << 24) | ( (data[1] & 0xFF) << 16 ) |
+ width = ((data[0] & 0xFF) << 24) | ( (data[1] & 0xFF) << 16 ) |
((data[2] & 0xFF) << 8) | (data[3] & 0xFF);
- height = ((data[4] & 0xFF) << 24) | ( (data[5] & 0xFF) << 16 ) |
+ height = ((data[4] & 0xFF) << 24) | ( (data[5] & 0xFF) << 16 ) |
((data[6] & 0xFF) << 8) | (data[7] & 0xFF);
depth = (data[8] & 0xFF);
colorType = (data[9] & 0xFF);
@@ -85,8 +85,8 @@ public class PNGHeader extends PNGChunk
* Create a PNG header chunk.
* Warning: This trusts that the parameters are valid.
*/
- public PNGHeader(int width, int height, int depth,
- int colorType, boolean interlace)
+ public PNGHeader(int width, int height, int depth,
+ int colorType, boolean interlace)
{
super( TYPE_HEADER );
data = new byte[ 13 ];
@@ -101,8 +101,8 @@ public class PNGHeader extends PNGChunk
// Build the data chunk.
byte[] a = getInt( width );
byte[] b = getInt( height );
- data[0] = a[0]; data[1] = a[1]; data[2] = a[2]; data[3] = a[3];
- data[4] = b[0]; data[5] = b[1]; data[6] = b[2]; data[7] = b[3];
+ data[0] = a[0]; data[1] = a[1]; data[2] = a[2]; data[3] = a[3];
+ data[4] = b[0]; data[5] = b[1]; data[6] = b[2]; data[7] = b[3];
data[8] = (byte)depth;
data[9] = (byte)colorType;
data[10] = (byte)compression;
@@ -125,14 +125,14 @@ public class PNGHeader extends PNGChunk
if( (colorType & 0xFFFFFFF8) != 0 || colorType == 5 || colorType == 1)
return false;
// Possible valid depths are 1,2,4,8,16
- if( !((depth == 1) || (depth == 2) || (depth == 4) ||
- (depth == 8) || (depth == 16)) )
+ if( !((depth == 1) || (depth == 2) || (depth == 4) ||
+ (depth == 8) || (depth == 16)) )
return false;
if( colorType == INDEXED && depth == 16 )
return false;
- if( ( colorType == RGB || colorType == GRAYSCALE_WITH_ALPHA ||
- colorType == RGB_WITH_ALPHA ) &&
- depth < 8 )
+ if( ( colorType == RGB || colorType == GRAYSCALE_WITH_ALPHA ||
+ colorType == RGB_WITH_ALPHA ) &&
+ depth < 8 )
return false;
// Only compression and filter methods zero are defined
if( compression != 0 || filter != 0 )
@@ -153,7 +153,7 @@ public class PNGHeader extends PNGChunk
}
/**
- * Returns <code>true</code> if this PNG is grayscale
+ * Returns <code>true</code> if this PNG is grayscale
*/
public boolean isGrayscale()
{
@@ -176,7 +176,7 @@ public class PNGHeader extends PNGChunk
return (interlace != 0);
}
- /**
+ /**
* Returns the number of bytes per pixel.
*/
public int bytesPerPixel()
@@ -184,18 +184,18 @@ public class PNGHeader extends PNGChunk
switch( colorType )
{
case GRAYSCALE_WITH_ALPHA:
- return ((depth * 2) >> 3);
+ return ((depth * 2) >> 3);
case RGB:
- return ((depth * 3) >> 3);
+ return ((depth * 3) >> 3);
case RGB_WITH_ALPHA:
- return ((depth * 4) >> 3);
+ return ((depth * 4) >> 3);
default:
case GRAYSCALE:
case INDEXED:
- int i = (depth >> 3);
- if( i > 0 ) return i;
- return 1; // if bytes per pixel < 1, return 1 anyway.
+ int i = (depth >> 3);
+ if( i > 0 ) return i;
+ return 1; // if bytes per pixel < 1, return 1 anyway.
}
}
@@ -208,20 +208,20 @@ public class PNGHeader extends PNGChunk
switch( colorType )
{
case GRAYSCALE:
- nBits = width * depth;
- break;
+ nBits = width * depth;
+ break;
case RGB:
- nBits = width * depth * 3;
- break;
+ nBits = width * depth * 3;
+ break;
case INDEXED:
- nBits = depth * width;
- break;
+ nBits = depth * width;
+ break;
case GRAYSCALE_WITH_ALPHA:
- nBits = depth * width * 2;
- break;
+ nBits = depth * width * 2;
+ break;
case RGB_WITH_ALPHA:
- nBits = depth * width * 4;
- break;
+ nBits = depth * width * 4;
+ break;
}
// Round up number of bits to the nearest byte
if( (nBits & 0x07) != 0 )
@@ -232,17 +232,17 @@ public class PNGHeader extends PNGChunk
public int getWidth()
{
- return width;
+ return width;
}
-
+
public int getHeight()
- {
- return height;
+ {
+ return height;
}
public int getDepth()
- {
- return depth;
+ {
+ return depth;
}
/**
diff --git a/gnu/javax/imageio/png/PNGICCProfile.java b/gnu/javax/imageio/png/PNGICCProfile.java
index b6dc21e19..9ecea7166 100644
--- a/gnu/javax/imageio/png/PNGICCProfile.java
+++ b/gnu/javax/imageio/png/PNGICCProfile.java
@@ -49,14 +49,14 @@ import java.util.zip.Deflater;
/**
* A PNG iCCP (ICC Profile) chunk.
*/
-public class PNGICCProfile extends PNGChunk
-{
+public class PNGICCProfile extends PNGChunk
+{
private String name;
private ICC_Profile profile;
// A generic profile name to use "ICC Profile"
private static final byte[] genericName = new byte[]
{ 0x49, 0x43, 0x43, 0x20, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65 };
-
+
protected PNGICCProfile( int type, byte[] data, int crc ) throws PNGException
{
super( type, data, crc );
@@ -66,23 +66,23 @@ public class PNGICCProfile extends PNGChunk
try
{
- name = new String(data, 0, i, "8859_1");
+ name = new String(data, 0, i, "8859_1");
}
catch(UnsupportedEncodingException e)
{
- name = ""; // shouldn't really happen.
+ name = ""; // shouldn't really happen.
}
if( data[i++] != 0 )
throw new PNGException("Can't handle nonzero compression types with iCCP chunks.");
try
{
- ByteArrayInputStream bos = new ByteArrayInputStream( data, i,
- data.length - i );
- profile = ICC_Profile.getInstance( new InflaterInputStream( bos ) );
+ ByteArrayInputStream bos = new ByteArrayInputStream( data, i,
+ data.length - i );
+ profile = ICC_Profile.getInstance( new InflaterInputStream( bos ) );
}
catch(IOException ioe)
{
- throw new PNGException("Couldn't read iCCP profile chunk.");
+ throw new PNGException("Couldn't read iCCP profile chunk.");
}
System.out.println("Got profile:"+profile);
}
diff --git a/gnu/javax/imageio/png/PNGImageReader.java b/gnu/javax/imageio/png/PNGImageReader.java
index 64aa3fea5..3209baa26 100644
--- a/gnu/javax/imageio/png/PNGImageReader.java
+++ b/gnu/javax/imageio/png/PNGImageReader.java
@@ -162,9 +162,9 @@ public class PNGImageReader
*
* @see ImageReader#setInput(Object, boolean, boolean)
*/
- public void setInput(Object input,
- boolean seekForwardOnly,
- boolean ignoreMetadata)
+ public void setInput(Object input,
+ boolean seekForwardOnly,
+ boolean ignoreMetadata)
{
super.setInput(input, seekForwardOnly, ignoreMetadata);
if (! (input instanceof InputStream || input instanceof ImageInputStream))
diff --git a/gnu/javax/imageio/png/PNGPalette.java b/gnu/javax/imageio/png/PNGPalette.java
index 478129df5..197cad846 100644
--- a/gnu/javax/imageio/png/PNGPalette.java
+++ b/gnu/javax/imageio/png/PNGPalette.java
@@ -43,8 +43,8 @@ import java.awt.image.IndexColorModel;
/**
* A PNG Palette chunk.
*/
-public class PNGPalette extends PNGChunk
-{
+public class PNGPalette extends PNGChunk
+{
private int[] red,green,blue;
protected PNGPalette( int type, byte[] data, int crc ) throws PNGException
@@ -62,9 +62,9 @@ public class PNGPalette extends PNGChunk
blue = new int[ nEntries ];
for( int i = 0; i < nEntries; i++ )
{
- red[i] = (data[ i * 3 ] & 0xFF);
- green[i] = (data[ i * 3 + 1 ] & 0xFF);
- blue[i] = (data[ i * 3 + 2] & 0xFF);
+ red[i] = (data[ i * 3 ] & 0xFF);
+ green[i] = (data[ i * 3 + 1 ] & 0xFF);
+ blue[i] = (data[ i * 3 + 2] & 0xFF);
}
}
@@ -78,9 +78,9 @@ public class PNGPalette extends PNGChunk
blue = new int[ n ];
for(int i = 0; i < n; i++ )
{
- red[i] = data[i * 3] = (byte)cm.getRed(i);
- green[i] = data[i * 3 + 1] = (byte)cm.getGreen(i);
- blue[i] = data[i * 3 + 2] = (byte)cm.getBlue(i);
+ red[i] = data[i * 3] = (byte)cm.getRed(i);
+ green[i] = data[i * 3 + 1] = (byte)cm.getGreen(i);
+ blue[i] = data[i * 3 + 2] = (byte)cm.getBlue(i);
}
}
@@ -93,27 +93,27 @@ public class PNGPalette extends PNGChunk
if( cs == null )
{
- for(int i = 0; i < nc; i ++ )
- {
- r[i] = (byte)red[i];
- g[i] = (byte)green[i];
- b[i] = (byte)blue[i];
- }
+ for(int i = 0; i < nc; i ++ )
+ {
+ r[i] = (byte)red[i];
+ g[i] = (byte)green[i];
+ b[i] = (byte)blue[i];
+ }
}
else
{
- for(int i = 0; i < nc; i ++ )
- {
- float[] in = new float[3];
- in[0] = (((float)red[i]) / 255f);
- in[1] = (((float)green[i]) / 255f);
- in[2] = (((float)blue[i]) / 255f);
- float[] out = cs.toRGB( in );
- r[i] = (byte)( Math.round(out[0] * 255.0) );
- g[i] = (byte)( Math.round(out[1] * 255.0) );
- b[i] = (byte)( Math.round(out[2] * 255.0) );
- }
- }
+ for(int i = 0; i < nc; i ++ )
+ {
+ float[] in = new float[3];
+ in[0] = (((float)red[i]) / 255f);
+ in[1] = (((float)green[i]) / 255f);
+ in[2] = (((float)blue[i]) / 255f);
+ float[] out = cs.toRGB( in );
+ r[i] = (byte)( Math.round(out[0] * 255.0) );
+ g[i] = (byte)( Math.round(out[1] * 255.0) );
+ b[i] = (byte)( Math.round(out[2] * 255.0) );
+ }
+ }
return new IndexColorModel(8, nc, r, g, b);
}
diff --git a/gnu/javax/imageio/png/PNGPhys.java b/gnu/javax/imageio/png/PNGPhys.java
index 0a82d6acb..d15f09e88 100644
--- a/gnu/javax/imageio/png/PNGPhys.java
+++ b/gnu/javax/imageio/png/PNGPhys.java
@@ -40,8 +40,8 @@ package gnu.javax.imageio.png;
/**
* A PNG "pHYS" chunk - pixel physical dimensions
*/
-public class PNGPhys extends PNGChunk
-{
+public class PNGPhys extends PNGChunk
+{
long x, y;
double ratio;
boolean usesRatio;
@@ -51,14 +51,14 @@ public class PNGPhys extends PNGChunk
super( type, data, crc );
if( data.length < 9 )
throw new PNGException("Unexpected size of pHYS chunk.");
- x = ((data[0] & 0xFF) << 24) | ( (data[1] & 0xFF) << 16 ) |
+ x = ((data[0] & 0xFF) << 24) | ( (data[1] & 0xFF) << 16 ) |
((data[2] & 0xFF) << 8) | (data[3] & 0xFF);
- y = ((data[4] & 0xFF) << 24) | ( (data[5] & 0xFF) << 16 ) |
+ y = ((data[4] & 0xFF) << 24) | ( (data[5] & 0xFF) << 16 ) |
((data[6] & 0xFF) << 8) | (data[7] & 0xFF);
if(data[8] == 0)
{
- ratio = ((double)x)/((double)y);
- usesRatio = true;
+ ratio = ((double)x)/((double)y);
+ usesRatio = true;
}
}
@@ -71,13 +71,13 @@ public class PNGPhys extends PNGChunk
if( ratio < 1.0 )
{
- y = 0xFFFFFFFF;
- x = (long)(0xFFFFFFFFL * ratio);
+ y = 0xFFFFFFFF;
+ x = (long)(0xFFFFFFFFL * ratio);
}
else
{
- x = 0xFFFFFFFF;
- y = (long)(0xFFFFFFFFL * ratio);
+ x = 0xFFFFFFFF;
+ y = (long)(0xFFFFFFFFL * ratio);
}
makeData();
}
@@ -96,8 +96,8 @@ public class PNGPhys extends PNGChunk
data = new byte[ 9 ];
byte[] a = getInt( (int)x );
byte[] b = getInt( (int)y );
- data[0] = a[0]; data[1] = a[1]; data[2] = a[2]; data[3] = a[3];
- data[4] = b[0]; data[5] = b[1]; data[6] = b[2]; data[7] = b[3];
+ data[0] = a[0]; data[1] = a[1]; data[2] = a[2]; data[3] = a[3];
+ data[4] = b[0]; data[5] = b[1]; data[6] = b[2]; data[7] = b[3];
data[7] = (usesRatio) ? 0 : (byte)0xFF;
}
diff --git a/gnu/javax/imageio/png/PNGTime.java b/gnu/javax/imageio/png/PNGTime.java
index 9b5c0332a..824f06f83 100644
--- a/gnu/javax/imageio/png/PNGTime.java
+++ b/gnu/javax/imageio/png/PNGTime.java
@@ -42,8 +42,8 @@ import java.util.Date;
/**
* A PNG tIME chunk.
*/
-public class PNGTime extends PNGChunk
-{
+public class PNGTime extends PNGChunk
+{
private Date date;
protected PNGTime( int type, byte[] data, int crc ) throws PNGException
@@ -55,7 +55,7 @@ public class PNGTime extends PNGChunk
// PNG value is absolute (2006, not 106 or 06), java is from 1900.
int year = ( (data[0] & 0xFF) << 8 ) | (data[1] & 0xFF);
int month = (data[2] & 0xFF); // java counts from 0. PNG from 1.
- int day = (data[3] & 0xFF);
+ int day = (data[3] & 0xFF);
int hour = (data[4] & 0xFF);
int minute = (data[5] & 0xFF);
int second = (data[6] & 0xFF);
diff --git a/gnu/javax/management/ListenerData.java b/gnu/javax/management/ListenerData.java
index 719daa086..31fdeccf0 100644
--- a/gnu/javax/management/ListenerData.java
+++ b/gnu/javax/management/ListenerData.java
@@ -66,7 +66,7 @@ public class ListenerData
* event occurring.
*/
private Object passback;
-
+
/**
* Constructs a new {@link ListenerData} with the specified
* listener, filter and passback object.
@@ -76,13 +76,13 @@ public class ListenerData
* @param passback the object to passback on an incoming event.
*/
public ListenerData(NotificationListener listener,
- NotificationFilter filter, Object passback)
+ NotificationFilter filter, Object passback)
{
this.listener = listener;
this.filter = filter;
this.passback = passback;
}
-
+
/**
* Returns the listener.
*
@@ -92,7 +92,7 @@ public class ListenerData
{
return listener;
}
-
+
/**
* Returns the filter.
*
@@ -102,7 +102,7 @@ public class ListenerData
{
return filter;
}
-
+
/**
* Returns the passback object.
*
@@ -112,7 +112,7 @@ public class ListenerData
{
return passback;
}
-
+
/**
* Returns true if the supplied object is an instance of
* {@link ListenerData} and has the same listener, filter
@@ -125,12 +125,12 @@ public class ListenerData
{
if (obj instanceof ListenerData)
{
- ListenerData data = (ListenerData) obj;
- return (data.getListener() == listener &&
- data.getFilter() == filter &&
- data.getPassback() == passback);
+ ListenerData data = (ListenerData) obj;
+ return (data.getListener() == listener &&
+ data.getFilter() == filter &&
+ data.getPassback() == passback);
}
return false;
}
-
+
}
diff --git a/gnu/javax/management/Server.java b/gnu/javax/management/Server.java
index e35c3b117..50252d4dd 100644
--- a/gnu/javax/management/Server.java
+++ b/gnu/javax/management/Server.java
@@ -165,14 +165,14 @@ public class Server
{
try
{
- DELEGATE_NAME =
- new ObjectName("JMImplementation:type=MBeanServerDelegate");
+ DELEGATE_NAME =
+ new ObjectName("JMImplementation:type=MBeanServerDelegate");
}
catch (MalformedObjectNameException e)
{
- throw (Error)
- (new InternalError("Failed to construct " +
- "the delegate's object name.").initCause(e));
+ throw (Error)
+ (new InternalError("Failed to construct " +
+ "the delegate's object name.").initCause(e));
}
}
@@ -189,32 +189,32 @@ public class Server
* @param delegate the delegate bean for this server.
*/
public Server(String defaultDomain, MBeanServer outer,
- MBeanServerDelegate delegate)
+ MBeanServerDelegate delegate)
{
this.defaultDomain = defaultDomain;
this.outer = outer;
this.delegate = delegate;
try
{
- registerMBean(delegate, DELEGATE_NAME);
+ registerMBean(delegate, DELEGATE_NAME);
}
catch (InstanceAlreadyExistsException e)
{
- throw (Error)
- (new InternalError("The delegate bean is " +
- "already registered.").initCause(e));
+ throw (Error)
+ (new InternalError("The delegate bean is " +
+ "already registered.").initCause(e));
}
catch (MBeanRegistrationException e)
{
- throw (Error)
- (new InternalError("The delegate bean's preRegister " +
- "methods threw an exception.").initCause(e));
+ throw (Error)
+ (new InternalError("The delegate bean's preRegister " +
+ "methods threw an exception.").initCause(e));
}
catch (NotCompliantMBeanException e)
{
- throw (Error)
- (new InternalError("The delegate bean is " +
- "not compliant.").initCause(e));
+ throw (Error)
+ (new InternalError("The delegate bean is " +
+ "not compliant.").initCause(e));
}
}
@@ -230,48 +230,48 @@ public class Server
* @throws SecurityException if the action is denied.
*/
private void checkSecurity(ObjectName name, String member,
- String action)
+ String action)
{
SecurityManager sm = System.getSecurityManager();
if (sm != null)
try
- {
- MBeanInfo info = null;
- if (name != null)
- {
- Object bean = getBean(name);
- Method method = bean.getClass().getMethod("getMBeanInfo");
- info = (MBeanInfo) method.invoke(bean);
- }
- sm.checkPermission(new MBeanPermission((info == null) ?
- null : info.getClassName(),
- member, name, action));
- }
+ {
+ MBeanInfo info = null;
+ if (name != null)
+ {
+ Object bean = getBean(name);
+ Method method = bean.getClass().getMethod("getMBeanInfo");
+ info = (MBeanInfo) method.invoke(bean);
+ }
+ sm.checkPermission(new MBeanPermission((info == null) ?
+ null : info.getClassName(),
+ member, name, action));
+ }
catch (InstanceNotFoundException e)
- {
- throw (Error)
- (new InternalError("Failed to get bean.").initCause(e));
- }
+ {
+ throw (Error)
+ (new InternalError("Failed to get bean.").initCause(e));
+ }
catch (NoSuchMethodException e)
- {
- throw (Error)
- (new InternalError("Failed to get bean info.").initCause(e));
- }
+ {
+ throw (Error)
+ (new InternalError("Failed to get bean info.").initCause(e));
+ }
catch (IllegalAccessException e)
- {
- throw (Error)
- (new InternalError("Failed to get bean info.").initCause(e));
- }
+ {
+ throw (Error)
+ (new InternalError("Failed to get bean info.").initCause(e));
+ }
catch (IllegalArgumentException e)
- {
- throw (Error)
- (new InternalError("Failed to get bean info.").initCause(e));
- }
+ {
+ throw (Error)
+ (new InternalError("Failed to get bean info.").initCause(e));
+ }
catch (InvocationTargetException e)
- {
- throw (Error)
- (new InternalError("Failed to get bean info.").initCause(e));
- }
+ {
+ throw (Error)
+ (new InternalError("Failed to get bean info.").initCause(e));
+ }
}
/**
@@ -288,7 +288,7 @@ public class Server
ServerInfo bean = beans.get(name);
if (bean == null)
throw new InstanceNotFoundException("The bean, " + name +
- ", was not found.");
+ ", was not found.");
return bean.getObject();
}
@@ -322,18 +322,18 @@ public class Server
* Object)
*/
public void addNotificationListener(ObjectName name, NotificationListener listener,
- NotificationFilter filter, Object passback)
+ NotificationFilter filter, Object passback)
throws InstanceNotFoundException
{
Object bean = getBean(name);
checkSecurity(name, null, "addNotificationListener");
if (bean instanceof NotificationBroadcaster)
{
- NotificationBroadcaster bbean = (NotificationBroadcaster) bean;
- NotificationListener indirection = new ServerNotificationListener(bean, name,
- listener);
- bbean.addNotificationListener(indirection, filter, passback);
- LazyListenersHolder.listeners.put(listener, indirection);
+ NotificationBroadcaster bbean = (NotificationBroadcaster) bean;
+ NotificationListener indirection = new ServerNotificationListener(bean, name,
+ listener);
+ bbean.addNotificationListener(indirection, filter, passback);
+ LazyListenersHolder.listeners.put(listener, indirection);
}
}
@@ -343,7 +343,7 @@ public class Server
* bean. Notifications emitted by the management bean are forwarded
* to the listener via the server, which will convert any MBean
* references in the source to portable {@link ObjectName}
- * instances. The notification is otherwise unchanged.
+ * instances. The notification is otherwise unchanged.
* </p>
* <p>
* The listener that receives notifications will be the one that is
@@ -380,16 +380,16 @@ public class Server
* Object)
*/
public void addNotificationListener(ObjectName name, ObjectName listener,
- NotificationFilter filter, Object passback)
+ NotificationFilter filter, Object passback)
throws InstanceNotFoundException
{
Object lbean = getBean(listener);
if (!(lbean instanceof NotificationListener))
{
- RuntimeException e =
- new IllegalArgumentException("The supplied listener name does not " +
- "correspond to a notification listener.");
- throw new RuntimeOperationsException(e);
+ RuntimeException e =
+ new IllegalArgumentException("The supplied listener name does not " +
+ "correspond to a notification listener.");
+ throw new RuntimeOperationsException(e);
}
addNotificationListener(name, ((NotificationListener) lbean), filter, passback);
}
@@ -400,7 +400,7 @@ public class Server
* using the default constructor and registers it with the server
* under the supplied name. The class is loaded using the
* {@link javax.management.loading.ClassLoaderRepository default
- * loader repository} of the server.
+ * loader repository} of the server.
* </p>
* <p>
* If the name supplied is <code>null</code>, then the bean is
@@ -409,7 +409,7 @@ public class Server
* of this interface will be used to obtain the name in this case.
* </p>
* <p>
- * This method is equivalent to calling {@link
+ * This method is equivalent to calling {@link
* #createMBean(String, ObjectName, Object[], String[])
* <code>createMBean(className, name, (Object[]) null,
* (String[]) null)</code>} with <code>null</code> parameters
@@ -443,19 +443,19 @@ public class Server
*/
public ObjectInstance createMBean(String className, ObjectName name)
throws ReflectionException, InstanceAlreadyExistsException,
- MBeanRegistrationException, MBeanException,
- NotCompliantMBeanException
+ MBeanRegistrationException, MBeanException,
+ NotCompliantMBeanException
{
return createMBean(className, name, (Object[]) null, (String[]) null);
}
-
+
/**
* <p>
* Instantiates a new instance of the specified management bean
* using the given constructor and registers it with the server
* under the supplied name. The class is loaded using the
* {@link javax.management.loading.ClassLoaderRepository default
- * loader repository} of the server.
+ * loader repository} of the server.
* </p>
* <p>
* If the name supplied is <code>null</code>, then the bean is
@@ -463,7 +463,7 @@ public class Server
* The {@link MBeanRegistration#preRegister preRegister} method
* of this interface will be used to obtain the name in this case.
* </p>
- *
+ *
* @param className the class of the management bean, of which
* an instance should be created.
* @param name the name to register the new bean with.
@@ -491,13 +491,13 @@ public class Server
* and <code>registerMBean</code> methods.
*/
public ObjectInstance createMBean(String className, ObjectName name,
- Object[] params, String[] sig)
+ Object[] params, String[] sig)
throws ReflectionException, InstanceAlreadyExistsException,
- MBeanRegistrationException, MBeanException,
- NotCompliantMBeanException
+ MBeanRegistrationException, MBeanException,
+ NotCompliantMBeanException
{
return registerMBean(instantiate(className, params, sig), name);
- }
+ }
/**
* <p>
@@ -515,7 +515,7 @@ public class Server
* of this interface will be used to obtain the name in this case.
* </p>
* <p>
- * This method is equivalent to calling {@link
+ * This method is equivalent to calling {@link
* #createMBean(String, ObjectName, ObjectName, Object[], String)
* <code>createMBean(className, name, loaderName, (Object[]) null,
* (String) null)</code>} with <code>null</code> parameters
@@ -550,14 +550,14 @@ public class Server
* and <code>registerMBean</code> methods.
* @see #createMBean(String, ObjectName, ObjectName, Object[], String[])
*/
- public ObjectInstance createMBean(String className, ObjectName name,
- ObjectName loaderName)
+ public ObjectInstance createMBean(String className, ObjectName name,
+ ObjectName loaderName)
throws ReflectionException, InstanceAlreadyExistsException,
- MBeanRegistrationException, MBeanException,
- NotCompliantMBeanException, InstanceNotFoundException
+ MBeanRegistrationException, MBeanException,
+ NotCompliantMBeanException, InstanceNotFoundException
{
return createMBean(className, name, loaderName, (Object[]) null,
- (String[]) null);
+ (String[]) null);
}
/**
@@ -567,7 +567,7 @@ public class Server
* under the supplied name. The class is loaded using the
* given class loader. If this argument is <code>null</code>,
* then the same class loader as was used to load the server
- * is used.
+ * is used.
* </p>
* <p>
* If the name supplied is <code>null</code>, then the bean is
@@ -575,7 +575,7 @@ public class Server
* The {@link MBeanRegistration#preRegister preRegister} method
* of this interface will be used to obtain the name in this case.
* </p>
- *
+ *
* @param className the class of the management bean, of which
* an instance should be created.
* @param name the name to register the new bean with.
@@ -606,14 +606,14 @@ public class Server
* and <code>registerMBean</code> methods.
*/
public ObjectInstance createMBean(String className, ObjectName name,
- ObjectName loaderName, Object[] params,
- String[] sig)
+ ObjectName loaderName, Object[] params,
+ String[] sig)
throws ReflectionException, InstanceAlreadyExistsException,
- MBeanRegistrationException, MBeanException,
- NotCompliantMBeanException, InstanceNotFoundException
+ MBeanRegistrationException, MBeanException,
+ NotCompliantMBeanException, InstanceNotFoundException
{
return registerMBean(instantiate(className, loaderName, params, sig),
- name);
+ name);
}
/**
@@ -641,12 +641,12 @@ public class Server
{
try
{
- return new ServerInputStream(new ByteArrayInputStream(data),
- getClassLoaderFor(name));
+ return new ServerInputStream(new ByteArrayInputStream(data),
+ getClassLoaderFor(name));
}
catch (IOException e)
{
- throw new OperationsException("An I/O error occurred: " + e);
+ throw new OperationsException("An I/O error occurred: " + e);
}
}
@@ -680,17 +680,17 @@ public class Server
{
try
{
- Class<?> c = getClassLoaderRepository().loadClass(name);
- return new ServerInputStream(new ByteArrayInputStream(data),
- c.getClassLoader());
+ Class<?> c = getClassLoaderRepository().loadClass(name);
+ return new ServerInputStream(new ByteArrayInputStream(data),
+ c.getClassLoader());
}
catch (IOException e)
{
- throw new OperationsException("An I/O error occurred: " + e);
+ throw new OperationsException("An I/O error occurred: " + e);
}
catch (ClassNotFoundException e)
{
- throw new ReflectionException(e, "The class could not be found.");
+ throw new ReflectionException(e, "The class could not be found.");
}
}
@@ -722,21 +722,21 @@ public class Server
*/
public ObjectInputStream deserialize(String name, ObjectName loader, byte[] data)
throws InstanceNotFoundException, ReflectionException,
- OperationsException
+ OperationsException
{
try
{
- Class<?> c = getClassLoader(loader).loadClass(name);
- return new ServerInputStream(new ByteArrayInputStream(data),
- c.getClassLoader());
+ Class<?> c = getClassLoader(loader).loadClass(name);
+ return new ServerInputStream(new ByteArrayInputStream(data),
+ c.getClassLoader());
}
catch (IOException e)
{
- throw new OperationsException("An I/O error occurred: " + e);
+ throw new OperationsException("An I/O error occurred: " + e);
}
catch (ClassNotFoundException e)
{
- throw new ReflectionException(e, "The class could not be found.");
+ throw new ReflectionException(e, "The class could not be found.");
}
}
@@ -767,13 +767,13 @@ public class Server
*/
public Object getAttribute(ObjectName bean, String name)
throws MBeanException, AttributeNotFoundException,
- InstanceNotFoundException, ReflectionException
+ InstanceNotFoundException, ReflectionException
{
if (bean == null || name == null)
{
- RuntimeException e =
- new IllegalArgumentException("One of the supplied arguments was null.");
- throw new RuntimeOperationsException(e);
+ RuntimeException e =
+ new IllegalArgumentException("One of the supplied arguments was null.");
+ throw new RuntimeOperationsException(e);
}
Object abean = getBean(bean);
checkSecurity(bean, name, "getAttribute");
@@ -781,14 +781,14 @@ public class Server
return ((DynamicMBean) abean).getAttribute(name);
else
try
- {
- return new StandardMBean(abean, null).getAttribute(name);
- }
+ {
+ return new StandardMBean(abean, null).getAttribute(name);
+ }
catch (NotCompliantMBeanException e)
- {
- throw (Error)
- (new InternalError("Failed to create dynamic bean.").initCause(e));
- }
+ {
+ throw (Error)
+ (new InternalError("Failed to create dynamic bean.").initCause(e));
+ }
}
@@ -817,7 +817,7 @@ public class Server
* <code>MBeanPermission(className, n, bean,
* "getAttribute")</code>} or that attribute will
* not be included.
- *
+ *
* @see DynamicMBean#getAttributes(String[])
*/
public AttributeList getAttributes(ObjectName bean, String[] names)
@@ -825,47 +825,47 @@ public class Server
{
if (bean == null || names == null)
{
- RuntimeException e =
- new IllegalArgumentException("One of the supplied arguments was null.");
- throw new RuntimeOperationsException(e);
+ RuntimeException e =
+ new IllegalArgumentException("One of the supplied arguments was null.");
+ throw new RuntimeOperationsException(e);
}
Object abean = getBean(bean);
checkSecurity(bean, null, "getAttribute");
AttributeList list = new AttributeList(names.length);
for (int a = 0; a < names.length; ++a)
{
- if (names[a] == null)
- {
- RuntimeException e =
- new IllegalArgumentException("Argument " + a + " was null.");
- throw new RuntimeOperationsException(e);
- }
- checkSecurity(bean, names[a], "getAttribute");
- try
- {
- Object value;
- if (abean instanceof DynamicMBean)
- value = ((DynamicMBean) abean).getAttribute(names[a]);
- else
- try
- {
- value = new StandardMBean(abean, null).getAttribute(names[a]);
- }
- catch (NotCompliantMBeanException e)
- {
- throw (Error)
- (new InternalError("Failed to create dynamic bean.").initCause(e));
- }
- list.add(new Attribute(names[a], value));
- }
- catch (AttributeNotFoundException e)
- {
- /* Ignored */
- }
- catch (MBeanException e)
- {
- /* Ignored */
- }
+ if (names[a] == null)
+ {
+ RuntimeException e =
+ new IllegalArgumentException("Argument " + a + " was null.");
+ throw new RuntimeOperationsException(e);
+ }
+ checkSecurity(bean, names[a], "getAttribute");
+ try
+ {
+ Object value;
+ if (abean instanceof DynamicMBean)
+ value = ((DynamicMBean) abean).getAttribute(names[a]);
+ else
+ try
+ {
+ value = new StandardMBean(abean, null).getAttribute(names[a]);
+ }
+ catch (NotCompliantMBeanException e)
+ {
+ throw (Error)
+ (new InternalError("Failed to create dynamic bean.").initCause(e));
+ }
+ list.add(new Attribute(names[a], value));
+ }
+ catch (AttributeNotFoundException e)
+ {
+ /* Ignored */
+ }
+ catch (MBeanException e)
+ {
+ /* Ignored */
+ }
}
return list;
}
@@ -897,14 +897,14 @@ public class Server
{
if (name == null)
{
- checkSecurity(null, null, "getClassLoader");
- return getClass().getClassLoader();
+ checkSecurity(null, null, "getClassLoader");
+ return getClass().getClassLoader();
}
Object bean = getBean(name);
checkSecurity(name, null, "getClassLoader");
return (ClassLoader) bean;
}
-
+
/**
* Returns the class loader of the specified management bean. If
* <code>l</code> is the requested class loader, and <code>r</code>
@@ -932,7 +932,7 @@ public class Server
Object bean = getBean(name);
checkSecurity(name, null, "getClassLoaderFor");
return bean.getClass().getClassLoader();
- }
+ }
/**
* Returns the class loader repository used by this server.
@@ -987,16 +987,16 @@ public class Server
Iterator<ObjectName> iterator = beans.keySet().iterator();
while (iterator.hasNext())
{
- String d = iterator.next().getDomain();
- try
- {
- checkSecurity(new ObjectName(d + ":x=x"), null, "getDomains");
- domains.add(d);
- }
- catch (MalformedObjectNameException e)
- {
- /* Ignored */
- }
+ String d = iterator.next().getDomain();
+ try
+ {
+ checkSecurity(new ObjectName(d + ":x=x"), null, "getDomains");
+ domains.add(d);
+ }
+ catch (MalformedObjectNameException e)
+ {
+ /* Ignored */
+ }
}
return domains.toArray(new String[domains.size()]);
}
@@ -1033,38 +1033,38 @@ public class Server
*/
public MBeanInfo getMBeanInfo(ObjectName name)
throws InstanceNotFoundException, IntrospectionException,
- ReflectionException
+ ReflectionException
{
Object bean = getBean(name);
checkSecurity(name, null, "getMBeanInfo");
try
{
- Method method = bean.getClass().getMethod("getMBeanInfo");
- return (MBeanInfo) method.invoke(bean);
+ Method method = bean.getClass().getMethod("getMBeanInfo");
+ return (MBeanInfo) method.invoke(bean);
}
catch (NoSuchMethodException e)
{
- try
- {
- return new StandardMBean(bean, null).getMBeanInfo();
- }
- catch (NotCompliantMBeanException ex)
- {
- throw new IntrospectionException("An error occurred in executing " +
- "getMBeanInfo on the bean: " + ex + ".");
- }
+ try
+ {
+ return new StandardMBean(bean, null).getMBeanInfo();
+ }
+ catch (NotCompliantMBeanException ex)
+ {
+ throw new IntrospectionException("An error occurred in executing " +
+ "getMBeanInfo on the bean: " + ex + ".");
+ }
}
catch (IllegalAccessException e)
{
- throw new ReflectionException(e, "Failed to call getMBeanInfo");
+ throw new ReflectionException(e, "Failed to call getMBeanInfo");
}
catch (IllegalArgumentException e)
{
- throw new ReflectionException(e, "Failed to call getMBeanInfo");
+ throw new ReflectionException(e, "Failed to call getMBeanInfo");
}
catch (InvocationTargetException e)
{
- throw new ReflectionException(e, "The method threw an exception");
+ throw new ReflectionException(e, "The method threw an exception");
}
}
@@ -1088,7 +1088,7 @@ public class Server
ServerInfo bean = beans.get(name);
if (bean == null)
throw new InstanceNotFoundException("The bean, " + name +
- ", was not found.");
+ ", was not found.");
return bean.getInstance();
}
@@ -1102,7 +1102,7 @@ public class Server
* but the instance is not yet registered with the server.
* </p>
* <p>
- * This method is equivalent to calling {@link
+ * This method is equivalent to calling {@link
* #instantiate(String, Object[], String[])
* <code>instantiate(name, (Object[]) null, (String[]) null)</code>}
* with <code>null</code> parameters and signature.
@@ -1162,53 +1162,53 @@ public class Server
checkSecurity(null, null, "instantiate");
if (name == null)
{
- RuntimeException e =
- new IllegalArgumentException("The name was null.");
- throw new RuntimeOperationsException(e);
+ RuntimeException e =
+ new IllegalArgumentException("The name was null.");
+ throw new RuntimeOperationsException(e);
}
Class<?>[] sigTypes = new Class[sig.length];
for (int a = 0; a < sigTypes.length; ++a)
{
- try
- {
- sigTypes[a] = repository.loadClass(sig[a]);
- }
- catch (ClassNotFoundException e)
- {
- throw new ReflectionException(e, "The class, " + sigTypes[a] +
- ", in the method signature " +
- "could not be loaded.");
- }
+ try
+ {
+ sigTypes[a] = repository.loadClass(sig[a]);
+ }
+ catch (ClassNotFoundException e)
+ {
+ throw new ReflectionException(e, "The class, " + sigTypes[a] +
+ ", in the method signature " +
+ "could not be loaded.");
+ }
}
try
{
- Constructor<?> cons =
- repository.loadClass(name).getConstructor(sigTypes);
- return cons.newInstance(params);
+ Constructor<?> cons =
+ repository.loadClass(name).getConstructor(sigTypes);
+ return cons.newInstance(params);
}
catch (ClassNotFoundException e)
{
- throw new ReflectionException(e, "The class, " + name +
- ", of the constructor " +
- "could not be loaded.");
+ throw new ReflectionException(e, "The class, " + name +
+ ", of the constructor " +
+ "could not be loaded.");
}
catch (NoSuchMethodException e)
{
- throw new ReflectionException(e, "The method, " + name +
- ", could not be found.");
+ throw new ReflectionException(e, "The method, " + name +
+ ", could not be found.");
}
catch (IllegalAccessException e)
{
- throw new ReflectionException(e, "Failed to instantiate the object");
+ throw new ReflectionException(e, "Failed to instantiate the object");
}
catch (InstantiationException e)
{
- throw new ReflectionException(e, "Failed to instantiate the object");
+ throw new ReflectionException(e, "Failed to instantiate the object");
}
catch (InvocationTargetException e)
{
- throw new MBeanException((Exception) e.getCause(), "The constructor "
- + name + " threw an exception");
+ throw new MBeanException((Exception) e.getCause(), "The constructor "
+ + name + " threw an exception");
}
}
@@ -1222,7 +1222,7 @@ public class Server
* registered with the server.
* </p>
* <p>
- * This method is equivalent to calling {@link
+ * This method is equivalent to calling {@link
* #instantiate(String, ObjectName, Object[], String[])
* <code>instantiate(name, loaderName, (Object[]) null,
* (String[]) null)</code>} with <code>null</code> parameters
@@ -1250,7 +1250,7 @@ public class Server
*/
public Object instantiate(String name, ObjectName loaderName)
throws InstanceNotFoundException, ReflectionException,
- MBeanException
+ MBeanException
{
return instantiate(name, loaderName);
}
@@ -1284,61 +1284,61 @@ public class Server
* "instantiate")</code>}.
*/
public Object instantiate(String name, ObjectName loaderName,
- Object[] params, String[] sig)
+ Object[] params, String[] sig)
throws InstanceNotFoundException, ReflectionException,
- MBeanException
+ MBeanException
{
checkSecurity(null, null, "instantiate");
if (name == null)
{
- RuntimeException e =
- new IllegalArgumentException("The name was null.");
- throw new RuntimeOperationsException(e);
+ RuntimeException e =
+ new IllegalArgumentException("The name was null.");
+ throw new RuntimeOperationsException(e);
}
ClassLoader loader = getClassLoader(loaderName);
Class<?>[] sigTypes = new Class[sig.length];
for (int a = 0; a < sig.length; ++a)
{
- try
- {
- sigTypes[a] = Class.forName(sig[a], true, loader);
- }
- catch (ClassNotFoundException e)
- {
- throw new ReflectionException(e, "The class, " + sig[a] +
- ", in the method signature " +
- "could not be loaded.");
- }
+ try
+ {
+ sigTypes[a] = Class.forName(sig[a], true, loader);
+ }
+ catch (ClassNotFoundException e)
+ {
+ throw new ReflectionException(e, "The class, " + sig[a] +
+ ", in the method signature " +
+ "could not be loaded.");
+ }
}
try
{
- Constructor<?> cons =
- Class.forName(name, true, loader).getConstructor(sigTypes);
- return cons.newInstance(params);
+ Constructor<?> cons =
+ Class.forName(name, true, loader).getConstructor(sigTypes);
+ return cons.newInstance(params);
}
catch (ClassNotFoundException e)
{
- throw new ReflectionException(e, "The class, " + name +
- ", of the constructor " +
- "could not be loaded.");
+ throw new ReflectionException(e, "The class, " + name +
+ ", of the constructor " +
+ "could not be loaded.");
}
catch (NoSuchMethodException e)
{
- throw new ReflectionException(e, "The method, " + name +
- ", could not be found.");
+ throw new ReflectionException(e, "The method, " + name +
+ ", could not be found.");
}
catch (IllegalAccessException e)
{
- throw new ReflectionException(e, "Failed to instantiate the object");
+ throw new ReflectionException(e, "Failed to instantiate the object");
}
catch (InstantiationException e)
{
- throw new ReflectionException(e, "Failed to instantiate the object");
+ throw new ReflectionException(e, "Failed to instantiate the object");
}
catch (InvocationTargetException e)
{
- throw new MBeanException((Exception) e.getCause(), "The constructor "
- + name + " threw an exception");
+ throw new MBeanException((Exception) e.getCause(), "The constructor "
+ + name + " threw an exception");
}
}
@@ -1368,13 +1368,13 @@ public class Server
*/
public Object invoke(ObjectName bean, String name, Object[] params, String[] sig)
throws InstanceNotFoundException, MBeanException,
- ReflectionException
+ ReflectionException
{
if (bean == null)
{
- RuntimeException e =
- new IllegalArgumentException("The bean was null.");
- throw new RuntimeOperationsException(e);
+ RuntimeException e =
+ new IllegalArgumentException("The bean was null.");
+ throw new RuntimeOperationsException(e);
}
Object abean = getBean(bean);
checkSecurity(bean, name, "invoke");
@@ -1382,14 +1382,14 @@ public class Server
return ((DynamicMBean) abean).invoke(name, params, sig);
else
try
- {
- return new StandardMBean(abean, null).invoke(name, params, sig);
- }
+ {
+ return new StandardMBean(abean, null).invoke(name, params, sig);
+ }
catch (NotCompliantMBeanException e)
- {
- throw (Error)
- (new InternalError("Failed to create dynamic bean.").initCause(e));
- }
+ {
+ throw (Error)
+ (new InternalError("Failed to create dynamic bean.").initCause(e));
+ }
}
/**
@@ -1407,7 +1407,7 @@ public class Server
* <li>Both the class of B and C were loaded by the same class loader,
* and B is assignable to C.</li>
* </ul>
- *
+ *
* @param name the name of the management bean.
* @param className the name of the class to test if <code>name</code> is
* an instance of.
@@ -1431,26 +1431,26 @@ public class Server
info = ((DynamicMBean) bean).getMBeanInfo();
else
try
- {
- info = new StandardMBean(bean, null).getMBeanInfo();
- }
+ {
+ info = new StandardMBean(bean, null).getMBeanInfo();
+ }
catch (NotCompliantMBeanException e)
- {
- throw (Error)
- (new InternalError("Failed to create dynamic bean.").initCause(e));
- }
+ {
+ throw (Error)
+ (new InternalError("Failed to create dynamic bean.").initCause(e));
+ }
if (info.getClassName().equals(className))
return true;
Class<?> bclass = bean.getClass();
try
{
- Class<?> oclass = Class.forName(className);
- return (bclass.getClassLoader().equals(oclass.getClassLoader()) &&
- oclass.isAssignableFrom(bclass));
+ Class<?> oclass = Class.forName(className);
+ return (bclass.getClassLoader().equals(oclass.getClassLoader()) &&
+ oclass.isAssignableFrom(bclass));
}
catch (ClassNotFoundException e)
{
- return false;
+ return false;
}
}
@@ -1468,9 +1468,9 @@ public class Server
{
if (name == null)
{
- RuntimeException e =
- new IllegalArgumentException("The name was null.");
- throw new RuntimeOperationsException(e);
+ RuntimeException e =
+ new IllegalArgumentException("The name was null.");
+ throw new RuntimeOperationsException(e);
}
return beans.containsKey(name);
}
@@ -1489,7 +1489,7 @@ public class Server
* <p>
* If both the object name and the query expression are <code>null</code>,
* or the object name has no domain and no key properties,
- * no filtering will be performed and all beans are returned.
+ * no filtering will be performed and all beans are returned.
* </p>
*
* @param name an {@link ObjectName} to use as a filter.
@@ -1516,34 +1516,34 @@ public class Server
Set<ObjectInstance> results = new HashSet<ObjectInstance>();
for (Map.Entry<ObjectName,ServerInfo> entry : beans.entrySet())
{
- ObjectName nextName = entry.getKey();
- checkSecurity(name, nextName.toString(), "queryMBeans");
- try
- {
- if ((name == null || name.apply(nextName)) &&
- (query == null || query.apply(nextName)))
- results.add(entry.getValue().getInstance());
- }
- catch (BadStringOperationException e)
- {
- /* Ignored -- assume false result */
- }
- catch (BadBinaryOpValueExpException e)
- {
- /* Ignored -- assume false result */
- }
- catch (BadAttributeValueExpException e)
- {
- /* Ignored -- assume false result */
- }
- catch (InvalidApplicationException e)
- {
- /* Ignored -- assume false result */
- }
+ ObjectName nextName = entry.getKey();
+ checkSecurity(name, nextName.toString(), "queryMBeans");
+ try
+ {
+ if ((name == null || name.apply(nextName)) &&
+ (query == null || query.apply(nextName)))
+ results.add(entry.getValue().getInstance());
+ }
+ catch (BadStringOperationException e)
+ {
+ /* Ignored -- assume false result */
+ }
+ catch (BadBinaryOpValueExpException e)
+ {
+ /* Ignored -- assume false result */
+ }
+ catch (BadAttributeValueExpException e)
+ {
+ /* Ignored -- assume false result */
+ }
+ catch (InvalidApplicationException e)
+ {
+ /* Ignored -- assume false result */
+ }
}
return results;
}
-
+
/**
* <p>
* Returns a set of {@link ObjectName}s matching the specified
@@ -1558,7 +1558,7 @@ public class Server
* <p>
* If both the object name and the query expression are <code>null</code>,
* or the object name has no domain and no key properties,
- * no filtering will be performed and all beans are returned.
+ * no filtering will be performed and all beans are returned.
* </p>
*
* @param name an {@link ObjectName} to use as a filter.
@@ -1587,29 +1587,29 @@ public class Server
Set<ObjectName> results = new HashSet<ObjectName>();
for (ObjectName nextName : beans.keySet())
{
- checkSecurity(name, nextName.toString(), "queryNames");
- try
- {
- if ((name == null || name.apply(nextName)) &&
- (query == null || query.apply(nextName)))
- results.add(nextName);
- }
- catch (BadStringOperationException e)
- {
- /* Ignored -- assume false result */
- }
- catch (BadBinaryOpValueExpException e)
- {
- /* Ignored -- assume false result */
- }
- catch (BadAttributeValueExpException e)
- {
- /* Ignored -- assume false result */
- }
- catch (InvalidApplicationException e)
- {
- /* Ignored -- assume false result */
- }
+ checkSecurity(name, nextName.toString(), "queryNames");
+ try
+ {
+ if ((name == null || name.apply(nextName)) &&
+ (query == null || query.apply(nextName)))
+ results.add(nextName);
+ }
+ catch (BadStringOperationException e)
+ {
+ /* Ignored -- assume false result */
+ }
+ catch (BadBinaryOpValueExpException e)
+ {
+ /* Ignored -- assume false result */
+ }
+ catch (BadAttributeValueExpException e)
+ {
+ /* Ignored -- assume false result */
+ }
+ catch (InvalidApplicationException e)
+ {
+ /* Ignored -- assume false result */
+ }
}
return results;
}
@@ -1618,7 +1618,7 @@ public class Server
* Registers the supplied instance with the server, using the specified
* {@link ObjectName}. If the name given is <code>null</code>, then
* the bean supplied is expected to implement the {@link MBeanRegistration}
- * interface and provide the name via the
+ * interface and provide the name via the
* {@link MBeanRegistration#preRegister preRegister} method
* of this interface.
*
@@ -1656,71 +1656,71 @@ public class Server
*/
public ObjectInstance registerMBean(Object obj, ObjectName name)
throws InstanceAlreadyExistsException, MBeanRegistrationException,
- NotCompliantMBeanException
- {
+ NotCompliantMBeanException
+ {
SecurityManager sm = System.getSecurityManager();
Class<?> cl = obj.getClass();
String className = cl.getName();
if (sm != null)
{
- sm.checkPermission(new MBeanPermission(className, null, name,
- "registerMBean"));
- if (!(cl.getProtectionDomain().implies(new MBeanTrustPermission("register"))))
- throw new SecurityException("The protection domain of the object's class" +
- "does not imply the trust permission," +
- "register");
+ sm.checkPermission(new MBeanPermission(className, null, name,
+ "registerMBean"));
+ if (!(cl.getProtectionDomain().implies(new MBeanTrustPermission("register"))))
+ throw new SecurityException("The protection domain of the object's class" +
+ "does not imply the trust permission," +
+ "register");
}
if (obj == null)
{
- RuntimeException e =
- new IllegalArgumentException("The object was null.");
- throw new RuntimeOperationsException(e);
+ RuntimeException e =
+ new IllegalArgumentException("The object was null.");
+ throw new RuntimeOperationsException(e);
}
MBeanRegistration register = null;
if (obj instanceof MBeanRegistration)
register = (MBeanRegistration) obj;
if (name == null && register == null)
{
- RuntimeException e =
- new IllegalArgumentException("The name was null and " +
- "the bean does not implement " +
- "MBeanRegistration.");
- throw new RuntimeOperationsException(e);
+ RuntimeException e =
+ new IllegalArgumentException("The name was null and " +
+ "the bean does not implement " +
+ "MBeanRegistration.");
+ throw new RuntimeOperationsException(e);
}
if (register != null)
{
- try
- {
- name = register.preRegister(this, name);
- if (name == null)
- {
- RuntimeException e =
- new NullPointerException("The name returned by " +
- "MBeanRegistration.preRegister() " +
- "was null");
- throw e;
- }
- if (sm != null)
- sm.checkPermission(new MBeanPermission(className, null, name,
- "registerMBean"));
- }
- catch (SecurityException e)
- {
- register.postRegister(Boolean.FALSE);
- throw e;
- }
- catch (Exception e)
- {
- register.postRegister(Boolean.FALSE);
- throw new MBeanRegistrationException(e, "Pre-registration failed.");
- }
+ try
+ {
+ name = register.preRegister(this, name);
+ if (name == null)
+ {
+ RuntimeException e =
+ new NullPointerException("The name returned by " +
+ "MBeanRegistration.preRegister() " +
+ "was null");
+ throw e;
+ }
+ if (sm != null)
+ sm.checkPermission(new MBeanPermission(className, null, name,
+ "registerMBean"));
+ }
+ catch (SecurityException e)
+ {
+ register.postRegister(Boolean.FALSE);
+ throw e;
+ }
+ catch (Exception e)
+ {
+ register.postRegister(Boolean.FALSE);
+ throw new MBeanRegistrationException(e, "Pre-registration failed.");
+ }
}
ObjectInstance obji = new ObjectInstance(name, className);
if (beans.putIfAbsent(name, new ServerInfo(obji, obj)) != null)
{
- if (register != null)
- register.postRegister(Boolean.FALSE);
- throw new InstanceAlreadyExistsException(name + "is already registered.");
+ if (register != null)
+ register.postRegister(Boolean.FALSE);
+ throw new InstanceAlreadyExistsException(name + "is already registered.");
}
if (register != null)
register.postRegister(Boolean.TRUE);
@@ -1752,16 +1752,16 @@ public class Server
* @see NotificationBroadcaster#removeNotificationListener(NotificationListener)
*/
public void removeNotificationListener(ObjectName name,
- NotificationListener listener)
+ NotificationListener listener)
throws InstanceNotFoundException, ListenerNotFoundException
{
Object bean = getBean(name);
checkSecurity(name, null, "removeNotificationListener");
if (bean instanceof NotificationBroadcaster)
{
- NotificationBroadcaster bbean = (NotificationBroadcaster) bean;
- bbean.removeNotificationListener(listener);
- LazyListenersHolder.listeners.remove(listener);
+ NotificationBroadcaster bbean = (NotificationBroadcaster) bean;
+ bbean.removeNotificationListener(listener);
+ LazyListenersHolder.listeners.remove(listener);
}
}
@@ -1794,18 +1794,18 @@ public class Server
* Object)
*/
public void removeNotificationListener(ObjectName name,
- NotificationListener listener,
- NotificationFilter filter,
- Object passback)
+ NotificationListener listener,
+ NotificationFilter filter,
+ Object passback)
throws InstanceNotFoundException, ListenerNotFoundException
{
Object bean = getBean(name);
checkSecurity(name, null, "removeNotificationListener");
if (bean instanceof NotificationEmitter)
{
- NotificationEmitter bbean = (NotificationEmitter) bean;
- bbean.removeNotificationListener(listener, filter, passback);
- LazyListenersHolder.listeners.remove(listener);
+ NotificationEmitter bbean = (NotificationEmitter) bean;
+ bbean.removeNotificationListener(listener, filter, passback);
+ LazyListenersHolder.listeners.remove(listener);
}
}
@@ -1839,10 +1839,10 @@ public class Server
Object lbean = getBean(listener);
if (!(lbean instanceof NotificationListener))
{
- RuntimeException e =
- new IllegalArgumentException("The supplied listener name does not " +
- "correspond to a notification listener.");
- throw new RuntimeOperationsException(e);
+ RuntimeException e =
+ new IllegalArgumentException("The supplied listener name does not " +
+ "correspond to a notification listener.");
+ throw new RuntimeOperationsException(e);
}
removeNotificationListener(name, ((NotificationListener) lbean));
}
@@ -1877,26 +1877,26 @@ public class Server
* Object)
*/
public void removeNotificationListener(ObjectName name,
- ObjectName listener,
- NotificationFilter filter,
- Object passback)
+ ObjectName listener,
+ NotificationFilter filter,
+ Object passback)
throws InstanceNotFoundException, ListenerNotFoundException
{
Object lbean = getBean(listener);
if (!(lbean instanceof NotificationListener))
{
- RuntimeException e =
- new IllegalArgumentException("The supplied listener name does not " +
- "correspond to a notification listener.");
- throw new RuntimeOperationsException(e);
+ RuntimeException e =
+ new IllegalArgumentException("The supplied listener name does not " +
+ "correspond to a notification listener.");
+ throw new RuntimeOperationsException(e);
}
removeNotificationListener(name, ((NotificationListener) lbean), filter,
- passback);
+ passback);
}
/**
* Sets the value of the specified attribute of the supplied
- * management bean.
+ * management bean.
*
* @param name the name of the management bean.
* @param attribute the attribute to set.
@@ -1929,14 +1929,14 @@ public class Server
*/
public void setAttribute(ObjectName name, Attribute attribute)
throws InstanceNotFoundException, AttributeNotFoundException,
- InvalidAttributeValueException, MBeanException,
- ReflectionException
+ InvalidAttributeValueException, MBeanException,
+ ReflectionException
{
if (attribute == null || name == null)
{
- RuntimeException e =
- new IllegalArgumentException("One of the supplied arguments was null.");
- throw new RuntimeOperationsException(e);
+ RuntimeException e =
+ new IllegalArgumentException("One of the supplied arguments was null.");
+ throw new RuntimeOperationsException(e);
}
Object bean = getBean(name);
checkSecurity(name, attribute.getName(), "setAttribute");
@@ -1944,14 +1944,14 @@ public class Server
((DynamicMBean) bean).setAttribute(attribute);
else
try
- {
- new StandardMBean(bean, null).setAttribute(attribute);
- }
+ {
+ new StandardMBean(bean, null).setAttribute(attribute);
+ }
catch (NotCompliantMBeanException e)
- {
- throw (Error)
- (new InternalError("Failed to create dynamic bean.").initCause(e));
- }
+ {
+ throw (Error)
+ (new InternalError("Failed to create dynamic bean.").initCause(e));
+ }
}
/**
@@ -1992,9 +1992,9 @@ public class Server
{
if (name == null || attributes == null)
{
- RuntimeException e =
- new IllegalArgumentException("One of the supplied arguments was null.");
- throw new RuntimeOperationsException(e);
+ RuntimeException e =
+ new IllegalArgumentException("One of the supplied arguments was null.");
+ throw new RuntimeOperationsException(e);
}
Object abean = getBean(name);
checkSecurity(name, null, "setAttribute");
@@ -2002,42 +2002,42 @@ public class Server
Iterator<Object> it = attributes.iterator();
while (it.hasNext())
{
- try
- {
- Attribute attrib = (Attribute) it.next();
- if (attrib == null)
- {
- RuntimeException e =
- new IllegalArgumentException("An attribute was null.");
- throw new RuntimeOperationsException(e);
- }
- checkSecurity(name, attrib.getName(), "setAttribute");
- if (abean instanceof DynamicMBean)
- ((DynamicMBean) abean).setAttribute(attrib);
- else
- try
- {
- new StandardMBean(abean, null).setAttribute(attrib);
- }
- catch (NotCompliantMBeanException e)
- {
- throw (Error)
- (new InternalError("Failed to create dynamic bean.").initCause(e));
- }
- list.add(attrib);
- }
- catch (AttributeNotFoundException e)
- {
- /* Ignored */
- }
- catch (InvalidAttributeValueException e)
- {
- /* Ignored */
- }
- catch (MBeanException e)
- {
- /* Ignored */
- }
+ try
+ {
+ Attribute attrib = (Attribute) it.next();
+ if (attrib == null)
+ {
+ RuntimeException e =
+ new IllegalArgumentException("An attribute was null.");
+ throw new RuntimeOperationsException(e);
+ }
+ checkSecurity(name, attrib.getName(), "setAttribute");
+ if (abean instanceof DynamicMBean)
+ ((DynamicMBean) abean).setAttribute(attrib);
+ else
+ try
+ {
+ new StandardMBean(abean, null).setAttribute(attrib);
+ }
+ catch (NotCompliantMBeanException e)
+ {
+ throw (Error)
+ (new InternalError("Failed to create dynamic bean.").initCause(e));
+ }
+ list.add(attrib);
+ }
+ catch (AttributeNotFoundException e)
+ {
+ /* Ignored */
+ }
+ catch (InvalidAttributeValueException e)
+ {
+ /* Ignored */
+ }
+ catch (MBeanException e)
+ {
+ /* Ignored */
+ }
}
return list;
}
@@ -2064,36 +2064,36 @@ public class Server
* MBeanPermission(String,String,ObjectName,String)
* <code>MBeanPermission(className, null, name,
* "unregisterMBean")</code>}.
- */
+ */
public void unregisterMBean(ObjectName name)
throws InstanceNotFoundException, MBeanRegistrationException
{
if (name == null)
{
- RuntimeException e =
- new IllegalArgumentException("The name was null.");
- throw new RuntimeOperationsException(e);
+ RuntimeException e =
+ new IllegalArgumentException("The name was null.");
+ throw new RuntimeOperationsException(e);
}
if (name.equals(DELEGATE_NAME))
{
- RuntimeException e =
- new IllegalArgumentException("The delegate can not be unregistered.");
- throw new RuntimeOperationsException(e);
- }
- Object bean = getBean(name);
+ RuntimeException e =
+ new IllegalArgumentException("The delegate can not be unregistered.");
+ throw new RuntimeOperationsException(e);
+ }
+ Object bean = getBean(name);
checkSecurity(name, null, "unregisterMBean");
MBeanRegistration register = null;
if (bean instanceof MBeanRegistration)
{
- register = (MBeanRegistration) bean;
- try
- {
- register.preDeregister();
- }
- catch (Exception e)
- {
- throw new MBeanRegistrationException(e, "Pre-deregistration failed.");
- }
+ register = (MBeanRegistration) bean;
+ try
+ {
+ register.preDeregister();
+ }
+ catch (Exception e)
+ {
+ throw new MBeanRegistrationException(e, "Pre-deregistration failed.");
+ }
}
beans.remove(name);
notify(name, MBeanServerNotification.UNREGISTRATION_NOTIFICATION);
@@ -2113,8 +2113,8 @@ public class Server
private void notify(ObjectName name, String type)
{
delegate.sendNotification
- (new MBeanServerNotification
- (type, DELEGATE_NAME, sequenceNumber.getAndIncrement(), name));
+ (new MBeanServerNotification
+ (type, DELEGATE_NAME, sequenceNumber.getAndIncrement(), name));
}
/**
@@ -2137,13 +2137,13 @@ public class Server
throws ClassNotFoundException, IOException
{
try
- {
- return Class.forName(osc.getName(), true, cl);
- }
+ {
+ return Class.forName(osc.getName(), true, cl);
+ }
catch (ClassNotFoundException e)
- {
- return super.resolveClass(osc);
- }
+ {
+ return super.resolveClass(osc);
+ }
}
}
@@ -2152,7 +2152,7 @@ public class Server
* Holder for information on registered beans.
*/
private class ServerInfo
- {
+ {
private ObjectInstance instance;
private Object object;
@@ -2206,7 +2206,7 @@ public class Server
* @param listener the listener events eventually reach.
*/
public ServerNotificationListener(Object bean, ObjectName name,
- NotificationListener listener)
+ NotificationListener listener)
{
this.bean = bean;
this.name = name;
@@ -2224,7 +2224,7 @@ public class Server
public void handleNotification(Notification notif, Object handback)
{
if (notif.getSource() == bean)
- notif.setSource(name);
+ notif.setSource(name);
listener.handleNotification(notif, handback);
}
diff --git a/gnu/javax/management/Translator.java b/gnu/javax/management/Translator.java
index a15994429..38d575aca 100644
--- a/gnu/javax/management/Translator.java
+++ b/gnu/javax/management/Translator.java
@@ -120,125 +120,125 @@ public final class Translator
return jtype;
if (jclass.isArray())
{
- Class<?> ctype = jclass.getComponentType();
- if (ctype.isPrimitive())
- return jtype;
- if (OpenType.ALLOWED_CLASSNAMES_LIST.contains(ctype.getName()))
- return jtype;
- Object[] elems = (Object[]) jtype;
- Object[] celems = new Object[elems.length];
- for (int a = 0; a < elems.length; ++a)
- celems[a] = fromJava(elems[a], elems[a].getClass());
- return makeArraySpecific(celems);
+ Class<?> ctype = jclass.getComponentType();
+ if (ctype.isPrimitive())
+ return jtype;
+ if (OpenType.ALLOWED_CLASSNAMES_LIST.contains(ctype.getName()))
+ return jtype;
+ Object[] elems = (Object[]) jtype;
+ Object[] celems = new Object[elems.length];
+ for (int a = 0; a < elems.length; ++a)
+ celems[a] = fromJava(elems[a], elems[a].getClass());
+ return makeArraySpecific(celems);
}
String tName = getTypeName(type);
if (jtype instanceof List || jtype instanceof Set ||
- jtype instanceof SortedSet)
+ jtype instanceof SortedSet)
{
- if (jtype instanceof SortedSet)
- {
- ParameterizedType ptype = (ParameterizedType) type;
- Class<?> elemClass = (Class<?>) ptype.getActualTypeArguments()[0];
- if (!Comparable.class.isAssignableFrom(elemClass))
- throw new IllegalArgumentException(jtype + " has a " +
- "non-comparable element " +
- "type, " + elemClass);
- if (((SortedSet<?>) jtype).comparator() != null)
- throw new IllegalArgumentException(jtype + " does not " +
- "use natural ordering.");
- }
- Collection<?> elems = (Collection<?>) jtype;
- int numElems = elems.size();
- Object[] celems = new Object[numElems];
- Iterator<?> i = elems.iterator();
- for (int a = 0; a < numElems; ++a)
- {
- Object elem = i.next();
- celems[a] = fromJava(elem, elem.getClass());
- }
- return makeArraySpecific(celems);
+ if (jtype instanceof SortedSet)
+ {
+ ParameterizedType ptype = (ParameterizedType) type;
+ Class<?> elemClass = (Class<?>) ptype.getActualTypeArguments()[0];
+ if (!Comparable.class.isAssignableFrom(elemClass))
+ throw new IllegalArgumentException(jtype + " has a " +
+ "non-comparable element " +
+ "type, " + elemClass);
+ if (((SortedSet<?>) jtype).comparator() != null)
+ throw new IllegalArgumentException(jtype + " does not " +
+ "use natural ordering.");
+ }
+ Collection<?> elems = (Collection<?>) jtype;
+ int numElems = elems.size();
+ Object[] celems = new Object[numElems];
+ Iterator<?> i = elems.iterator();
+ for (int a = 0; a < numElems; ++a)
+ {
+ Object elem = i.next();
+ celems[a] = fromJava(elem, elem.getClass());
+ }
+ return makeArraySpecific(celems);
}
if (jtype instanceof Enum)
return ((Enum<?>) jtype).name();
if (jtype instanceof Map || jtype instanceof SortedMap)
{
- int lparam = tName.indexOf("<");
- int comma = tName.indexOf(",", lparam);
- int rparam = tName.indexOf(">", comma);
- String key = tName.substring(lparam + 1, comma).trim();
- String value = tName.substring(comma + 1, rparam).trim();
- String typeName = null;
- if (jtype instanceof Map)
- typeName = "java.util.Map" + tName.substring(lparam);
- else
- {
- Class<?> keyClass = Class.forName(key);
- if (!Comparable.class.isAssignableFrom(keyClass))
- throw new IllegalArgumentException(jtype + " has a " +
- "non-comparable element " +
- "type, " + keyClass);
- if (((SortedMap<?,?>) jtype).comparator() != null)
- throw new IllegalArgumentException(jtype + " does not " +
- "use natural ordering.");
- typeName = "java.util.SortedMap" + tName.substring(lparam);
- }
- OpenType<?> k = translate(key).getOpenType();
- OpenType<?> v = translate(value).getOpenType();
- CompositeType rowType = new CompositeType(typeName, typeName,
- new String[] { "key", "value" },
- new String[] { "Map key", "Map value"},
- new OpenType[] {k,v});
- TabularType tabType = new TabularType(typeName, typeName, rowType,
- new String[]{"key"});
- TabularData data = new TabularDataSupport(tabType);
- for (Map.Entry<?,?> entry : ((Map<?,?>) jtype).entrySet())
- {
- try
- {
- data.put(new CompositeDataSupport(rowType,
- new String[] {
- "key",
- "value"
- },
- new Object[] {
- entry.getKey(),
- entry.getValue()
- }));
- }
- catch (OpenDataException e)
- {
- throw (InternalError) (new InternalError("A problem occurred " +
- "converting the map " +
- "to a composite data " +
- "structure.").initCause(e));
- }
- }
- return data;
- }
+ int lparam = tName.indexOf("<");
+ int comma = tName.indexOf(",", lparam);
+ int rparam = tName.indexOf(">", comma);
+ String key = tName.substring(lparam + 1, comma).trim();
+ String value = tName.substring(comma + 1, rparam).trim();
+ String typeName = null;
+ if (jtype instanceof Map)
+ typeName = "java.util.Map" + tName.substring(lparam);
+ else
+ {
+ Class<?> keyClass = Class.forName(key);
+ if (!Comparable.class.isAssignableFrom(keyClass))
+ throw new IllegalArgumentException(jtype + " has a " +
+ "non-comparable element " +
+ "type, " + keyClass);
+ if (((SortedMap<?,?>) jtype).comparator() != null)
+ throw new IllegalArgumentException(jtype + " does not " +
+ "use natural ordering.");
+ typeName = "java.util.SortedMap" + tName.substring(lparam);
+ }
+ OpenType<?> k = translate(key).getOpenType();
+ OpenType<?> v = translate(value).getOpenType();
+ CompositeType rowType = new CompositeType(typeName, typeName,
+ new String[] { "key", "value" },
+ new String[] { "Map key", "Map value"},
+ new OpenType[] {k,v});
+ TabularType tabType = new TabularType(typeName, typeName, rowType,
+ new String[]{"key"});
+ TabularData data = new TabularDataSupport(tabType);
+ for (Map.Entry<?,?> entry : ((Map<?,?>) jtype).entrySet())
+ {
+ try
+ {
+ data.put(new CompositeDataSupport(rowType,
+ new String[] {
+ "key",
+ "value"
+ },
+ new Object[] {
+ entry.getKey(),
+ entry.getValue()
+ }));
+ }
+ catch (OpenDataException e)
+ {
+ throw (InternalError) (new InternalError("A problem occurred " +
+ "converting the map " +
+ "to a composite data " +
+ "structure.").initCause(e));
+ }
+ }
+ return data;
+ }
if (JMX.isMXBeanInterface(jclass))
{
- try
- {
- MBeanServerInvocationHandler ih = (MBeanServerInvocationHandler)
- Proxy.getInvocationHandler(jtype);
- return ih.getObjectName();
- }
- catch (IllegalArgumentException e)
- {
- throw new IllegalArgumentException("For a MXBean to be translated " +
- "to an open type, it must be a " +
- "proxy.", e);
- }
- catch (ClassCastException e)
- {
- throw new IllegalArgumentException("For a MXBean to be translated " +
- "to an open type, it must have a " +
- "MBeanServerInvocationHandler.", e);
- }
+ try
+ {
+ MBeanServerInvocationHandler ih = (MBeanServerInvocationHandler)
+ Proxy.getInvocationHandler(jtype);
+ return ih.getObjectName();
+ }
+ catch (IllegalArgumentException e)
+ {
+ throw new IllegalArgumentException("For a MXBean to be translated " +
+ "to an open type, it must be a " +
+ "proxy.", e);
+ }
+ catch (ClassCastException e)
+ {
+ throw new IllegalArgumentException("For a MXBean to be translated " +
+ "to an open type, it must have a " +
+ "MBeanServerInvocationHandler.", e);
+ }
}
/* FIXME: Handle other types */
throw new IllegalArgumentException("The type, " + jtype +
- ", is not convertible.");
+ ", is not convertible.");
}
/**
@@ -257,42 +257,42 @@ public final class Translator
Class<?> returnType = method.getReturnType();
if (returnType.isEnum())
{
- String ename = (String) otype;
- Enum<?>[] constants = (Enum[]) returnType.getEnumConstants();
- for (Enum<?> c : constants)
- if (c.name().equals(ename))
- return c;
+ String ename = (String) otype;
+ Enum<?>[] constants = (Enum[]) returnType.getEnumConstants();
+ for (Enum<?> c : constants)
+ if (c.name().equals(ename))
+ return c;
}
if (List.class.isAssignableFrom(returnType))
{
- Object[] elems = (Object[]) otype;
- List<Object> l = new ArrayList<Object>(elems.length);
- for (Object elem : elems)
- l.add(elem);
- return l;
+ Object[] elems = (Object[]) otype;
+ List<Object> l = new ArrayList<Object>(elems.length);
+ for (Object elem : elems)
+ l.add(elem);
+ return l;
}
if (Map.class.isAssignableFrom(returnType))
{
- TabularData data = (TabularData) otype;
- Map<Object,Object> m = new HashMap<Object,Object>(data.size());
- for (Object val : data.values())
- {
- CompositeData vals = (CompositeData) val;
- m.put(vals.get("key"), vals.get("value"));
- }
- return m;
+ TabularData data = (TabularData) otype;
+ Map<Object,Object> m = new HashMap<Object,Object>(data.size());
+ for (Object val : data.values())
+ {
+ CompositeData vals = (CompositeData) val;
+ m.put(vals.get("key"), vals.get("value"));
+ }
+ return m;
}
try
{
- Method m = returnType.getMethod("from",
- new Class[]
- { CompositeData.class });
- return m.invoke(null, (CompositeData) otype);
+ Method m = returnType.getMethod("from",
+ new Class[]
+ { CompositeData.class });
+ return m.invoke(null, (CompositeData) otype);
}
catch (NoSuchMethodException e)
{
- /* Ignored; we expect this if this
- isn't a from(CompositeData) class */
+ /* Ignored; we expect this if this
+ isn't a from(CompositeData) class */
}
return otype;
}
@@ -301,7 +301,7 @@ public final class Translator
* Creates a new array which has the specific type
* used by the elements of the original {@link Object}
* array supplied.
- *
+ *
* @param arr a series of elements in an {@link Object}
* array.
* @return the same elements in a new array of the specific
@@ -310,7 +310,7 @@ public final class Translator
private static final Object[] makeArraySpecific(Object[] arr)
{
Object[] rcelems = (Object[]) Array.newInstance(arr[0].getClass(),
- arr.length);
+ arr.length);
System.arraycopy(arr, 0, rcelems, 0, arr.length);
return rcelems;
}
@@ -331,160 +331,160 @@ public final class Translator
{
if (type.equals("boolean") || type.equals(Boolean.class.getName()))
return new OpenMBeanParameterInfoSupport("TransParam",
- "Translated parameter",
- SimpleType.BOOLEAN,
- null,
- new Boolean[] {
- Boolean.TRUE,
- Boolean.FALSE
- });
+ "Translated parameter",
+ SimpleType.BOOLEAN,
+ null,
+ new Boolean[] {
+ Boolean.TRUE,
+ Boolean.FALSE
+ });
if (type.equals("byte") || type.equals(Byte.class.getName()))
return new OpenMBeanParameterInfoSupport("TransParam",
- "Translated parameter",
- SimpleType.BYTE,
- null,
- Byte.valueOf(Byte.MIN_VALUE),
- Byte.valueOf(Byte.MAX_VALUE));
+ "Translated parameter",
+ SimpleType.BYTE,
+ null,
+ Byte.valueOf(Byte.MIN_VALUE),
+ Byte.valueOf(Byte.MAX_VALUE));
if (type.equals("char") || type.equals(Character.class.getName()))
return new OpenMBeanParameterInfoSupport("TransParam",
- "Translated parameter",
- SimpleType.CHARACTER,
- null,
- Character.valueOf(Character.MIN_VALUE),
- Character.valueOf(Character.MAX_VALUE));
+ "Translated parameter",
+ SimpleType.CHARACTER,
+ null,
+ Character.valueOf(Character.MIN_VALUE),
+ Character.valueOf(Character.MAX_VALUE));
if (type.equals("double") || type.equals(Double.class.getName()))
return new OpenMBeanParameterInfoSupport("TransParam",
- "Translated parameter",
- SimpleType.DOUBLE,
- null,
- Double.valueOf(Double.MIN_VALUE),
- Double.valueOf(Double.MAX_VALUE));
+ "Translated parameter",
+ SimpleType.DOUBLE,
+ null,
+ Double.valueOf(Double.MIN_VALUE),
+ Double.valueOf(Double.MAX_VALUE));
if (type.equals("float") || type.equals(Float.class.getName()))
return new OpenMBeanParameterInfoSupport("TransParam",
- "Translated parameter",
- SimpleType.FLOAT,
- null,
- Float.valueOf(Float.MIN_VALUE),
- Float.valueOf(Float.MAX_VALUE));
+ "Translated parameter",
+ SimpleType.FLOAT,
+ null,
+ Float.valueOf(Float.MIN_VALUE),
+ Float.valueOf(Float.MAX_VALUE));
if (type.equals("int") || type.equals(Integer.class.getName()))
return new OpenMBeanParameterInfoSupport("TransParam",
- "Translated parameter",
- SimpleType.INTEGER,
- null,
- Integer.valueOf(Integer.MIN_VALUE),
- Integer.valueOf(Integer.MAX_VALUE));
+ "Translated parameter",
+ SimpleType.INTEGER,
+ null,
+ Integer.valueOf(Integer.MIN_VALUE),
+ Integer.valueOf(Integer.MAX_VALUE));
if (type.equals("long") || type.equals(Long.class.getName()))
return new OpenMBeanParameterInfoSupport("TransParam",
- "Translated parameter",
- SimpleType.LONG,
- null,
- Long.valueOf(Long.MIN_VALUE),
- Long.valueOf(Long.MAX_VALUE));
+ "Translated parameter",
+ SimpleType.LONG,
+ null,
+ Long.valueOf(Long.MIN_VALUE),
+ Long.valueOf(Long.MAX_VALUE));
if (type.equals("short") || type.equals(Short.class.getName()))
return new OpenMBeanParameterInfoSupport("TransParam",
- "Translated parameter",
- SimpleType.SHORT,
- null,
- Short.valueOf(Short.MIN_VALUE),
- Short.valueOf(Short.MAX_VALUE));
+ "Translated parameter",
+ SimpleType.SHORT,
+ null,
+ Short.valueOf(Short.MIN_VALUE),
+ Short.valueOf(Short.MAX_VALUE));
if (type.equals(String.class.getName()))
return new OpenMBeanParameterInfoSupport("TransParam",
- "Translated parameter",
- SimpleType.STRING);
+ "Translated parameter",
+ SimpleType.STRING);
if (type.equals("void"))
return new OpenMBeanParameterInfoSupport("TransParam",
- "Translated parameter",
- SimpleType.VOID);
+ "Translated parameter",
+ SimpleType.VOID);
if (type.startsWith("java.util.Map"))
{
- int lparam = type.indexOf("<");
- int comma = type.indexOf(",", lparam);
- int rparam = type.indexOf(">", comma);
- String key = type.substring(lparam + 1, comma).trim();
- OpenType<?> k = translate(key).getOpenType();
- OpenType<?> v = translate(type.substring(comma + 1, rparam).trim()).getOpenType();
- CompositeType ctype = new CompositeType(Map.class.getName(), Map.class.getName(),
- new String[] { "key", "value" },
- new String[] { "Map key", "Map value"},
- new OpenType[] { k, v});
- TabularType ttype = new TabularType(key, key, ctype,
- new String[] { "key" });
- return new OpenMBeanParameterInfoSupport("TransParam",
- "Translated parameter",
- ttype);
+ int lparam = type.indexOf("<");
+ int comma = type.indexOf(",", lparam);
+ int rparam = type.indexOf(">", comma);
+ String key = type.substring(lparam + 1, comma).trim();
+ OpenType<?> k = translate(key).getOpenType();
+ OpenType<?> v = translate(type.substring(comma + 1, rparam).trim()).getOpenType();
+ CompositeType ctype = new CompositeType(Map.class.getName(), Map.class.getName(),
+ new String[] { "key", "value" },
+ new String[] { "Map key", "Map value"},
+ new OpenType[] { k, v});
+ TabularType ttype = new TabularType(key, key, ctype,
+ new String[] { "key" });
+ return new OpenMBeanParameterInfoSupport("TransParam",
+ "Translated parameter",
+ ttype);
}
if (type.startsWith("java.util.List"))
{
- int lparam = type.indexOf("<");
- int rparam = type.indexOf(">");
- OpenType<?> e = translate(type.substring(lparam + 1, rparam).trim()).getOpenType();
- return new OpenMBeanParameterInfoSupport("TransParam",
- "Translated parameter",
- new ArrayType<OpenType<?>>(1, e)
- );
- }
+ int lparam = type.indexOf("<");
+ int rparam = type.indexOf(">");
+ OpenType<?> e = translate(type.substring(lparam + 1, rparam).trim()).getOpenType();
+ return new OpenMBeanParameterInfoSupport("TransParam",
+ "Translated parameter",
+ new ArrayType<OpenType<?>>(1, e)
+ );
+ }
Class<?> c;
try
{
- c = Class.forName(type);
+ c = Class.forName(type);
}
catch (ClassNotFoundException e)
{
- throw (InternalError)
- (new InternalError("The class for a type used in a management bean " +
- "could not be loaded.").initCause(e));
+ throw (InternalError)
+ (new InternalError("The class for a type used in a management bean " +
+ "could not be loaded.").initCause(e));
}
if (c.isEnum())
{
- Object[] values = c.getEnumConstants();
- String[] names = new String[values.length];
- for (int a = 0; a < values.length; ++a)
- names[a] = values[a].toString();
- return new OpenMBeanParameterInfoSupport("TransParam",
- "Translated parameter",
- SimpleType.STRING,
- null, names);
+ Object[] values = c.getEnumConstants();
+ String[] names = new String[values.length];
+ for (int a = 0; a < values.length; ++a)
+ names[a] = values[a].toString();
+ return new OpenMBeanParameterInfoSupport("TransParam",
+ "Translated parameter",
+ SimpleType.STRING,
+ null, names);
}
if (c.isArray())
{
- int depth;
- for (depth = 0; c.getName().charAt(depth) == '['; ++depth)
+ int depth;
+ for (depth = 0; c.getName().charAt(depth) == '['; ++depth)
;
- OpenType<?> ot = getTypeFromClass(c.getComponentType());
- return new OpenMBeanParameterInfoSupport("TransParam",
- "Translated parameter",
- new ArrayType<OpenType<?>>(depth, ot)
- );
+ OpenType<?> ot = getTypeFromClass(c.getComponentType());
+ return new OpenMBeanParameterInfoSupport("TransParam",
+ "Translated parameter",
+ new ArrayType<OpenType<?>>(depth, ot)
+ );
}
Method[] methods = c.getDeclaredMethods();
List<String> names = new ArrayList<String>();
List<OpenType<?>> types = new ArrayList<OpenType<?>>();
for (int a = 0; a < methods.length; ++a)
{
- String name = methods[a].getName();
- if (Modifier.isPublic(methods[a].getModifiers()))
- {
- if (name.startsWith("get"))
- {
- names.add(name.substring(3));
- types.add(getTypeFromClass(methods[a].getReturnType()));
- }
- else if (name.startsWith("is"))
- {
- names.add(name.substring(2));
- types.add(getTypeFromClass(methods[a].getReturnType()));
- }
- }
+ String name = methods[a].getName();
+ if (Modifier.isPublic(methods[a].getModifiers()))
+ {
+ if (name.startsWith("get"))
+ {
+ names.add(name.substring(3));
+ types.add(getTypeFromClass(methods[a].getReturnType()));
+ }
+ else if (name.startsWith("is"))
+ {
+ names.add(name.substring(2));
+ types.add(getTypeFromClass(methods[a].getReturnType()));
+ }
+ }
}
if (names.isEmpty())
throw new OpenDataException("The type used does not have an open type translation.");
String[] fields = names.toArray(new String[names.size()]);
CompositeType ctype = new CompositeType(c.getName(), c.getName(),
- fields, fields,
- types.toArray(new OpenType[types.size()]));
+ fields, fields,
+ types.toArray(new OpenType[types.size()]));
return new OpenMBeanParameterInfoSupport("TransParam",
- "Translated parameter",
- ctype);
+ "Translated parameter",
+ ctype);
}
/**
@@ -524,25 +524,25 @@ public final class Translator
* @return the type name computed according to the rules above.
*/
private static final String getTypeName(Type type)
- {
+ {
if (type instanceof Class)
{
- Class<?> c = (Class<?>) type;
- if (c.isArray())
- {
- StringBuilder b =
- new StringBuilder(c.getComponentType().getName());
- String normName = c.getName();
- for (int a = 0; a < normName.length(); ++a)
- {
- if (normName.charAt(a) == '[')
- b.append("[]");
- else
- break;
- }
- return b.toString();
- }
- return c.getName();
+ Class<?> c = (Class<?>) type;
+ if (c.isArray())
+ {
+ StringBuilder b =
+ new StringBuilder(c.getComponentType().getName());
+ String normName = c.getName();
+ for (int a = 0; a < normName.length(); ++a)
+ {
+ if (normName.charAt(a) == '[')
+ b.append("[]");
+ else
+ break;
+ }
+ return b.toString();
+ }
+ return c.getName();
}
return type.toString();
}
diff --git a/gnu/javax/naming/giop/ContextContinuation.java b/gnu/javax/naming/giop/ContextContinuation.java
index 05023840b..e952393cc 100644
--- a/gnu/javax/naming/giop/ContextContinuation.java
+++ b/gnu/javax/naming/giop/ContextContinuation.java
@@ -79,7 +79,7 @@ import org.omg.CosNaming.NamingContextPackage.NotFound;
* to the existing naming service. When listing bindings, it uses the
* {@link Context#BATCHSIZE} property to determine, how many bindings should
* be returned at once (the process is transparend)
- *
+ *
* @author Audrius Meskauskas (audriusa@Bioinformatics.org)
*/
public class ContextContinuation implements Context
@@ -90,28 +90,28 @@ public class ContextContinuation implements Context
* one. Use {@link Context#BATCHSIZE} to override the value of this constant.
*/
public int DEFAULT_BATCH_SIZE = 20;
-
+
/**
* The actual CORBA naming service.
*/
NamingContextExt service;
-
+
/**
* The object request broker, used to access the naming service. This field
- * is only initialised when the context is constructed from the URL.
+ * is only initialised when the context is constructed from the URL.
*/
ORB orb;
-
+
/**
* The properties.
*/
Hashtable properties;
-
+
/**
* The parent factory.
*/
GiopNamingServiceFactory factory;
-
+
/**
* The name transformer to obtain the name from its string representation. The
* to_name method of the naming service is avoided as it may be remote and
@@ -119,16 +119,16 @@ public class ContextContinuation implements Context
* specific.
*/
static NameTransformer transformer = new NameTransformer();
-
+
/**
* The batch size for list operations - how many to return at once.
*/
public final int howMany;
-
+
/**
* Creates a new naming context that uses naming service, represented by the
* given CORBA object.
- *
+ *
* @param nsObject
* the naming service object. It must be possible to narrow it into
* the NamingContextExt.
@@ -177,7 +177,7 @@ public class ContextContinuation implements Context
* Give the specified name for the specified object. The passed name must not
* be already bound to some other object. The components of the name are
* mapped into the components of the CORBA name.
- *
+ *
* @param name
* the name that will be given to the object (in the scope of this
* context).
@@ -218,7 +218,7 @@ public class ContextContinuation implements Context
/**
* Give the specified name for the specified object. The passed name must not
* be already bound to some other object.
- *
+ *
* @param name
* the name that will be given to the object (in the scope of this
* context).
@@ -261,7 +261,7 @@ public class ContextContinuation implements Context
* can be called several times, but after it has been once invoked, it is not
* allowed to call any other method of this context. This method destroys
* the ORB, if we have one.
- *
+ *
* @throws NamingException
*/
public void close() throws NamingException
@@ -292,7 +292,7 @@ public class ContextContinuation implements Context
* Creates the new naming subcontext and binds it to the current (this)
* context. The returned object will wrap around the newly created CORBA
* subcontext
- *
+ *
* @param subContext
* the name of the new context being created
* @return the newly created context, bound to the instance of the context on
@@ -312,7 +312,7 @@ public class ContextContinuation implements Context
toGiop(subContext));
Hashtable clonedProps = new Hashtable();
clonedProps.putAll(properties);
-
+
// Nulls are passed both for orb and factory, as the child contexts
// need not to do any cleanup.
return new ContextContinuation(subcontext, clonedProps, null, null);
@@ -335,7 +335,7 @@ public class ContextContinuation implements Context
* Creates the new naming subcontext and binds it to the current (this)
* context. The returned object will wrap around the newly created CORBA
* subcontext
- *
+ *
* @param subContext
* the name of the new context being created
* @return the newly created context, bound to the instance of the context on
@@ -351,7 +351,7 @@ public class ContextContinuation implements Context
{
try
{
- org.omg.CORBA.Object subcontext =
+ org.omg.CORBA.Object subcontext =
service.bind_new_context(transformer.toName(subContext));
Hashtable clonedProps = new Hashtable();
clonedProps.putAll(properties);
@@ -379,7 +379,7 @@ public class ContextContinuation implements Context
* Removes the naming subcontext from this naming context. Returns without
* action if such subcontext does not exist. The context being destroyed must
* be empty.
- *
+ *
* @param subContext
* the name of the subcontext beig removed.
* @throws ContextNotEmptyException
@@ -395,7 +395,7 @@ public class ContextContinuation implements Context
* Removes the naming subcontext from this naming context. Returns without
* action if such subcontext does not exist. The context being destroyed must
* be empty.
- *
+ *
* @param subContext
* the name of the subcontext beig removed.
* @throws ContextNotEmptyException
@@ -411,7 +411,7 @@ public class ContextContinuation implements Context
* Returs the full name of this naming context. The returned string is not a
* JNDI composite name and should not be passed directly to the methods of the
* naming context. This implementation returns the IOR.
- *
+ *
* @return the full name of this naming context, in its own namespace.
* @throws OperationNotSupportedException
* if the naming system, represented by this context, does not
@@ -459,7 +459,7 @@ public class ContextContinuation implements Context
* bound object. The behaviour in the case if the bindings are added or
* removed later is not defined. The contents of the subcontexts are not
* included.
- *
+ *
* @param name
* the name of the subcontext
* @return the enumeration over the names, known for the given subcontext.
@@ -499,7 +499,7 @@ public class ContextContinuation implements Context
* bound object. The behaviour in the case if the bindings are added or
* removed later is not defined. The contents of the subcontexts are not
* included.
- *
+ *
* @param name
* the name of the subcontext
* @return the enumeration over the names, known for the given subcontext.
@@ -538,7 +538,7 @@ public class ContextContinuation implements Context
* {@link Binding}, providing also information about the class of the bound
* object. The behaviour in the case if the bindings are added or removed
* later is not defined. The contents of the subcontexts are not included.
- *
+ *
* @param name
* the name of the subcontext
* @return the enumeration over the names, known for the given subcontext.
@@ -576,7 +576,7 @@ public class ContextContinuation implements Context
* {@link Binding}, providing also information about the class of the bound
* object. The behaviour in the case if the bindings are added or removed
* later is not defined. The contents of the subcontexts are not included.
- *
+ *
* @param name
* the name of the subcontext
* @return the enumeration over the names, known for the given subcontext.
@@ -612,7 +612,7 @@ public class ContextContinuation implements Context
/**
* Gets the previously named object by name. If the passed name is empty, the
* method should return a cloned instance of this naming context.
- *
+ *
* @param name
* the name of the object being searched in this context
* @return the named object
@@ -642,7 +642,7 @@ public class ContextContinuation implements Context
/**
* Gets the previously named object by name. If the passed name is empty, the
* method should return a cloned instance of this naming context.
- *
+ *
* @param name
* the name of the object being searched in this context
* @return the named object
@@ -688,7 +688,7 @@ public class ContextContinuation implements Context
/**
* Give the specified name for the specified object. Unlike bind, this method
* silently replaces the existing binding for this name, if one exists.
- *
+ *
* @param name
* the name that will be given to the object (in the scope of this
* context).
@@ -723,7 +723,7 @@ public class ContextContinuation implements Context
/**
* Give the specified name for the specified object. Unlike bind, this method
* silently replaces the existing binding for this name, if one exists.
- *
+ *
* @param name
* the name that will be given to the object (in the scope of this
* context).
@@ -758,7 +758,7 @@ public class ContextContinuation implements Context
/**
* Renames the existing binding, removing the existing and giving the new name
* for the same object.
- *
+ *
* @param oldName
* the existing name of the known object
* @param newName
@@ -778,7 +778,7 @@ public class ContextContinuation implements Context
/**
* Renames the existing binding, removing the existing and giving the new name
* for the same object.
- *
+ *
* @param oldName
* the existing name of the known object
* @param newName
@@ -800,7 +800,7 @@ public class ContextContinuation implements Context
* returns without action if the name is not bound to an object in the
* terminal context, but throws {@link NameNotFoundException} if one of the
* intermadiate contexts does not exist.
- *
+ *
* @param name
* the name to be removed
* @throws NameNotFoundException
@@ -834,7 +834,7 @@ public class ContextContinuation implements Context
* returns without action if the name is not bound to an object in the
* terminal context, but throws {@link NameNotFoundException} if one of the
* intermadiate contexts does not exist.
- *
+ *
* @param name
* the name to be removed
* @throws NameNotFoundException
@@ -862,12 +862,12 @@ public class ContextContinuation implements Context
throw new InvalidNameException(name);
}
}
-
+
/**
* Add new environment property to the environment of this context. Both name
* and value of the new property must not be null. If the property is already
* defined, is current value is replaced by the propVal.
- *
+ *
* @param key
* the name of the new property
* @param value
@@ -888,7 +888,7 @@ public class ContextContinuation implements Context
* Returns the environment, associated with this naming context. The returned
* table should never be modified by the caller. Use {@link #addToEnvironment}
* and {@link #removeFromEnvironment} to modify the environement, if needed.
- *
+ *
* @return the table, representing the environment of this context
* @throws NamingException
*/
@@ -900,7 +900,7 @@ public class ContextContinuation implements Context
/**
* Removes the property with the given name from the environment. Returns
* without action if this property is not defined.
- *
+ *
* @param propName
* the name of the property being removed.
* @return the value of the property that has been removed or null if the
@@ -911,12 +911,12 @@ public class ContextContinuation implements Context
{
return properties.remove(propName);
}
-
+
/**
* Convert the {@link Name} into array of the name components, required to the
* CORBA naming service. First the string representation is obtained, then
* it is converted using parsing rules of the CORBA name.
- *
+ *
* @param name
* then name to convert
* @return the converted array of components.
@@ -925,11 +925,11 @@ public class ContextContinuation implements Context
{
return transformer.toName(name.toString());
}
-
+
/**
* Get the batch size from the environment properties. The batch size is used
* for listing operations.
- *
+ *
* @return the batch size, or some default value if not specified.
*/
public int getBatchSize()
@@ -951,6 +951,6 @@ public class ContextContinuation implements Context
}
return batchSize;
}
-
-
+
+
}
diff --git a/gnu/javax/naming/giop/CorbalocParser.java b/gnu/javax/naming/giop/CorbalocParser.java
index 95ebb8a06..4b7883969 100644
--- a/gnu/javax/naming/giop/CorbalocParser.java
+++ b/gnu/javax/naming/giop/CorbalocParser.java
@@ -65,15 +65,15 @@ import org.omg.CORBA.ORBPackage.InvalidName;
/**
* Parses the alternative IOR representations into our IOR structure.
- *
+ *
* TODO This parser currently supports only one address per target string. A
* string with the multiple addresses will be accepted, but only the last
* address will be taken into consideration. The fault tolerance is not yet
* implemented.
- *
+ *
* The key string is filtered using {@link java.net.URLDecoder} that replaces
* the agreed escape sequences by the corresponding non alphanumeric characters.
- *
+ *
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public class CorbalocParser
@@ -93,17 +93,17 @@ public class CorbalocParser
* The IOR prefix.
*/
public static final String pxIOR = "ior";
-
+
/**
* The file:// prefix.
*/
public static final String pxFILE = "file://";
-
+
/**
* The ftp:// prefix.
*/
public static final String pxFTP = "ftp://";
-
+
/**
* The http:// prefix.
*/
@@ -146,7 +146,7 @@ public class CorbalocParser
/**
* Parse CORBALOC.
- *
+ *
* The expected format is: <br>
* 1. corbaloc:[iiop][version.subversion@]:host[:port]/key <br>
* 2. corbaloc:rir:[/key] <br>
@@ -155,14 +155,14 @@ public class CorbalocParser
* 5. file://[file name]<br>
* 6. http://[url]<br>
* 7. ftp://[url]<br>
- *
+ *
* Protocol defaults to IOP, the object key defaults to the NameService.
- *
+ *
* @param corbaloc the string to parse.
* @param orb the ORB, needed to create IORs and resolve rir references.
- *
+ *
* @return the arrey of strings, first member being the IOR of the
- * naming service, second member the name in the naming service.
+ * naming service, second member the name in the naming service.
*/
public synchronized String[] corbaloc(String corbaloc,
ORB orb)
@@ -170,7 +170,7 @@ public class CorbalocParser
{
return corbaloc(corbaloc, orb, 0);
}
-
+
/**
* Parse controlling against the infinite recursion loop.
*/
@@ -182,7 +182,7 @@ public class CorbalocParser
// by malicious attempt.
if (recursion > 10)
throw new DATA_CONVERSION("More than 10 redirections");
-
+
if (corbaloc.startsWith(pxFILE))
return corbaloc(readFile(corbaloc.substring(pxFILE.length())), orb, recursion+1);
else if (corbaloc.startsWith(pxHTTP))
@@ -334,7 +334,7 @@ public class CorbalocParser
throw new InvalidNameException("Unsupported protocol '" + t[p] +
"' (iiop expected)");
}
-
+
/**
* Read IOR from the file in the local file system.
*/
@@ -363,7 +363,7 @@ public class CorbalocParser
throw (d);
}
}
-
+
/**
* Read IOR from the remote URL.
*/
diff --git a/gnu/javax/naming/giop/GiopNamingEnumeration.java b/gnu/javax/naming/giop/GiopNamingEnumeration.java
index 9b93f8bb6..c2de75b38 100644
--- a/gnu/javax/naming/giop/GiopNamingEnumeration.java
+++ b/gnu/javax/naming/giop/GiopNamingEnumeration.java
@@ -51,7 +51,7 @@ import org.omg.CosNaming.BindingListHolder;
/**
* Iterates over name class pairs, obtaining values first from the binding list
* and then from the binding iterator.
- *
+ *
* @author Audrius Meskauskas
*/
public abstract class GiopNamingEnumeration implements NamingEnumeration
@@ -60,18 +60,18 @@ public abstract class GiopNamingEnumeration implements NamingEnumeration
* The array of bindings, returned at once.
*/
Binding[] list;
-
+
/**
* The binding iterator to obtain the subsequent bindings. May be null,
* if all values are stored in the <code>list</code>.
*/
BindingIterator iterator;
-
+
/**
* The batch size.
*/
int batch;
-
+
/**
* The position of the element in the binding list, that must be returned
* during the subsequent call of the next(). If this field is grater or equal
@@ -79,17 +79,17 @@ public abstract class GiopNamingEnumeration implements NamingEnumeration
* iterator.
*/
int p;
-
+
GiopNamingEnumeration(BindingListHolder bh, BindingIteratorHolder bih, int batchSize)
{
list = bh.value;
iterator = bih.value;
batch = batchSize;
}
-
+
/**
* Convert from the CORBA binding into that this enumeration should return.
- *
+ *
* @param binding
* the binding to convert
* @return the value, that must be returned by the {@link #next()}.
@@ -104,10 +104,10 @@ public abstract class GiopNamingEnumeration implements NamingEnumeration
iterator = null;
}
}
-
+
/**
* Checks if there are more elements to return.
- *
+ *
* @throws NamingException
* never
*/
@@ -118,7 +118,7 @@ public abstract class GiopNamingEnumeration implements NamingEnumeration
/**
* Returns the next element.
- *
+ *
* @throws NamingException
* never
*/
@@ -155,7 +155,7 @@ public abstract class GiopNamingEnumeration implements NamingEnumeration
else
throw new NoSuchElementException();
}
-
+
/**
* Tries to obtain more elements, return true on success. Updates the fields
* accordingly.
diff --git a/gnu/javax/naming/giop/GiopNamingServiceFactory.java b/gnu/javax/naming/giop/GiopNamingServiceFactory.java
index 6c221548f..e8aac3b65 100644
--- a/gnu/javax/naming/giop/GiopNamingServiceFactory.java
+++ b/gnu/javax/naming/giop/GiopNamingServiceFactory.java
@@ -61,7 +61,7 @@ import org.omg.CORBA.ORB;
* parsed using the specification of the corbaname urls. Being the naming
* service, the returned context supports creating the subcontexts, forwarding
* this task to the existing naming service.
- *
+ *
* @author Audrius Meskauskas (audriusa@Bioinformatics.org)
*/
public class GiopNamingServiceFactory
@@ -70,17 +70,17 @@ public class GiopNamingServiceFactory
* The default naming service provider. It is assumed, that the naming service
* is running on the port 900 of the local host, using the GIOP version 1.2
*/
- public static final String DEFAULT_PROVIDER =
+ public static final String DEFAULT_PROVIDER =
"corbaloc:iiop:1.2@127.0.0.1:900/NameService";
-
+
/**
- * The table of all instantiated ORB's that are found by they ORB
+ * The table of all instantiated ORB's that are found by they ORB
* properties signatures. If all ORB related properties are the same,
* the ORB's are shared.
*/
public static Hashtable orbs = new Hashtable();
-
-
+
+
/**
* Create a new instance of the corbaname URL context.
*/
@@ -116,13 +116,13 @@ public class GiopNamingServiceFactory
return new GiopNamingServiceURLContext(environment, this, orb);
}
-
+
/**
* Check if this ORB is still in use (maybe it is time to shutdown it). This
* method only works when the Classpath CORBA implementation is used
* (otherwise it return without action). The method is called from the close()
* method of the created context.
- *
+ *
* @param orb
* the ORB that maybe is no longer referenced.
*/
@@ -139,7 +139,7 @@ public class GiopNamingServiceFactory
{
cOrb.shutdown(false);
cOrb.destroy();
-
+
Enumeration keys = orbs.keys();
Object key;
Remove: while (keys.hasMoreElements())
@@ -155,7 +155,7 @@ public class GiopNamingServiceFactory
}
}
}
-
+
/**
* Get all properties.
*/
@@ -164,7 +164,7 @@ public class GiopNamingServiceFactory
TreeMap map = new TreeMap();
map.putAll(props);
CPStringBuilder b = new CPStringBuilder(50*props.size());
-
+
Iterator iter = map.entrySet().iterator();
Map.Entry m;
while (iter.hasNext())
diff --git a/gnu/javax/naming/giop/GiopNamingServiceURLContext.java b/gnu/javax/naming/giop/GiopNamingServiceURLContext.java
index 50446ac7e..0d2e290b4 100644
--- a/gnu/javax/naming/giop/GiopNamingServiceURLContext.java
+++ b/gnu/javax/naming/giop/GiopNamingServiceURLContext.java
@@ -80,7 +80,7 @@ import org.omg.CosNaming.NamingContextPackage.NotFound;
* to the existing naming service. When listing bindings, it uses the
* {@link Context#BATCHSIZE} property to determine, how many bindings should
* be returned at once (the process is transparend)
- *
+ *
* @author Audrius Meskauskas (audriusa@Bioinformatics.org)
*/
public class GiopNamingServiceURLContext extends CorbalocParser implements
@@ -95,7 +95,7 @@ public class GiopNamingServiceURLContext extends CorbalocParser implements
/**
* The object request broker, used to access the naming service. This field
- * is only initialised when the context is constructed from the URL.
+ * is only initialised when the context is constructed from the URL.
*/
ORB orb;
@@ -125,7 +125,7 @@ public class GiopNamingServiceURLContext extends CorbalocParser implements
/**
* Creates a new naming context that uses naming service, represented by the
* given CORBA object.
- *
+ *
* @param props
* the environment table.
* @param aFactory
@@ -143,7 +143,7 @@ public class GiopNamingServiceURLContext extends CorbalocParser implements
properties = props;
howMany = getBatchSize();
}
-
+
public NamingContextExt getService(String address)
{
org.omg.CORBA.Object nsObject = orb.string_to_object(address);
@@ -199,7 +199,7 @@ public class GiopNamingServiceURLContext extends CorbalocParser implements
* Give the specified name for the specified object. The passed name must not
* be already bound to some other object. The components of the name are
* mapped into the components of the CORBA name.
- *
+ *
* @param name
* the name that will be given to the object (in the scope of this
* context).
@@ -220,7 +220,7 @@ public class GiopNamingServiceURLContext extends CorbalocParser implements
/**
* Give the specified name for the specified object. The passed name must not
* be already bound to some other object.
- *
+ *
* @param name
* the name that will be given to the object (in the scope of this
* context).
@@ -237,7 +237,7 @@ public class GiopNamingServiceURLContext extends CorbalocParser implements
{
try
{
- String[] n = split(name);
+ String[] n = split(name);
org.omg.CORBA.Object object = (org.omg.CORBA.Object) obj;
getService(n[0]).bind(transformer.toName(n[1]), object);
}
@@ -264,7 +264,7 @@ public class GiopNamingServiceURLContext extends CorbalocParser implements
* can be called several times, but after it has been once invoked, it is not
* allowed to call any other method of this context. This method destroys
* the ORB, if we have one.
- *
+ *
* @throws NamingException
*/
public void close() throws NamingException
@@ -295,7 +295,7 @@ public class GiopNamingServiceURLContext extends CorbalocParser implements
* Creates the new naming subcontext and binds it to the current (this)
* context. The returned object will wrap around the newly created CORBA
* subcontext
- *
+ *
* @param subContext
* the name of the new context being created
* @return the newly created context, bound to the instance of the context on
@@ -316,7 +316,7 @@ public class GiopNamingServiceURLContext extends CorbalocParser implements
* Creates the new naming subcontext and binds it to the current (this)
* context. The returned object will wrap around the newly created CORBA
* subcontext
- *
+ *
* @param subContext
* the name of the new context being created
* @return the newly created context, bound to the instance of the context on
@@ -360,7 +360,7 @@ public class GiopNamingServiceURLContext extends CorbalocParser implements
* Removes the naming subcontext from this naming context. Returns without
* action if such subcontext does not exist. The context being destroyed must
* be empty.
- *
+ *
* @param subContext
* the name of the subcontext beig removed.
* @throws ContextNotEmptyException
@@ -376,7 +376,7 @@ public class GiopNamingServiceURLContext extends CorbalocParser implements
* Removes the naming subcontext from this naming context. Returns without
* action if such subcontext does not exist. The context being destroyed must
* be empty.
- *
+ *
* @param subContext
* the name of the subcontext beig removed.
* @throws ContextNotEmptyException
@@ -419,7 +419,7 @@ public class GiopNamingServiceURLContext extends CorbalocParser implements
* bound object. The behaviour in the case if the bindings are added or
* removed later is not defined. The contents of the subcontexts are not
* included.
- *
+ *
* @param name
* the name of the subcontext
* @return the enumeration over the names, known for the given subcontext.
@@ -437,7 +437,7 @@ public class GiopNamingServiceURLContext extends CorbalocParser implements
* bound object. The behaviour in the case if the bindings are added or
* removed later is not defined. The contents of the subcontexts are not
* included.
- *
+ *
* @param name
* the name of the subcontext
* @return the enumeration over the names, known for the given subcontext.
@@ -449,7 +449,7 @@ public class GiopNamingServiceURLContext extends CorbalocParser implements
BindingListHolder bl = new BindingListHolder();
NamingContext subcontext;
-
+
String [] n = split(name);
NamingContextExt service = getService(n[0]);
@@ -479,7 +479,7 @@ public class GiopNamingServiceURLContext extends CorbalocParser implements
* {@link Binding}, providing also information about the class of the bound
* object. The behaviour in the case if the bindings are added or removed
* later is not defined. The contents of the subcontexts are not included.
- *
+ *
* @param name
* the name of the subcontext
* @return the enumeration over the names, known for the given subcontext.
@@ -496,7 +496,7 @@ public class GiopNamingServiceURLContext extends CorbalocParser implements
* {@link Binding}, providing also information about the class of the bound
* object. The behaviour in the case if the bindings are added or removed
* later is not defined. The contents of the subcontexts are not included.
- *
+ *
* @param name
* the name of the subcontext
* @return the enumeration over the names, known for the given subcontext.
@@ -508,7 +508,7 @@ public class GiopNamingServiceURLContext extends CorbalocParser implements
BindingListHolder bl = new BindingListHolder();
NamingContext subcontext;
-
+
String [] n = split(name);
NamingContextExt service = getService(n[0]);
@@ -535,7 +535,7 @@ public class GiopNamingServiceURLContext extends CorbalocParser implements
/**
* Gets the previously named object by name. If the passed name is empty, the
* method should return a cloned instance of this naming context.
- *
+ *
* @param name
* the name of the object being searched in this context
* @return the named object
@@ -550,7 +550,7 @@ public class GiopNamingServiceURLContext extends CorbalocParser implements
/**
* Gets the previously named object by name. If the passed name is empty, the
* method should return a cloned instance of this naming context.
- *
+ *
* @param name
* the name of the object being searched in this context
* @return the named object
@@ -598,7 +598,7 @@ public class GiopNamingServiceURLContext extends CorbalocParser implements
/**
* Give the specified name for the specified object. Unlike bind, this method
* silently replaces the existing binding for this name, if one exists.
- *
+ *
* @param name
* the name that will be given to the object (in the scope of this
* context).
@@ -617,7 +617,7 @@ public class GiopNamingServiceURLContext extends CorbalocParser implements
/**
* Give the specified name for the specified object. Unlike bind, this method
* silently replaces the existing binding for this name, if one exists.
- *
+ *
* @param name
* the name that will be given to the object (in the scope of this
* context).
@@ -655,7 +655,7 @@ public class GiopNamingServiceURLContext extends CorbalocParser implements
/**
* Renames the existing binding, removing the existing and giving the new name
* for the same object.
- *
+ *
* @param oldName
* the existing name of the known object
* @param newName
@@ -675,7 +675,7 @@ public class GiopNamingServiceURLContext extends CorbalocParser implements
/**
* Renames the existing binding, removing the existing and giving the new name
* for the same object.
- *
+ *
* @param oldName
* the existing name of the known object
* @param newName
@@ -697,7 +697,7 @@ public class GiopNamingServiceURLContext extends CorbalocParser implements
* returns without action if the name is not bound to an object in the
* terminal context, but throws {@link NameNotFoundException} if one of the
* intermadiate contexts does not exist.
- *
+ *
* @param name
* the name to be removed
* @throws NameNotFoundException
@@ -716,7 +716,7 @@ public class GiopNamingServiceURLContext extends CorbalocParser implements
* returns without action if the name is not bound to an object in the
* terminal context, but throws {@link NameNotFoundException} if one of the
* intermadiate contexts does not exist.
- *
+ *
* @param name
* the name to be removed
* @throws NameNotFoundException
@@ -752,7 +752,7 @@ public class GiopNamingServiceURLContext extends CorbalocParser implements
* Add new environment property to the environment of this context. Both name
* and value of the new property must not be null. If the property is already
* defined, is current value is replaced by the propVal.
- *
+ *
* @param key
* the name of the new property
* @param value
@@ -773,7 +773,7 @@ public class GiopNamingServiceURLContext extends CorbalocParser implements
* Returns the environment, associated with this naming context. The returned
* table should never be modified by the caller. Use {@link #addToEnvironment}
* and {@link #removeFromEnvironment} to modify the environement, if needed.
- *
+ *
* @return the table, representing the environment of this context
* @throws NamingException
*/
@@ -785,7 +785,7 @@ public class GiopNamingServiceURLContext extends CorbalocParser implements
/**
* Removes the property with the given name from the environment. Returns
* without action if this property is not defined.
- *
+ *
* @param propName
* the name of the property being removed.
* @return the value of the property that has been removed or null if the
@@ -801,7 +801,7 @@ public class GiopNamingServiceURLContext extends CorbalocParser implements
* Convert the {@link Name} into array of the name components, required to the
* CORBA naming service. First the string representation is obtained, then
* it is converted using parsing rules of the CORBA name.
- *
+ *
* @param name
* then name to convert
* @return the converted array of components.
@@ -814,7 +814,7 @@ public class GiopNamingServiceURLContext extends CorbalocParser implements
/**
* Get the batch size from the environment properties. The batch size is used
* for listing operations.
- *
+ *
* @return the batch size, or some default value if not specified.
*/
public int getBatchSize()
diff --git a/gnu/javax/naming/giop/ListBindingsEnumeration.java b/gnu/javax/naming/giop/ListBindingsEnumeration.java
index 68ba49b3f..dd9ed0265 100644
--- a/gnu/javax/naming/giop/ListBindingsEnumeration.java
+++ b/gnu/javax/naming/giop/ListBindingsEnumeration.java
@@ -50,7 +50,7 @@ import org.omg.CosNaming.NamingContext;
/**
* Iterates over bindings, obtaining values first from the binding list and then
* from the binding iterator.
- *
+ *
* @author Audrius Meskauskas
*/
public class ListBindingsEnumeration extends GiopNamingEnumeration implements
@@ -60,10 +60,10 @@ public class ListBindingsEnumeration extends GiopNamingEnumeration implements
* The naming service, to resolve the objects.
*/
NamingContext service;
-
+
/**
* Create the new enumeration
- *
+ *
* @param bh
* holder, containing the first portion of the bindings
* @param bih
@@ -75,19 +75,19 @@ public class ListBindingsEnumeration extends GiopNamingEnumeration implements
* the naming service, used to obtain the objects, bound to the
* names.
*/
- public ListBindingsEnumeration(BindingListHolder bh,
- BindingIteratorHolder bih, int batchSize,
+ public ListBindingsEnumeration(BindingListHolder bh,
+ BindingIteratorHolder bih, int batchSize,
NamingContext aService)
{
super(bh, bih, batchSize);
service = aService;
}
-
+
/**
* Convert from the CORBA binding into the javax.naming binding. As the CORBA
* naming service binding does not contain the object itself, this method
* makes the additional calls to the naming service.
- *
+ *
* @param binding
* the binding to convert
* @return the value, that must be returned by the {@link #next()}.
@@ -102,7 +102,7 @@ public class ListBindingsEnumeration extends GiopNamingEnumeration implements
if (i < binding.binding_name.length - 1)
name.append('/');
}
-
+
try
{
Object object = service.resolve(binding.binding_name);
diff --git a/gnu/javax/naming/giop/ListEnumeration.java b/gnu/javax/naming/giop/ListEnumeration.java
index 3fca1e0ab..68a40fcf0 100644
--- a/gnu/javax/naming/giop/ListEnumeration.java
+++ b/gnu/javax/naming/giop/ListEnumeration.java
@@ -52,7 +52,7 @@ import org.omg.CosNaming.NamingContext;
/**
* Iterates over name class pairs, obtaining values first from the binding list
* and then from the binding iterator.
- *
+ *
* @author Audrius Meskauskas
*/
public class ListEnumeration extends GiopNamingEnumeration implements
@@ -60,7 +60,7 @@ public class ListEnumeration extends GiopNamingEnumeration implements
{
/**
* Create the new enumeration
- *
+ *
* @param bh
* holder, containing the first portion of the bindings
* @param bih
@@ -69,18 +69,18 @@ public class ListEnumeration extends GiopNamingEnumeration implements
* the number of bindings the the iterator will be requested to
* return as a single pack
*/
- public ListEnumeration(BindingListHolder bh,
+ public ListEnumeration(BindingListHolder bh,
BindingIteratorHolder bih, int batchSize)
{
super(bh, bih, batchSize);
}
-
+
/**
* Convert from the CORBA binding into the {@link NameClassPair} that this
* enumeration should return. This method converts into NameClassPair,
* connecting the name components with slashes and setting the class name
* to either NamingContext or GIOP Object.
- *
+ *
* @param binding
* the binding to convert
* @return the value, that must be returned by the {@link #next()}.
@@ -113,6 +113,6 @@ public class ListEnumeration extends GiopNamingEnumeration implements
NameClassPair pair = new NameClassPair(name.toString(), className);
return pair;
- }
-
+ }
+
}
diff --git a/gnu/javax/naming/ictxImpl/trans/GnuName.java b/gnu/javax/naming/ictxImpl/trans/GnuName.java
index b423c721b..f37f8022d 100644
--- a/gnu/javax/naming/ictxImpl/trans/GnuName.java
+++ b/gnu/javax/naming/ictxImpl/trans/GnuName.java
@@ -47,7 +47,7 @@ import javax.naming.Name;
/**
* The implementation of the {@link Name}.
- *
+ *
* @author Audrius Meskauskas
*/
public class GnuName
@@ -61,7 +61,7 @@ public class GnuName
{
/**
* Get the new enumeration that enumerates from the given position forward
- *
+ *
* @param position the position of the first name component to enumerate (0
* means first element)
*/
@@ -134,7 +134,7 @@ public class GnuName
/**
* Creates the name, containing from the given chain of the atomic components.
- *
+ *
* @param name the array, containing the name components.
*/
public GnuName(String[] name)
@@ -157,7 +157,7 @@ public class GnuName
* Inserts the given <code>String</code> component to this <code>Name</code>
* at the given index. The method modifies the current <code>Name</code> and
* then returns it.
- *
+ *
* @exception ArrayIndexOutOfBoundsException if the given index is smaller
* then zero or greater then or equal to <code>size()</code>.
* @exception InvalidNameException if the given <code>String</code> is not a
@@ -181,7 +181,7 @@ public class GnuName
* Adds the given <code>String</code> component to the end of this
* <code>Name</code>. The method modifies the current <code>Name</code>
* and then returns it.
- *
+ *
* @exception InvalidNameException if the given <code>String</code> is not a
* valid component for this <code>Name</code>.
*/
@@ -203,7 +203,7 @@ public class GnuName
* <code>Name</code> at the given index. Components after this index (if
* any) are shifted up. The method modifies the current <code>Name</code>
* and then returns it.
- *
+ *
* @exception ArrayIndexOutOfBoundsException if the given index is smaller
* then zero or greater then or equal to <code>size()</code>.
* @exception InvalidNameException if any of the given components is not a
@@ -230,7 +230,7 @@ public class GnuName
* Adds all the components of the given <code>Name</code> to the end of this
* <code>Name</code>. The method modifies the current <code>Name</code>
* and then returns it.
- *
+ *
* @exception InvalidNameException if any of the given components is not a
* valid component for this <code>Name</code>.
*/
@@ -296,7 +296,7 @@ public class GnuName
/**
* Gets the component at the given index.
- *
+ *
* @exception ArrayIndexOutOfBoundsException if the given index is smaller
* then zero or greater then or equal to <code>size()</code>.
*/
@@ -317,7 +317,7 @@ public class GnuName
/**
* Returns the components till the given index as a <code>Name</code>. The
* returned <code>Name</code> can be modified without changing the original.
- *
+ *
* @param posn the ending position, exclusive
* @exception ArrayIndexOutOfBoundsException if the given index is smaller
* then zero or greater then or equal to <code>size()</code>.
@@ -331,7 +331,7 @@ public class GnuName
* Returns the components from the given index till the end as a
* <code>Name</code>. The returned <code>Name</code> can be modified
* without changing the original.
- *
+ *
* @param posn the starting position, inclusive. If it is equal to the size of
* the name, the empty name is returned.
* @exception ArrayIndexOutOfBoundsException if the given index is smaller
@@ -354,7 +354,7 @@ public class GnuName
/**
* Removes the component at the given index from this <code>Name</code>.
* The method modifies the current <code>Name</code> and then returns it.
- *
+ *
* @exception InvalidNameException if the name size reduces below zero.
*/
public Object remove(int posn) throws InvalidNameException
diff --git a/gnu/javax/naming/jndi/url/corbaname/corbanameURLContextFactory.java b/gnu/javax/naming/jndi/url/corbaname/corbanameURLContextFactory.java
index 7fe2e5c8c..c6fb8481f 100644
--- a/gnu/javax/naming/jndi/url/corbaname/corbanameURLContextFactory.java
+++ b/gnu/javax/naming/jndi/url/corbaname/corbanameURLContextFactory.java
@@ -43,8 +43,8 @@ import javax.naming.spi.ObjectFactory;
/**
* The GIOP URL context factory.
- *
- * @author Audrius Meskauskas (audriusa@Bioinformatics.org)
+ *
+ * @author Audrius Meskauskas (audriusa@Bioinformatics.org)
*/
public class corbanameURLContextFactory extends GiopNamingServiceFactory
implements ObjectFactory
diff --git a/gnu/javax/naming/jndi/url/rmi/ContextContinuation.java b/gnu/javax/naming/jndi/url/rmi/ContextContinuation.java
index ee8c77914..a94ae6d65 100644
--- a/gnu/javax/naming/jndi/url/rmi/ContextContinuation.java
+++ b/gnu/javax/naming/jndi/url/rmi/ContextContinuation.java
@@ -60,8 +60,8 @@ import javax.naming.NamingException;
import javax.naming.OperationNotSupportedException;
/**
- * The implementation of the RMI URL context. This context connects
- *
+ * The implementation of the RMI URL context. This context connects
+ *
* @author Audrius Meskauskas
*/
public class ContextContinuation implements Context
@@ -70,18 +70,18 @@ public class ContextContinuation implements Context
* The default registry location.
*/
public static final String DEFAULT_REGISTRY_LOCATION = "rmi://localhost:1099";
-
+
/**
* The local or remote RMI registry, performing the actual work for this
* context.
*/
Registry registry;
-
+
/**
* The properties.
*/
Properties properties;
-
+
/**
* The flag, indicating, that the lookup methods were called before.
* If the lookup methods were called before, the existing ORB cannot be
@@ -89,14 +89,14 @@ public class ContextContinuation implements Context
* unfunctional.
*/
boolean lookupCalled;
-
+
/**
* Add new environment property to the environment of this context. Both name
* and value of the new property must not be null. If the property is already
* defined, is current value is replaced by the propVal. This method replaces
* the registry. The new registry will be lazily instantiated on the first
* call.
- *
+ *
* @param key
* the name of the new property
* @param value
@@ -117,7 +117,7 @@ public class ContextContinuation implements Context
* table should never be modified by the caller (the registry would not be updated
* in such case). Use {@link #addToEnvironment} and
* {@link #removeFromEnvironment} to modify the environement, if needed.
- *
+ *
* @return the table, representing the environment of this context
* @throws NamingException
*/
@@ -132,7 +132,7 @@ public class ContextContinuation implements Context
* constructing the new ORB with the changes set of properties (you can
* replace the CORBA implementation provider, for instance). The new ORB will
* be lazily instantiated on the first call.
- *
+ *
* @param propName
* the name of the property being removed.
* @return the value of the property that has been removed or null if the
@@ -144,18 +144,18 @@ public class ContextContinuation implements Context
removeRegistry();
return properties.remove(propName);
}
-
+
/**
* Remove the current registry reference.
*/
public void removeRegistry()
{
- registry = null;
+ registry = null;
}
-
+
/**
* Get the cached or new registry reference.
- *
+ *
* @return the registry reference, either cached or new.
*/
public Registry getRegistry() throws NamingException
@@ -164,17 +164,17 @@ public class ContextContinuation implements Context
{
String address = properties.getProperty(Context.PROVIDER_URL,
DEFAULT_REGISTRY_LOCATION);
-
+
// The format like rmi://localhost:1099 is expected. Parse.
if (!address.startsWith("rmi://"))
throw new InvalidNameException(address);
-
+
String a = address.substring("rmi://".length());
-
+
// The colon, if present, indicates the start of the port number.
int colon = a.lastIndexOf(':');
int port;
-
+
try
{
if (colon >=0)
@@ -188,8 +188,8 @@ public class ContextContinuation implements Context
catch (NumberFormatException e1)
{
throw new InvalidNameException(address);
- }
-
+ }
+
try
{
registry = LocateRegistry.getRegistry(a, port);
@@ -204,7 +204,7 @@ public class ContextContinuation implements Context
/**
* Create the rmi url context that works, talking with the given RMI registry.
- *
+ *
* @param props
* the properties for this context
* @param initialRegistry
@@ -217,11 +217,11 @@ public class ContextContinuation implements Context
properties.putAll(props);
registry = initialRegistry;
}
-
+
/**
* Bind the given name into this context. The .toString() is called to
* convert into the string representation, required by RMI registry.
- *
+ *
* @throws NamingException if the object is not an instance of Remote
*/
public void bind(Name name, Object obj) throws NamingException
@@ -362,7 +362,7 @@ public class ContextContinuation implements Context
{
if (name.length() > 0)
throw new OperationNotSupportedException("Only empty name is accepted");
-
+
try
{
return new ListEnumeration(getRegistry().list());
@@ -375,7 +375,7 @@ public class ContextContinuation implements Context
/**
* List existing bindings of this context (the parameter must be empty name,
- * indicating the root context).
+ * indicating the root context).
*/
public NamingEnumeration listBindings(Name name) throws NamingException
{
@@ -386,13 +386,13 @@ public class ContextContinuation implements Context
/**
* List existing bindings of this context (the parameter must be empty name,
- * indicating the root context).
+ * indicating the root context).
*/
public NamingEnumeration listBindings(String name) throws NamingException
{
if (name.length() > 0)
throw new OperationNotSupportedException("Only empty name is accepted");
-
+
try
{
Registry r = getRegistry();
@@ -422,7 +422,7 @@ public class ContextContinuation implements Context
/**
* Rebinds this object.
- *
+ *
* @param name
* the object name (.toString()) is used to convert into string
* representation.
@@ -436,7 +436,7 @@ public class ContextContinuation implements Context
/**
* Rebinds this object.
- *
+ *
* @param name
* the object name.
* @param obj
@@ -462,7 +462,7 @@ public class ContextContinuation implements Context
+ obj.getClass().getName());
}
}
-
+
/**
* Renames the object. If the new name is already bound in the given context,
* the {@link AlreadyBoundException} is thrown and the oldName binding is
@@ -549,7 +549,7 @@ public class ContextContinuation implements Context
throw new CommunicationException(e.toString());
}
}
-
+
/**
* Release the associated resources.
*/
@@ -557,10 +557,10 @@ public class ContextContinuation implements Context
{
removeRegistry();
}
-
+
/**
* Resolve the object by name.
- *
+ *
* @param name
* the object name, .toString() is used to get the string
* representation.
@@ -569,10 +569,10 @@ public class ContextContinuation implements Context
{
return lookup(name.toString());
}
-
+
/**
* Resolve the object by name
- *
+ *
* @param name the object name.
*/
public Object lookup(String name) throws NamingException
diff --git a/gnu/javax/naming/jndi/url/rmi/ListBindingsEnumeration.java b/gnu/javax/naming/jndi/url/rmi/ListBindingsEnumeration.java
index 757e8bf59..6ac4788d0 100644
--- a/gnu/javax/naming/jndi/url/rmi/ListBindingsEnumeration.java
+++ b/gnu/javax/naming/jndi/url/rmi/ListBindingsEnumeration.java
@@ -45,7 +45,7 @@ import javax.naming.NamingEnumeration;
/**
* Iterates over bindings, obtaining values first from the binding list and then
* from the binding iterator.
- *
+ *
* @author Audrius Meskauskas
*/
public class ListBindingsEnumeration extends RmiNamingEnumeration implements
@@ -55,10 +55,10 @@ public class ListBindingsEnumeration extends RmiNamingEnumeration implements
* The naming service, to resolve the objects.
*/
Registry service;
-
+
/**
* Create the new enumeration
- *
+ *
* @param bindings
* the list of the bound names
* @param aService
@@ -70,12 +70,12 @@ public class ListBindingsEnumeration extends RmiNamingEnumeration implements
super(bindings);
service = aService;
}
-
+
/**
* Convert from the CORBA binding into the javax.naming binding. As the CORBA
* naming service binding does not contain the object itself, this method
* makes the additional calls to the naming service.
- *
+ *
* @param binding
* the binding to convert
* @return the value, that must be returned by the {@link #next()}.
diff --git a/gnu/javax/naming/jndi/url/rmi/ListEnumeration.java b/gnu/javax/naming/jndi/url/rmi/ListEnumeration.java
index b4142c5e3..b64ca87ea 100644
--- a/gnu/javax/naming/jndi/url/rmi/ListEnumeration.java
+++ b/gnu/javax/naming/jndi/url/rmi/ListEnumeration.java
@@ -46,7 +46,7 @@ import javax.naming.NamingEnumeration;
/**
* Iterates over name class pairs, obtaining values first from the binding list
* and then from the binding iterator.
- *
+ *
* @author Audrius Meskauskas
*/
public class ListEnumeration extends RmiNamingEnumeration implements
@@ -54,7 +54,7 @@ public class ListEnumeration extends RmiNamingEnumeration implements
{
/**
* Create the new enumeration
- *
+ *
* @param bindings
* the array of the binding names, returned by the RMI registry.
*/
@@ -62,11 +62,11 @@ public class ListEnumeration extends RmiNamingEnumeration implements
{
super(bindings);
}
-
+
/**
* Convert from the binding name into the {@link NameClassPair} that this
- * enumeration should return.
- *
+ * enumeration should return.
+ *
* @param binding
* the binding to convert
* @return the value, that must be returned by the {@link #next()}.
@@ -75,6 +75,6 @@ public class ListEnumeration extends RmiNamingEnumeration implements
{
NameClassPair pair = new NameClassPair(binding, Remote.class.getName());
return pair;
- }
-
+ }
+
}
diff --git a/gnu/javax/naming/jndi/url/rmi/RmiContinuation.java b/gnu/javax/naming/jndi/url/rmi/RmiContinuation.java
index 29eb61b4b..c8e6a158a 100644
--- a/gnu/javax/naming/jndi/url/rmi/RmiContinuation.java
+++ b/gnu/javax/naming/jndi/url/rmi/RmiContinuation.java
@@ -60,8 +60,8 @@ import javax.naming.NamingException;
import javax.naming.OperationNotSupportedException;
/**
- * The implementation of the RMI URL context. This context connects
- *
+ * The implementation of the RMI URL context. This context connects
+ *
* @author Audrius Meskauskas
*/
public class RmiContinuation implements Context
@@ -70,18 +70,18 @@ public class RmiContinuation implements Context
* The default registry location.
*/
public static final String DEFAULT_REGISTRY_LOCATION = "rmi://localhost:1099";
-
+
/**
* The local or remote RMI registry, performing the actual work for this
* context.
*/
Registry registry;
-
+
/**
* The properties.
*/
Properties properties;
-
+
/**
* The flag, indicating, that the lookup methods were called before.
* If the lookup methods were called before, the existing ORB cannot be
@@ -89,14 +89,14 @@ public class RmiContinuation implements Context
* unfunctional.
*/
boolean lookupCalled;
-
+
/**
* Add new environment property to the environment of this context. Both name
* and value of the new property must not be null. If the property is already
* defined, is current value is replaced by the propVal. This method replaces
* the registry. The new registry will be lazily instantiated on the first
* call.
- *
+ *
* @param key
* the name of the new property
* @param value
@@ -117,7 +117,7 @@ public class RmiContinuation implements Context
* table should never be modified by the caller (the registry would not be updated
* in such case). Use {@link #addToEnvironment} and
* {@link #removeFromEnvironment} to modify the environement, if needed.
- *
+ *
* @return the table, representing the environment of this context
* @throws NamingException
*/
@@ -132,7 +132,7 @@ public class RmiContinuation implements Context
* constructing the new ORB with the changes set of properties (you can
* replace the CORBA implementation provider, for instance). The new ORB will
* be lazily instantiated on the first call.
- *
+ *
* @param propName
* the name of the property being removed.
* @return the value of the property that has been removed or null if the
@@ -144,18 +144,18 @@ public class RmiContinuation implements Context
removeRegistry();
return properties.remove(propName);
}
-
+
/**
* Remove the current registry reference.
*/
public void removeRegistry()
{
- registry = null;
+ registry = null;
}
-
+
/**
* Get the cached or new registry reference.
- *
+ *
* @return the registry reference, either cached or new.
*/
public Registry getRegistry() throws NamingException
@@ -164,17 +164,17 @@ public class RmiContinuation implements Context
{
String address = properties.getProperty(Context.PROVIDER_URL,
DEFAULT_REGISTRY_LOCATION);
-
+
// The format like rmi://localhost:1099 is expected. Parse.
if (!address.startsWith("rmi://"))
throw new InvalidNameException(address);
-
+
String a = address.substring("rmi://".length());
-
+
// The colon, if present, indicates the start of the port number.
int colon = a.lastIndexOf(':');
int port;
-
+
try
{
if (colon >=0)
@@ -188,8 +188,8 @@ public class RmiContinuation implements Context
catch (NumberFormatException e1)
{
throw new InvalidNameException(address);
- }
-
+ }
+
try
{
registry = LocateRegistry.getRegistry(a, port);
@@ -204,7 +204,7 @@ public class RmiContinuation implements Context
/**
* Create the rmi url context that works, talking with the given RMI registry.
- *
+ *
* @param props
* the properties for this context
*/
@@ -214,11 +214,11 @@ public class RmiContinuation implements Context
if (props != null)
properties.putAll(props);
}
-
+
/**
* Bind the given name into this context. The .toString() is called to
* convert into the string representation, required by RMI registry.
- *
+ *
* @throws NamingException if the object is not an instance of Remote
*/
public void bind(Name name, Object obj) throws NamingException
@@ -359,7 +359,7 @@ public class RmiContinuation implements Context
{
if (name.length() > 0)
throw new OperationNotSupportedException("Only empty name is accepted");
-
+
try
{
return new ListEnumeration(getRegistry().list());
@@ -372,7 +372,7 @@ public class RmiContinuation implements Context
/**
* List existing bindings of this context (the parameter must be empty name,
- * indicating the root context).
+ * indicating the root context).
*/
public NamingEnumeration listBindings(Name name) throws NamingException
{
@@ -383,13 +383,13 @@ public class RmiContinuation implements Context
/**
* List existing bindings of this context (the parameter must be empty name,
- * indicating the root context).
+ * indicating the root context).
*/
public NamingEnumeration listBindings(String name) throws NamingException
{
if (name.length() > 0)
throw new OperationNotSupportedException("Only empty name is accepted");
-
+
try
{
Registry r = getRegistry();
@@ -419,7 +419,7 @@ public class RmiContinuation implements Context
/**
* Rebinds this object.
- *
+ *
* @param name
* the object name (.toString()) is used to convert into string
* representation.
@@ -433,7 +433,7 @@ public class RmiContinuation implements Context
/**
* Rebinds this object.
- *
+ *
* @param name
* the object name.
* @param obj
@@ -459,7 +459,7 @@ public class RmiContinuation implements Context
+ obj.getClass().getName());
}
}
-
+
/**
* Renames the object. If the new name is already bound in the given context,
* the {@link AlreadyBoundException} is thrown and the oldName binding is
@@ -546,7 +546,7 @@ public class RmiContinuation implements Context
throw new CommunicationException(e.toString());
}
}
-
+
/**
* Release the associated resources.
*/
@@ -554,10 +554,10 @@ public class RmiContinuation implements Context
{
removeRegistry();
}
-
+
/**
* Resolve the object by name.
- *
+ *
* @param name
* the object name, .toString() is used to get the string
* representation.
@@ -566,10 +566,10 @@ public class RmiContinuation implements Context
{
return lookup(name.toString());
}
-
+
/**
* Resolve the object by name
- *
+ *
* @param name the object name.
*/
public Object lookup(String name) throws NamingException
diff --git a/gnu/javax/naming/jndi/url/rmi/RmiNamingEnumeration.java b/gnu/javax/naming/jndi/url/rmi/RmiNamingEnumeration.java
index 6d88cccef..a75896272 100644
--- a/gnu/javax/naming/jndi/url/rmi/RmiNamingEnumeration.java
+++ b/gnu/javax/naming/jndi/url/rmi/RmiNamingEnumeration.java
@@ -46,7 +46,7 @@ import javax.naming.NamingException;
/**
* Iterates over name class pairs, obtaining values first from the binding list
* and then from the binding iterator.
- *
+ *
* @author Audrius Meskauskas
*/
public abstract class RmiNamingEnumeration implements NamingEnumeration
@@ -55,7 +55,7 @@ public abstract class RmiNamingEnumeration implements NamingEnumeration
* The array of bindings, returned at once.
*/
String[] list;
-
+
/**
* The position of the element in the binding list, that must be returned
* during the subsequent call of the next(). If this field is grater or equal
@@ -63,15 +63,15 @@ public abstract class RmiNamingEnumeration implements NamingEnumeration
* iterator.
*/
int p;
-
+
RmiNamingEnumeration(String[] bindingList)
{
list = bindingList;
}
-
+
/**
* Convert from the CORBA binding into that this enumeration should return.
- *
+ *
* @param binding
* the binding to convert
* @return the value, that must be returned by the {@link #next()}.
@@ -80,7 +80,7 @@ public abstract class RmiNamingEnumeration implements NamingEnumeration
/**
* Checks if there are more elements to return.
- *
+ *
* @throws NamingException
* never
*/
@@ -91,7 +91,7 @@ public abstract class RmiNamingEnumeration implements NamingEnumeration
/**
* Returns the next element.
- *
+ *
* @throws NamingException
* never
*/
@@ -118,7 +118,7 @@ public abstract class RmiNamingEnumeration implements NamingEnumeration
else
throw new NoSuchElementException();
}
-
+
/**
* Nothing to do in this method.
*/
diff --git a/gnu/javax/naming/jndi/url/rmi/rmiURLContext.java b/gnu/javax/naming/jndi/url/rmi/rmiURLContext.java
index a17ce026b..11f7265a6 100644
--- a/gnu/javax/naming/jndi/url/rmi/rmiURLContext.java
+++ b/gnu/javax/naming/jndi/url/rmi/rmiURLContext.java
@@ -61,8 +61,8 @@ import javax.naming.NamingException;
import javax.naming.OperationNotSupportedException;
/**
- * The implementation of the RMI URL context. This context connects
- *
+ * The implementation of the RMI URL context. This context connects
+ *
* @author Audrius Meskauskas
*/
public class rmiURLContext implements Context
@@ -71,19 +71,19 @@ public class rmiURLContext implements Context
* The default registry location.
*/
public static final String DEFAULT_REGISTRY_LOCATION = "rmi://localhost:1099";
-
+
/**
* The registry cache, maps the registry URL's to they instances. The
* obtained registries are reused, as newly obtaining them may cause the
* resource leak.
*/
static WeakHashMap registryCache = new WeakHashMap();
-
+
/**
* The properties.
*/
Properties properties;
-
+
/**
* The flag, indicating, that the lookup methods were called before.
* If the lookup methods were called before, the existing ORB cannot be
@@ -91,14 +91,14 @@ public class rmiURLContext implements Context
* unfunctional.
*/
boolean lookupCalled;
-
+
/**
* Add new environment property to the environment of this context. Both name
* and value of the new property must not be null. If the property is already
* defined, is current value is replaced by the propVal. This method replaces
* the registry. The new registry will be lazily instantiated on the first
* call.
- *
+ *
* @param key
* the name of the new property
* @param value
@@ -118,7 +118,7 @@ public class rmiURLContext implements Context
* table should never be modified by the caller (the registry would not be updated
* in such case). Use {@link #addToEnvironment} and
* {@link #removeFromEnvironment} to modify the environement, if needed.
- *
+ *
* @return the table, representing the environment of this context
* @throws NamingException
*/
@@ -133,7 +133,7 @@ public class rmiURLContext implements Context
* constructing the new ORB with the changes set of properties (you can
* replace the CORBA implementation provider, for instance). The new ORB will
* be lazily instantiated on the first call.
- *
+ *
* @param propName
* the name of the property being removed.
* @return the value of the property that has been removed or null if the
@@ -144,10 +144,10 @@ public class rmiURLContext implements Context
{
return properties.remove(propName);
}
-
+
/**
* Get the cached or new registry reference.
- *
+ *
* @return the registry reference, either cached or new.
*/
public Registry getRegistry(String netAddress) throws NamingException
@@ -157,8 +157,8 @@ public class rmiURLContext implements Context
synchronized (registryCache)
{
registry = (Registry) registryCache.get(netAddress);
- }
-
+ }
+
if (registry == null)
{
// The colon, if present, indicates the start of the port number.
@@ -188,18 +188,18 @@ public class rmiURLContext implements Context
{
throw new CommunicationException(e.toString());
}
-
+
synchronized (registryCache)
{
registryCache.put(netAddress, registry);
- }
+ }
}
return registry;
}
/**
* Create the rmi url context that works, talking with the given RMI registry.
- *
+ *
* @param props
* the properties for this context
*/
@@ -209,11 +209,11 @@ public class rmiURLContext implements Context
if (props != null)
properties.putAll(props);
}
-
+
/**
* Bind the given name into this context. The .toString() is called to
* convert into the string representation, required by RMI registry.
- *
+ *
* @throws NamingException if the object is not an instance of Remote
*/
public void bind(Name name, Object obj) throws NamingException
@@ -366,7 +366,7 @@ public class rmiURLContext implements Context
/**
* List existing bindings of this context (the parameter must be empty name,
- * indicating the root context).
+ * indicating the root context).
*/
public NamingEnumeration listBindings(Name name) throws NamingException
{
@@ -383,7 +383,7 @@ public class rmiURLContext implements Context
String [] n = split(name);
if (n[1].length() > 0)
throw new InvalidNameException(name+", the name part must be empty");
-
+
Registry r = getRegistry(n[0]);
return new ListBindingsEnumeration(r.list(), r);
}
@@ -413,7 +413,7 @@ public class rmiURLContext implements Context
/**
* Rebinds this object.
- *
+ *
* @param name
* the object name (.toString()) is used to convert into string
* representation.
@@ -427,7 +427,7 @@ public class rmiURLContext implements Context
/**
* Rebinds this object.
- *
+ *
* @param name
* the object name.
* @param obj
@@ -437,7 +437,7 @@ public class rmiURLContext implements Context
{
try
{
- String [] n = split(name);
+ String [] n = split(name);
getRegistry(n[0]).rebind(n[1], (Remote) obj);
}
catch (AccessException e)
@@ -454,7 +454,7 @@ public class rmiURLContext implements Context
+ obj.getClass().getName());
}
}
-
+
/**
* Renames the object. If the new name is already bound in the given context,
* the {@link AlreadyBoundException} is thrown and the oldName binding is
@@ -476,12 +476,12 @@ public class rmiURLContext implements Context
try
{
String [] n = split(oldName);
- Registry r = getRegistry(n[0]);
+ Registry r = getRegistry(n[0]);
Remote object = r.lookup(n[1]);
r.unbind(oldName);
try
{
- String [] n2 = split(newName);
+ String [] n2 = split(newName);
Registry r2 = getRegistry(n2[0]);
r2.bind(n2[1], object);
}
@@ -529,7 +529,7 @@ public class rmiURLContext implements Context
{
try
{
- String [] n = split(name);
+ String [] n = split(name);
getRegistry(n[0]).unbind(n[1]);
}
catch (AccessException e)
@@ -545,17 +545,17 @@ public class rmiURLContext implements Context
throw new CommunicationException(e.toString());
}
}
-
+
/**
* Release the associated resources.
*/
public void close() throws NamingException
{
}
-
+
/**
* Resolve the object by name.
- *
+ *
* @param name
* the object name, .toString() is used to get the string
* representation.
@@ -564,10 +564,10 @@ public class rmiURLContext implements Context
{
return lookup(name.toString());
}
-
+
/**
* Resolve the object by name
- *
+ *
* @param name the object name.
*/
public Object lookup(String name) throws NamingException
@@ -590,11 +590,11 @@ public class rmiURLContext implements Context
throw new NameNotFoundException(name);
}
}
-
+
/**
* Split the given rmi address into the network address and naming service
* name.
- *
+ *
* @param address
* the address to split
* @return the two member array, lower being the network address of the naming
diff --git a/gnu/javax/naming/jndi/url/rmi/rmiURLContextFactory.java b/gnu/javax/naming/jndi/url/rmi/rmiURLContextFactory.java
index 593845327..ce0471d36 100644
--- a/gnu/javax/naming/jndi/url/rmi/rmiURLContextFactory.java
+++ b/gnu/javax/naming/jndi/url/rmi/rmiURLContextFactory.java
@@ -45,22 +45,22 @@ import javax.naming.spi.ObjectFactory;
/**
* Find the RMI URL context. This factory checks the Context.PROVIDER_URL
- * property for the address of the RMI naming service and creates the
+ * property for the address of the RMI naming service and creates the
* context that operates talking with this naming service. If such property
* is missing, "rmi://localhost:1099" is assumed.
- *
- * @author Audrius Meskauskas (audriusa@Bioinformatics.org)
+ *
+ * @author Audrius Meskauskas (audriusa@Bioinformatics.org)
*/
public class rmiURLContextFactory implements ObjectFactory
{
/**
- * Create a new instance of the context.
+ * Create a new instance of the context.
*/
public Object getObjectInstance(Object refObj, Name name, Context nameCtx,
Hashtable environment)
{
return new rmiURLContext(environment);
}
-
+
}
diff --git a/gnu/javax/net/ssl/AbstractSessionContext.java b/gnu/javax/net/ssl/AbstractSessionContext.java
index bdd7f274e..96a4e6dd0 100644
--- a/gnu/javax/net/ssl/AbstractSessionContext.java
+++ b/gnu/javax/net/ssl/AbstractSessionContext.java
@@ -54,7 +54,7 @@ import javax.net.ssl.SSLSessionContext;
* be subclassed to add extended functionality to session contexts, such
* as by storing sessions in files on disk, or by sharing contexts
* across different JVM instances.
- *
+ *
* <p>In order to securely store sessions, along with private key data,
* the abstract methods {@lnk {@link #load(char[])} and {@link #store(char[])}
* come into play. When storing sessions, a session context implementation
@@ -62,10 +62,10 @@ import javax.net.ssl.SSLSessionContext;
* before either writing the {@link java.io.Serializable} session to the
* underlying store, or getting the opaque {@link Session#privateData()}
* class from the session, and storing that.
- *
+ *
* <p>As a simple example, that writes sessions to some object output
* stream:
- *
+ *
* <pre>
char[] password = ...;
ObjectOutputStream out = ...;
@@ -75,12 +75,12 @@ import javax.net.ssl.SSLSessionContext;
s.prepare(password);
out.writeObject(s);
}</pre>
- *
+ *
* <p>The reverse must be done when deserializing sessions, by using the
* {@link Session#repair(char[])} method, possibly by first calling
* {@link Session#setPrivateData(java.io.Serializable)} with the read,
* opaque private data type. Thus an example of reading may be:
- *
+ *
* <pre>
char[] password = ...;
ObjectInputStream in = ...;
@@ -91,19 +91,19 @@ import javax.net.ssl.SSLSessionContext;
s.repair(password);
addToThisStore(s);
}</pre>
- *
+ *
* @author Casey Marshall (csm@gnu.org)
*/
public abstract class AbstractSessionContext implements SSLSessionContext
{
protected long timeout;
- private static Class<? extends AbstractSessionContext>
+ private static Class<? extends AbstractSessionContext>
implClass = SimpleSessionContext.class;
/**
* Create a new instance of a session context, according to the configured
* implementation class.
- *
+ *
* @return The new session context.
* @throws SSLException If an error occurs in creating the instance.
*/
@@ -126,12 +126,12 @@ public abstract class AbstractSessionContext implements SSLSessionContext
/**
* Reconfigure this instance to use a different session context
* implementation.
- *
+ *
* <p><strong>Note:</strong> this method requires that the caller have
* {@link SSLPermission} with target
* <code>gnu.javax.net.ssl.AbstractSessionContext</code> and action
* <code>setImplClass</code>.
- *
+ *
* @param clazz The new implementation class.
* @throws SecurityException If the caller does not have permission to
* change the session context.
@@ -183,7 +183,7 @@ public abstract class AbstractSessionContext implements SSLSessionContext
}
return s;
}
-
+
public final SSLSession getSession(String host, int port)
{
for (Enumeration e = getIds(); e.hasMoreElements(); )
@@ -203,18 +203,18 @@ public abstract class AbstractSessionContext implements SSLSessionContext
int port2 = s.getPeerPort();
if (port != port2)
continue;
-
+
// Else, a match.
return s;
}
-
+
return null;
}
-
+
/**
* To be implemented by subclasses. Subclasses do not need to check
* timeouts in this method.
- *
+ *
* @param sessionId The session ID.
* @return The session, or <code>null</code> if the requested session
* was not found.
@@ -225,7 +225,7 @@ public abstract class AbstractSessionContext implements SSLSessionContext
{
return (int) (timeout / 1000);
}
-
+
/**
* Load this session store from the underlying media, if supported
* by the implementation.
@@ -265,7 +265,7 @@ public abstract class AbstractSessionContext implements SSLSessionContext
public abstract void remove (byte[] sessionId);
/**
- *
+ *
*/
public final void setSessionTimeout(int seconds)
{
@@ -273,7 +273,7 @@ public abstract class AbstractSessionContext implements SSLSessionContext
throw new IllegalArgumentException("timeout may not be negative");
this.timeout = (long) seconds * 1000;
}
-
+
/**
* Commit this session store to the underlying media. For session
* store implementations that support saving sessions across
@@ -285,4 +285,4 @@ public abstract class AbstractSessionContext implements SSLSessionContext
* in this store.
*/
public abstract void store (char[] password) throws SessionStoreException;
-} \ No newline at end of file
+}
diff --git a/gnu/javax/net/ssl/PreSharedKeyManager.java b/gnu/javax/net/ssl/PreSharedKeyManager.java
index ba6500a27..2c9fd2aea 100644
--- a/gnu/javax/net/ssl/PreSharedKeyManager.java
+++ b/gnu/javax/net/ssl/PreSharedKeyManager.java
@@ -1,4 +1,4 @@
-/* PreSharedKeyManager.java --
+/* PreSharedKeyManager.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -49,6 +49,6 @@ import javax.net.ssl.KeyManager;
public interface PreSharedKeyManager extends KeyManager
{
SecretKey getKey(String name) throws KeyManagementException;
-
+
String chooseIdentityHint();
-} \ No newline at end of file
+}
diff --git a/gnu/javax/net/ssl/PreSharedKeyManagerParameters.java b/gnu/javax/net/ssl/PreSharedKeyManagerParameters.java
index 1b1d492b1..fe3c9e89b 100644
--- a/gnu/javax/net/ssl/PreSharedKeyManagerParameters.java
+++ b/gnu/javax/net/ssl/PreSharedKeyManagerParameters.java
@@ -1,4 +1,4 @@
-/* PreSharedKeyManagerParameters.java --
+/* PreSharedKeyManagerParameters.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -51,7 +51,7 @@ public class PreSharedKeyManagerParameters
implements ManagerFactoryParameters
{
private final LinkedHashMap<String, SecretKey> keys;
-
+
public PreSharedKeyManagerParameters()
{
keys = new LinkedHashMap<String, SecretKey>();
@@ -62,20 +62,20 @@ public class PreSharedKeyManagerParameters
name.getClass();
return keys.get(name);
}
-
+
public void putKey(String name, SecretKey key)
{
name.getClass();
key.getClass();
keys.put(name, key);
}
-
+
public boolean removeKey(String name)
{
name.getClass();
return keys.remove(name) != null;
}
-
+
public Iterator<String> identities()
{
return keys.keySet().iterator();
diff --git a/gnu/javax/net/ssl/SSLCipherSuite.java b/gnu/javax/net/ssl/SSLCipherSuite.java
index a3ab87713..80068e5cb 100644
--- a/gnu/javax/net/ssl/SSLCipherSuite.java
+++ b/gnu/javax/net/ssl/SSLCipherSuite.java
@@ -56,7 +56,7 @@ public abstract class SSLCipherSuite
private final byte[] id;
private final SSLProtocolVersion version;
private Provider provider;
-
+
protected SSLCipherSuite (final String algorithm, final byte[] id,
final SSLProtocolVersion version)
{
@@ -66,20 +66,20 @@ public abstract class SSLCipherSuite
this.id = (byte[]) id.clone ();
this.version = version;
}
-
+
public static final SSLCipherSuite getInstance (SSLProtocolVersion version, byte[] id)
throws NoSuchAlgorithmException
{
return getInstance (version + "-" + ((id[0] & 0xFF) + "/" + (id[1] & 0xFF)));
}
-
+
public static final SSLCipherSuite getInstance (SSLProtocolVersion version,
byte[] id, Provider provider)
throws NoSuchAlgorithmException
{
return getInstance (version + "-" + (id[0] & 0xFF) + "/" + (id[1] & 0xFF), provider);
}
-
+
public static final SSLCipherSuite getInstance (String name)
throws NoSuchAlgorithmException
{
@@ -95,10 +95,10 @@ public abstract class SSLCipherSuite
// Ignore.
}
}
-
+
throw new NoSuchAlgorithmException (SERVICE + ": " + name);
}
-
+
public static final SSLCipherSuite getInstance (String name, Provider provider)
throws NoSuchAlgorithmException
{
@@ -117,26 +117,26 @@ public abstract class SSLCipherSuite
}
return suite;
}
-
+
public final String getAlgorithm ()
{
return algorithm;
}
-
+
public final byte[] getId ()
{
return (byte[]) id.clone ();
}
-
+
public final Provider getProvider ()
{
return provider;
}
-
+
public final SSLProtocolVersion getProtocolVersion ()
{
return version;
}
-
+
public abstract void encipher (ByteBuffer in, ByteBuffer out);
}
diff --git a/gnu/javax/net/ssl/SSLRecordHandler.java b/gnu/javax/net/ssl/SSLRecordHandler.java
index 3ce56eab5..8a44245ce 100644
--- a/gnu/javax/net/ssl/SSLRecordHandler.java
+++ b/gnu/javax/net/ssl/SSLRecordHandler.java
@@ -97,4 +97,4 @@ public abstract class SSLRecordHandler
{
return contentType & 0xFF;
}
-} \ No newline at end of file
+}
diff --git a/gnu/javax/net/ssl/Session.java b/gnu/javax/net/ssl/Session.java
index 09b50eef0..3acf9932d 100644
--- a/gnu/javax/net/ssl/Session.java
+++ b/gnu/javax/net/ssl/Session.java
@@ -69,7 +69,7 @@ public abstract class Session implements SSLSession, Serializable
protected final long creationTime;
protected long lastAccessedTime;
protected int applicationBufferSize;
-
+
protected ID sessionId;
protected Certificate[] localCerts;
protected Certificate[] peerCerts;
@@ -141,12 +141,12 @@ public abstract class Session implements SSLSession, Serializable
}
return null;
}
-
+
public int getPacketBufferSize()
{
return applicationBufferSize + 2048;
}
-
+
public Certificate[] getPeerCertificates() throws SSLPeerUnverifiedException
{
if (!peerVerified)
@@ -165,17 +165,17 @@ public abstract class Session implements SSLSession, Serializable
return null;
return (X509Certificate[]) peerCertChain.clone();
}
-
+
public String getPeerHost()
{
return peerHost;
}
-
+
public int getPeerPort()
{
return peerPort;
}
-
+
public Principal getPeerPrincipal() throws SSLPeerUnverifiedException
{
if (!peerVerified)
@@ -184,33 +184,33 @@ public abstract class Session implements SSLSession, Serializable
return null;
return peerCertChain[0].getSubjectDN();
}
-
+
public SSLSessionContext getSessionContext()
{
return context;
}
-
+
public String[] getValueNames()
{
Set<String> keys = this.values.keySet();
return keys.toArray(new String[keys.size()]);
}
-
+
public Object getValue(String name)
{
return values.get(name);
}
-
+
public void invalidate()
{
valid = false;
}
-
+
public boolean isValid()
{
return valid;
}
-
+
public void putValue(String name, Object value)
{
values.put(name, value);
@@ -224,7 +224,7 @@ public abstract class Session implements SSLSession, Serializable
{
}
}
-
+
public void removeValue(String name)
{
Object value = values.remove(name);
@@ -236,9 +236,9 @@ public abstract class Session implements SSLSession, Serializable
}
catch (Exception x)
{
- }
+ }
}
-
+
public final boolean isTruncatedMac()
{
return truncatedMac;
@@ -248,31 +248,31 @@ public abstract class Session implements SSLSession, Serializable
* Prepare this session for serialization. Private data will be encrypted
* with the given password, and this object will then be ready to be
* serialized.
- *
+ *
* @param password The password to protect this session with.
* @throws SSLException If encrypting this session's private data fails.
*/
public abstract void prepare (char[] password) throws SSLException;
-
+
/**
* Repair this session's private data after deserialization. This method
* will decrypt this session's private data, and prepare the session for
* use in new SSL connections.
- *
+ *
* @param password The password to decrypt the private data with.
* @throws SSLException
*/
public abstract void repair(char[] password) throws SSLException;
-
+
/**
* Get the private data of this session. This method may only be called
* after first calling {@link #prepare(char[])}.
- *
+ *
* @return The sealed private data.
* @throws SSLException If the private data have not been sealed.
*/
public abstract SealedObject privateData() throws SSLException;
-
+
/**
* Set the private data of this session.
* @param data
diff --git a/gnu/javax/net/ssl/SessionStoreException.java b/gnu/javax/net/ssl/SessionStoreException.java
index 5dcf3d028..4d8ef97d0 100644
--- a/gnu/javax/net/ssl/SessionStoreException.java
+++ b/gnu/javax/net/ssl/SessionStoreException.java
@@ -46,12 +46,12 @@ public class SessionStoreException extends SSLException
{
super (message);
}
-
+
public SessionStoreException (final String message, final Throwable cause)
{
super (message, cause);
}
-
+
public SessionStoreException (final Throwable cause)
{
super (cause);
diff --git a/gnu/javax/net/ssl/provider/AbstractHandshake.java b/gnu/javax/net/ssl/provider/AbstractHandshake.java
index d80a5bb78..bf03ed77f 100644
--- a/gnu/javax/net/ssl/provider/AbstractHandshake.java
+++ b/gnu/javax/net/ssl/provider/AbstractHandshake.java
@@ -97,9 +97,9 @@ public abstract class AbstractHandshake
protected static final byte[] SERVER_FINISHED
= new byte[] {
115, 101, 114, 118, 101, 114, 32, 102, 105, 110, 105, 115,
- 104, 101, 100
+ 104, 101, 100
};
-
+
/**
* "client finished" -- TLS 1.0 and later
*/
@@ -108,14 +108,14 @@ public abstract class AbstractHandshake
99, 108, 105, 101, 110, 116, 32, 102, 105, 110, 105, 115,
104, 101, 100
};
-
+
/**
* "key expansion" -- TLS 1.0 and later
*/
private static final byte[] KEY_EXPANSION =
new byte[] { 107, 101, 121, 32, 101, 120, 112,
97, 110, 115, 105, 111, 110 };
-
+
/**
* "master secret" -- TLS 1.0 and later
*/
@@ -123,7 +123,7 @@ public abstract class AbstractHandshake
= new byte[] {
109, 97, 115, 116, 101, 114, 32, 115, 101, 99, 114, 101, 116
};
-
+
/**
* "client write key" -- TLS 1.0 exportable whitener.
*/
@@ -132,7 +132,7 @@ public abstract class AbstractHandshake
99, 108, 105, 101, 110, 116, 32, 119, 114, 105, 116, 101, 32, 107,
101, 121
};
-
+
/**
* "server write key" -- TLS 1.0 exportable whitener.
*/
@@ -141,30 +141,30 @@ public abstract class AbstractHandshake
115, 101, 114, 118, 101, 114, 32, 119, 114, 105, 116, 101, 32, 107,
101, 121
};
-
+
private static final byte[] IV_BLOCK
= new byte[] {
73, 86, 32, 98, 108, 111, 99, 107
};
-
+
/**
* SSL 3.0; the string "CLNT"
*/
private static final byte[] SENDER_CLIENT
= new byte[] { 0x43, 0x4C, 0x4E, 0x54 };
-
+
/**
* SSL 3.0; the string "SRVR"
*/
private static final byte[] SENDER_SERVER
= new byte[] { 0x53, 0x52, 0x56, 0x52 };
-
+
/**
* SSL 3.0; the value 0x36 40 (for SHA-1 hashes) or 48 (for MD5 hashes)
* times.
*/
protected static final byte[] PAD1 = new byte[48];
-
+
/**
* SSL 3.0; the value 0x5c 40 (for SHA-1 hashes) or 48 (for MD5 hashes)
* times.
@@ -176,7 +176,7 @@ public abstract class AbstractHandshake
Arrays.fill(PAD1, SSLHMac.PAD1);
Arrays.fill(PAD2, SSLHMac.PAD2);
}
-
+
/**
* The currently-read handshake messages. There may be zero, or
* multiple, handshake messages in this buffer.
@@ -191,7 +191,7 @@ public abstract class AbstractHandshake
protected MessageDigest sha;
protected MessageDigest md5;
-
+
protected final SSLEngineImpl engine;
protected KeyAgreement keyAgreement;
protected byte[] preMasterSecret;
@@ -210,7 +210,7 @@ public abstract class AbstractHandshake
md5 = MessageDigest.getInstance("MD5");
tasks = new LinkedList<DelegatedTask>();
}
-
+
/**
* Handles the next input message in the handshake. This is called
* in response to a call to {@link javax.net.ssl.SSLEngine#unwrap}
@@ -265,13 +265,13 @@ public abstract class AbstractHandshake
/**
* Called to process more handshake data. This method will be called
* repeatedly while there is remaining handshake data, and while the
- * status is
+ * status is
* @return
* @throws SSLException
*/
protected abstract HandshakeStatus implHandleInput()
throws SSLException;
-
+
/**
* Produce more handshake output. This is called in response to a
* call to {@link javax.net.ssl.SSLEngine#wrap}, when the handshake
@@ -301,27 +301,27 @@ public abstract class AbstractHandshake
}
return status;
}
-
+
/**
* Called to implement the underlying output handling. The callee should
* attempt to fill the given buffer as much as it can; this can include
* multiple, and even partial, handshake messages.
- *
+ *
* @param fragment The buffer the callee should write handshake messages to.
* @return The new status of the handshake.
* @throws SSLException If an error occurs processing the output message.
*/
protected abstract SSLEngineResult.HandshakeStatus implHandleOutput (ByteBuffer fragment)
throws SSLException;
-
+
/**
* Return a new instance of input security parameters, initialized with
* the session key. It is, of course, only valid to invoke this method
* once the handshake is complete, and the session keys established.
- *
+ *
* <p>In the presence of a well-behaving peer, this should be called once
* the <code>ChangeCipherSpec</code> message is recieved.
- *
+ *
* @return The input parameters for the newly established session.
* @throws SSLException If the handshake is not complete.
*/
@@ -335,7 +335,7 @@ public abstract class AbstractHandshake
* Return a new instance of output security parameters, initialized with
* the session key. This should be called after the
* <code>ChangeCipherSpec</code> message is sent to the peer.
- *
+ *
* @return The output parameters for the newly established session.
* @throws SSLException If the handshake is not complete.
*/
@@ -344,7 +344,7 @@ public abstract class AbstractHandshake
checkKeyExchange();
return outParams;
}
-
+
/**
* Fetch a delegated task waiting to run, if any.
*
@@ -356,21 +356,21 @@ public abstract class AbstractHandshake
return null;
return tasks.removeFirst();
}
-
+
/**
* Used by the skeletal code to query the current status of the handshake.
* This <em>should</em> be the same value as returned by the previous call
* to {@link #implHandleOutput(ByteBuffer)} or {@link
* #implHandleInput(ByteBuffer)}.
- *
+ *
* @return The current handshake status.
*/
abstract HandshakeStatus status();
-
+
/**
* Check if the key exchange completed successfully, throwing an exception
* if not.
- *
+ *
* <p>Note that we assume that the caller of our SSLEngine is correct, and
* that they did run the delegated tasks that encapsulate the key exchange.
* What we are primarily checking, therefore, is that no error occurred in the
@@ -379,14 +379,14 @@ public abstract class AbstractHandshake
* @throws SSLException If the key exchange did not complete successfully.
*/
abstract void checkKeyExchange() throws SSLException;
-
+
/**
* Handle an SSLv2 client hello. This is only used by SSL servers.
- *
+ *
* @param hello The hello message.
*/
abstract void handleV2Hello(ByteBuffer hello) throws SSLException;
-
+
/**
* Attempt to read the next handshake message from the given
* record. If only a partial handshake message is available, then
@@ -418,13 +418,13 @@ public abstract class AbstractHandshake
if (Debug.DEBUG)
logger.logv(Component.SSL_HANDSHAKE, "inserting {0} into {1}",
fragment, handshakeBuffer);
-
+
// Put the fragment into the buffer.
handshakeBuffer.put(fragment);
return hasMessage();
}
-
+
protected boolean doHash()
{
return true;
@@ -501,9 +501,9 @@ public abstract class AbstractHandshake
* algorithm was used to generate this value was subtly different than
* that used in TLSv1.0 and later. In TLSv1.0 and later, this value is
* just the digest over the handshake messages.
- *
+ *
* <p>SSLv3 uses the algorithm:
- *
+ *
* <pre>
CertificateVerify.signature.md5_hash
MD5(master_secret + pad_2 +
@@ -511,7 +511,7 @@ CertificateVerify.signature.md5_hash
Certificate.signature.sha_hash
SHA(master_secret + pad_2 +
SHA(handshake_messages + master_secret + pad_1));</pre>
- *
+ *
* @param md5 The running MD5 hash of the handshake.
* @param sha The running SHA-1 hash of the handshake.
* @param session The current session being negotiated.
@@ -533,7 +533,7 @@ Certificate.signature.sha_hash
md5.update(tmp);
md5value = md5.digest();
}
-
+
sha.update(session.privateData.masterSecret);
sha.update(PAD1, 0, 40);
byte[] tmp = sha.digest();
@@ -542,16 +542,16 @@ Certificate.signature.sha_hash
sha.update(PAD2, 0, 40);
sha.update(tmp);
byte[] shavalue = sha.digest();
-
+
if (md5value != null)
return Util.concat(md5value, shavalue);
-
+
return shavalue;
}
-
+
/**
* Generate the session keys from the computed master secret.
- *
+ *
* @param clientRandom The client's nonce.
* @param serverRandom The server's nonce.
* @param session The session being established.
@@ -570,7 +570,7 @@ Certificate.signature.sha_hash
if (session.suite.cipherAlgorithm() == CipherAlgorithm.AES)
ivlen = 16;
int keylen = session.suite.keyLength();
-
+
byte[][] keys = new byte[6][];
keys[0] = new byte[maclen]; // client_write_MAC_secret
keys[1] = new byte[maclen]; // server_write_MAC_secret
@@ -578,7 +578,7 @@ Certificate.signature.sha_hash
keys[3] = new byte[keylen]; // server_write_key
keys[4] = new byte[ivlen]; // client_write_iv
keys[5] = new byte[ivlen]; // server_write_iv
-
+
IRandom prf = null;
if (session.version == ProtocolVersion.SSL_3)
{
@@ -604,14 +604,14 @@ Certificate.signature.sha_hash
clientRandom.buffer().get(seed, (KEY_EXPANSION.length
+ serverRandom.length()),
clientRandom.length());
-
+
prf = new TLSRandom();
HashMap<String,byte[]> attr = new HashMap<String,byte[]>(2);
attr.put(TLSRandom.SECRET, session.privateData.masterSecret);
attr.put(TLSRandom.SEED, seed);
prf.init(attr);
}
-
+
try
{
prf.nextBytes(keys[0], 0, keys[0].length);
@@ -666,7 +666,7 @@ Certificate.signature.sha_hash
prf2.init(attr);
keys[2] = new byte[8];
prf2.nextBytes(keys[2], 0, keys[2].length);
-
+
attr.put(TLSRandom.SECRET, keys[3]);
seed = new byte[SERVER_WRITE_KEY.length +
serverRandom.length() +
@@ -682,7 +682,7 @@ Certificate.signature.sha_hash
prf2.init(attr);
keys[3] = new byte[8];
prf2.nextBytes(keys[3], 0, keys[3].length);
-
+
attr.put(TLSRandom.SECRET, new byte[0]);
seed = new byte[IV_BLOCK.length +
clientRandom.length() +
@@ -714,7 +714,7 @@ Certificate.signature.sha_hash
{
throw new Error(nsae);
}
-
+
if (Debug.DEBUG_KEY_EXCHANGE)
logger.logv(Component.SSL_KEY_EXCHANGE,
"keys generated;\n [0]: {0}\n [1]: {1}\n [2]: {2}\n" +
@@ -727,12 +727,12 @@ Certificate.signature.sha_hash
Util.toHexString(keys[5], ':'));
return keys;
}
-
+
/**
* Generate a "finished" message. The hashes passed in are modified
* by this function, so they should be clone copies of the digest if
* the hash function needs to be used more.
- *
+ *
* @param md5 The MD5 computation.
* @param sha The SHA-1 computation.
* @param isClient Whether or not the client-side finished message is
@@ -797,22 +797,22 @@ Certificate.signature.sha_hash
//
finishedBuffer = ByteBuffer.allocate(36);
-
+
md5.update(isClient ? SENDER_CLIENT : SENDER_SERVER);
md5.update(session.privateData.masterSecret);
md5.update(PAD1);
-
+
byte[] tmp = md5.digest();
md5.reset();
md5.update(session.privateData.masterSecret);
md5.update(PAD2);
md5.update(tmp);
finishedBuffer.put(md5.digest());
-
+
sha.update(isClient ? SENDER_CLIENT : SENDER_SERVER);
sha.update(session.privateData.masterSecret);
sha.update(PAD1, 0, 40);
-
+
tmp = sha.digest();
sha.reset();
sha.update(session.privateData.masterSecret);
@@ -822,7 +822,7 @@ Certificate.signature.sha_hash
}
return finishedBuffer;
}
-
+
protected void initDiffieHellman(DHPrivateKey dhKey, SecureRandom random)
throws SSLException
{
@@ -840,7 +840,7 @@ Certificate.signature.sha_hash
throw new SSLException(nsae);
}
}
-
+
protected void generateMasterSecret(Random clientRandom,
Random serverRandom,
SessionImpl session)
@@ -849,11 +849,11 @@ Certificate.signature.sha_hash
assert(clientRandom != null);
assert(serverRandom != null);
assert(session != null);
-
+
if (Debug.DEBUG_KEY_EXCHANGE)
logger.logv(Component.SSL_KEY_EXCHANGE, "preMasterSecret:\n{0}",
new ByteArray(preMasterSecret));
-
+
if (session.version == ProtocolVersion.SSL_3)
{
try
@@ -861,7 +861,7 @@ Certificate.signature.sha_hash
MessageDigest _md5 = MessageDigest.getInstance("MD5");
MessageDigest _sha = MessageDigest.getInstance("SHA");
session.privateData.masterSecret = new byte[48];
-
+
_sha.update((byte) 'A');
_sha.update(preMasterSecret);
_sha.update(clientRandom.buffer());
@@ -869,7 +869,7 @@ Certificate.signature.sha_hash
_md5.update(preMasterSecret);
_md5.update(_sha.digest());
_md5.digest(session.privateData.masterSecret, 0, 16);
-
+
_sha.update((byte) 'B');
_sha.update((byte) 'B');
_sha.update(preMasterSecret);
@@ -914,20 +914,20 @@ Certificate.signature.sha_hash
attr.put(TLSRandom.SECRET, preMasterSecret);
attr.put(TLSRandom.SEED, seed);
prf.init(attr);
-
+
session.privateData.masterSecret = new byte[48];
prf.nextBytes(session.privateData.masterSecret, 0, 48);
}
-
+
if (Debug.DEBUG_KEY_EXCHANGE)
logger.log(Component.SSL_KEY_EXCHANGE, "master_secret: {0}",
new ByteArray(session.privateData.masterSecret));
-
+
// Wipe out the preMasterSecret.
for (int i = 0; i < preMasterSecret.length; i++)
preMasterSecret[i] = 0;
}
-
+
protected void setupSecurityParameters(byte[][] keys, boolean isClient,
SSLEngineImpl engine,
CompressionMethod compression)
@@ -943,7 +943,7 @@ Certificate.signature.sha_hash
Cipher inCipher = s.cipher();
Mac inMac = s.mac(engine.session().version);
Inflater inflater = (compression == CompressionMethod.ZLIB
- ? new Inflater() : null);
+ ? new Inflater() : null);
inCipher.init(Cipher.DECRYPT_MODE,
new SecretKeySpec(keys[isClient ? 3 : 2],
s.cipherAlgorithm().toString()),
@@ -953,7 +953,7 @@ Certificate.signature.sha_hash
inParams = new InputSecurityParameters(inCipher, inMac,
inflater,
engine.session(), s);
-
+
Cipher outCipher = s.cipher();
Mac outMac = s.mac(engine.session().version);
Deflater deflater = (compression == CompressionMethod.ZLIB
@@ -1025,23 +1025,23 @@ Certificate.signature.sha_hash
preMasterSecret[6] = (byte) engine.session().random().nextInt();
preMasterSecret[7] = (byte) engine.session().random().nextInt();
}
-
+
if (Debug.DEBUG_KEY_EXCHANGE)
logger.logv(Component.SSL_KEY_EXCHANGE, "PSK identity {0} key {1}",
identity, key);
-
+
generateMasterSecret(clientRandom, serverRandom,
engine.session());
byte[][] keys = generateKeys(clientRandom, serverRandom,
engine.session());
setupSecurityParameters(keys, isClient, engine, compression);
}
-
+
protected class DHPhase extends DelegatedTask
{
private final DHPublicKey key;
private final boolean full;
-
+
protected DHPhase(DHPublicKey key)
{
this(key, true);
@@ -1065,7 +1065,7 @@ Certificate.signature.sha_hash
}
}
}
-
+
protected class CertVerifier extends DelegatedTask
{
private final boolean clientSide;
@@ -1077,12 +1077,12 @@ Certificate.signature.sha_hash
this.clientSide = clientSide;
this.chain = chain;
}
-
+
boolean verified()
{
return verified;
}
-
+
protected void implRun()
{
X509TrustManager tm = engine.contextImpl.trustManager;
@@ -1153,18 +1153,18 @@ Certificate.signature.sha_hash
verified = false;
}
}
-
+
if (verified)
engine.session().setPeerVerified(true);
}
}
-
+
protected class DHE_PSKGen extends DelegatedTask
{
private final DHPublicKey dhKey;
private final SecretKey psKey;
private final boolean isClient;
-
+
protected DHE_PSKGen(DHPublicKey dhKey, SecretKey psKey, boolean isClient)
{
this.dhKey = dhKey;
@@ -1187,7 +1187,7 @@ Certificate.signature.sha_hash
psSecret = new byte[8];
engine.session().random().nextBytes(psSecret);
}
-
+
preMasterSecret = new byte[dhSecret.length + psSecret.length + 4];
preMasterSecret[0] = (byte) (dhSecret.length >>> 8);
preMasterSecret[1] = (byte) dhSecret.length;
@@ -1196,10 +1196,10 @@ Certificate.signature.sha_hash
preMasterSecret[dhSecret.length + 3] = (byte) psSecret.length;
System.arraycopy(psSecret, 0, preMasterSecret, dhSecret.length + 4,
psSecret.length);
-
+
generateMasterSecret(clientRandom, serverRandom, engine.session());
byte[][] keys = generateKeys(clientRandom, serverRandom, engine.session());
setupSecurityParameters(keys, isClient, engine, compression);
}
}
-} \ No newline at end of file
+}
diff --git a/gnu/javax/net/ssl/provider/Alert.java b/gnu/javax/net/ssl/provider/Alert.java
index 12c86b0a4..0ceb96bbb 100644
--- a/gnu/javax/net/ssl/provider/Alert.java
+++ b/gnu/javax/net/ssl/provider/Alert.java
@@ -73,7 +73,7 @@ public final class Alert implements Constructed
{
this.buffer = buffer;
}
-
+
public Alert (final Level level, final Description description)
{
level.getClass ();
@@ -171,7 +171,7 @@ public final class Alert implements Constructed
{
WARNING (1), FATAL (2);
-
+
private final int value;
private Level(int value)
@@ -231,7 +231,7 @@ public final class Alert implements Constructed
BAD_CERTIFICATE_HASH_VALUE (114),
UNKNOWN_SRP_USERNAME (120),
MISSING_SRP_USERNAME (121);
-
+
private final int value;
private Description(int value)
diff --git a/gnu/javax/net/ssl/provider/AlertException.java b/gnu/javax/net/ssl/provider/AlertException.java
index 291de2700..90eaaf430 100644
--- a/gnu/javax/net/ssl/provider/AlertException.java
+++ b/gnu/javax/net/ssl/provider/AlertException.java
@@ -66,14 +66,14 @@ public class AlertException extends SSLException
{
this(alert, true);
}
-
+
public AlertException(Alert alert, boolean isLocal, Throwable cause)
{
super(alert.description().toString(), cause);
this.alert = alert;
this.isLocal = isLocal;
}
-
+
public AlertException(Alert alert, Throwable cause)
{
this(alert, true, cause);
@@ -93,7 +93,7 @@ public class AlertException extends SSLException
{
return alert;
}
-
+
public boolean isLocal()
{
return isLocal;
diff --git a/gnu/javax/net/ssl/provider/Builder.java b/gnu/javax/net/ssl/provider/Builder.java
index baaba8aec..070c51b76 100644
--- a/gnu/javax/net/ssl/provider/Builder.java
+++ b/gnu/javax/net/ssl/provider/Builder.java
@@ -46,11 +46,11 @@ import java.nio.ByteBuffer;
* buffer that grows to fit the object being built; the allocated size of
* this buffer may be larger than the built object needs, but the general
* effort will be not to allocate too large a buffer.
- *
+ *
* <p>Once the object is built, through various <em>setters</em> for
* the object's attributes, the final buffer may be retrieved with the
* {@link #buffer()} method.
- *
+ *
* @author Casey Marshall (csm@gnu.org)
*/
public interface Builder extends Constructed
@@ -59,7 +59,7 @@ public interface Builder extends Constructed
* Returns the final buffer, possibly containing the built object. The
* returned buffer will be "trimmed" to size: its position will be zero,
* and its limit and capacity set to the length of the built object.
- *
+ *
* @return The underlying buffer.
*/
ByteBuffer buffer();
diff --git a/gnu/javax/net/ssl/provider/Certificate.java b/gnu/javax/net/ssl/provider/Certificate.java
index 8ff91e557..68de1304d 100644
--- a/gnu/javax/net/ssl/provider/Certificate.java
+++ b/gnu/javax/net/ssl/provider/Certificate.java
@@ -57,7 +57,7 @@ import java.util.List;
/**
* The certificate object. This is used by both the client and the server
* to send their certificates (if any) to one another.
- *
+ *
* <pre>opaque ASN.1Cert&lt;1..2^24-1&gt;;
struct {
diff --git a/gnu/javax/net/ssl/provider/CertificateBuilder.java b/gnu/javax/net/ssl/provider/CertificateBuilder.java
index b60ad556a..1126e6fcc 100644
--- a/gnu/javax/net/ssl/provider/CertificateBuilder.java
+++ b/gnu/javax/net/ssl/provider/CertificateBuilder.java
@@ -1,4 +1,4 @@
-/* CertificateBuilder.java --
+/* CertificateBuilder.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -46,7 +46,7 @@ import java.security.cert.CertificateException;
/**
* Builder for {@link Certificate} objects.
- *
+ *
* @author Casey Marshall (csm@gnu.org)
*/
public class CertificateBuilder extends Certificate implements Builder
diff --git a/gnu/javax/net/ssl/provider/CertificateRequest.java b/gnu/javax/net/ssl/provider/CertificateRequest.java
index b7a22b204..fd9d65be5 100644
--- a/gnu/javax/net/ssl/provider/CertificateRequest.java
+++ b/gnu/javax/net/ssl/provider/CertificateRequest.java
@@ -62,7 +62,7 @@ public class CertificateRequest implements Handshake.Body
// -------------------------------------------------------------------------
protected ByteBuffer buffer;
-
+
// Constructor.
// -------------------------------------------------------------------------
diff --git a/gnu/javax/net/ssl/provider/CertificateRequestBuilder.java b/gnu/javax/net/ssl/provider/CertificateRequestBuilder.java
index 8c059854e..f32c52acf 100644
--- a/gnu/javax/net/ssl/provider/CertificateRequestBuilder.java
+++ b/gnu/javax/net/ssl/provider/CertificateRequestBuilder.java
@@ -1,4 +1,4 @@
-/* CertificateRequestBuilder.java --
+/* CertificateRequestBuilder.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -47,7 +47,7 @@ import javax.security.auth.x500.X500Principal;
/**
* Builder for {@link CertificateRequest} objects.
- *
+ *
* @author Casey Marshall (csm@gnu.org)
*/
public class CertificateRequestBuilder extends CertificateRequest
@@ -74,7 +74,7 @@ public class CertificateRequestBuilder extends CertificateRequest
for (ClientCertificateType type : types)
b.put((byte) type.getValue());
}
-
+
public void setAuthorities(List<X500Principal> authorities)
{
ByteArrayOutputStream out = new ByteArrayOutputStream(1024);
@@ -99,7 +99,7 @@ public class CertificateRequestBuilder extends CertificateRequest
buffer.putShort(typesLen, (short) auths.length);
((ByteBuffer) buffer.duplicate().position(typesLen + 2)).put(auths);
}
-
+
public void ensureCapacity(final int capacity)
{
if (buffer.capacity() >= capacity)
diff --git a/gnu/javax/net/ssl/provider/CertificateStatusRequest.java b/gnu/javax/net/ssl/provider/CertificateStatusRequest.java
index 059c6ec47..e66373620 100644
--- a/gnu/javax/net/ssl/provider/CertificateStatusRequest.java
+++ b/gnu/javax/net/ssl/provider/CertificateStatusRequest.java
@@ -71,12 +71,12 @@ opaque Extensions&lt;0..2^16-1&gt;;</pre>
public class CertificateStatusRequest extends Value implements Iterable<byte[]>
{
private ByteBuffer buffer;
-
+
public CertificateStatusRequest(final ByteBuffer buffer)
{
this.buffer = buffer;
}
-
+
public CertificateStatusRequest(CertificateStatusType type,
List<byte[]> responderIdList,
byte[] requestExtensions)
@@ -106,12 +106,12 @@ public class CertificateStatusRequest extends Value implements Iterable<byte[]>
int l = 3 + (buffer.getShort(1) & 0xFFFF);
return l + (buffer.getShort(l) & 0xFFFF) + 2;
}
-
+
public ByteBuffer buffer()
{
return (ByteBuffer) buffer.duplicate().limit(length());
}
-
+
public CertificateStatusType statusType()
{
int x = buffer.get(0) & 0xFF;
@@ -132,7 +132,7 @@ public class CertificateStatusRequest extends Value implements Iterable<byte[]>
}
return n;
}
-
+
public byte[] responderId(int index)
{
int len = buffer.getShort(1) & 0xFFFF;
@@ -152,7 +152,7 @@ public class CertificateStatusRequest extends Value implements Iterable<byte[]>
}
throw new IndexOutOfBoundsException();
}
-
+
public byte[] requestExtensions()
{
int l = 2 + (buffer.getShort(0) & 0xFFFF);
@@ -161,19 +161,19 @@ public class CertificateStatusRequest extends Value implements Iterable<byte[]>
((ByteBuffer) buffer.duplicate().position(ll+2)).get(b);
return b;
}
-
+
public void setStatusType(CertificateStatusType type)
{
buffer.put(0, (byte) type.value);
}
-
+
public void setRequestIdListLength(int newLength)
{
if (newLength < 0 || newLength > 0xFFFF)
throw new IllegalArgumentException("length out of range");
buffer.putShort(1, (short) newLength);
}
-
+
public void putRequestId(int index, byte[] id)
{
if (id.length > 0xFFFF)
@@ -192,7 +192,7 @@ public class CertificateStatusRequest extends Value implements Iterable<byte[]>
buffer.putShort(i, (short) id.length);
((ByteBuffer) buffer.duplicate().position(i)).put(id);
}
-
+
public void setRequestExtensions(int index, byte[] ext)
{
if (ext.length > 0xFFFF)
@@ -201,17 +201,17 @@ public class CertificateStatusRequest extends Value implements Iterable<byte[]>
buffer.putShort(off, (short) ext.length);
((ByteBuffer) buffer.duplicate().position(off+2)).put(ext);
}
-
+
public Iterator<byte[]> iterator()
{
return new ResponderIdIterator();
}
-
+
public String toString()
{
return toString(null);
}
-
+
public String toString(String prefix)
{
StringWriter str = new StringWriter();
@@ -237,16 +237,16 @@ public class CertificateStatusRequest extends Value implements Iterable<byte[]>
out.print("} CertificateStatus;");
return str.toString();
}
-
+
public class ResponderIdIterator implements Iterator<byte[]>
{
private int index;
-
+
public ResponderIdIterator()
{
index = 0;
}
-
+
public byte[] next() throws NoSuchElementException
{
try
@@ -258,12 +258,12 @@ public class CertificateStatusRequest extends Value implements Iterable<byte[]>
throw new NoSuchElementException();
}
}
-
+
public boolean hasNext()
{
return index < size();
}
-
+
public void remove()
{
throw new UnsupportedOperationException();
diff --git a/gnu/javax/net/ssl/provider/CertificateStatusType.java b/gnu/javax/net/ssl/provider/CertificateStatusType.java
index 7cddf168f..0d52b2778 100644
--- a/gnu/javax/net/ssl/provider/CertificateStatusType.java
+++ b/gnu/javax/net/ssl/provider/CertificateStatusType.java
@@ -3,9 +3,9 @@ package gnu.javax.net.ssl.provider;
public enum CertificateStatusType
{
OCSP (1);
-
+
public final int value;
-
+
private CertificateStatusType (final int value)
{
this.value = value;
diff --git a/gnu/javax/net/ssl/provider/CertificateURL.java b/gnu/javax/net/ssl/provider/CertificateURL.java
index 0bc1c428b..737efcacd 100644
--- a/gnu/javax/net/ssl/provider/CertificateURL.java
+++ b/gnu/javax/net/ssl/provider/CertificateURL.java
@@ -52,7 +52,7 @@ import java.util.NoSuchElementException;
/**
* The CertificateURL extension value.
- *
+ *
* <pre>
enum {
individual_certs(0), pkipath(1), (255)
@@ -84,12 +84,12 @@ opaque SHA1Hash[20];</pre>
public class CertificateURL extends Value implements Iterable<CertificateURL.URLAndOptionalHash>
{
private ByteBuffer buffer;
-
+
public CertificateURL(final ByteBuffer buffer)
{
this.buffer = buffer;
}
-
+
public CertificateURL(CertChainType type, List<URLAndOptionalHash> urls)
{
int length = 3;
@@ -102,12 +102,12 @@ public class CertificateURL extends Value implements Iterable<CertificateURL.URL
buffer.put(url.buffer());
buffer.rewind();
}
-
+
public int length()
{
return 3 + (buffer.getShort(1) & 0xFFFF);
}
-
+
public ByteBuffer buffer()
{
return (ByteBuffer) buffer.duplicate().limit(length());
@@ -122,7 +122,7 @@ public class CertificateURL extends Value implements Iterable<CertificateURL.URL
}
throw new IllegalArgumentException("unknown certificate URL type");
}
-
+
public int size()
{
int len = buffer.getShort(1) & 0xFFFF;
@@ -137,7 +137,7 @@ public class CertificateURL extends Value implements Iterable<CertificateURL.URL
}
return n;
}
-
+
public URLAndOptionalHash get(int index)
{
int len = buffer.getShort(1) & 0xFFFF;
@@ -156,7 +156,7 @@ public class CertificateURL extends Value implements Iterable<CertificateURL.URL
throw new IndexOutOfBoundsException();
return new URLAndOptionalHash(((ByteBuffer) buffer.duplicate().position(i).limit(i+l)).slice());
}
-
+
public void set(int index, URLAndOptionalHash url)
{
int len = buffer.getShort(1) & 0xFFFF;
@@ -179,19 +179,19 @@ public class CertificateURL extends Value implements Iterable<CertificateURL.URL
if (url.hashPresent())
((ByteBuffer) buffer.duplicate().position(i+l+3)).put (url.sha1Hash());
}
-
+
public void setLength(final int length)
{
if (length < 0 || length > 65535)
throw new IllegalArgumentException("length must be between 0 and 65535");
buffer.putShort(1, (short) length);
}
-
+
public String toString()
{
return toString(null);
}
-
+
public String toString(String prefix)
{
StringWriter str = new StringWriter();
@@ -221,16 +221,16 @@ public class CertificateURL extends Value implements Iterable<CertificateURL.URL
{
return new Iterator();
}
-
+
public class Iterator implements java.util.Iterator<URLAndOptionalHash>
{
private int index;
-
+
public Iterator()
{
index = 0;
}
-
+
public URLAndOptionalHash next() throws NoSuchElementException
{
try
@@ -242,49 +242,49 @@ public class CertificateURL extends Value implements Iterable<CertificateURL.URL
throw new NoSuchElementException();
}
}
-
+
public boolean hasNext()
{
return index < size();
}
-
+
public void remove()
{
throw new UnsupportedOperationException();
}
}
-
+
public static enum CertChainType
{
INDIVIDUAL_CERTS (0), PKIPATH (1);
-
+
private final int value;
-
+
private CertChainType (final int value)
{
this.value = value;
}
-
+
public int getValue()
{
return value;
}
}
-
+
public static class URLAndOptionalHash implements Builder, Constructed
{
private ByteBuffer buffer;
-
+
public URLAndOptionalHash (final ByteBuffer buffer)
{
this.buffer = buffer.duplicate().order(ByteOrder.BIG_ENDIAN);
}
-
+
public URLAndOptionalHash(String url)
{
this(url, null);
}
-
+
public URLAndOptionalHash(String url, byte[] hash)
{
if (hash != null && hash.length < 20)
@@ -302,35 +302,35 @@ public class CertificateURL extends Value implements Iterable<CertificateURL.URL
buffer.put(hash, 0, 20);
buffer.rewind();
}
-
+
public int length()
{
return ((buffer.getShort(0) & 0xFFFF)
+ (hashPresent() ? 23 : 3));
}
-
+
public ByteBuffer buffer()
{
return (ByteBuffer) buffer.duplicate().limit(length());
}
-
+
public String url()
{
Charset cs = Charset.forName("ASCII");
return cs.decode(urlBuffer()).toString();
}
-
+
public int urlLength()
{
return buffer.getShort(0) & 0xFFFF;
}
-
+
public ByteBuffer urlBuffer()
{
int len = urlLength();
return ((ByteBuffer) buffer.duplicate().position(2).limit(2+len)).slice();
}
-
+
public boolean hashPresent()
{
int i = (buffer.getShort(0) & 0xFFFF) + 2;
@@ -341,7 +341,7 @@ public class CertificateURL extends Value implements Iterable<CertificateURL.URL
return true;
throw new IllegalArgumentException("expecting 0 or 1: " + (b & 0xFF));
}
-
+
public byte[] sha1Hash()
{
int i = (buffer.getShort(0) & 0xFFFF) + 2;
@@ -352,12 +352,12 @@ public class CertificateURL extends Value implements Iterable<CertificateURL.URL
((ByteBuffer) buffer.duplicate().position(i+1)).get(buf);
return buf;
}
-
+
public String toString()
{
return toString(null);
}
-
+
public String toString(final String prefix)
{
StringWriter str = new StringWriter();
diff --git a/gnu/javax/net/ssl/provider/CertificateVerify.java b/gnu/javax/net/ssl/provider/CertificateVerify.java
index b63f5e4ef..dfa5f6028 100644
--- a/gnu/javax/net/ssl/provider/CertificateVerify.java
+++ b/gnu/javax/net/ssl/provider/CertificateVerify.java
@@ -52,7 +52,7 @@ public class CertificateVerify extends Signature implements Handshake.Body
{
super(buffer, sigAlg);
}
-
+
public CertificateVerify(final byte[] sigVal, final SignatureAlgorithm sigAlg)
{
super(sigVal, sigAlg);
diff --git a/gnu/javax/net/ssl/provider/CipherSuite.java b/gnu/javax/net/ssl/provider/CipherSuite.java
index af3041e94..1c5923129 100644
--- a/gnu/javax/net/ssl/provider/CipherSuite.java
+++ b/gnu/javax/net/ssl/provider/CipherSuite.java
@@ -313,7 +313,7 @@ public final class CipherSuite implements Constructed
SignatureAlgorithm.DSA,
MacAlgorithm.SHA, 32, 0x00, 0x58,
"TLS_SRP_SHA_DSS_WITH_AES_256_CBC_SHA");*/
-
+
// Pre-shared key suites.
public static final CipherSuite TLS_PSK_WITH_RC4_128_SHA =
new CipherSuite(CipherAlgorithm.RC4,
@@ -364,7 +364,7 @@ public final class CipherSuite implements Constructed
SignatureAlgorithm.ANONYMOUS,
MacAlgorithm.SHA, 32, 0x00, 0x91,
"TLS_DHE_PSK_WITH_AES_256_CBC_SHA");
-
+
public static final CipherSuite TLS_RSA_PSK_WITH_RC4_128_SHA =
new CipherSuite(CipherAlgorithm.RC4,
KeyExchangeAlgorithm.RSA_PSK,
@@ -629,7 +629,7 @@ public final class CipherSuite implements Constructed
throw new NoSuchAlgorithmException(toString() + ": unresolved cipher suite");
if (macAlgorithm == MacAlgorithm.NULL)
return null;
-
+
String macAlg = null;
if (version == ProtocolVersion.SSL_3)
{
@@ -642,7 +642,7 @@ public final class CipherSuite implements Constructed
if (macAlgorithm == MacAlgorithm.SHA)
macAlg = "HMac-SHA1";
}
-
+
GetSecurityPropertyAction gspa =
new GetSecurityPropertyAction ("jessie.jce.provider");
final String provider = AccessController.doPrivileged (gspa);
@@ -689,7 +689,7 @@ public final class CipherSuite implements Constructed
{
buf.put (id);
}
-
+
public CipherSuite resolve()
{
if (id[0] == 0x00) switch (id[1] & 0xFF)
@@ -764,7 +764,7 @@ public final class CipherSuite implements Constructed
}
return this;
}
-
+
public boolean isResolved()
{
return isResolved;
diff --git a/gnu/javax/net/ssl/provider/CipherSuiteList.java b/gnu/javax/net/ssl/provider/CipherSuiteList.java
index 0e96b3144..a12304698 100644
--- a/gnu/javax/net/ssl/provider/CipherSuiteList.java
+++ b/gnu/javax/net/ssl/provider/CipherSuiteList.java
@@ -194,7 +194,7 @@ public final class CipherSuiteList implements Iterable<CipherSuite>
{
return new Iterator ();
}
-
+
/**
* An iterator for the elements in this list. The iterator supports
* only the <code>set</code> method out of the optional methods,
diff --git a/gnu/javax/net/ssl/provider/ClientCertificateTypeList.java b/gnu/javax/net/ssl/provider/ClientCertificateTypeList.java
index 1a1886b88..4dd64f09f 100644
--- a/gnu/javax/net/ssl/provider/ClientCertificateTypeList.java
+++ b/gnu/javax/net/ssl/provider/ClientCertificateTypeList.java
@@ -74,7 +74,7 @@ public class ClientCertificateTypeList implements Iterable<ClientCertificateType
return CertificateRequest.ClientCertificateType.forValue
(buffer.get (index + 1) & 0xFF);
}
-
+
public java.util.Iterator<ClientCertificateType> iterator()
{
return new Iterator();
@@ -224,4 +224,4 @@ public class ClientCertificateTypeList implements Iterable<ClientCertificateType
put (index, type);
}
}
-} \ No newline at end of file
+}
diff --git a/gnu/javax/net/ssl/provider/ClientDHE_PSKParameters.java b/gnu/javax/net/ssl/provider/ClientDHE_PSKParameters.java
index e63e03c0a..e2362e029 100644
--- a/gnu/javax/net/ssl/provider/ClientDHE_PSKParameters.java
+++ b/gnu/javax/net/ssl/provider/ClientDHE_PSKParameters.java
@@ -1,4 +1,4 @@
-/* ClientDHE_PSKParameters.java --
+/* ClientDHE_PSKParameters.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -60,7 +60,7 @@ public class ClientDHE_PSKParameters extends ExchangeKeys implements Builder, Co
{
super(buffer);
}
-
+
public ClientDHE_PSKParameters(String identity, ClientDiffieHellmanPublic dh)
{
super(null);
@@ -80,12 +80,12 @@ public class ClientDHE_PSKParameters extends ExchangeKeys implements Builder, Co
{
return (ByteBuffer) buffer.duplicate().rewind().limit(length());
}
-
+
private int identityLength()
{
return (buffer.getShort(0) & 0xFFFF) + 2;
}
-
+
public String identity()
{
Charset utf8 = Charset.forName("UTF-8");
@@ -109,7 +109,7 @@ public class ClientDHE_PSKParameters extends ExchangeKeys implements Builder, Co
return new ClientDiffieHellmanPublic(((ByteBuffer) buffer.duplicate()
.position(identityLength()).limit(length())).slice());
}
-
+
/* (non-Javadoc)
* @see gnu.javax.net.ssl.provider.Constructed#toString(java.lang.String)
*/
diff --git a/gnu/javax/net/ssl/provider/ClientDiffieHellmanPublic.java b/gnu/javax/net/ssl/provider/ClientDiffieHellmanPublic.java
index 8af8b850b..393313a2f 100644
--- a/gnu/javax/net/ssl/provider/ClientDiffieHellmanPublic.java
+++ b/gnu/javax/net/ssl/provider/ClientDiffieHellmanPublic.java
@@ -54,7 +54,7 @@ struct {
case implicit: struct { };
case explicit: opaque dh_Yc&lt;1..2^16-1&gt;;
} dh_public;
-} ClientDiffieHellmanPublic;</pre>
+} ClientDiffieHellmanPublic;</pre>
*/
public class ClientDiffieHellmanPublic extends ExchangeKeys implements Builder
{
@@ -62,12 +62,12 @@ public class ClientDiffieHellmanPublic extends ExchangeKeys implements Builder
{
super(buffer);
}
-
+
public ClientDiffieHellmanPublic(final BigInteger Yc)
{
super(wrap(Yc));
}
-
+
private static ByteBuffer wrap(BigInteger Yc)
{
byte[] b = Util.trim(Yc);
@@ -81,7 +81,7 @@ public class ClientDiffieHellmanPublic extends ExchangeKeys implements Builder
{
return (ByteBuffer) buffer.duplicate().rewind().limit(length());
}
-
+
public BigInteger publicValue()
{
int len = length() - 2;
diff --git a/gnu/javax/net/ssl/provider/ClientHandshake.java b/gnu/javax/net/ssl/provider/ClientHandshake.java
index fdbf26212..c938e284a 100644
--- a/gnu/javax/net/ssl/provider/ClientHandshake.java
+++ b/gnu/javax/net/ssl/provider/ClientHandshake.java
@@ -1,4 +1,4 @@
-/* ClientHandshake.java --
+/* ClientHandshake.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -103,27 +103,27 @@ public class ClientHandshake extends AbstractHandshake
WRITE_FINISHED (false, true),
READ_FINISHED (true, false),
DONE (false, false);
-
+
private final boolean isWriteState;
private final boolean isReadState;
-
+
private State(boolean isReadState, boolean isWriteState)
{
this.isReadState = isReadState;
this.isWriteState = isWriteState;
}
-
+
boolean isReadState()
{
return isReadState;
}
-
+
boolean isWriteState()
{
return isWriteState;
}
}
-
+
private State state;
private ByteBuffer outBuffer;
private boolean continuedSession;
@@ -134,14 +134,14 @@ public class ClientHandshake extends AbstractHandshake
private MaxFragmentLength maxFragmentLengthSent;
private boolean truncatedHMacSent;
private ProtocolVersion sentVersion;
-
+
// Delegated tasks.
private CertVerifier certVerifier;
private ParamsVerifier paramsVerifier;
private DelegatedTask keyExchange;
private CertLoader certLoader;
private GenCertVerify genCertVerify;
-
+
public ClientHandshake(SSLEngineImpl engine) throws NoSuchAlgorithmException
{
super(engine);
@@ -160,7 +160,7 @@ public class ClientHandshake extends AbstractHandshake
if (state.isWriteState()
|| (outBuffer != null && outBuffer.hasRemaining()))
return HandshakeStatus.NEED_WRAP;
-
+
// Copy the current buffer, and prepare it for reading.
ByteBuffer buffer = handshakeBuffer.duplicate ();
buffer.flip();
@@ -169,7 +169,7 @@ public class ClientHandshake extends AbstractHandshake
Handshake handshake = new Handshake(buffer.slice(),
engine.session().suite,
engine.session().version);
-
+
if (Debug.DEBUG)
logger.logv(Component.SSL_HANDSHAKE, "processing in state {0}:\n{1}",
state, handshake);
@@ -241,7 +241,7 @@ public class ClientHandshake extends AbstractHandshake
state = READ_CERTIFICATE_REQUEST;
}
break;
-
+
// Server Certificate.
case READ_CERTIFICATE:
{
@@ -274,7 +274,7 @@ public class ClientHandshake extends AbstractHandshake
engine.session().setPeerCertificates(chain);
certVerifier = new CertVerifier(true, chain);
tasks.add(certVerifier);
-
+
// If we are doing an RSA key exchange, generate our parameters.
KeyExchangeAlgorithm kea = engine.session().suite.keyExchangeAlgorithm();
if (kea == RSA || kea == RSA_PSK)
@@ -290,7 +290,7 @@ public class ClientHandshake extends AbstractHandshake
state = READ_SERVER_KEY_EXCHANGE;
}
break;
-
+
// Server Key Exchange.
case READ_SERVER_KEY_EXCHANGE:
{
@@ -301,7 +301,7 @@ public class ClientHandshake extends AbstractHandshake
&& kexalg != DHE_PSK && kexalg != PSK && kexalg != RSA_PSK)
throw new AlertException(new Alert(Level.FATAL,
Description.UNEXPECTED_MESSAGE));
-
+
if (handshake.type() != Handshake.Type.SERVER_KEY_EXCHANGE)
{
if (kexalg != RSA_PSK && kexalg != PSK)
@@ -320,14 +320,14 @@ public class ClientHandshake extends AbstractHandshake
paramsBuffer = ByteBuffer.allocate(b.remaining());
paramsBuffer.put(b);
}
-
+
if (s.signatureAlgorithm() != SignatureAlgorithm.ANONYMOUS)
{
byte[] signature = skex.signature().signature();
paramsVerifier = new ParamsVerifier(paramsBuffer, signature);
tasks.add(paramsVerifier);
}
-
+
if (kexalg == DHE_DSS || kexalg == DHE_RSA || kexalg == DH_anon)
{
ServerDHParams dhParams = (ServerDHParams) skex.params();
@@ -357,7 +357,7 @@ public class ClientHandshake extends AbstractHandshake
state = READ_CERTIFICATE_REQUEST;
}
break;
-
+
// Certificate Request.
case READ_CERTIFICATE_REQUEST:
{
@@ -366,23 +366,23 @@ public class ClientHandshake extends AbstractHandshake
state = READ_SERVER_HELLO_DONE;
return HandshakeStatus.NEED_UNWRAP;
}
-
+
CertificateRequest req = (CertificateRequest) handshake.body();
ClientCertificateTypeList types = req.types();
LinkedList<String> typeList = new LinkedList<String>();
for (ClientCertificateType t : types)
typeList.add(t.name());
-
+
X500PrincipalList issuers = req.authorities();
LinkedList<X500Principal> issuerList = new LinkedList<X500Principal>();
for (X500Principal p : issuers)
issuerList.add(p);
-
+
certLoader = new CertLoader(typeList, issuerList);
tasks.add(certLoader);
}
break;
-
+
// Server Hello Done.
case READ_SERVER_HELLO_DONE:
{
@@ -392,7 +392,7 @@ public class ClientHandshake extends AbstractHandshake
state = WRITE_CERTIFICATE;
}
break;
-
+
// Finished.
case READ_FINISHED:
{
@@ -422,7 +422,7 @@ public class ClientHandshake extends AbstractHandshake
if (Debug.DEBUG)
logger.logv(Component.SSL_HANDSHAKE, "clientFinished: {0}",
clientFinished);
-
+
if (engine.session().version == ProtocolVersion.SSL_3)
{
if (!Arrays.equals(clientFinished.md5Hash(),
@@ -453,13 +453,13 @@ public class ClientHandshake extends AbstractHandshake
state = DONE;
}
break;
-
+
default:
throw new IllegalStateException("invalid state: " + state);
}
-
+
handshakeOffset += handshake.length() + 4;
-
+
if (!tasks.isEmpty())
return HandshakeStatus.NEED_TASK;
if (state.isWriteState()
@@ -488,7 +488,7 @@ public class ClientHandshake extends AbstractHandshake
fragment.put((ByteBuffer) outBuffer.duplicate().limit(outBuffer.position() + l));
outBuffer.position(outBuffer.position() + l);
}
-
+
if (!fragment.hasRemaining())
{
if (state.isWriteState() || outBuffer.hasRemaining())
@@ -518,7 +518,7 @@ outer_loop:
// that ID.
if (continued != null)
sid = continued.id();
-
+
hello.setSessionId(sid.id());
sentVersion = chooseVersion();
hello.setVersion(sentVersion);
@@ -551,7 +551,7 @@ outer_loop:
extensions.add(new Extension(Extension.Type.SERVER_NAME,
names));
}
-
+
if (truncatedHMac())
{
extensions.add(new Extension(Extension.Type.TRUNCATED_HMAC,
@@ -564,7 +564,7 @@ outer_loop:
}
else
hello.setDisableExtensions(true);
-
+
if (Debug.DEBUG)
logger.logv(Component.SSL_HANDSHAKE, "{0}", hello);
@@ -579,7 +579,7 @@ outer_loop:
state = READ_SERVER_HELLO;
}
break;
-
+
case WRITE_CERTIFICATE:
{
java.security.cert.Certificate[] chain
@@ -598,12 +598,12 @@ outer_loop:
Description.INTERNAL_ERROR),
ce);
}
-
+
outBuffer = cert.buffer();
-
+
fragment.putInt((Handshake.Type.CERTIFICATE.getValue() << 24)
| (cert.length() & 0xFFFFFF));
-
+
int l = Math.min(fragment.remaining(), outBuffer.remaining());
fragment.put((ByteBuffer) outBuffer.duplicate()
.limit(outBuffer.position() + l));
@@ -612,7 +612,7 @@ outer_loop:
state = WRITE_CLIENT_KEY_EXCHANGE;
}
break;
-
+
case WRITE_CLIENT_KEY_EXCHANGE:
{
KeyExchangeAlgorithm kea = engine.session().suite.keyExchangeAlgorithm();
@@ -698,10 +698,10 @@ outer_loop:
engine.session().suite);
engine.session().privateData.masterSecret = new byte[0];
}
-
+
if (Debug.DEBUG)
logger.logv(Component.SSL_HANDSHAKE, "{0}", ckex);
-
+
outBuffer = ckex.buffer();
if (Debug.DEBUG)
logger.logv(Component.SSL_HANDSHAKE, "client kex buffer {0}", outBuffer);
@@ -726,28 +726,28 @@ outer_loop:
// Both states terminate in a NEED_TASK, or a need to change cipher
// specs; so we can't write any more messages here.
break outer_loop;
-
+
case WRITE_CERTIFICATE_VERIFY:
{
assert(genCertVerify != null);
assert(genCertVerify.hasRun());
CertificateVerify verify = new CertificateVerify(genCertVerify.signed(),
engine.session().suite.signatureAlgorithm());
-
+
outBuffer = verify.buffer();
fragment.putInt((Handshake.Type.CERTIFICATE_VERIFY.getValue() << 24)
| (verify.length() & 0xFFFFFF));
int l = Math.min(fragment.remaining(), outBuffer.remaining());
fragment.put((ByteBuffer) outBuffer.duplicate().limit(outBuffer.position() + l));
outBuffer.position(outBuffer.position() + l);
-
+
// XXX This is a potential problem: we may not have drained
// outBuffer, but set the changeCipherSpec toggle.
engine.changeCipherSpec();
state = WRITE_FINISHED;
}
break outer_loop;
-
+
case WRITE_FINISHED:
{
MessageDigest md5copy = null;
@@ -766,10 +766,10 @@ outer_loop:
outBuffer
= generateFinished(md5copy, shacopy, true,
engine.session());
-
+
fragment.putInt((Handshake.Type.FINISHED.getValue() << 24)
| outBuffer.remaining() & 0xFFFFFF);
-
+
int l = Math.min(outBuffer.remaining(), fragment.remaining());
fragment.put((ByteBuffer) outBuffer.duplicate().limit(outBuffer.position() + l));
outBuffer.position(outBuffer.position() + l);
@@ -777,10 +777,10 @@ outer_loop:
if (continuedSession)
state = DONE;
else
- state = READ_FINISHED;
+ state = READ_FINISHED;
}
break;
-
+
default:
throw new IllegalStateException("invalid state: " + state);
}
@@ -808,7 +808,7 @@ outer_loop:
return HandshakeStatus.NEED_WRAP;
return HandshakeStatus.FINISHED;
}
-
+
@Override void checkKeyExchange() throws SSLException
{
// XXX implement.
@@ -821,7 +821,7 @@ outer_loop:
{
throw new SSLException("this should be impossible");
}
-
+
private ProtocolVersion chooseVersion() throws SSLException
{
// Select the highest enabled version, for our initial key exchange.
@@ -839,13 +839,13 @@ outer_loop:
continue;
}
}
-
+
if (version == null)
throw new SSLException("no suitable enabled versions");
-
+
return version;
}
-
+
private List<CipherSuite> getSuites() throws SSLException
{
List<CipherSuite> suites = new LinkedList<CipherSuite>();
@@ -859,7 +859,7 @@ outer_loop:
throw new SSLException("no cipher suites enabled");
return suites;
}
-
+
private List<CompressionMethod> getCompressionMethods()
{
List<CompressionMethod> methods = new LinkedList<CompressionMethod>();
@@ -869,14 +869,14 @@ outer_loop:
methods.add(CompressionMethod.NULL);
return methods;
}
-
+
private boolean enableExtensions()
{
GetSecurityPropertyAction action
= new GetSecurityPropertyAction("jessie.client.enable.extensions");
return Boolean.valueOf(AccessController.doPrivileged(action));
}
-
+
private MaxFragmentLength maxFragmentLength()
{
GetSecurityPropertyAction action
@@ -905,35 +905,35 @@ outer_loop:
}
return null;
}
-
+
private boolean truncatedHMac()
{
GetSecurityPropertyAction action
= new GetSecurityPropertyAction("jessie.client.truncatedHMac");
return Boolean.valueOf(AccessController.doPrivileged(action));
}
-
+
private String getPSKIdentity()
{
GetSecurityPropertyAction action
= new GetSecurityPropertyAction("jessie.client.psk.identity");
return AccessController.doPrivileged(action);
}
-
+
// Delegated tasks.
-
+
class ParamsVerifier extends DelegatedTask
{
private final ByteBuffer paramsBuffer;
private final byte[] signature;
private boolean verified;
-
+
ParamsVerifier(ByteBuffer paramsBuffer, byte[] signature)
{
this.paramsBuffer = paramsBuffer;
this.signature = signature;
}
-
+
public void implRun()
throws InvalidKeyException, NoSuchAlgorithmException,
SSLPeerUnverifiedException, SignatureException
@@ -949,26 +949,26 @@ outer_loop:
notifyAll();
}
}
-
+
boolean verified()
{
return verified;
}
}
-
+
class ClientDHGen extends DelegatedTask
{
private final DHPublicKey serverKey;
private final DHParameterSpec params;
private final boolean full;
-
+
ClientDHGen(DHPublicKey serverKey, DHParameterSpec params, boolean full)
{
this.serverKey = serverKey;
this.params = params;
this.full = full;
}
-
+
public void implRun()
throws InvalidAlgorithmParameterException, NoSuchAlgorithmException,
SSLException
@@ -1006,24 +1006,24 @@ outer_loop:
if (phase.thrown() != null)
throw new SSLException(phase.thrown());
}
-
+
DHPublicKey serverKey()
{
return serverKey;
}
}
-
+
class CertLoader extends DelegatedTask
{
private final List<String> keyTypes;
private final List<X500Principal> issuers;
-
+
CertLoader(List<String> keyTypes, List<X500Principal> issuers)
{
this.keyTypes = keyTypes;
this.issuers = issuers;
}
-
+
public void implRun()
{
X509ExtendedKeyManager km = engine.contextImpl.keyManager;
@@ -1041,17 +1041,17 @@ outer_loop:
{
private byte[] encryptedPreMasterSecret;
private final boolean full;
-
+
RSAGen()
{
this(true);
}
-
+
RSAGen(boolean full)
{
this.full = full;
}
-
+
public void implRun()
throws BadPaddingException, IllegalBlockSizeException, InvalidKeyException,
NoSuchAlgorithmException, NoSuchPaddingException,
@@ -1087,7 +1087,7 @@ outer_loop:
}
rsa.init(Cipher.ENCRYPT_MODE, cert.getPublicKey());
encryptedPreMasterSecret = rsa.doFinal(preMasterSecret);
-
+
// Generate our session keys, because we can.
if (full)
{
@@ -1096,18 +1096,18 @@ outer_loop:
setupSecurityParameters(keys, true, engine, compression);
}
}
-
+
byte[] encryptedSecret()
{
return encryptedPreMasterSecret;
}
}
-
+
class GenCertVerify extends DelegatedTask
{
private final MessageDigest md5, sha;
private byte[] signed;
-
+
GenCertVerify(MessageDigest md5, MessageDigest sha)
{
try
@@ -1137,14 +1137,14 @@ outer_loop:
else
toSign = sha.digest();
}
-
+
java.security.Signature sig =
java.security.Signature.getInstance(engine.session().suite.signatureAlgorithm().name());
sig.initSign(privateKey);
sig.update(toSign);
signed = sig.sign();
}
-
+
byte[] signed()
{
return signed;
diff --git a/gnu/javax/net/ssl/provider/ClientHello.java b/gnu/javax/net/ssl/provider/ClientHello.java
index 54d7f8b4d..a58dc5d7a 100644
--- a/gnu/javax/net/ssl/provider/ClientHello.java
+++ b/gnu/javax/net/ssl/provider/ClientHello.java
@@ -149,7 +149,7 @@ public class ClientHello implements Handshake.Body
.limit (buffer.capacity ())).slice ();
return new CompressionMethodList (listBuf);
}
-
+
public boolean hasExtensions()
{
int offset = getExtensionsOffset();
@@ -168,7 +168,7 @@ public class ClientHello implements Handshake.Body
.limit(offset + len + 2)).slice ();
return new ExtensionList(ebuf);
}
-
+
public int extensionsLength()
{
if (hasExtensions())
diff --git a/gnu/javax/net/ssl/provider/ClientHelloBuilder.java b/gnu/javax/net/ssl/provider/ClientHelloBuilder.java
index 81e3dd72f..90405c45b 100644
--- a/gnu/javax/net/ssl/provider/ClientHelloBuilder.java
+++ b/gnu/javax/net/ssl/provider/ClientHelloBuilder.java
@@ -1,4 +1,4 @@
-/* ClientHelloBuilder.java --
+/* ClientHelloBuilder.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -43,7 +43,7 @@ import java.util.List;
/**
* Builder for {@link ClientHello} objects.
- *
+ *
* @author Casey Marshall (csm@gnu.org)
*/
public class ClientHelloBuilder extends ClientHello implements Builder
@@ -80,7 +80,7 @@ public class ClientHelloBuilder extends ClientHello implements Builder
this.buffer.position (SESSID_OFFSET2);
this.buffer.put (buffer, offset, len);
}
-
+
public void setCipherSuites(List<CipherSuite> suites)
{
int off = getCipherSuitesOffset();
@@ -93,7 +93,7 @@ public class ClientHelloBuilder extends ClientHello implements Builder
i += 2;
}
}
-
+
public void setCompressionMethods(List<CompressionMethod> methods)
{
int off = getCompressionMethodsOffset();
@@ -112,19 +112,19 @@ public class ClientHelloBuilder extends ClientHello implements Builder
ensureCapacity(needed);
buffer.putShort(getExtensionsOffset(), (short) length);
}
-
+
public void setExtensions(ByteBuffer extensions)
{
int elen = extensions.getShort(0) & 0xFFFF;
setExtensionsLength(elen);
((ByteBuffer) buffer.duplicate().position(getExtensionsOffset())).put(extensions);
}
-
+
public void setDisableExtensions(boolean disableExtensions)
{
this.disableExtensions = disableExtensions;
}
-
+
public void ensureCapacity(final int length)
{
if (buffer.capacity() >= length)
diff --git a/gnu/javax/net/ssl/provider/ClientHelloV2.java b/gnu/javax/net/ssl/provider/ClientHelloV2.java
index a514d9ad3..6009d52a3 100644
--- a/gnu/javax/net/ssl/provider/ClientHelloV2.java
+++ b/gnu/javax/net/ssl/provider/ClientHelloV2.java
@@ -155,4 +155,4 @@ class ClientHelloV2 implements Constructed
out.println (Util.toHexString (challenge (), ':'));
return str.toString ();
}
-} \ No newline at end of file
+}
diff --git a/gnu/javax/net/ssl/provider/ClientKeyExchangeBuilder.java b/gnu/javax/net/ssl/provider/ClientKeyExchangeBuilder.java
index ebebdcc0e..a43873510 100644
--- a/gnu/javax/net/ssl/provider/ClientKeyExchangeBuilder.java
+++ b/gnu/javax/net/ssl/provider/ClientKeyExchangeBuilder.java
@@ -1,4 +1,4 @@
-/* ClientKeyExchangeBuilder.java --
+/* ClientKeyExchangeBuilder.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -42,7 +42,7 @@ import java.nio.ByteBuffer;
/**
* Builder for {@link ClientKeyExchange} objects.
- *
+ *
* @author Casey Marshall (csm@gnu.org)
*/
public class ClientKeyExchangeBuilder extends ClientKeyExchange
@@ -60,11 +60,11 @@ public class ClientKeyExchangeBuilder extends ClientKeyExchange
{
return ((ByteBuffer) buffer.duplicate().position(0).limit(length())).slice();
}
-
+
public void setExchangeKeys(ByteBuffer exchangeKeys)
{
// For SSLv3 and RSA key exchange, the message is sent without length.
- // So we use the precise capacity of the buffer to signal the size of
+ // So we use the precise capacity of the buffer to signal the size of
// the message.
if (buffer.capacity() < exchangeKeys.remaining()
|| (suite.keyExchangeAlgorithm() == KeyExchangeAlgorithm.RSA
diff --git a/gnu/javax/net/ssl/provider/ClientPSKParameters.java b/gnu/javax/net/ssl/provider/ClientPSKParameters.java
index f08ec7f90..22c6333e9 100644
--- a/gnu/javax/net/ssl/provider/ClientPSKParameters.java
+++ b/gnu/javax/net/ssl/provider/ClientPSKParameters.java
@@ -1,4 +1,4 @@
-/* ClientPSKParameters.java --
+/* ClientPSKParameters.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -73,7 +73,7 @@ public class ClientPSKParameters extends ExchangeKeys implements Builder, Constr
buffer.put(idBuf);
buffer.rewind();
}
-
+
/* (non-Javadoc)
* @see gnu.javax.net.ssl.provider.Builder#buffer()
*/
@@ -89,13 +89,13 @@ public class ClientPSKParameters extends ExchangeKeys implements Builder, Constr
{
return (buffer.getShort(0) & 0xFFFF) + 2;
}
-
+
public String identity()
{
Charset utf8 = Charset.forName("UTF-8");
return utf8.decode((ByteBuffer) buffer.duplicate().position(2).limit(length())).toString();
}
-
+
public @Override String toString()
{
return toString(null);
diff --git a/gnu/javax/net/ssl/provider/ClientRSA_PSKParameters.java b/gnu/javax/net/ssl/provider/ClientRSA_PSKParameters.java
index 860cc731f..842e911d0 100644
--- a/gnu/javax/net/ssl/provider/ClientRSA_PSKParameters.java
+++ b/gnu/javax/net/ssl/provider/ClientRSA_PSKParameters.java
@@ -1,4 +1,4 @@
-/* ClientRSA_PSKParameters.java --
+/* ClientRSA_PSKParameters.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -72,14 +72,14 @@ public class ClientRSA_PSKParameters extends ExchangeKeys implements Builder, Co
{
return (ByteBuffer) buffer.duplicate().rewind().limit(length());
}
-
+
public String identity()
{
Charset utf8 = Charset.forName("UTF-8");
return utf8.decode((ByteBuffer) buffer.duplicate().position(2).limit
(identityLength())).toString();
}
-
+
private int identityLength()
{
return (buffer.getShort(0) & 0xFFFF) + 2;
@@ -92,7 +92,7 @@ public class ClientRSA_PSKParameters extends ExchangeKeys implements Builder, Co
{
return identityLength() + secret().length();
}
-
+
public EncryptedPreMasterSecret secret()
{
return new EncryptedPreMasterSecret
diff --git a/gnu/javax/net/ssl/provider/CompressionMethod.java b/gnu/javax/net/ssl/provider/CompressionMethod.java
index 6c57e840c..3005dd9fc 100644
--- a/gnu/javax/net/ssl/provider/CompressionMethod.java
+++ b/gnu/javax/net/ssl/provider/CompressionMethod.java
@@ -55,10 +55,10 @@ public enum CompressionMethod
{
case 0: return NULL;
case 1: return ZLIB;
-
+
// Note: we can't throw an exception here, because we get these values
// over the wire, and need to just ignore ones we don't recognize.
- default: return null;
+ default: return null;
}
}
diff --git a/gnu/javax/net/ssl/provider/CompressionMethodList.java b/gnu/javax/net/ssl/provider/CompressionMethodList.java
index 47ba5484c..b57e0c6a6 100644
--- a/gnu/javax/net/ssl/provider/CompressionMethodList.java
+++ b/gnu/javax/net/ssl/provider/CompressionMethodList.java
@@ -192,7 +192,7 @@ public final class CompressionMethodList implements Iterable<CompressionMethod>
{
return new Iterator ();
}
-
+
/**
* An iterator for the elements in this list. The iterator supports
* only the <code>set</code> method out of the optional methods,
diff --git a/gnu/javax/net/ssl/provider/Constructed.java b/gnu/javax/net/ssl/provider/Constructed.java
index 3a3545b22..23ff68812 100644
--- a/gnu/javax/net/ssl/provider/Constructed.java
+++ b/gnu/javax/net/ssl/provider/Constructed.java
@@ -40,9 +40,9 @@ package gnu.javax.net.ssl.provider;
/**
* The base interface to SSL constructed types.
- *
+ *
* <p><b>Contract for ByteBuffer-based constructed types:</b>
- *
+ *
* <p>Most implementations of this interface supported by this library
* take a "view" of an underlying ByteBuffer. The general contract of
* such classes is that they <em>will not</em> modify the position or
@@ -54,12 +54,12 @@ package gnu.javax.net.ssl.provider;
* the object, so the limit isn't useful in such cases. Of course, if the
* limit is set to something other than the object's length, it must be
* larger than the object length).
- *
+ *
* <p>Setter methods (usually in a class that implements the {@link Builder}
* interface) may modify the limit, but the general contract remains that
* the position remain at zero, and that the limit be at least as large as
* the object length.
- *
+ *
* <p>Thus, very often the code will use <em>absolute</em> getters and setters
* for primitive types, or it will use the {@link java.nio.ByteBuffer#duplicate()}
* method, and sometimes the {@link java.nio.ByteBuffer#slice()} method, and
diff --git a/gnu/javax/net/ssl/provider/Debug.java b/gnu/javax/net/ssl/provider/Debug.java
index 6d0f7c3a5..308ef67a0 100644
--- a/gnu/javax/net/ssl/provider/Debug.java
+++ b/gnu/javax/net/ssl/provider/Debug.java
@@ -40,7 +40,7 @@ package gnu.javax.net.ssl.provider;
/**
* Debug constants for Jessie.
- *
+ *
* @author Casey Marshall (csm@gnu.org)
*/
public final class Debug
@@ -50,13 +50,13 @@ public final class Debug
* logger.
*/
public static final boolean DEBUG = true;
-
+
/**
* Set to true to dump out info about the SSL key exchange. Since this
* MAY contain sensitive data, it is a separate value.
*/
public static final boolean DEBUG_KEY_EXCHANGE = true;
-
+
/**
* Set to true to turn on dumping of decrypted packets. Since this will
* log potentially-sensitive information (i.e., decrypted messages), only
diff --git a/gnu/javax/net/ssl/provider/DelegatedTask.java b/gnu/javax/net/ssl/provider/DelegatedTask.java
index 200d4d457..34fd39d19 100644
--- a/gnu/javax/net/ssl/provider/DelegatedTask.java
+++ b/gnu/javax/net/ssl/provider/DelegatedTask.java
@@ -1,4 +1,4 @@
-/* DelegatedTask.java --
+/* DelegatedTask.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -49,12 +49,12 @@ public abstract class DelegatedTask implements Runnable
private static final SystemLogger logger = SystemLogger.SYSTEM;
private boolean hasRun;
protected Throwable thrown;
-
+
protected DelegatedTask()
{
hasRun = false;
}
-
+
public final void run()
{
if (hasRun)
@@ -79,15 +79,15 @@ public abstract class DelegatedTask implements Runnable
}
}
- public final boolean hasRun()
+ public final boolean hasRun()
{
return hasRun;
}
-
+
public final Throwable thrown()
{
return thrown;
}
-
+
protected abstract void implRun() throws Throwable;
}
diff --git a/gnu/javax/net/ssl/provider/EmptyExchangeKeys.java b/gnu/javax/net/ssl/provider/EmptyExchangeKeys.java
index acf4cfa03..55b59998d 100644
--- a/gnu/javax/net/ssl/provider/EmptyExchangeKeys.java
+++ b/gnu/javax/net/ssl/provider/EmptyExchangeKeys.java
@@ -1,4 +1,4 @@
-/* EmptyExchangeKeys.java --
+/* EmptyExchangeKeys.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -64,7 +64,7 @@ public class EmptyExchangeKeys
{
return toString(null);
}
-
+
/* (non-Javadoc)
* @see gnu.javax.net.ssl.provider.Constructed#toString(java.lang.String)
*/
diff --git a/gnu/javax/net/ssl/provider/EncryptedPreMasterSecret.java b/gnu/javax/net/ssl/provider/EncryptedPreMasterSecret.java
index 85769cffc..a40223dd0 100644
--- a/gnu/javax/net/ssl/provider/EncryptedPreMasterSecret.java
+++ b/gnu/javax/net/ssl/provider/EncryptedPreMasterSecret.java
@@ -61,7 +61,7 @@ public final class EncryptedPreMasterSecret extends ExchangeKeys implements Buil
version.getClass();
this.version = version;
}
-
+
public EncryptedPreMasterSecret(byte[] encryptedSecret, ProtocolVersion version)
{
this(ByteBuffer.allocate(version == ProtocolVersion.SSL_3
@@ -72,7 +72,7 @@ public final class EncryptedPreMasterSecret extends ExchangeKeys implements Buil
b.putShort((short) encryptedSecret.length);
b.put(encryptedSecret);
}
-
+
public ByteBuffer buffer()
{
return (ByteBuffer) buffer.duplicate().rewind();
@@ -145,4 +145,4 @@ public final class EncryptedPreMasterSecret extends ExchangeKeys implements Buil
out.print("} EncryptedPreMasterSecret;");
return str.toString();
}
-} \ No newline at end of file
+}
diff --git a/gnu/javax/net/ssl/provider/ExchangeKeys.java b/gnu/javax/net/ssl/provider/ExchangeKeys.java
index f161f484a..a6664b856 100644
--- a/gnu/javax/net/ssl/provider/ExchangeKeys.java
+++ b/gnu/javax/net/ssl/provider/ExchangeKeys.java
@@ -51,4 +51,4 @@ public abstract class ExchangeKeys implements Constructed
if (buffer != null)
this.buffer = buffer.duplicate().order(ByteOrder.BIG_ENDIAN);
}
-} \ No newline at end of file
+}
diff --git a/gnu/javax/net/ssl/provider/Extension.java b/gnu/javax/net/ssl/provider/Extension.java
index c79e58832..5cbcd5790 100644
--- a/gnu/javax/net/ssl/provider/Extension.java
+++ b/gnu/javax/net/ssl/provider/Extension.java
@@ -46,13 +46,13 @@ import java.nio.ByteOrder;
/**
* An SSL hello extension.
- *
+ *
* <pre>
* struct {
* ExtensionType extension_type;
* opaque extension_data<0..2^16-1>;
* } Extension;</pre>
- *
+ *
* @author csm@gnu.org
*/
public final class Extension implements Builder, Constructed
@@ -70,7 +70,7 @@ public final class Extension implements Builder, Constructed
{
this.buffer = buffer.duplicate().order(ByteOrder.BIG_ENDIAN);
}
-
+
public Extension(final Type type, final Value value)
{
ByteBuffer valueBuffer = value.buffer();
@@ -89,7 +89,7 @@ public final class Extension implements Builder, Constructed
{
return (buffer.getShort (2) & 0xFFFF) + 4;
}
-
+
public ByteBuffer buffer()
{
return (ByteBuffer) buffer.duplicate().limit(length());
@@ -107,20 +107,20 @@ public final class Extension implements Builder, Constructed
((ByteBuffer) buffer.duplicate ().position (4)).get (value);
return value;
}
-
+
public ByteBuffer valueBuffer()
{
int len = buffer.getShort(2) & 0xFFFF;
return ((ByteBuffer) buffer.duplicate().position(4).limit(len+4)).slice();
}
-
+
public Value value()
{
switch (type ())
{
case SERVER_NAME:
return new ServerNameList(valueBuffer());
-
+
case MAX_FRAGMENT_LENGTH:
switch (valueBuffer().get() & 0xFF)
{
@@ -131,32 +131,32 @@ public final class Extension implements Builder, Constructed
default:
throw new IllegalArgumentException("invalid max_fragment_len");
}
-
+
case TRUNCATED_HMAC:
return new TruncatedHMAC();
case CLIENT_CERTIFICATE_URL:
return new CertificateURL(valueBuffer());
-
+
case TRUSTED_CA_KEYS:
return new TrustedAuthorities(valueBuffer());
-
+
case STATUS_REQUEST:
return new CertificateStatusRequest(valueBuffer());
-
+
case SRP:
case CERT_TYPE:
}
return new UnresolvedExtensionValue(valueBuffer());
}
-
+
public void setLength (final int newLength)
{
if (newLength < 0 || newLength > 65535)
throw new IllegalArgumentException ("length is out of bounds");
buffer.putShort (2, (short) newLength);
}
-
+
public void setType (final Type type)
{
buffer.putShort(0, (short) type.getValue());
@@ -166,14 +166,14 @@ public final class Extension implements Builder, Constructed
{
setValue (value, 0, value.length);
}
-
+
public void setValue (final byte[] value, final int offset, final int length)
{
if (length != length ())
throw new IllegalArgumentException ("length is different than claimed length");
((ByteBuffer) buffer.duplicate().position(4)).put(value, offset, length);
}
-
+
public String toString()
{
return toString(null);
@@ -233,13 +233,13 @@ public final class Extension implements Builder, Constructed
default: return null;
}
}
-
+
public int getValue()
{
return value;
}
}
-
+
public static abstract class Value implements Builder, Constructed
{
}
diff --git a/gnu/javax/net/ssl/provider/ExtensionList.java b/gnu/javax/net/ssl/provider/ExtensionList.java
index d5aaad621..fb7b12d9e 100644
--- a/gnu/javax/net/ssl/provider/ExtensionList.java
+++ b/gnu/javax/net/ssl/provider/ExtensionList.java
@@ -13,9 +13,9 @@ import java.util.NoSuchElementException;
/**
* A list of extensions, that may appear in either the {@link ClientHello} or
* {@link ServerHello}. The form of the extensions list is:
- *
+ *
* <tt> Extension extensions_list&lt;1..2^16-1&gt;</tt>
- *
+ *
* @author csm
*/
public class ExtensionList implements Builder, Iterable<Extension>
@@ -28,7 +28,7 @@ public class ExtensionList implements Builder, Iterable<Extension>
this.buffer = buffer.duplicate().order(ByteOrder.BIG_ENDIAN);
modCount = 0;
}
-
+
public ExtensionList(List<Extension> extensions)
{
int length = 2;
@@ -40,7 +40,7 @@ public class ExtensionList implements Builder, Iterable<Extension>
buffer.put(extension.buffer());
buffer.rewind();
}
-
+
public ByteBuffer buffer()
{
return (ByteBuffer) buffer.duplicate().limit(length());
@@ -63,10 +63,10 @@ public class ExtensionList implements Builder, Iterable<Extension>
ByteBuffer b = (ByteBuffer) buffer.duplicate().position(i).limit(i+el+4);
return new Extension(b.slice());
}
-
+
/**
* Returns the number of extensions this list contains.
- *
+ *
* @return The number of extensions.
*/
public int size ()
@@ -86,14 +86,14 @@ public class ExtensionList implements Builder, Iterable<Extension>
/**
* Returns the length of this extension list, in bytes.
- *
+ *
* @return The length of this extension list, in bytes.
*/
public int length ()
{
return (buffer.getShort (0) & 0xFFFF) + 2;
}
-
+
/**
* Sets the extension at index <i>i</i> to <i>e</i>. Note that setting an
* element at an index <b>may</b> invalidate any other elements that come
@@ -101,10 +101,10 @@ public class ExtensionList implements Builder, Iterable<Extension>
* move existing elements in this list, and since extensions are variable
* length, you can <em>not</em> guarantee that extensions later in the list
* will still be valid.
- *
+ *
* <p>Thus, elements of this list <b>must</b> be set in order of increasing
* index.
- *
+ *
* @param index The index to set the extension at.
* @param e The extension.
* @throws java.nio.BufferOverflowException If setting the extension overflows
@@ -136,12 +136,12 @@ public class ExtensionList implements Builder, Iterable<Extension>
((ByteBuffer) buffer.duplicate().position(i+4)).put (e.valueBuffer());
modCount++;
}
-
+
/**
* Reserve space for an extension at index <i>i</i> in the list. In other
* words, this does the job of {@link #set(int, Extension)}, but does not
* copy the extension value to the underlying buffer.
- *
+ *
* @param index The index of the extension to reserve space for.
* @param t The type of the extension.
* @param eLength The number of bytes to reserve for this extension. The total
@@ -168,10 +168,10 @@ public class ExtensionList implements Builder, Iterable<Extension>
buffer.putShort(i+2, (short) eLength);
modCount++;
}
-
+
/**
* Set the total length of this list, in bytes.
- *
+ *
* @param newLength The new list length.
*/
public void setLength (final int newLength)
@@ -181,7 +181,7 @@ public class ExtensionList implements Builder, Iterable<Extension>
buffer.putShort (0, (short) newLength);
modCount++;
}
-
+
public Iterator<Extension> iterator()
{
return new ExtensionsIterator();
@@ -191,7 +191,7 @@ public class ExtensionList implements Builder, Iterable<Extension>
{
return toString (null);
}
-
+
public String toString(final String prefix)
{
StringWriter str = new StringWriter();
@@ -214,7 +214,7 @@ public class ExtensionList implements Builder, Iterable<Extension>
/**
* List iterator interface to an extensions list.
- *
+ *
* @author csm@gnu.org
*/
public final class ExtensionsIterator implements ListIterator<Extension>
@@ -222,7 +222,7 @@ public class ExtensionList implements Builder, Iterable<Extension>
private final int modCount;
private int index;
private final int size;
-
+
public ExtensionsIterator ()
{
this.modCount = ExtensionList.this.modCount;
diff --git a/gnu/javax/net/ssl/provider/Handshake.java b/gnu/javax/net/ssl/provider/Handshake.java
index dd36f2b3f..31f142d3e 100644
--- a/gnu/javax/net/ssl/provider/Handshake.java
+++ b/gnu/javax/net/ssl/provider/Handshake.java
@@ -266,7 +266,7 @@ public final class Handshake implements Constructed
/**
* Convert a raw handshake type value to a type enum value.
- *
+ *
* @return The corresponding enum value for the raw integer value.
* @throws IllegalArgumentException If the value is not a known handshake
* type.
diff --git a/gnu/javax/net/ssl/provider/InputSecurityParameters.java b/gnu/javax/net/ssl/provider/InputSecurityParameters.java
index cf5ca6099..1d3da833a 100644
--- a/gnu/javax/net/ssl/provider/InputSecurityParameters.java
+++ b/gnu/javax/net/ssl/provider/InputSecurityParameters.java
@@ -83,7 +83,7 @@ public class InputSecurityParameters
/**
* Decrypt a record, storing the decrypted fragment into the given array
* of byte buffers.
- *
+ *
* @param record The input record.
* @param output The output buffers.
* @param offset The offset of the first buffer to use.
@@ -94,7 +94,7 @@ public class InputSecurityParameters
* and the input fragment is not a multiple of the block size.
* @throws MacException If verifying the MAC fails.
* @throws SSLException ???
- * @throws ShortBufferException
+ * @throws ShortBufferException
*/
public int decrypt(Record record, ByteBuffer[] output, int offset, int length)
throws DataFormatException, IllegalBlockSizeException,
@@ -102,11 +102,11 @@ public class InputSecurityParameters
{
return decrypt(record, output, offset, length, null);
}
-
+
/**
* Decrypt a record, storing the decrypted fragment into the given growable
* buffer.
- *
+ *
* @param record The input record.
* @param outputStream The output buffer.
* @return The number of bytes put into the output buffer.
@@ -122,7 +122,7 @@ public class InputSecurityParameters
{
return decrypt(record, null, 0, 0, outputStream);
}
-
+
private int decrypt(Record record, ByteBuffer[] output, int offset, int length,
ByteBufferOutputStream outputStream)
throws DataFormatException, IllegalBlockSizeException,
@@ -142,7 +142,7 @@ public class InputSecurityParameters
if (Debug.DEBUG_DECRYPTION)
logger.logv(Component.SSL_RECORD_LAYER, "decrypted fragment:\n{0}",
Util.hexDump((ByteBuffer) fragment.duplicate().position(0), " >> "));
-
+
int fragmentLength = record.length();
int maclen = 0;
if (mac != null)
@@ -178,14 +178,14 @@ public class InputSecurityParameters
logger.logv(Component.SSL_RECORD_LAYER, "TLSv1.x padding\n{0}",
new ByteArray(pad));
}
-
+
if (Debug.DEBUG)
logger.logv(Component.SSL_RECORD_LAYER, "padding bad? {0}",
badPadding);
if (!badPadding)
fragmentLength = fragmentLength - padRemoveLen;
}
-
+
int ivlen = 0;
if (session.version.compareTo(ProtocolVersion.TLS_1_1) >= 0
&& !suite.isStreamCipher())
@@ -244,7 +244,7 @@ public class InputSecurityParameters
else
fragment.position(0);
fragment.limit(fragmentLength);
-
+
while (!done)
{
int l;
@@ -259,7 +259,7 @@ public class InputSecurityParameters
out.write(outbuffer, 0, l);
done = !fragment.hasRemaining() && inflater.finished();
}
-
+
ByteBuffer outbuf = out.buffer();
if (outputStream != null)
{
@@ -323,10 +323,10 @@ public class InputSecurityParameters
}
sequence++;
-
+
return produced;
}
-
+
CipherSuite cipherSuite ()
{
return suite;
diff --git a/gnu/javax/net/ssl/provider/Jessie.java b/gnu/javax/net/ssl/provider/Jessie.java
index 6bd68b385..d3fb3a658 100644
--- a/gnu/javax/net/ssl/provider/Jessie.java
+++ b/gnu/javax/net/ssl/provider/Jessie.java
@@ -90,11 +90,11 @@ public class Jessie extends Provider
put("Mac.SSLv3HMac-MD5", SSLv3HMacMD5Impl.class.getName());
put("Mac.SSLv3HMac-SHA", SSLv3HMacSHAImpl.class.getName());
-
+
put("Signature.TLSv1.1-RSA", SSLRSASignatureImpl.class.getName());
put("Alg.Alias.Signature.TLSv1-RSA", "TLSv1.1-RSA");
put("Alg.Alias.Signature.SSLv3-RSA", "TLSv1.1-RSA");
-
+
return null;
}
});
diff --git a/gnu/javax/net/ssl/provider/MaxFragmentLength.java b/gnu/javax/net/ssl/provider/MaxFragmentLength.java
index eb63958b8..acbfedff1 100644
--- a/gnu/javax/net/ssl/provider/MaxFragmentLength.java
+++ b/gnu/javax/net/ssl/provider/MaxFragmentLength.java
@@ -5,7 +5,7 @@ import gnu.javax.net.ssl.provider.Extension.Value;
import java.nio.ByteBuffer;
/**
- * Extension value
+ * Extension value
* @author csm
*/
public class MaxFragmentLength extends Value
@@ -14,21 +14,21 @@ public class MaxFragmentLength extends Value
public static final MaxFragmentLength LEN_2_10 = new MaxFragmentLength(2, 1 << 10);
public static final MaxFragmentLength LEN_2_11 = new MaxFragmentLength(3, 1 << 11);
public static final MaxFragmentLength LEN_2_12 = new MaxFragmentLength(4, 1 << 12);
-
+
private final int value;
private final int length;
-
+
private MaxFragmentLength(int value, int length)
{
this.value = value;
this.length = length;
}
-
+
public ByteBuffer buffer()
{
return ByteBuffer.allocate(1).put(0, (byte) value);
}
-
+
public int length()
{
return 1;
@@ -38,17 +38,17 @@ public class MaxFragmentLength extends Value
{
return value;
}
-
+
public int maxLength()
{
return length;
}
-
+
public String toString()
{
return toString(null);
}
-
+
public String toString(String prefix)
{
String s = "max_fragment_length = ";
diff --git a/gnu/javax/net/ssl/provider/OutputSecurityParameters.java b/gnu/javax/net/ssl/provider/OutputSecurityParameters.java
index 228071a39..c6ed7d587 100644
--- a/gnu/javax/net/ssl/provider/OutputSecurityParameters.java
+++ b/gnu/javax/net/ssl/provider/OutputSecurityParameters.java
@@ -1,4 +1,4 @@
-/* OutputSecurityParameters.java --
+/* OutputSecurityParameters.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -88,12 +88,12 @@ public class OutputSecurityParameters
if (offset < 0 || offset >= input.length
|| length <= 0 || offset + length > input.length)
throw new IndexOutOfBoundsException();
-
+
if (Debug.DEBUG)
for (int i = offset; i < offset+length; i++)
logger.logv(Component.SSL_RECORD_LAYER, "encrypting record [{0}]: {1}",
i-offset, input[i]);
-
+
int maclen = 0;
if (mac != null)
maclen = session.isTruncatedMac() ? 10 : mac.getMacLength ();
@@ -107,7 +107,7 @@ public class OutputSecurityParameters
iv = new byte[ivlen];
session.random().nextBytes(iv);
}
-
+
int padaddlen = 0;
if (!suite.isStreamCipher()
&& session.version.compareTo(ProtocolVersion.TLS_1) >= 0)
@@ -115,7 +115,7 @@ public class OutputSecurityParameters
padaddlen = (session.random().nextInt(255 / cipher.getBlockSize())
* cipher.getBlockSize());
}
-
+
int fragmentLength = 0;
ByteBuffer[] fragments = null;
// Compress the content, if needed.
@@ -126,10 +126,10 @@ public class OutputSecurityParameters
byte[] inbuf = new byte[1024];
byte[] outbuf = new byte[1024];
int written = 0;
-
+
// Here we use the guarantee that the deflater won't increase the
// output size by more than 1K -- we resign ourselves to only deflate
- // as much data as we have space for *uncompressed*,
+ // as much data as we have space for *uncompressed*,
int limit = output.remaining() - (maclen + ivlen + padaddlen) - 1024;
for (int i = offset; i < length && written < limit; i++)
@@ -241,7 +241,7 @@ public class OutputSecurityParameters
outrecord.setContentType(contentType);
outrecord.setVersion(session.version);
outrecord.setLength(fragmentLength);
-
+
int consumed = 0;
ByteBuffer outfragment = outrecord.fragment();
@@ -279,16 +279,16 @@ public class OutputSecurityParameters
if (macValue != null)
outfragment.put(macValue);
}
-
+
// Advance the output buffer's position.
output.position(output.position() + outrecord.length() + 5);
sequence++;
return new int[] { consumed, fragmentLength + 5 };
}
-
+
CipherSuite suite()
{
return suite;
}
-} \ No newline at end of file
+}
diff --git a/gnu/javax/net/ssl/provider/PreSharedKeyManagerFactoryImpl.java b/gnu/javax/net/ssl/provider/PreSharedKeyManagerFactoryImpl.java
index aa1f97853..16263fb37 100644
--- a/gnu/javax/net/ssl/provider/PreSharedKeyManagerFactoryImpl.java
+++ b/gnu/javax/net/ssl/provider/PreSharedKeyManagerFactoryImpl.java
@@ -1,4 +1,4 @@
-/* PreSharedKeyManagerFactory.java --
+/* PreSharedKeyManagerFactory.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -106,7 +106,7 @@ public class PreSharedKeyManagerFactoryImpl
{
return params.getKey(name);
}
-
+
public String chooseIdentityHint()
{
Iterator<String> it = params.identities();
diff --git a/gnu/javax/net/ssl/provider/Random.java b/gnu/javax/net/ssl/provider/Random.java
index f89acc1f8..bd5c037f5 100644
--- a/gnu/javax/net/ssl/provider/Random.java
+++ b/gnu/javax/net/ssl/provider/Random.java
@@ -83,7 +83,7 @@ public class Random implements Builder, Constructed
{
return RANDOM_LENGTH + 4;
}
-
+
public ByteBuffer buffer()
{
return ((ByteBuffer) buffer.duplicate().position(0).limit(length())).slice();
diff --git a/gnu/javax/net/ssl/provider/SSLContextImpl.java b/gnu/javax/net/ssl/provider/SSLContextImpl.java
index cf7c8e4e3..50bbdb61b 100644
--- a/gnu/javax/net/ssl/provider/SSLContextImpl.java
+++ b/gnu/javax/net/ssl/provider/SSLContextImpl.java
@@ -1,4 +1,4 @@
-/* SSLContextImpl.java --
+/* SSLContextImpl.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -68,14 +68,14 @@ import javax.net.ssl.X509TrustManager;
/**
* Our implementation of {@link SSLContextSpi}.
- *
+ *
* @author Casey Marshall (csm@gnu.org)
*/
public final class SSLContextImpl extends SSLContextSpi
{
AbstractSessionContext serverContext;
AbstractSessionContext clientContext;
-
+
PreSharedKeyManager pskManager;
X509ExtendedKeyManager keyManager;
X509TrustManager trustManager;
@@ -85,7 +85,7 @@ public final class SSLContextImpl extends SSLContextSpi
public SSLContextImpl()
{
}
-
+
/* (non-Javadoc)
* @see javax.net.ssl.SSLContextSpi#engineCreateSSLEngine()
*/
@@ -210,11 +210,11 @@ public final class SSLContextImpl extends SSLContextSpi
this.random = defaultRandom();
}
}
-
+
/**
* Create and return a default key manager. The default is the JessieX509
* algorithm, loaded from either the jssecerts file, or the cacerts file.
- *
+ *
* @return The default key manager instance.
* @throws KeyManagementException If the instance cannot be created.
*/
@@ -257,7 +257,7 @@ public final class SSLContextImpl extends SSLContextSpi
/**
* Create and return a default trust manager. The default is the JessieX509
* algorithm, loaded from either the jssecerts file, or the cacerts file.
- *
+ *
* @return The default trust manager instance.
* @throws KeyManagementException If the instance cannot be created.
*/
@@ -290,7 +290,7 @@ public final class SSLContextImpl extends SSLContextSpi
* property, or Fortuna if that property is not set. If none of these
* algorithms can be found, and instance created with the SecureRandom
* constructor is returned.
- *
+ *
* @return The default secure PRNG instance.
*/
private SecureRandom defaultRandom()
@@ -312,4 +312,4 @@ public final class SSLContextImpl extends SSLContextSpi
return rand;
}
-} \ No newline at end of file
+}
diff --git a/gnu/javax/net/ssl/provider/SSLEngineImpl.java b/gnu/javax/net/ssl/provider/SSLEngineImpl.java
index 4a7f924e8..b63fb2f20 100644
--- a/gnu/javax/net/ssl/provider/SSLEngineImpl.java
+++ b/gnu/javax/net/ssl/provider/SSLEngineImpl.java
@@ -84,7 +84,7 @@ public final class SSLEngineImpl extends SSLEngine
private String[] enabledSuites;
private String[] enabledProtocols;
-
+
/**
* We can receive any message chunked across multiple records,
* including alerts, even though all alert messages are only two
@@ -100,7 +100,7 @@ public final class SSLEngineImpl extends SSLEngine
private Mode mode;
private enum Mode { SERVER, CLIENT }
-
+
SSLEngineImpl (SSLContextImpl contextImpl, String host, int port)
{
super(host, port);
@@ -113,11 +113,11 @@ public final class SSLEngineImpl extends SSLEngine
contextImpl.random.nextBytes(sid);
session.setId(new Session.ID(sid));
session.setRandom(contextImpl.random);
-
+
if (Debug.DEBUG)
logger.logv(Component.SSL_RECORD_LAYER, "generated session ID {0} with random {1}",
session.id(), contextImpl.random);
-
+
// Begin with no encryption.
insec = new InputSecurityParameters (null, null, null, session,
CipherSuite.TLS_NULL_WITH_NULL_NULL);
@@ -134,7 +134,7 @@ public final class SSLEngineImpl extends SSLEngine
lastAlert = null;
handshakeStatus = SSLEngineResult.HandshakeStatus.NOT_HANDSHAKING;
changeCipherSpec = false;
-
+
// Set up default protocols and suites.
enabledProtocols = new String[] {
ProtocolVersion.TLS_1_1.toString(),
@@ -143,7 +143,7 @@ public final class SSLEngineImpl extends SSLEngine
};
enabledSuites = defaultSuites();
}
-
+
static String[] defaultSuites()
{
return new String[] {
@@ -204,7 +204,7 @@ public final class SSLEngineImpl extends SSLEngine
if (mode == null)
throw new IllegalStateException("setUseClientMode was never used");
-
+
switch (mode)
{
case SERVER:
@@ -219,7 +219,7 @@ public final class SSLEngineImpl extends SSLEngine
throw new SSLException(nsae);
}
break;
-
+
case CLIENT:
try
{
@@ -244,7 +244,7 @@ public final class SSLEngineImpl extends SSLEngine
{
lastAlert = new Alert(Alert.Level.WARNING, Alert.Description.CLOSE_NOTIFY);
}
-
+
@Override
public Runnable getDelegatedTask()
{
@@ -252,13 +252,13 @@ public final class SSLEngineImpl extends SSLEngine
return null;
return handshake.getTask();
}
-
+
@Override
public String[] getEnabledCipherSuites()
{
return (String[]) enabledSuites.clone();
}
-
+
@Override
public String[] getEnabledProtocols()
{
@@ -270,7 +270,7 @@ public final class SSLEngineImpl extends SSLEngine
{
return createSessions;
}
-
+
@Override
public HandshakeStatus getHandshakeStatus()
{
@@ -278,43 +278,43 @@ public final class SSLEngineImpl extends SSLEngine
return HandshakeStatus.NOT_HANDSHAKING;
return handshake.status();
}
-
+
@Override
public boolean getNeedClientAuth()
{
return needClientAuth;
}
-
+
@Override
public SSLSession getSession()
{
return session;
}
-
+
@Override
public boolean getUseClientMode ()
{
return (mode == Mode.CLIENT);
}
-
+
@Override
public boolean getWantClientAuth()
{
return wantClientAuth;
}
-
+
@Override
public boolean isInboundDone()
{
return inClosed;
}
-
+
@Override
public boolean isOutboundDone()
{
return outClosed;
}
-
+
@Override
public void setEnableSessionCreation(final boolean createSessions)
{
@@ -336,16 +336,16 @@ public final class SSLEngineImpl extends SSLEngine
throw new IllegalArgumentException("need at least one protocol");
enabledProtocols = (String[]) protocols.clone();
}
-
+
@Override
public String[] getSupportedCipherSuites()
{
// XXX if we ever want to support "pluggable" cipher suites, we'll need
// to figure this out.
-
+
return CipherSuite.availableSuiteNames().toArray(new String[0]);
}
-
+
@Override
public String[] getSupportedProtocols()
{
@@ -359,7 +359,7 @@ public final class SSLEngineImpl extends SSLEngine
{
this.needClientAuth = needClientAuth;
}
-
+
@Override
public void setUseClientMode (final boolean clientMode)
{
@@ -368,7 +368,7 @@ public final class SSLEngineImpl extends SSLEngine
else
mode = Mode.SERVER;
}
-
+
public @Override void setWantClientAuth(final boolean wantClientAuth)
{
this.wantClientAuth = wantClientAuth;
@@ -385,13 +385,13 @@ public final class SSLEngineImpl extends SSLEngine
if (inClosed)
return new SSLEngineResult(SSLEngineResult.Status.CLOSED,
handshakeStatus, 0, 0);
-
+
if (source.remaining() < 5)
{
return new SSLEngineResult(SSLEngineResult.Status.BUFFER_UNDERFLOW,
handshakeStatus, 0, 0);
}
-
+
Record record = null;
boolean helloV2 = false;
@@ -410,15 +410,15 @@ public final class SSLEngineImpl extends SSLEngine
if (Debug.DEBUG)
logger.log (Component.SSL_RECORD_LAYER,
"converting SSLv2 client hello to version 3 hello");
-
+
source.getShort(); // skip length
ClientHelloV2 v2 = new ClientHelloV2(source.slice());
-
+
if (Debug.DEBUG)
logger.log(Component.SSL_RECORD_LAYER, "v2 hello: {0}", v2);
-
+
List<CipherSuite> suites = v2.cipherSpecs();
-
+
ClientHelloBuilder hello = new ClientHelloBuilder();
hello.setVersion(v2.version ());
@@ -448,31 +448,31 @@ public final class SSLEngineImpl extends SSLEngine
record.setContentType(ContentType.HANDSHAKE);
record.setVersion(v2.version());
record.setLength(hello.length() + 4);
-
+
Handshake handshake = new Handshake(record.fragment());
handshake.setLength(hello.length());
handshake.setType(Handshake.Type.CLIENT_HELLO);
-
+
handshake.bodyBuffer().put(hello.buffer());
source.position(source.position() + hellolen);
helloV2 = true;
}
else
record = new Record(source);
-
+
ContentType type = record.contentType ();
-
+
if (Debug.DEBUG)
logger.log(Component.SSL_RECORD_LAYER, "input record:\n{0}", record);
-
+
if (record.length() > session.getPacketBufferSize() - 5)
{
lastAlert = new Alert(Alert.Level.FATAL,
Alert.Description.RECORD_OVERFLOW);
throw new AlertException(lastAlert);
}
-
- ByteBufferOutputStream sysMsg = null;
+
+ ByteBufferOutputStream sysMsg = null;
ByteBuffer msg = null;
int produced = 0;
@@ -492,7 +492,7 @@ public final class SSLEngineImpl extends SSLEngine
insec.decrypt(record, sysMsg);
}
}
-
+
// Advance the input buffer past the record we just read.
if (!helloV2)
source.position(source.position() + record.length() + 5);
@@ -532,7 +532,7 @@ public final class SSLEngineImpl extends SSLEngine
}
SSLEngineResult result = null;
-
+
// If we need to handle the output here, do it. Otherwise, the output
// has been stored in the supplied output buffers.
if (sysMsg != null)
@@ -541,7 +541,7 @@ public final class SSLEngineImpl extends SSLEngine
logger.logv(Component.SSL_RECORD_LAYER, "sysmessage {0}", sysMsg);
msg = sysMsg.buffer();
}
-
+
if (type == ContentType.CHANGE_CIPHER_SPEC)
{
// We *may* get a partial message, even though the message is only
@@ -665,7 +665,7 @@ public final class SSLEngineImpl extends SSLEngine
if (Debug.DEBUG)
logger.logv(Component.SSL_RECORD_LAYER, "return result: {0}", result);
-
+
return result;
}
@@ -679,7 +679,7 @@ public final class SSLEngineImpl extends SSLEngine
if (outClosed)
return new SSLEngineResult(SSLEngineResult.Status.CLOSED,
handshakeStatus, 0, 0);
-
+
ContentType type = null;
ByteBuffer sysMessage = null;
if (Debug.DEBUG)
@@ -720,7 +720,7 @@ public final class SSLEngineImpl extends SSLEngine
new Record((ByteBuffer) sink.duplicate().position(orig)));
SSLEngineResult result = new SSLEngineResult(SSLEngineResult.Status.OK,
handshakeStatus, 0, produced);
-
+
// Note, this will only happen if we transition from
// TLS_NULL_WITH_NULL_NULL *to* TLS_NULL_WITH_NULL_NULL, which
// doesn't make a lot of sense, but we support it anyway.
@@ -731,7 +731,7 @@ public final class SSLEngineImpl extends SSLEngine
}
return result;
}
-
+
// Rough guideline; XXX.
sysMessage = ByteBuffer.allocate(sink.remaining() - 2048);
type = ContentType.HANDSHAKE;
@@ -753,7 +753,7 @@ public final class SSLEngineImpl extends SSLEngine
int produced = 0;
int consumed = 0;
-
+
try
{
int orig = sink.position();
@@ -773,7 +773,7 @@ public final class SSLEngineImpl extends SSLEngine
consumed = inout[0];
produced = inout[1];
}
-
+
if (Debug.DEBUG)
logger.logv(Component.SSL_RECORD_LAYER, "emitting record:\n{0}",
new Record((ByteBuffer) sink.duplicate().position(orig).limit(produced)));
@@ -798,14 +798,14 @@ public final class SSLEngineImpl extends SSLEngine
lastAlert = new Alert(Alert.Level.FATAL, Alert.Description.INTERNAL_ERROR);
return new SSLEngineResult(SSLEngineResult.Status.OK, handshakeStatus, 0, 0);
}
-
+
if (lastAlert != null && lastAlert.level() == Alert.Level.FATAL)
{
AlertException ae = new AlertException(lastAlert);
lastAlert = null;
throw ae;
}
-
+
if (changeCipherSpec)
{
outsec = handshake.getOutputParams();
@@ -829,14 +829,14 @@ public final class SSLEngineImpl extends SSLEngine
{
return session;
}
-
+
void setSession(SessionImpl session)
{
this.session = session;
}
-
+
void changeCipherSpec()
{
changeCipherSpec = true;
}
-} \ No newline at end of file
+}
diff --git a/gnu/javax/net/ssl/provider/SSLRSASignatureImpl.java b/gnu/javax/net/ssl/provider/SSLRSASignatureImpl.java
index e6981c9c7..105b4d5d7 100644
--- a/gnu/javax/net/ssl/provider/SSLRSASignatureImpl.java
+++ b/gnu/javax/net/ssl/provider/SSLRSASignatureImpl.java
@@ -58,7 +58,7 @@ import java.util.Arrays;
/**
* An implementation of of the RSA signature algorithm; this is an RSA
* encrypted MD5 hash followed by a SHA-1 hash.
- *
+ *
* @author Casey Marshall (csm@gnu.org)
*/
public class SSLRSASignatureImpl extends SignatureSpi
@@ -69,7 +69,7 @@ public class SSLRSASignatureImpl extends SignatureSpi
private final MessageDigest md5, sha;
private boolean initSign = false;
private boolean initVerify = false;
-
+
public SSLRSASignatureImpl() throws NoSuchAlgorithmException
{
md5 = MessageDigest.getInstance("MD5");
@@ -149,7 +149,7 @@ public class SSLRSASignatureImpl extends SignatureSpi
@Override protected byte[] engineSign() throws SignatureException
{
// FIXME we need to add RSA blinding to this, somehow.
-
+
if (!initSign)
throw new SignatureException("not initialized for signing");
// Pad the hash results with RSA block type 1.
diff --git a/gnu/javax/net/ssl/provider/SSLServerSocketFactoryImpl.java b/gnu/javax/net/ssl/provider/SSLServerSocketFactoryImpl.java
index dc80dc782..67620d173 100644
--- a/gnu/javax/net/ssl/provider/SSLServerSocketFactoryImpl.java
+++ b/gnu/javax/net/ssl/provider/SSLServerSocketFactoryImpl.java
@@ -1,4 +1,4 @@
-/* SSLServerSocketFactoryImpl.java --
+/* SSLServerSocketFactoryImpl.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -50,7 +50,7 @@ import javax.net.ssl.SSLServerSocketFactory;
public class SSLServerSocketFactoryImpl extends SSLServerSocketFactory
{
private final SSLContextImpl contextImpl;
-
+
public SSLServerSocketFactoryImpl(SSLContextImpl contextImpl)
{
this.contextImpl = contextImpl;
diff --git a/gnu/javax/net/ssl/provider/SSLServerSocketImpl.java b/gnu/javax/net/ssl/provider/SSLServerSocketImpl.java
index 41ef5f1cf..5b07017f0 100644
--- a/gnu/javax/net/ssl/provider/SSLServerSocketImpl.java
+++ b/gnu/javax/net/ssl/provider/SSLServerSocketImpl.java
@@ -1,4 +1,4 @@
-/* SSLServerSocketImpl.java --
+/* SSLServerSocketImpl.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -48,7 +48,7 @@ import javax.net.ssl.SSLServerSocket;
public class SSLServerSocketImpl extends SSLServerSocket
{
private final SSLContextImpl contextImpl;
-
+
private boolean enableSessionCreation;
private String[] enabledCipherSuites;
private String[] enabledProtocols;
@@ -183,7 +183,7 @@ public class SSLServerSocketImpl extends SSLServerSocket
{
wantClientAuth = wantAuth;
}
-
+
@Override public SSLSocketImpl accept() throws IOException
{
SSLSocketImpl socketImpl = new SSLSocketImpl(contextImpl, null, -1);
diff --git a/gnu/javax/net/ssl/provider/SSLSocketFactoryImpl.java b/gnu/javax/net/ssl/provider/SSLSocketFactoryImpl.java
index 2915941db..d5dd54bce 100644
--- a/gnu/javax/net/ssl/provider/SSLSocketFactoryImpl.java
+++ b/gnu/javax/net/ssl/provider/SSLSocketFactoryImpl.java
@@ -1,4 +1,4 @@
-/* SSLSocketFactoryImpl.java --
+/* SSLSocketFactoryImpl.java --
Copyright (C) 2006, 2007 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -55,7 +55,7 @@ public class SSLSocketFactoryImpl extends SSLSocketFactory
* The SSLContextImpl that created us.
*/
private final SSLContextImpl contextImpl;
-
+
public SSLSocketFactoryImpl(SSLContextImpl contextImpl)
{
this.contextImpl = contextImpl;
diff --git a/gnu/javax/net/ssl/provider/SSLSocketImpl.java b/gnu/javax/net/ssl/provider/SSLSocketImpl.java
index eead7258b..9072c2886 100644
--- a/gnu/javax/net/ssl/provider/SSLSocketImpl.java
+++ b/gnu/javax/net/ssl/provider/SSLSocketImpl.java
@@ -73,7 +73,7 @@ public class SSLSocketImpl extends SSLSocket
{
private final ByteBuffer buffer;
private final OutputStream out;
-
+
SocketOutputStream() throws IOException
{
buffer = ByteBuffer.wrap(new byte[getSession().getPacketBufferSize()]);
@@ -112,12 +112,12 @@ public class SSLSocketImpl extends SSLSocket
}
}
}
-
+
@Override public void write(int b) throws IOException
{
write(new byte[] { (byte) b });
}
-
+
@Override public void close() throws IOException
{
SSLSocketImpl.this.close();
@@ -197,12 +197,12 @@ public class SSLSocketImpl extends SSLSocket
private IOException handshakeException;
private boolean initialHandshakeDone = false;
private final boolean autoClose;
-
+
public SSLSocketImpl(SSLContextImpl contextImpl, String host, int port)
{
this(contextImpl, host, port, new Socket(), true);
}
-
+
public SSLSocketImpl(SSLContextImpl contextImpl, String host, int port,
Socket underlyingSocket, boolean autoClose)
{
@@ -361,7 +361,7 @@ public class SSLSocketImpl extends SSLSocket
if (handshakeException != null)
throw handshakeException;
-
+
Thread t = new Thread(new Runnable()
{
public void run()
@@ -378,7 +378,7 @@ public class SSLSocketImpl extends SSLSocket
}, "HandshakeThread@" + System.identityHashCode(this));
t.start();
}
-
+
void doHandshake() throws IOException
{
synchronized (engine)
@@ -396,13 +396,13 @@ public class SSLSocketImpl extends SSLSocket
}
isHandshaking = true;
}
-
+
if (initialHandshakeDone)
throw new SSLException("rehandshaking not yet implemented");
long now = -System.currentTimeMillis();
engine.beginHandshake();
-
+
HandshakeStatus status = engine.getHandshakeStatus();
assert(status != HandshakeStatus.NOT_HANDSHAKING);
@@ -411,10 +411,10 @@ public class SSLSocketImpl extends SSLSocket
ByteBuffer outBuffer = ByteBuffer.wrap(new byte[getSession().getPacketBufferSize()]);
ByteBuffer emptyBuffer = ByteBuffer.allocate(0);
SSLEngineResult result = null;
-
+
DataInputStream sockIn = new DataInputStream(underlyingSocket.getInputStream());
OutputStream sockOut = underlyingSocket.getOutputStream();
-
+
try
{
while (status != HandshakeStatus.NOT_HANDSHAKING
@@ -477,7 +477,7 @@ public class SSLSocketImpl extends SSLSocket
throw new SSLException("unexpected SSL status "
+ result.getStatus());
outBuffer.flip();
- sockOut.write(outBuffer.array(), outBuffer.position(),
+ sockOut.write(outBuffer.array(), outBuffer.position(),
outBuffer.limit());
}
break;
@@ -536,14 +536,14 @@ public class SSLSocketImpl extends SSLSocket
}
}
}
-
+
// Methods overriding Socket.
@Override public void bind(SocketAddress bindpoint) throws IOException
{
underlyingSocket.bind(bindpoint);
}
-
+
@Override public void connect(SocketAddress endpoint) throws IOException
{
underlyingSocket.connect(endpoint);
@@ -559,12 +559,12 @@ public class SSLSocketImpl extends SSLSocket
{
return underlyingSocket.getInetAddress();
}
-
+
@Override public InetAddress getLocalAddress()
{
return underlyingSocket.getLocalAddress();
}
-
+
@Override public int getPort()
{
return underlyingSocket.getPort();
diff --git a/gnu/javax/net/ssl/provider/SSLv3HMacMD5Impl.java b/gnu/javax/net/ssl/provider/SSLv3HMacMD5Impl.java
index 763bbaf3b..5ef84ca1c 100644
--- a/gnu/javax/net/ssl/provider/SSLv3HMacMD5Impl.java
+++ b/gnu/javax/net/ssl/provider/SSLv3HMacMD5Impl.java
@@ -1,4 +1,4 @@
-/* SSLv3HMacMD5.java --
+/* SSLv3HMacMD5.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -59,7 +59,7 @@ public class SSLv3HMacMD5Impl extends MacSpi
{
adaptee = new SSLHMac("MD5");
}
-
+
/* (non-Javadoc)
* @see javax.crypto.MacSpi#engineDoFinal()
*/
diff --git a/gnu/javax/net/ssl/provider/SSLv3HMacSHAImpl.java b/gnu/javax/net/ssl/provider/SSLv3HMacSHAImpl.java
index 008a21c04..6b9c9e9cc 100644
--- a/gnu/javax/net/ssl/provider/SSLv3HMacSHAImpl.java
+++ b/gnu/javax/net/ssl/provider/SSLv3HMacSHAImpl.java
@@ -1,4 +1,4 @@
-/* SSLv3HMacSHA.java --
+/* SSLv3HMacSHA.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -59,7 +59,7 @@ public class SSLv3HMacSHAImpl extends MacSpi
{
adaptee = new SSLHMac("SHA-160");
}
-
+
/* (non-Javadoc)
* @see javax.crypto.MacSpi#engineDoFinal()
*/
diff --git a/gnu/javax/net/ssl/provider/ServerDHE_PSKParameters.java b/gnu/javax/net/ssl/provider/ServerDHE_PSKParameters.java
index 2d21d9d45..1de3f8124 100644
--- a/gnu/javax/net/ssl/provider/ServerDHE_PSKParameters.java
+++ b/gnu/javax/net/ssl/provider/ServerDHE_PSKParameters.java
@@ -1,4 +1,4 @@
-/* ServerDHE_PSKParameters.java --
+/* ServerDHE_PSKParameters.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -60,12 +60,12 @@ import java.nio.charset.Charset;
public class ServerDHE_PSKParameters implements Constructed, Builder, ServerKeyExchangeParams
{
private ByteBuffer buffer;
-
+
public ServerDHE_PSKParameters(ByteBuffer buffer)
{
this.buffer = buffer.duplicate().order(ByteOrder.BIG_ENDIAN);
}
-
+
public ServerDHE_PSKParameters(String identityHint, ServerDHParams dhParams)
{
this(identityHint, dhParams.buffer());
@@ -78,7 +78,7 @@ public class ServerDHE_PSKParameters implements Constructed, Builder, ServerKeyE
buffer = ByteBuffer.allocate(2 + hintBuf.remaining() + dhParams.remaining());
buffer.putShort((short) hintBuf.remaining());
buffer.put(hintBuf);
- buffer.put(dhParams);
+ buffer.put(dhParams);
}
public KeyExchangeAlgorithm algorithm()
@@ -93,19 +93,19 @@ public class ServerDHE_PSKParameters implements Constructed, Builder, ServerKeyE
{
return (buffer.getShort(0) & 0xFFFF) + 2 + params().length();
}
-
+
private int hintLength()
{
return (buffer.getShort(0) & 0xFFFF) + 2;
}
-
+
public String identityHint()
{
Charset utf8 = Charset.forName("UTF-8");
return utf8.decode((ByteBuffer) buffer.duplicate().position(2).limit
(hintLength())).toString();
}
-
+
public ServerDHParams params()
{
return new ServerDHParams(((ByteBuffer) buffer.duplicate().position
@@ -119,7 +119,7 @@ public class ServerDHE_PSKParameters implements Constructed, Builder, ServerKeyE
{
return (ByteBuffer) buffer.duplicate().rewind().limit(length());
}
-
+
public @Override String toString()
{
return toString(null);
diff --git a/gnu/javax/net/ssl/provider/ServerDHParams.java b/gnu/javax/net/ssl/provider/ServerDHParams.java
index 55d4a41da..0e2c34881 100644
--- a/gnu/javax/net/ssl/provider/ServerDHParams.java
+++ b/gnu/javax/net/ssl/provider/ServerDHParams.java
@@ -64,7 +64,7 @@ public class ServerDHParams implements Builder, ServerKeyExchangeParams
{
this.buffer = buffer.duplicate().order(ByteOrder.BIG_ENDIAN);
}
-
+
public ServerDHParams (final BigInteger p, final BigInteger g,
final BigInteger y)
{
@@ -72,7 +72,7 @@ public class ServerDHParams implements Builder, ServerKeyExchangeParams
byte[] g_bytes = g.toByteArray();
byte[] y_bytes = y.toByteArray();
int len = p_bytes.length + g_bytes.length + y_bytes.length + 6;
-
+
int p_off = 0;
if (p_bytes[0] == 0x00)
{
@@ -94,7 +94,7 @@ public class ServerDHParams implements Builder, ServerKeyExchangeParams
int p_len = p_bytes.length - p_off;
int g_len = g_bytes.length - g_off;
int y_len = y_bytes.length - y_off;
-
+
buffer = ByteBuffer.allocate(len);
buffer.putShort((short) p_len);
buffer.put(p_bytes, p_off, p_len);
@@ -121,7 +121,7 @@ public class ServerDHParams implements Builder, ServerKeyExchangeParams
{
return (ByteBuffer) buffer.duplicate().position(0).limit(length());
}
-
+
/**
* Returns the server's prime modulus.
*
diff --git a/gnu/javax/net/ssl/provider/ServerHandshake.java b/gnu/javax/net/ssl/provider/ServerHandshake.java
index e30f04241..d69fa120d 100644
--- a/gnu/javax/net/ssl/provider/ServerHandshake.java
+++ b/gnu/javax/net/ssl/provider/ServerHandshake.java
@@ -90,7 +90,7 @@ import javax.net.ssl.SSLEngineResult.HandshakeStatus;
import javax.security.auth.x500.X500Principal;
class ServerHandshake extends AbstractHandshake
-{
+{
/**
* Handshake state enumeration.
*/
@@ -109,21 +109,21 @@ class ServerHandshake extends AbstractHandshake
READ_CERTIFICATE_VERIFY (false, true),
READ_FINISHED (false, true),
DONE (false, false);
-
+
private final boolean isWriteState;
private final boolean isReadState;
-
+
private State(final boolean isWriteState, final boolean isReadState)
{
this.isWriteState = isWriteState;
this.isReadState = isReadState;
}
-
+
boolean isReadState()
{
return isReadState;
}
-
+
boolean isWriteState()
{
return isWriteState;
@@ -143,7 +143,7 @@ class ServerHandshake extends AbstractHandshake
private boolean helloV2 = false;
private KeyPair dhPair;
private PrivateKey serverKey;
-
+
// Delegated tasks we use.
private GenDH genDH;
private CertVerifier certVerifier;
@@ -224,11 +224,11 @@ class ServerHandshake extends AbstractHandshake
kexes.add(DHE_PSK);
kexes.add(PSK);
}
-
+
if (Debug.DEBUG)
logger.logv(Component.SSL_HANDSHAKE,
"we have certs for key exchange algorithms {0}", kexes);
-
+
HashSet<CipherSuite> suites = new HashSet<CipherSuite>();
for (String s : enabledSuites)
{
@@ -247,7 +247,7 @@ class ServerHandshake extends AbstractHandshake
if (suites.contains(resolved))
return resolved;
}
-
+
// We didn't find a match?
throw new AlertException(new Alert(Alert.Level.FATAL,
Alert.Description.INSUFFICIENT_SECURITY));
@@ -283,7 +283,7 @@ class ServerHandshake extends AbstractHandshake
throw new SSLException ("no supported compression method");
}
-
+
protected @Override boolean doHash()
{
boolean b = helloV2;
@@ -308,7 +308,7 @@ class ServerHandshake extends AbstractHandshake
Handshake handshake = new Handshake(buffer.slice(),
engine.session().suite,
engine.session().version);
-
+
if (Debug.DEBUG)
logger.logv(Component.SSL_HANDSHAKE, "processing in state {0}:\n{1}",
state, handshake);
@@ -328,7 +328,7 @@ class ServerHandshake extends AbstractHandshake
if (handshake.type () != CLIENT_HELLO)
throw new AlertException(new Alert(Alert.Level.FATAL,
Alert.Description.UNEXPECTED_MESSAGE));
-
+
{
ClientHello hello = (ClientHello) handshake.body ();
engine.session().version
@@ -366,7 +366,7 @@ class ServerHandshake extends AbstractHandshake
engine.session().maxLength = len;
engine.session().setApplicationBufferSize(len.maxLength());
break;
-
+
case SERVER_NAME:
requestedNames = (ServerNameList) e.value();
List<String> names
@@ -426,7 +426,7 @@ class ServerHandshake extends AbstractHandshake
state = READ_CLIENT_KEY_EXCHANGE;
return HandshakeStatus.NEED_UNWRAP;
}
-
+
Certificate cert = (Certificate) handshake.body();
try
{
@@ -472,7 +472,7 @@ class ServerHandshake extends AbstractHandshake
if (handshake.type() != CLIENT_KEY_EXCHANGE)
throw new SSLException("expecting client key exchange");
ClientKeyExchange kex = (ClientKeyExchange) handshake.body();
-
+
KeyExchangeAlgorithm alg = engine.session().suite.keyExchangeAlgorithm();
switch (alg)
{
@@ -500,7 +500,7 @@ class ServerHandshake extends AbstractHandshake
tasks.add(keyExchangeTask);
}
break;
-
+
case PSK:
{
ClientPSKParameters params = (ClientPSKParameters)
@@ -508,7 +508,7 @@ class ServerHandshake extends AbstractHandshake
generatePSKSecret(params.identity(), null, false);
}
break;
-
+
case DHE_PSK:
{
ClientDHE_PSKParameters params = (ClientDHE_PSKParameters)
@@ -530,7 +530,7 @@ class ServerHandshake extends AbstractHandshake
tasks.add(keyExchangeTask);
}
break;
-
+
case RSA_PSK:
{
ClientRSA_PSKParameters params = (ClientRSA_PSKParameters)
@@ -554,7 +554,7 @@ class ServerHandshake extends AbstractHandshake
tasks.add(keyExchangeTask);
}
break;
-
+
case NONE:
{
Inflater inflater = null;
@@ -575,7 +575,7 @@ class ServerHandshake extends AbstractHandshake
break;
}
// XXX SRP
-
+
if (clientCert != null)
state = READ_CERTIFICATE_VERIFY;
else
@@ -595,7 +595,7 @@ class ServerHandshake extends AbstractHandshake
{
if (handshake.type() != CERTIFICATE_VERIFY)
throw new SSLException("expecting certificate verify message");
-
+
CertificateVerify verify = (CertificateVerify) handshake.body();
try
{
@@ -617,7 +617,7 @@ class ServerHandshake extends AbstractHandshake
state = READ_FINISHED;
}
break;
-
+
// Finished.
//
// This message is sent immediately following the change cipher
@@ -637,7 +637,7 @@ class ServerHandshake extends AbstractHandshake
Description.UNEXPECTED_MESSAGE));
Finished clientFinished = (Finished) handshake.body();
-
+
MessageDigest md5copy = null;
MessageDigest shacopy = null;
try
@@ -659,7 +659,7 @@ class ServerHandshake extends AbstractHandshake
if (Debug.DEBUG)
logger.log(Component.SSL_HANDSHAKE, "server finished: {0}",
serverFinished);
-
+
if (engine.session().version == ProtocolVersion.SSL_3)
{
if (!Arrays.equals(clientFinished.md5Hash(),
@@ -680,7 +680,7 @@ class ServerHandshake extends AbstractHandshake
throw new SSLException("session verify failed");
}
}
-
+
if (continuedSession)
state = DONE;
else
@@ -711,7 +711,7 @@ class ServerHandshake extends AbstractHandshake
logger.logv(Component.SSL_HANDSHAKE,
"handle output state: {0}; output fragment: {1}",
state, fragment);
-
+
// Drain the output buffer, if it needs it.
if (outBuffer != null && outBuffer.hasRemaining())
{
@@ -719,7 +719,7 @@ class ServerHandshake extends AbstractHandshake
fragment.put((ByteBuffer) outBuffer.duplicate().limit(outBuffer.position() + l));
outBuffer.position(outBuffer.position() + l);
}
-
+
if (!fragment.hasRemaining())
{
if (state.isWriteState() || outBuffer.hasRemaining())
@@ -727,7 +727,7 @@ class ServerHandshake extends AbstractHandshake
else
return HandshakeStatus.NEED_UNWRAP;
}
-
+
// XXX what we need to do here is generate a "stream" of handshake
// messages, and insert them into fragment amounts that we have available.
// A handshake message can span multiple records, and we can put
@@ -808,7 +808,7 @@ output_loop:
state = READ_CLIENT_HELLO;
}
break output_loop; // XXX temporary
-
+
// Server Hello.
//
// This message is sent immediately following the client hello.
@@ -834,7 +834,7 @@ output_loop:
}
else // Don't send any extensions.
hello.setDisableExtensions(true);
-
+
if (Debug.DEBUG)
logger.log(Component.SSL_HANDSHAKE, "{0}", hello);
@@ -921,7 +921,7 @@ output_loop:
logger.logv(Component.SSL_HANDSHAKE, "my cert:\n{0}", localCert);
logger.logv(Component.SSL_HANDSHAKE, "{0}", cert);
}
-
+
int typeLen = ((CERTIFICATE.getValue() << 24)
| (cert.length() & 0xFFFFFF));
fragment.putInt(typeLen);
@@ -961,7 +961,7 @@ output_loop:
case WRITE_SERVER_KEY_EXCHANGE:
{
KeyExchangeAlgorithm kex = engine.session().suite.keyExchangeAlgorithm();
-
+
ByteBuffer paramBuffer = null;
ByteBuffer sigBuffer = null;
if (kex == DHE_DSS || kex == DHE_RSA || kex == DH_anon
@@ -978,7 +978,7 @@ output_loop:
engine.session().random());
paramBuffer = genDH.paramsBuffer;
sigBuffer = genDH.sigBuffer;
-
+
if (kex == DHE_PSK)
{
String identityHint
@@ -1009,7 +1009,7 @@ output_loop:
}
}
// XXX handle SRP
-
+
if (paramBuffer != null)
{
ServerKeyExchangeBuilder ske
@@ -1017,10 +1017,10 @@ output_loop:
ske.setParams(paramBuffer);
if (sigBuffer != null)
ske.setSignature(sigBuffer);
-
+
if (Debug.DEBUG)
logger.log(Component.SSL_HANDSHAKE, "{0}", ske);
-
+
outBuffer = ske.buffer();
int l = Math.min(fragment.remaining(), outBuffer.remaining());
fragment.putInt((SERVER_KEY_EXCHANGE.getValue() << 24)
@@ -1029,7 +1029,7 @@ output_loop:
(outBuffer.position() + l));
outBuffer.position(outBuffer.position() + l);
}
-
+
if (engine.getWantClientAuth() || engine.getNeedClientAuth())
state = WRITE_CERTIFICATE_REQUEST;
else
@@ -1048,7 +1048,7 @@ output_loop:
case WRITE_CERTIFICATE_REQUEST:
{
CertificateRequestBuilder req = new CertificateRequestBuilder();
-
+
List<ClientCertificateType> types
= new ArrayList<ClientCertificateType>(4);
types.add(ClientCertificateType.RSA_SIGN);
@@ -1056,7 +1056,7 @@ output_loop:
types.add(ClientCertificateType.DSS_SIGN);
types.add(ClientCertificateType.DSS_FIXED_DH);
req.setTypes(types);
-
+
X509Certificate[] anchors
= engine.contextImpl.trustManager.getAcceptedIssuers();
List<X500Principal> issuers
@@ -1064,18 +1064,18 @@ output_loop:
for (X509Certificate cert : anchors)
issuers.add(cert.getIssuerX500Principal());
req.setAuthorities(issuers);
-
+
if (Debug.DEBUG)
logger.log(Component.SSL_HANDSHAKE, "{0}", req);
-
+
fragment.putInt((CERTIFICATE_REQUEST.getValue() << 24)
| (req.length() & 0xFFFFFF));
-
+
outBuffer = req.buffer();
int l = Math.min(outBuffer.remaining(), fragment.remaining());
fragment.put((ByteBuffer) outBuffer.duplicate().limit(outBuffer.position() + l));
outBuffer.position(outBuffer.position() + l);
-
+
state = WRITE_SERVER_HELLO_DONE;
}
break;
@@ -1097,7 +1097,7 @@ output_loop:
state = READ_CERTIFICATE;
}
break output_loop; // XXX temporary
-
+
// Finished.
//
// This is always sent by the server to verify the keys that the
@@ -1129,10 +1129,10 @@ output_loop:
outBuffer
= generateFinished(md5copy, shacopy, false,
engine.session());
-
+
fragment.putInt((FINISHED.getValue() << 24)
| outBuffer.remaining() & 0xFFFFFF);
-
+
int l = Math.min(outBuffer.remaining(), fragment.remaining());
fragment.put((ByteBuffer) outBuffer.duplicate().limit(outBuffer.position() + l));
outBuffer.position(outBuffer.position() + l);
@@ -1151,10 +1151,10 @@ output_loop:
return HandshakeStatus.NEED_WRAP;
if (state.isReadState())
return HandshakeStatus.NEED_UNWRAP;
-
+
return HandshakeStatus.FINISHED;
}
-
+
@Override HandshakeStatus status()
{
if (!tasks.isEmpty())
@@ -1163,7 +1163,7 @@ output_loop:
return HandshakeStatus.NEED_UNWRAP;
if (state.isWriteState())
return HandshakeStatus.NEED_WRAP;
-
+
return HandshakeStatus.FINISHED;
}
@@ -1185,7 +1185,7 @@ output_loop:
Alert.Description.HANDSHAKE_FAILURE),
keyExchangeTask.thrown());
}
-
+
@Override void handleV2Hello(ByteBuffer hello)
{
int len = hello.getShort(0) & 0x7FFF;
@@ -1211,7 +1211,7 @@ output_loop:
Signature signature = new Signature(sigVal, engine.session().suite.signatureAlgorithm());
return signature.buffer();
}
-
+
private void verifyClient(byte[] sigValue) throws SSLException, SignatureException
{
MessageDigest md5copy = null;
@@ -1236,7 +1236,7 @@ output_loop:
else
toSign = shacopy.digest();
}
-
+
try
{
java.security.Signature sig = java.security.Signature.getInstance(engine.session().suite.signatureAlgorithm().toString());
@@ -1253,7 +1253,7 @@ output_loop:
throw new SSLException(nsae);
}
}
-
+
// Delegated tasks.
class CertLoader extends DelegatedTask
@@ -1261,7 +1261,7 @@ output_loop:
CertLoader()
{
}
-
+
public void implRun() throws SSLException
{
KeyExchangeAlgorithm kexalg = engine.session().suite.keyExchangeAlgorithm();
@@ -1279,7 +1279,7 @@ output_loop:
km.getPrivateKey(keyAlias));
}
}
-
+
/**
* Delegated task for generating Diffie-Hellman parameters.
*/
@@ -1297,13 +1297,13 @@ output_loop:
dhGen.initialize(dhparams, engine.session().random());
dhPair = dhGen.generateKeyPair();
DHPublicKey pub = (DHPublicKey) dhPair.getPublic();
-
+
// Generate the parameters message.
ServerDHParams params = new ServerDHParams(pub.getParams().getP(),
pub.getParams().getG(),
pub.getY());
paramsBuffer = params.buffer();
-
+
// Sign the parameters, if needed.
if (engine.session().suite.signatureAlgorithm() != SignatureAlgorithm.ANONYMOUS)
{
@@ -1316,7 +1316,7 @@ output_loop:
dhPair.getPublic(), dhPair.getPrivate());
}
}
-
+
class RSAKeyExchange extends DelegatedTask
{
private final byte[] encryptedPreMasterSecret;
@@ -1325,7 +1325,7 @@ output_loop:
{
this.encryptedPreMasterSecret = encryptedPreMasterSecret;
}
-
+
public void implRun()
throws BadPaddingException, IllegalBlockSizeException, InvalidKeyException,
NoSuchAlgorithmException, NoSuchPaddingException, SSLException
@@ -1339,18 +1339,18 @@ output_loop:
setupSecurityParameters(keys, false, engine, compression);
}
}
-
+
class RSA_PSKExchange extends DelegatedTask
{
private final byte[] encryptedPreMasterSecret;
private final SecretKey psKey;
-
+
RSA_PSKExchange(byte[] encryptedPreMasterSecret, SecretKey psKey)
{
this.encryptedPreMasterSecret = encryptedPreMasterSecret;
this.psKey = psKey;
}
-
+
public @Override void implRun()
throws BadPaddingException, IllegalBlockSizeException, InvalidKeyException,
NoSuchAlgorithmException, NoSuchPaddingException, SSLException
@@ -1368,7 +1368,7 @@ output_loop:
preMasterSecret[rsaSecret.length + 3] = (byte) psSecret.length;
System.arraycopy(psSecret, 0, preMasterSecret, rsaSecret.length+4,
psSecret.length);
-
+
generateMasterSecret(clientRandom, serverRandom, engine.session());
byte[][] keys = generateKeys(clientRandom, serverRandom, engine.session());
setupSecurityParameters(keys, false, engine, compression);
diff --git a/gnu/javax/net/ssl/provider/ServerHello.java b/gnu/javax/net/ssl/provider/ServerHello.java
index 2bbce37fb..944194b3e 100644
--- a/gnu/javax/net/ssl/provider/ServerHello.java
+++ b/gnu/javax/net/ssl/provider/ServerHello.java
@@ -74,7 +74,7 @@ public class ServerHello implements Handshake.Body
protected ByteBuffer buffer;
protected boolean disableExtensions;
-
+
// Constructor.
// -------------------------------------------------------------------------
@@ -170,7 +170,7 @@ public class ServerHello implements Handshake.Body
return 0;
return buffer.getShort(offset) & 0xFFFF;
}
-
+
public ExtensionList extensions ()
{
int offset = SESSID_OFFSET2 + (buffer.get (SESSID_OFFSET) & 0xFF) + 3;
diff --git a/gnu/javax/net/ssl/provider/ServerHelloBuilder.java b/gnu/javax/net/ssl/provider/ServerHelloBuilder.java
index 09ad1d9e8..47bce29ee 100644
--- a/gnu/javax/net/ssl/provider/ServerHelloBuilder.java
+++ b/gnu/javax/net/ssl/provider/ServerHelloBuilder.java
@@ -1,4 +1,4 @@
-/* ServerHelloBuilder.java --
+/* ServerHelloBuilder.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -57,11 +57,11 @@ public class ServerHelloBuilder extends ServerHello implements Builder
{
return ((ByteBuffer) buffer.duplicate().position(0).limit(length())).slice();
}
-
+
// We don't reallocate the buffer in any of the following methods,
// because we always allocate a large enough buffer for the base
// object in the constructor.
-
+
public void setVersion (final ProtocolVersion version)
{
buffer.putShort (0, (short) version.rawValue ());
@@ -95,12 +95,12 @@ public class ServerHelloBuilder extends ServerHello implements Builder
}
// For extensions, we do reallocate the buffer.
-
+
public void setDisableExtensions(boolean disable)
{
disableExtensions = disable;
}
-
+
public void setExtensionsLength (final int length)
{
if (length < 0 || length > 16384)
@@ -111,7 +111,7 @@ public class ServerHelloBuilder extends ServerHello implements Builder
buffer.putShort (SESSID_OFFSET2 + (buffer.get (SESSID_OFFSET) & 0xFF) + 3,
(short) length);
}
-
+
public void setExtensions(ByteBuffer extensions)
{
extensions = (ByteBuffer)
@@ -120,7 +120,7 @@ public class ServerHelloBuilder extends ServerHello implements Builder
+ (buffer.get(SESSID_OFFSET) & 0xFF)
)).put(extensions);
}
-
+
public void ensureCapacity(int newCapacity)
{
ByteBuffer newBuffer = ByteBuffer.allocate(newCapacity);
diff --git a/gnu/javax/net/ssl/provider/ServerHelloDone.java b/gnu/javax/net/ssl/provider/ServerHelloDone.java
index e09772250..987b51c56 100644
--- a/gnu/javax/net/ssl/provider/ServerHelloDone.java
+++ b/gnu/javax/net/ssl/provider/ServerHelloDone.java
@@ -63,4 +63,4 @@ public class ServerHelloDone implements Handshake.Body
return ((prefix != null ? prefix : "")
+ "struct { } ServerHelloDone;");
}
-} \ No newline at end of file
+}
diff --git a/gnu/javax/net/ssl/provider/ServerKeyExchangeBuilder.java b/gnu/javax/net/ssl/provider/ServerKeyExchangeBuilder.java
index d4b6fa397..658ae228a 100644
--- a/gnu/javax/net/ssl/provider/ServerKeyExchangeBuilder.java
+++ b/gnu/javax/net/ssl/provider/ServerKeyExchangeBuilder.java
@@ -1,4 +1,4 @@
-/* ServerKeyExchangeBuilder.java --
+/* ServerKeyExchangeBuilder.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -42,7 +42,7 @@ import java.nio.ByteBuffer;
/**
* Builder for {@link ServerKeyExchange} objects.
- *
+ *
* @author Casey Marshall (csm@gnu.org)
*/
public class ServerKeyExchangeBuilder extends ServerKeyExchange
@@ -68,7 +68,7 @@ public class ServerKeyExchangeBuilder extends ServerKeyExchange
ensureCapacity(params.remaining());
buffer.duplicate().put(params);
}
-
+
public void setSignature(ByteBuffer signature)
{
if (suite.keyExchangeAlgorithm() == KeyExchangeAlgorithm.NONE)
@@ -77,7 +77,7 @@ public class ServerKeyExchangeBuilder extends ServerKeyExchange
ensureCapacity(paramsLen + signature.remaining());
((ByteBuffer) buffer.duplicate().position(paramsLen)).put(signature);
}
-
+
public void ensureCapacity(int capacity)
{
if (buffer.capacity() >= capacity)
diff --git a/gnu/javax/net/ssl/provider/ServerNameList.java b/gnu/javax/net/ssl/provider/ServerNameList.java
index 5a268f542..38f092476 100644
--- a/gnu/javax/net/ssl/provider/ServerNameList.java
+++ b/gnu/javax/net/ssl/provider/ServerNameList.java
@@ -54,7 +54,7 @@ import java.util.NoSuchElementException;
/**
* The ServerName extension.
- *
+ *
* <pre>
struct {
NameType name_type;
@@ -82,12 +82,12 @@ struct {
public class ServerNameList extends Value implements Iterable<ServerNameList.ServerName>
{
private ByteBuffer buffer;
-
+
public ServerNameList (final ByteBuffer buffer)
{
this.buffer = buffer.duplicate().order(ByteOrder.BIG_ENDIAN);
}
-
+
public ServerNameList(List<ServerName> names)
{
int length = 2;
@@ -104,12 +104,12 @@ public class ServerNameList extends Value implements Iterable<ServerNameList.Ser
{
return (buffer.getShort(0) & 0xFFFF) + 2;
}
-
+
public ByteBuffer buffer()
{
return (ByteBuffer) buffer.duplicate().limit(length());
}
-
+
public int size()
{
int n = 0;
@@ -122,7 +122,7 @@ public class ServerNameList extends Value implements Iterable<ServerNameList.Ser
}
return n;
}
-
+
public ServerName get (int index)
{
final int len = length();
@@ -142,14 +142,14 @@ public class ServerNameList extends Value implements Iterable<ServerNameList.Ser
ByteBuffer buf = ((ByteBuffer) buffer.duplicate().position(i).limit(i+l+3)).slice();
return new ServerName (buf);
}
-
+
public void setLength(final int newLength)
{
if (newLength < 0 || newLength > 65535)
throw new IllegalArgumentException("length must be between 0 and 65535");
buffer.putShort(0, (short) newLength);
}
-
+
public String toString()
{
return toString(null);
@@ -172,7 +172,7 @@ public class ServerNameList extends Value implements Iterable<ServerNameList.Ser
out.print ("};");
return str.toString();
}
-
+
public java.util.Iterator<ServerName> iterator()
{
return new Iterator();
@@ -181,17 +181,17 @@ public class ServerNameList extends Value implements Iterable<ServerNameList.Ser
public class Iterator implements java.util.Iterator<ServerName>
{
private int index;
-
+
public Iterator()
{
index = 0;
}
-
+
public boolean hasNext()
{
return index < size();
}
-
+
public ServerName next() throws NoSuchElementException
{
try
@@ -203,7 +203,7 @@ public class ServerNameList extends Value implements Iterable<ServerNameList.Ser
throw new NoSuchElementException();
}
}
-
+
public void remove()
{
throw new UnsupportedOperationException();
@@ -213,12 +213,12 @@ public class ServerNameList extends Value implements Iterable<ServerNameList.Ser
public static class ServerName implements Constructed
{
private ByteBuffer buffer;
-
+
public ServerName(final ByteBuffer buffer)
{
this.buffer = buffer.duplicate().order(ByteOrder.BIG_ENDIAN);
}
-
+
public ServerName(NameType type, String name)
{
CharsetEncoder utf8 = Charset.forName("UTF-8").newEncoder();
@@ -239,12 +239,12 @@ public class ServerNameList extends Value implements Iterable<ServerNameList.Ser
buffer.put(nameBuf);
buffer.rewind();
}
-
+
public int length()
{
return (buffer.getShort(1) & 0xFFFF) + 3;
}
-
+
public ByteBuffer buffer()
{
return (ByteBuffer) buffer.duplicate().limit(length());
@@ -259,19 +259,19 @@ public class ServerNameList extends Value implements Iterable<ServerNameList.Ser
}
throw new IllegalArgumentException ("illegal name type: " + v);
}
-
+
public String name()
{
int len = length();
Charset cs = Charset.forName ("UTF-8");
return cs.decode(((ByteBuffer) buffer.duplicate().position(3).limit(len))).toString();
}
-
+
public String toString()
{
return toString (null);
}
-
+
public String toString(String prefix)
{
StringWriter str = new StringWriter();
@@ -295,14 +295,14 @@ public class ServerNameList extends Value implements Iterable<ServerNameList.Ser
public static enum NameType
{
HOST_NAME (0);
-
+
private final int value;
-
+
private NameType (int value)
{
this.value = value;
}
-
+
public int getValue()
{
return value;
diff --git a/gnu/javax/net/ssl/provider/ServerPSKParameters.java b/gnu/javax/net/ssl/provider/ServerPSKParameters.java
index 8acce6dde..9ecedb513 100644
--- a/gnu/javax/net/ssl/provider/ServerPSKParameters.java
+++ b/gnu/javax/net/ssl/provider/ServerPSKParameters.java
@@ -1,4 +1,4 @@
-/* ServerPSKParameters.java --
+/* ServerPSKParameters.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -59,12 +59,12 @@ import java.nio.charset.Charset;
public class ServerPSKParameters implements Builder, Constructed, ServerKeyExchangeParams
{
private ByteBuffer buffer;
-
+
public ServerPSKParameters(ByteBuffer buffer)
{
this.buffer = buffer.duplicate().order(ByteOrder.BIG_ENDIAN);
}
-
+
public ServerPSKParameters(String identityHint)
{
Charset utf8 = Charset.forName("UTF-8");
@@ -74,7 +74,7 @@ public class ServerPSKParameters implements Builder, Constructed, ServerKeyExcha
buffer.put(identityHintBuffer);
buffer.rewind();
}
-
+
public KeyExchangeAlgorithm algorithm()
{
return KeyExchangeAlgorithm.PSK;
@@ -95,7 +95,7 @@ public class ServerPSKParameters implements Builder, Constructed, ServerKeyExcha
{
return (buffer.getShort(0) & 0xFFFF) + 2;
}
-
+
public String identityHint()
{
Charset utf8 = Charset.forName("UTF-8");
diff --git a/gnu/javax/net/ssl/provider/ServerRSA_PSKParameters.java b/gnu/javax/net/ssl/provider/ServerRSA_PSKParameters.java
index 0d7b590d2..0895afe96 100644
--- a/gnu/javax/net/ssl/provider/ServerRSA_PSKParameters.java
+++ b/gnu/javax/net/ssl/provider/ServerRSA_PSKParameters.java
@@ -1,4 +1,4 @@
-/* ServerRSA_PSKParameters.java --
+/* ServerRSA_PSKParameters.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/net/ssl/provider/SessionImpl.java b/gnu/javax/net/ssl/provider/SessionImpl.java
index 6a4020117..6eb070efc 100644
--- a/gnu/javax/net/ssl/provider/SessionImpl.java
+++ b/gnu/javax/net/ssl/provider/SessionImpl.java
@@ -60,25 +60,25 @@ public class SessionImpl extends Session
byte[] privateDataSalt;
SealedObject sealedPrivateData;
MaxFragmentLength maxLength;
-
+
transient PrivateData privateData;
-
+
public SessionImpl()
{
super();
privateData = new PrivateData();
}
-
+
SecureRandom random ()
{
return random;
}
-
+
public String getProtocol()
{
return version.toString();
}
-
+
public void prepare(char[] passwd) throws SSLException
{
try
@@ -111,7 +111,7 @@ public class SessionImpl extends Session
throw new SSLException(nspe);
}
}
-
+
public void repair(char[] passwd) throws SSLException
{
try
@@ -136,14 +136,14 @@ public class SessionImpl extends Session
throw new SSLException(nsae);
}
}
-
+
public SealedObject privateData() throws SSLException
{
if (privateData == null)
throw new SSLException("this session has not been prepared");
return sealedPrivateData;
}
-
+
public void setPrivateData(SealedObject so) throws SSLException
{
this.sealedPrivateData = so;
@@ -153,37 +153,37 @@ public class SessionImpl extends Session
{
applicationBufferSize = size;
}
-
+
void setRandom(SecureRandom random)
{
this.random = random;
}
-
+
void setTruncatedMac(boolean truncatedMac)
{
this.truncatedMac = truncatedMac;
}
-
+
void setId(Session.ID id)
{
this.sessionId = id;
}
-
+
void setLocalCertificates(java.security.cert.Certificate[] chain)
{
this.localCerts = chain;
}
-
+
void setPeerCertificates(java.security.cert.Certificate[] chain)
{
this.peerCerts = chain;
}
-
+
void setPeerVerified(boolean peerVerified)
{
this.peerVerified = peerVerified;
}
-
+
static class PrivateData implements Serializable
{
static final long serialVersionUID = -8040597659545984581L;
diff --git a/gnu/javax/net/ssl/provider/Signature.java b/gnu/javax/net/ssl/provider/Signature.java
index d95e18137..160dd805f 100644
--- a/gnu/javax/net/ssl/provider/Signature.java
+++ b/gnu/javax/net/ssl/provider/Signature.java
@@ -81,7 +81,7 @@ public class Signature implements Builder, Constructed
this.buffer = buffer;
this.alg = alg;
}
-
+
public Signature (final byte[] sigValue, final SignatureAlgorithm alg)
{
buffer = ByteBuffer.allocate(sigValue.length + 2);
@@ -100,7 +100,7 @@ public class Signature implements Builder, Constructed
return 0;
return (buffer.getShort (0) & 0xFFFF) + 2;
}
-
+
public ByteBuffer buffer()
{
return (ByteBuffer) buffer.duplicate().limit(length());
diff --git a/gnu/javax/net/ssl/provider/SignatureAlgorithm.java b/gnu/javax/net/ssl/provider/SignatureAlgorithm.java
index a789576db..79cff5626 100644
--- a/gnu/javax/net/ssl/provider/SignatureAlgorithm.java
+++ b/gnu/javax/net/ssl/provider/SignatureAlgorithm.java
@@ -41,12 +41,12 @@ package gnu.javax.net.ssl.provider;
public enum SignatureAlgorithm
{
ANONYMOUS, RSA, DSA;
-
+
/**
* Returns the algorithm name for this signature algorithm, which can
* be used with the JCA API to get a {@link java.security.Signature} for
* that algorithm.
- *
+ *
* @return The algorithm name.
*/
public String algorithm()
diff --git a/gnu/javax/net/ssl/provider/SimpleSessionContext.java b/gnu/javax/net/ssl/provider/SimpleSessionContext.java
index 20503d3ca..8d5745061 100644
--- a/gnu/javax/net/ssl/provider/SimpleSessionContext.java
+++ b/gnu/javax/net/ssl/provider/SimpleSessionContext.java
@@ -48,7 +48,7 @@ import java.util.Map;
/**
* A simple, non-persistent SessionContext.
- *
+ *
* @author csm
*/
public final class SimpleSessionContext
@@ -58,17 +58,17 @@ public final class SimpleSessionContext
* By default, sessions last for 5 minutes.
*/
public static final int DEFAULT_TIMEOUT = 300;
-
+
private final HashMap<Session.ID, Session> store;
private int storeLimit;
-
+
public SimpleSessionContext()
{
super(DEFAULT_TIMEOUT);
storeLimit = 0;
store = new HashMap<Session.ID, Session>();
}
-
+
@Override
protected Session implGet(byte[] sessionId)
{
@@ -116,12 +116,12 @@ public final class SimpleSessionContext
return new Enumeration()
{
Iterator<Session.ID> it = store.keySet().iterator();
-
+
public boolean hasMoreElements()
{
return it.hasNext();
}
-
+
public Object nextElement()
{
return it.next().id();
diff --git a/gnu/javax/net/ssl/provider/TruncatedHMAC.java b/gnu/javax/net/ssl/provider/TruncatedHMAC.java
index 0595f87a7..97fff98dc 100644
--- a/gnu/javax/net/ssl/provider/TruncatedHMAC.java
+++ b/gnu/javax/net/ssl/provider/TruncatedHMAC.java
@@ -45,7 +45,7 @@ import java.nio.ByteBuffer;
/**
* The value type for the {@link Extension.Type#TRUNCATED_HMAC} extension.
* This extension has an empty value; this class is thusly empty.
- *
+ *
* @author csm
*/
public class TruncatedHMAC extends Value
@@ -55,12 +55,12 @@ public class TruncatedHMAC extends Value
{
return 0;
}
-
+
public ByteBuffer buffer()
{
return ByteBuffer.wrap(new byte[0]);
}
-
+
public String toString()
{
return toString(null);
diff --git a/gnu/javax/net/ssl/provider/TrustedAuthorities.java b/gnu/javax/net/ssl/provider/TrustedAuthorities.java
index 85e359675..72d072739 100644
--- a/gnu/javax/net/ssl/provider/TrustedAuthorities.java
+++ b/gnu/javax/net/ssl/provider/TrustedAuthorities.java
@@ -51,7 +51,7 @@ import javax.security.auth.x500.X500Principal;
/**
* The trusted authorities hello extension.
- *
+ *
* <pre>
struct {
TrustedAuthority trusted_authorities_list&lt;0..2^16-1&gt;;
@@ -73,7 +73,7 @@ enum {
} IdentifierType;
opaque DistinguishedName&lt;1..2^16-1&gt;;</pre>
- *
+ *
* @author csm
*/
public class TrustedAuthorities extends Value
@@ -85,19 +85,19 @@ public class TrustedAuthorities extends Value
{
this.buffer = buffer.duplicate().order(ByteOrder.BIG_ENDIAN);
}
-
+
// XXX really implement Builder.
-
+
public int length()
{
return 2 + (buffer.getShort(0) & 0xFFFF);
}
-
+
public ByteBuffer buffer()
{
return (ByteBuffer) buffer.duplicate().limit(length());
}
-
+
public int size()
{
int len = buffer.getShort(0) & 0xFFFF;
@@ -128,12 +128,12 @@ public class TrustedAuthorities extends Value
}
throw new IndexOutOfBoundsException();
}
-
+
public String toString()
{
return toString(null);
}
-
+
public String toString(String prefix)
{
StringWriter str = new StringWriter();
@@ -149,21 +149,21 @@ public class TrustedAuthorities extends Value
out.print("} TrustedAuthorities;");
return str.toString();
}
-
+
public Iterator<TrustedAuthority> iterator()
{
return new AuthoritiesIterator();
}
-
+
public class AuthoritiesIterator implements Iterator<TrustedAuthority>
{
private int index;
-
+
public AuthoritiesIterator()
{
index = 0;
}
-
+
public TrustedAuthority next() throws NoSuchElementException
{
try
@@ -175,12 +175,12 @@ public class TrustedAuthorities extends Value
throw new NoSuchElementException();
}
}
-
+
public boolean hasNext()
{
return index < size();
}
-
+
public void remove()
{
throw new UnsupportedOperationException();
@@ -190,12 +190,12 @@ public class TrustedAuthorities extends Value
public static class TrustedAuthority implements Constructed
{
private final ByteBuffer buffer;
-
+
public TrustedAuthority(final ByteBuffer buffer)
{
this.buffer = buffer;
}
-
+
public int length()
{
switch (type().getValue())
@@ -207,7 +207,7 @@ public class TrustedAuthorities extends Value
}
throw new IllegalArgumentException("unknown authority type");
}
-
+
public byte[] sha1Hash()
{
IdentifierType t = type();
@@ -218,7 +218,7 @@ public class TrustedAuthorities extends Value
((ByteBuffer) buffer.duplicate().position(1)).get(b);
return b;
}
-
+
public X500Principal name()
{
int len = buffer.getShort(1) & 0xFFFF;
@@ -226,7 +226,7 @@ public class TrustedAuthorities extends Value
((ByteBuffer) buffer.duplicate().position(3)).get(b);
return new X500Principal(b);
}
-
+
public IdentifierType type()
{
switch (buffer.get(0))
@@ -236,15 +236,15 @@ public class TrustedAuthorities extends Value
case 2: return IdentifierType.X509_NAME;
case 3: return IdentifierType.CERT_SHA1_HASH;
}
-
+
throw new IllegalArgumentException("invalid IdentifierType");
}
-
+
public String toString()
{
return toString(null);
}
-
+
public String toString(String prefix)
{
StringWriter str = new StringWriter();
@@ -265,7 +265,7 @@ public class TrustedAuthorities extends Value
out.print(Util.toHexString(sha1Hash(), ':'));
out.println(";");
break;
-
+
case 2:
if (prefix != null) out.print(prefix);
out.print(" name = ");
@@ -277,18 +277,18 @@ public class TrustedAuthorities extends Value
return str.toString();
}
}
-
+
public static enum IdentifierType
{
PRE_AGREED (0), KEY_SHA1_HASH (1), X509_NAME (2), CERT_SHA1_HASH (3);
-
+
private final int value;
-
+
private IdentifierType(final int value)
{
this.value = value;
}
-
+
public int getValue()
{
return value;
diff --git a/gnu/javax/net/ssl/provider/UnresolvedExtensionValue.java b/gnu/javax/net/ssl/provider/UnresolvedExtensionValue.java
index f54dda5bc..94cd091c5 100644
--- a/gnu/javax/net/ssl/provider/UnresolvedExtensionValue.java
+++ b/gnu/javax/net/ssl/provider/UnresolvedExtensionValue.java
@@ -45,32 +45,32 @@ import java.nio.ByteBuffer;
public class UnresolvedExtensionValue extends Value
{
private final ByteBuffer buffer;
-
+
public UnresolvedExtensionValue (final ByteBuffer buffer)
{
this.buffer = buffer;
}
-
+
public int length()
{
return buffer.limit();
}
-
+
public ByteBuffer buffer()
{
return value();
}
-
+
public ByteBuffer value()
{
return buffer.slice();
}
-
+
public String toString()
{
return toString(null);
}
-
+
public String toString(final String prefix)
{
String s = Util.hexDump(buffer);
diff --git a/gnu/javax/net/ssl/provider/Util.java b/gnu/javax/net/ssl/provider/Util.java
index 57f637c18..a2004b7aa 100644
--- a/gnu/javax/net/ssl/provider/Util.java
+++ b/gnu/javax/net/ssl/provider/Util.java
@@ -77,29 +77,29 @@ public final class Util
{
return wrapBuffer(buffer, "");
}
-
+
public static Object wrapBuffer(ByteBuffer buffer, String prefix)
{
return new WrappedBuffer(buffer, prefix);
}
-
+
private static class WrappedBuffer
{
private final ByteBuffer buffer;
private final String prefix;
-
+
WrappedBuffer(ByteBuffer buffer, String prefix)
{
this.buffer = buffer;
this.prefix = prefix;
}
-
+
public String toString()
{
return hexDump(buffer, prefix);
}
}
-
+
/**
* Convert a hexadecimal string into its byte representation.
*
diff --git a/gnu/javax/net/ssl/provider/X500PrincipalList.java b/gnu/javax/net/ssl/provider/X500PrincipalList.java
index 1c88479cb..ffdcbbad2 100644
--- a/gnu/javax/net/ssl/provider/X500PrincipalList.java
+++ b/gnu/javax/net/ssl/provider/X500PrincipalList.java
@@ -188,7 +188,7 @@ public final class X500PrincipalList implements Iterable<X500Principal>
{
return new Iterator();
}
-
+
public class Iterator implements ListIterator<X500Principal>
{
private final int modCount;
@@ -269,4 +269,4 @@ public final class X500PrincipalList implements Iterable<X500Principal>
throw new UnsupportedOperationException ();
}
}
-} \ No newline at end of file
+}
diff --git a/gnu/javax/net/ssl/provider/X509KeyManagerFactory.java b/gnu/javax/net/ssl/provider/X509KeyManagerFactory.java
index c3b7e5f4b..a63cb2cbe 100644
--- a/gnu/javax/net/ssl/provider/X509KeyManagerFactory.java
+++ b/gnu/javax/net/ssl/provider/X509KeyManagerFactory.java
@@ -270,7 +270,7 @@ public class X509KeyManagerFactory extends KeyManagerFactorySpi
}
return null;
}
-
+
public @Override String chooseEngineClientAlias(String[] keyTypes,
Principal[] issuers,
SSLEngine engine)
@@ -297,7 +297,7 @@ public class X509KeyManagerFactory extends KeyManagerFactorySpi
return s[0];
return null;
}
-
+
public @Override String chooseEngineServerAlias(String keyType,
Principal[] issuers,
SSLEngine engine)
diff --git a/gnu/javax/net/ssl/provider/X509TrustManagerFactory.java b/gnu/javax/net/ssl/provider/X509TrustManagerFactory.java
index 1a0591284..ddd2f9c8b 100644
--- a/gnu/javax/net/ssl/provider/X509TrustManagerFactory.java
+++ b/gnu/javax/net/ssl/provider/X509TrustManagerFactory.java
@@ -83,7 +83,7 @@ public class X509TrustManagerFactory extends TrustManagerFactorySpi
private static final String sep
= AccessController.doPrivileged(new GetPropertyAction("file.separator"));
-
+
/**
* The location of the JSSE key store.
*/
@@ -253,7 +253,7 @@ public class X509TrustManagerFactory extends TrustManagerFactorySpi
throws CertificateException
{
CertPathValidator validator = null;
-
+
try
{
validator = CertPathValidator.getInstance("PKIX");
@@ -262,9 +262,9 @@ public class X509TrustManagerFactory extends TrustManagerFactorySpi
{
throw new CertificateException(nsae);
}
-
+
CertPath path = new X509CertPath(Arrays.asList(chain));
-
+
PKIXParameters params = null;
try
{
@@ -277,7 +277,7 @@ public class X509TrustManagerFactory extends TrustManagerFactorySpi
{
throw new CertificateException(iape);
}
-
+
try
{
validator.validate(path, params);
diff --git a/gnu/javax/rmi/CORBA/CorbaInput.java b/gnu/javax/rmi/CORBA/CorbaInput.java
index e80cabf6b..5880c85c5 100644
--- a/gnu/javax/rmi/CORBA/CorbaInput.java
+++ b/gnu/javax/rmi/CORBA/CorbaInput.java
@@ -51,7 +51,7 @@ import java.io.Serializable;
/**
* Converts calls on java ObjectOutputStream to calls on CORBA OutputStream. A
* class to substitute for objects using readObject method.
- *
+ *
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public class CorbaInput
diff --git a/gnu/javax/rmi/CORBA/CorbaOutput.java b/gnu/javax/rmi/CORBA/CorbaOutput.java
index 1c7234079..1d1480511 100644
--- a/gnu/javax/rmi/CORBA/CorbaOutput.java
+++ b/gnu/javax/rmi/CORBA/CorbaOutput.java
@@ -48,7 +48,7 @@ import java.io.Serializable;
/**
* A class to substitute as an ObjectOutputStream for objects using writeObject
* method.
- *
+ *
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public class CorbaOutput
diff --git a/gnu/javax/rmi/CORBA/DefaultWriteObjectTester.java b/gnu/javax/rmi/CORBA/DefaultWriteObjectTester.java
index 5bdf7dac9..b925428b0 100644
--- a/gnu/javax/rmi/CORBA/DefaultWriteObjectTester.java
+++ b/gnu/javax/rmi/CORBA/DefaultWriteObjectTester.java
@@ -43,7 +43,7 @@ import gnu.CORBA.CDR.BufferedCdrOutput;
import java.io.IOException;
/**
- * Tests if the defaultWriteObject method has been called.
+ * Tests if the defaultWriteObject method has been called.
* This information is required by RMI-IIOP header.
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
@@ -55,7 +55,7 @@ public class DefaultWriteObjectTester
* The flag, indicating, that the defaultWriteObject method was called.
*/
public boolean dwo_called;
-
+
/**
* Create an instance, delegating calls to the given CORBA stream.
*/
diff --git a/gnu/javax/rmi/CORBA/DelegateFactory.java b/gnu/javax/rmi/CORBA/DelegateFactory.java
index 0607c9f96..a12afd51e 100644
--- a/gnu/javax/rmi/CORBA/DelegateFactory.java
+++ b/gnu/javax/rmi/CORBA/DelegateFactory.java
@@ -1,4 +1,4 @@
-/* DelegateFactory.java --
+/* DelegateFactory.java --
Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -44,7 +44,7 @@ import gnu.CORBA.ObjectCreator;
/**
* This class produces delegates, using the system properties. If not
* corresponding property is specified, returns default implementations.
- *
+ *
* @author Wu Gansha (gansha.wu@intel.com)
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
@@ -73,11 +73,11 @@ public class DelegateFactory
/**
* Get an instance of the given delegate. As in all cases the singleton
* instance is used, the caching here would be redundant.
- *
+ *
* @param type a delegate type.
- *
+ *
* @return the associated delegate.
- *
+ *
* @throws InternalError if the delegate class, indicated in the system
* properties, cannot be instantiated.
*/
diff --git a/gnu/javax/rmi/CORBA/GetDelegateInstanceException.java b/gnu/javax/rmi/CORBA/GetDelegateInstanceException.java
index 7d98bb57b..f8aca0d47 100644
--- a/gnu/javax/rmi/CORBA/GetDelegateInstanceException.java
+++ b/gnu/javax/rmi/CORBA/GetDelegateInstanceException.java
@@ -1,4 +1,4 @@
-/* GetDelegateInstanceException.java --
+/* GetDelegateInstanceException.java --
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -42,12 +42,12 @@ public class GetDelegateInstanceException
extends Exception
{
private Throwable next;
-
+
public GetDelegateInstanceException(String msg)
{
super(msg);
}
-
+
public GetDelegateInstanceException(String msg, Throwable next)
{
super(msg, next);
diff --git a/gnu/javax/rmi/CORBA/PortableRemoteObjectDelegateImpl.java b/gnu/javax/rmi/CORBA/PortableRemoteObjectDelegateImpl.java
index ea4f73811..f430ac123 100644
--- a/gnu/javax/rmi/CORBA/PortableRemoteObjectDelegateImpl.java
+++ b/gnu/javax/rmi/CORBA/PortableRemoteObjectDelegateImpl.java
@@ -1,4 +1,4 @@
-/* PortableRemoteObjectDelegateImpl.java --
+/* PortableRemoteObjectDelegateImpl.java --
Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -65,7 +65,7 @@ import org.omg.PortableServer.POAManagerPackage.State;
/**
* Implements PortableRemoteObjectDelegate.
- *
+ *
* @author Wu Gansha (gansha.wu@intel.com) (stub)
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org) (implementation)
*/
@@ -78,15 +78,15 @@ public class PortableRemoteObjectDelegateImpl
* communication using the same communications runtime as for the passed
* <code>a_source</code> parameter. The a_target is connected to the same
* ORB (and, if applicable, to the same POA) as the a_source.
- *
+ *
* @param a_target the target to connect to ORB, must be an instance of either
* {@link ObjectImpl} (Stubs and old-style ties) or {@link Servant} (POA-bases
* ties).
- *
+ *
* @param a_source the object, providing the connection information, must be
* an instance of either {@link ObjectImpl} (Stubs and old-style ties) or
* {@link Servant} (POA-bases ties).
- *
+ *
* @throws RemoteException if the target is already connected to another ORB.
*/
public void connect(Remote a_target, Remote a_source)
@@ -196,13 +196,13 @@ public class PortableRemoteObjectDelegateImpl
/**
* Narrow the given object to the instance of the given class. The currently
* supported narrowing types are:
- *
+ *
* 1. Simple widening conversion.<br>
* 2. ObjectImpl -> RMI interface.<br>
* 3. ObjectImpl -> ObjectImpl.<br>
* 4. Tie -> Remote (implementation)<br>
* 5. Remote (implementation) -> Tie.<br>
- *
+ *
* The narrowing has sense only for derived classes.
*/
public Object narrow(Object narrowFrom, Class narrowTo)
@@ -278,7 +278,7 @@ public class PortableRemoteObjectDelegateImpl
return narrowed;
}
-
+
/**
* Get the Stub class name for the name, representing the given interface.
*/
@@ -295,7 +295,7 @@ public class PortableRemoteObjectDelegateImpl
+ interf.substring(p + 1) + "_Stub";
return stubClassName;
}
-
+
/**
* Get stub for the given implementation, searching by class name pattern. The
* found stub must implement Remote for this method to succeed.
diff --git a/gnu/javax/rmi/CORBA/RmiUtilities.java b/gnu/javax/rmi/CORBA/RmiUtilities.java
index 5fa78b1e9..ac6b90705 100644
--- a/gnu/javax/rmi/CORBA/RmiUtilities.java
+++ b/gnu/javax/rmi/CORBA/RmiUtilities.java
@@ -1,6 +1,6 @@
/* RmiUtilities.java --
Copyright (C) 2005 Free Software Foundation, Inc.
-
+
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
@@ -87,7 +87,7 @@ import javax.rmi.CORBA.Util;
/**
* Defines methods that must be accessible in several derived classes.
- *
+ *
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public class RmiUtilities
@@ -538,7 +538,7 @@ public class RmiUtilities
* Write data to the CORBA output stream. Writes the object contents only; the
* header must be already written. For object, containing objects, may be
* called recursively.
- *
+ *
* @param an_output a stream to write to, must be
* org.omg.CORBA_2_3.portable.OutputStream
* @param object an object to write.
@@ -567,7 +567,7 @@ public class RmiUtilities
* Write data to the CORBA output stream. Writes the object contents only; the
* header must be already written. For object, containing objects, may be
* called recursively.
- *
+ *
* @param an_output a stream to write to, must be
* org.omg.CORBA_2_3.portable.OutputStream
* @param object an object to write.
@@ -679,7 +679,7 @@ public class RmiUtilities
* Read data from the CDR input stream. Reads the object contents only; the
* header must be already read (the repository id or ids ara passed). For
* object, containing objects, may be called recursively.
- *
+ *
* @param an_input the stream to read from, must be
* org.omg.CORBA_2_3.portable.InputStream
* @param object the instance of the object being read.
@@ -689,7 +689,7 @@ public class RmiUtilities
* were specified.
* @param codebase the codebase, if it was included in the header of the value
* type. Null if not codebase was included.
- *
+ *
* @return the object, extracted from the stream.
*/
/**
@@ -760,7 +760,7 @@ public class RmiUtilities
if (object == null)
object = instantiate(offset, clz, g);
-
+
// The sentence below prevents attempt to read the internal fields of the
// ObjectImpl (or RMI Stub) that might follow the object definition.
// Sun's jre 1.5 does not write this information. The stubs, generated
diff --git a/gnu/javax/rmi/CORBA/StubDelegateImpl.java b/gnu/javax/rmi/CORBA/StubDelegateImpl.java
index afc254ddb..05c73a709 100644
--- a/gnu/javax/rmi/CORBA/StubDelegateImpl.java
+++ b/gnu/javax/rmi/CORBA/StubDelegateImpl.java
@@ -66,7 +66,7 @@ import org.omg.PortableServer.POAManagerPackage.State;
/**
* The default stub delegate.
- *
+ *
* @author Wu Gansha (gansha.wu@intel.com) (stub)
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org) (implementation)
*/
@@ -90,13 +90,13 @@ public class StubDelegateImpl
* obtained CORBA object can be narrowed into stub using
* {@link PortableRemoteObject#narrow}.
* </p>
- *
+ *
* @param orb the ORB where the Stub must be connected.
- *
+ *
* @throws RemoteException if the stub is already connected to some other ORB.
* If the stub is already connected to the ORB that was passed as parameter,
* the method returns without action.
- *
+ *
* @throws BAD_PARAM if the name of this stub does not match the stub name
* pattern, "_*_Stub" or if the Tie class, "_*Impl_Tie", does not exists or an
* instance of this class cannot be instantiated.
@@ -237,7 +237,7 @@ public class StubDelegateImpl
/**
* Returns the IOR reference of the connected ORB.
- *
+ *
* @see ORB#object_to_string(org.omg.CORBA.Object);
*/
public String toString(Stub self)
@@ -254,7 +254,7 @@ public class StubDelegateImpl
/**
* This should never be called. The ORB must be supplied.
- *
+ *
* @see #connect
*/
public void readObject(Stub self, ObjectInputStream input)
@@ -307,4 +307,4 @@ public class StubDelegateImpl
output.writeObject(out.buffer.toByteArray());
}
-} \ No newline at end of file
+}
diff --git a/gnu/javax/rmi/CORBA/TieTargetRecord.java b/gnu/javax/rmi/CORBA/TieTargetRecord.java
index 70e751a6f..f39441e38 100644
--- a/gnu/javax/rmi/CORBA/TieTargetRecord.java
+++ b/gnu/javax/rmi/CORBA/TieTargetRecord.java
@@ -44,7 +44,7 @@ import javax.rmi.CORBA.Tie;
/**
* Represents a Tie, connected to possibly multiple invocation targets.
- *
+ *
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public class TieTargetRecord
diff --git a/gnu/javax/rmi/CORBA/UtilDelegateImpl.java b/gnu/javax/rmi/CORBA/UtilDelegateImpl.java
index b9dc7a3d2..dd4e347f2 100644
--- a/gnu/javax/rmi/CORBA/UtilDelegateImpl.java
+++ b/gnu/javax/rmi/CORBA/UtilDelegateImpl.java
@@ -95,7 +95,7 @@ import javax.transaction.TransactionRolledbackException;
/**
* The implementation of UtilDelegate.
- *
+ *
* @author Wu Gansha (gansha.wu@intel.com) (stub)
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org) (implementation)
*/
@@ -191,7 +191,7 @@ public class UtilDelegateImpl
* pair has not been previously registered using {@link #registerTarget},
* this method tries to locate a tie class by the name pattern. If this
* succeeds, the tie-target pair is also registered.
- *
+ *
* @return the Tie.
*/
public Tie getTie(Remote target)
@@ -331,7 +331,7 @@ public class UtilDelegateImpl
/**
* Checks if the given stub is local.
- *
+ *
* @param stub a stub to check.
* @return true if the stub is local, false otherwise.
*/
@@ -354,7 +354,7 @@ public class UtilDelegateImpl
* Load the class. The method uses class loaders from the call stact first. If
* this fails, the further behaviour depends on the System Property
* "java.rmi.server.useCodebaseOnly" with default value "false".
- *
+ *
* <ul>
* <li>Try the current thread context class loader first.</li>
* <li>If remoteCodebase is non-null and useCodebaseOnly is "false" then call
@@ -364,12 +364,12 @@ public class UtilDelegateImpl
* <li>If a class is still not successfully loaded and the loader != null
* then try Class.forName(className, false, loader). </li>
* </ul>
- *
+ *
* @param className the name of the class.
* @param remoteCodebase the codebase.
* @param loader the class loader.
* @return the loaded class.
- *
+ *
* @throws ClassNotFoundException of the class cannot be loaded.
*/
public Class loadClass(String className, String remoteCodebase,
@@ -574,14 +574,14 @@ public class UtilDelegateImpl
* <td>{@link UnexpectedException}</td>
* </tr>
* </table>
- *
+ *
* @param ex an exception that was thrown on a server side implementation.
- *
+ *
* @return the corresponding RemoteException unless it is a RuntimeException.
- *
+ *
* @throws RuntimeException the passed exception if it is an instance of
* RuntimeException.
- *
+ *
* @specnote It is the same behavior, as in Suns implementations 1.4.0-1.5.0.
*/
public RemoteException wrapException(Throwable ex)
@@ -607,10 +607,10 @@ public class UtilDelegateImpl
* {@link #writeRemoteObject}. The written data contains discriminator,
* defining, that was written. Another method that writes the same content is
* {@link org.omg.CORBA_2_3.portable.OutputStream#write_abstract_interface(java.lang.Object)}.
- *
+ *
* @param output a stream to write to, must be
* {@link org.omg.CORBA_2_3.portable.OutputStream}.
- *
+ *
* @param object an object to write, must be CORBA object, Remote
*/
public void writeAbstractObject(OutputStream output, Object object)
@@ -627,7 +627,7 @@ public class UtilDelegateImpl
* method writes CORBA object, value type or value box. For value types Null
* is written with the abstract interface, its typecode having repository id
* "IDL:omg.org/CORBA/AbstractBase:1.0" and the empty string name.
- *
+ *
* @param output the object to write.
* @param object the java object that must be written in the form of the CORBA
* {@link Any}.
@@ -715,7 +715,7 @@ public class UtilDelegateImpl
* possible. This method is used in write_value(..) method group in
* {@link org.omg.CORBA_2_3.portable.OutputStream} and also may be called
* directly from generated Stubs and Ties.
- *
+ *
* @param output a stream to write to, must be
* org.omg.CORBA_2_3.portable.OutputStream
* @param object an object to write.
@@ -741,4 +741,4 @@ public class UtilDelegateImpl
writeFields(an_output, (Serializable) object);
}
-} \ No newline at end of file
+}
diff --git a/gnu/javax/rmi/CORBA/ValueHandlerDelegateImpl.java b/gnu/javax/rmi/CORBA/ValueHandlerDelegateImpl.java
index dc3b3cd6e..33fff16e5 100644
--- a/gnu/javax/rmi/CORBA/ValueHandlerDelegateImpl.java
+++ b/gnu/javax/rmi/CORBA/ValueHandlerDelegateImpl.java
@@ -56,17 +56,17 @@ import javax.rmi.CORBA.ValueHandlerMultiFormat;
/**
* Implementation of the ValueHandler.
- *
+ *
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org) (implementation)
*/
public class ValueHandlerDelegateImpl
extends RmiUtilities
implements ValueHandler, ValueHandlerMultiFormat
{
- /**
+ /**
* Return the maximal supported stream format version. We currently
* support the version 1.
- *
+ *
* TODO Support the version 2.
*/
public byte getMaximumStreamFormatVersion()
@@ -81,14 +81,14 @@ public class ValueHandlerDelegateImpl
{
if (version!=1)
throw new BAD_PARAM("Unsupported stream format version "+version);
- else
+ else
writeValue(output, value);
}
/**
* This implementation associates RunTime with stream rather than with the
* value handler and this method is not used in the implementation. It is
- * implemented just for the sake of compatibility.
+ * implemented just for the sake of compatibility.
*/
public RunTime getRunTimeCodeBase()
{
@@ -160,4 +160,4 @@ public class ValueHandlerDelegateImpl
ObjectStreamClass osc = ObjectStreamClass.lookup(cx);
return osc.getSerialVersionUID();
}
-} \ No newline at end of file
+}
diff --git a/gnu/javax/security/auth/callback/AWTCallbackHandler.java b/gnu/javax/security/auth/callback/AWTCallbackHandler.java
index d75ce4104..f241157ee 100644
--- a/gnu/javax/security/auth/callback/AWTCallbackHandler.java
+++ b/gnu/javax/security/auth/callback/AWTCallbackHandler.java
@@ -1,4 +1,4 @@
-/* AWTCallbackHandler.java --
+/* AWTCallbackHandler.java --
Copyright (C) 2004, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/security/auth/callback/AbstractCallbackHandler.java b/gnu/javax/security/auth/callback/AbstractCallbackHandler.java
index 5144f58ea..31a7f5aca 100644
--- a/gnu/javax/security/auth/callback/AbstractCallbackHandler.java
+++ b/gnu/javax/security/auth/callback/AbstractCallbackHandler.java
@@ -1,4 +1,4 @@
-/* AbstractCallbackHandler.java --
+/* AbstractCallbackHandler.java --
Copyright (C) 2005, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -86,7 +86,7 @@ public abstract class AbstractCallbackHandler implements CallbackHandler
/**
* Create an instance of <code>CallbackHandler</code> of the designated
* <code>type</code> from the first Security Provider which offers it.
- *
+ *
* @param type the type of callback handler to create.
* @return a newly created instance of <code>ClassbackHandler</code>.
* @throws NoSuchAlgorithmException if no security provider is found to offer
@@ -115,7 +115,7 @@ public abstract class AbstractCallbackHandler implements CallbackHandler
/**
* Create an instance of <code>CallbackHandler</code> of the designated
* <code>type</code> from the named security <code>provider</code>.
- *
+ *
* @param type the type of callback handler to create.
* @param provider a named security provider to use.
* @return a newly created instance of <code>ClassbackHandler</code>.
@@ -140,7 +140,7 @@ public abstract class AbstractCallbackHandler implements CallbackHandler
/**
* Create an instance of <code>CallbackHandler</code> of the designated
* <code>type</code> from the designated security <code>provider</code>.
- *
+ *
* @param type the type of callback handler to create.
* @param provider a security provider to use.
* @return a newly created instance of <code>ClassbackHandler</code>.
diff --git a/gnu/javax/security/auth/callback/CertificateCallback.java b/gnu/javax/security/auth/callback/CertificateCallback.java
index fcec11962..74885ed21 100644
--- a/gnu/javax/security/auth/callback/CertificateCallback.java
+++ b/gnu/javax/security/auth/callback/CertificateCallback.java
@@ -1,4 +1,4 @@
-/* CertificateCallback.java --
+/* CertificateCallback.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -55,7 +55,7 @@ public class CertificateCallback extends ConfirmationCallback
{
static final long serialVersionUID = 8343869651419225634L;
public final Certificate certificate;
-
+
public CertificateCallback(Certificate cert, String prompt)
{
super(prompt, ERROR, YES_NO_OPTION, NO);
diff --git a/gnu/javax/security/auth/callback/ConsoleCallbackHandler.java b/gnu/javax/security/auth/callback/ConsoleCallbackHandler.java
index d4bd9ed26..4c24ab808 100644
--- a/gnu/javax/security/auth/callback/ConsoleCallbackHandler.java
+++ b/gnu/javax/security/auth/callback/ConsoleCallbackHandler.java
@@ -1,4 +1,4 @@
-/* ConsoleCallbackHandler.java --
+/* ConsoleCallbackHandler.java --
Copyright (C) 2005, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/security/auth/callback/DefaultCallbackHandler.java b/gnu/javax/security/auth/callback/DefaultCallbackHandler.java
index fc48782fe..df0360b2e 100644
--- a/gnu/javax/security/auth/callback/DefaultCallbackHandler.java
+++ b/gnu/javax/security/auth/callback/DefaultCallbackHandler.java
@@ -1,4 +1,4 @@
-/* DefaultCallbackHandler.java --
+/* DefaultCallbackHandler.java --
Copyright (C) 2004, 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/gnu/javax/security/auth/callback/SwingCallbackHandler.java b/gnu/javax/security/auth/callback/SwingCallbackHandler.java
index 8e3e46eff..c9d5b3eb5 100644
--- a/gnu/javax/security/auth/callback/SwingCallbackHandler.java
+++ b/gnu/javax/security/auth/callback/SwingCallbackHandler.java
@@ -1,4 +1,4 @@
- /* SwingCallbackHandler.java --
+ /* SwingCallbackHandler.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -455,7 +455,7 @@ public class SwingCallbackHandler extends AbstractCallbackHandler
GridBagConstraints.NORTHWEST,
GridBagConstraints.NONE,
new Insets (10, 10, 15, 5), 0, 0));
-
+
final JTextArea text = new JTextArea (24, 80);
text.setEditable (true);
String _text;
@@ -584,4 +584,4 @@ public class SwingCallbackHandler extends AbstractCallbackHandler
}
dialog.dispose ();
}
-} \ No newline at end of file
+}
diff --git a/gnu/javax/security/auth/login/ConfigFileParser.java b/gnu/javax/security/auth/login/ConfigFileParser.java
index 40adb783e..5c4c4261f 100644
--- a/gnu/javax/security/auth/login/ConfigFileParser.java
+++ b/gnu/javax/security/auth/login/ConfigFileParser.java
@@ -81,7 +81,7 @@ import javax.security.auth.login.AppConfigurationEntry;
*
* <p>In the above context, a JAVA_IDENTIFIER is a sequence of tokens,
* separated by the character '.'. Each of these tokens obeys the following:</p>
- *
+ *
* <ol>
* <li>its first character yields <code>true</code> when used as an input to
* the {@link java.lang.Character#isJavaIdentifierStart(char)}, and</li>
@@ -183,7 +183,7 @@ public final class ConfigFileParser
/**
* @return <code>true</code> if a LOGIN_MODULE_ENTRY was correctly parsed.
- * Returns <code>false</code> otherwise.
+ * Returns <code>false</code> otherwise.
* @throws IOException if an exception occurs while parsing the input.
*/
private boolean parseACE(List listOfACEs) throws IOException
@@ -278,7 +278,7 @@ public final class ConfigFileParser
// we dont check the rest of the characters for isJavaIdentifierPart()
// because that's what the tokenizer does.
}
-
+
return cn;
}
diff --git a/gnu/javax/security/auth/login/ConfigFileTokenizer.java b/gnu/javax/security/auth/login/ConfigFileTokenizer.java
index 0235c6971..fc35bf772 100644
--- a/gnu/javax/security/auth/login/ConfigFileTokenizer.java
+++ b/gnu/javax/security/auth/login/ConfigFileTokenizer.java
@@ -52,7 +52,7 @@ import java.util.logging.Logger;
* the deault syntax. This class emulates, to a certain extent, the behavior of
* a {@link java.io.StreamTokenizer} instance <code>st</code>, when set as
* follows:
- *
+ *
* <pre>
* st.resetSyntax();
* st.lowerCaseMode(false);
@@ -77,7 +77,7 @@ import java.util.logging.Logger;
* <p>The most important (negative) difference with a
* {@link java.io.StreamTokenizer} is that this tokenizer does not properly
* handle C++ and Java // style comments in the middle of the line. It only
- * ignores them if/when found at the start of the line.</p>
+ * ignores them if/when found at the start of the line.</p>
*/
public class ConfigFileTokenizer
{
diff --git a/gnu/javax/security/auth/login/GnuConfiguration.java b/gnu/javax/security/auth/login/GnuConfiguration.java
index 8cd61c954..20d8f3afd 100644
--- a/gnu/javax/security/auth/login/GnuConfiguration.java
+++ b/gnu/javax/security/auth/login/GnuConfiguration.java
@@ -61,7 +61,7 @@ import javax.security.auth.login.Configuration;
* Login Configuration files written in the <i>default</i> syntax described in
* the publicly available documentation of that class. A more formal definition
* of this syntax is as follows:
- *
+ *
* <pre>
* CONFIG ::= APP_OR_OTHER_ENTRY+
* APP_OR_OTHER_ENTRY ::= APP_NAME_OR_OTHER JAAS_CONFIG_BLOCK
@@ -80,12 +80,12 @@ import javax.security.auth.login.Configuration;
* PARAM_NAME ::= STRING
* PARAM_VALUE ::= '"' STRING '"' | ''' STRING ''' | STRING
* </pre>
- *
+ *
* <p>This implementation will specifically attempt to process one or more
* Login Configuration files in the following locations, and when found parse
* them and merge their contents. The locations, and the order in which they are
* investigated, follows:</p>
- *
+ *
* <ol>
* <li>If the following Security properties:
* <i>java.security.auth.login.config.url.<b>N</b></i>, where <i><b>N</b></i>
@@ -99,7 +99,7 @@ import javax.security.auth.login.Configuration;
* <li>The GNU Classpath security file, named <i>classpath.security</i>,
* where all Security properties are encoded, is usually located in
* <i>/usr/local/classpath/lib/security</i> folder.</li>
- *
+ *
* <li>The numbers used in the properties
* <i>java.security.auth.login.config.url.<b>N</b></i> MUST be sequential,
* with no breaks in-between.</li>
@@ -120,7 +120,7 @@ import javax.security.auth.login.Configuration;
* (in that order) is found in the location referenced by the value of the
* System property <i>user.home</i>, then that file is parsed as a JAAS Login
* Configuration written in the default syntax.</li>
- *
+ *
* <li>If none of the above resulted in a correctly parsed JAAS Login
* Configuration file, then this implementation will install a <i>Null
* Configuration</i> which basically does not recognize any Application.</li>
@@ -182,11 +182,11 @@ public final class GnuConfiguration extends Configuration
/**
* Refreshes and reloads this <code>Configuration</code>.
- *
+ *
* <p>This method causes this <code>Configuration</code> object to refresh /
* reload its contents following the locations and logic described above in
* the class documentation section.</p>
- *
+ *
* @throws SecurityException if the caller does not have an
* {@link AuthPermission} for the action named
* <code>refreshLoginConfiguration</code>.
@@ -237,7 +237,7 @@ public final class GnuConfiguration extends Configuration
* Attempts to locate and parse one or more JAAS Login Configuration files
* defined as the values of the Security properties
* <i>java.security.auth.login.config.url.N</i>.
- *
+ *
* @return <code>true</code> if it succeeds, and <code>false</code>
* otherwsie.
*/
@@ -279,7 +279,7 @@ public final class GnuConfiguration extends Configuration
* {@link MalformedURLException} occurs, this method then tries to open that
* string as a {@link File} (with the same name). If it succeeds, an
* {@link InputStream} is constructed and returned.
- *
+ *
* @param s
* the designated name of either a {@link URL} or a {@link File}
* assumed to contain a JAAS Login Configuration in the default
@@ -308,7 +308,7 @@ public final class GnuConfiguration extends Configuration
/**
* Attempts to locate and parse a JAAS Login Configuration file defined as the
* value of the System property <i>java.security.auth.login.config</i>.
- *
+ *
* @return <code>true</code> if it succeeds, and <code>false</code>
* otherwsie.
*/
@@ -343,7 +343,7 @@ public final class GnuConfiguration extends Configuration
* as <i>.java.login.config</i> or <i>java.login.config</i> (without the
* leading dot) in the folder referenced by the System property
* <code>user.home</code>.
- *
+ *
* @return <code>true</code> if it succeeds, and <code>false</code>
* otherwsie.
*/
diff --git a/gnu/javax/sound/AudioSecurityManager.java b/gnu/javax/sound/AudioSecurityManager.java
index a6dce60b3..1daea2db5 100644
--- a/gnu/javax/sound/AudioSecurityManager.java
+++ b/gnu/javax/sound/AudioSecurityManager.java
@@ -1,5 +1,5 @@
/* AudioSecurityManager.java -- Manages Security requests for Sound classes.
-
+
Copyright (C) 2007 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -42,10 +42,10 @@ import javax.sound.sampled.AudioPermission;
/**
* This class handles security requests for classes in the Sound API.
- *
+ *
* A class that needs to check against a particular permission type may use this
* class to query the <code>SecurityManager</code>.
- *
+ *
* For example, to check for a read permission, a class can simply pass the
* <code>Permission.READ</code> constant to
* {@link #checkPermissions(gnu.javax.sound.AudioSecurityManager.Permission))},
@@ -54,11 +54,11 @@ import javax.sound.sampled.AudioPermission;
* <pre>
* AudioSecurityManager.checkPermissions(Permission.PLAY);
* </pre>
- *
+ *
* If there is need to query for all the defined permissions type, the constant
* <code>Permission.ALL</code> can be used. In alternative, the
- * {@link #checkPermissions()} is presented as a shorthand.
- *
+ * {@link #checkPermissions()} is presented as a shorthand.
+ *
* @author Mario Torre <neugens@limasoftware.net>
*/
public class AudioSecurityManager
@@ -70,19 +70,19 @@ public class AudioSecurityManager
{
PLAY, RECORD, ALL
}
-
+
/**
- * Shorthand to <code>checkPermissions(Permission.ALL)</code>.
+ * Shorthand to <code>checkPermissions(Permission.ALL)</code>.
*/
public static final void checkPermissions()
{
checkPermissions(Permission.ALL);
}
-
+
/**
- * Query the <code>SecurityManager</code> agains the given
+ * Query the <code>SecurityManager</code> agains the given
* <code>Permission</code>.
- *
+ *
* @param permission
*/
public static final void checkPermissions(Permission permission)
@@ -96,16 +96,16 @@ public class AudioSecurityManager
case PLAY:
perm = "play";
break;
-
+
case RECORD:
perm = "record";
break;
-
+
case ALL: default:
perm = "*";
break;
}
-
+
sm.checkPermission(new AudioPermission(perm));
}
}
diff --git a/gnu/javax/sound/midi/alsa/AlsaInputPortDevice.java b/gnu/javax/sound/midi/alsa/AlsaInputPortDevice.java
index fb9e684d0..d37a8fd6b 100644
--- a/gnu/javax/sound/midi/alsa/AlsaInputPortDevice.java
+++ b/gnu/javax/sound/midi/alsa/AlsaInputPortDevice.java
@@ -45,18 +45,18 @@ import gnu.javax.sound.midi.alsa.AlsaMidiDeviceProvider.AlsaPortInfo;
/**
* ALSA MIDI In Port.
- *
+ *
* @author Anthony Green (green@redhat.com)
*
*/
public class AlsaInputPortDevice extends AlsaPortDevice
-{
+{
AlsaInputPortDevice (AlsaPortInfo info)
{
super(info);
}
-
+
/* (non-Javadoc)
* @see javax.sound.midi.MidiDevice#open()
*/
diff --git a/gnu/javax/sound/midi/alsa/AlsaMidiDeviceProvider.java b/gnu/javax/sound/midi/alsa/AlsaMidiDeviceProvider.java
index 4951be605..33181b6d5 100644
--- a/gnu/javax/sound/midi/alsa/AlsaMidiDeviceProvider.java
+++ b/gnu/javax/sound/midi/alsa/AlsaMidiDeviceProvider.java
@@ -46,7 +46,7 @@ import javax.sound.midi.spi.MidiDeviceProvider;
/**
* Provide ALSA MIDI devices.
- *
+ *
* @author Anthony Green (green@redhat.com)
*
*/
@@ -54,7 +54,7 @@ public class AlsaMidiDeviceProvider extends MidiDeviceProvider
{
/**
* Abstract base for ALSA specific MIDI device info.
- *
+ *
* @author Anthony Green (green@redhat.com)
*
*/
@@ -62,7 +62,7 @@ public class AlsaMidiDeviceProvider extends MidiDeviceProvider
{
/**
* Create an ALSA specific MIDI device info object.
- *
+ *
* @param name the device name
* @param description the device description
*/
@@ -70,13 +70,13 @@ public class AlsaMidiDeviceProvider extends MidiDeviceProvider
{
super(name, "Alsa", description, "0.0");
}
-
+
abstract MidiDevice getDevice ();
- }
+ }
/**
* ALSA MIDI Port.
- *
+ *
* @author Anthony Green (green@redhat.com)
*
*/
@@ -84,10 +84,10 @@ public class AlsaMidiDeviceProvider extends MidiDeviceProvider
{
long client;
long port;
-
+
/**
* Create ALSA MIDI In Port.
- *
+ *
* @param name the device name
* @param description the device description
* @param client the client ID
@@ -99,11 +99,11 @@ public class AlsaMidiDeviceProvider extends MidiDeviceProvider
this.client = client;
this.port = port;
}
- }
-
+ }
+
/**
* ALSA Sequencer specific info.
- *
+ *
* @author Anthony Green (green@redhat.com)
*
*/
@@ -113,16 +113,16 @@ public class AlsaMidiDeviceProvider extends MidiDeviceProvider
{
super(name, description);
}
-
+
MidiDevice getDevice()
{
return AlsaMidiSequencerDevice.getInstance();
}
}
-
+
/**
* ALSA MIDI In Port.
- *
+ *
* @author Anthony Green (green@redhat.com)
*
*/
@@ -132,7 +132,7 @@ public class AlsaMidiDeviceProvider extends MidiDeviceProvider
{
super(name, description, client, port);
}
-
+
MidiDevice getDevice()
{
return new AlsaInputPortDevice(this);
@@ -141,7 +141,7 @@ public class AlsaMidiDeviceProvider extends MidiDeviceProvider
/**
* ALSA MIDI Out Port.
- *
+ *
* @author Anthony Green (green@redhat.com)
*
*/
@@ -151,46 +151,46 @@ public class AlsaMidiDeviceProvider extends MidiDeviceProvider
{
super(name, description, client, port);
}
-
+
MidiDevice getDevice()
{
return new AlsaOutputPortDevice(this);
}
}
-
+
private static AlsaInfo[] infos;
-
+
private static native AlsaInfo[] getInputDeviceInfo_();
private static native AlsaInfo[] getOutputDeviceInfo_();
-
+
/**
* Initialize the ALSA system
*/
private static native void init_();
-
+
static
- {
+ {
if (Configuration.INIT_LOAD_LIBRARY)
{
System.loadLibrary("gjsmalsa");
- }
-
+ }
+
init_();
-
+
AlsaInfo inputs[] = getInputDeviceInfo_();
AlsaInfo outputs[] = getOutputDeviceInfo_();
-
+
infos = new AlsaInfo[inputs.length + outputs.length + 1];
infos[0] = new AlsaSequencerInfo ("/dev/snd/seq", "ALSA Sequencer");
System.arraycopy(inputs, 0, infos, 1, inputs.length);
System.arraycopy(outputs, 0, infos, 1 + inputs.length, outputs.length);
}
-
+
public AlsaMidiDeviceProvider()
{
// Nothing.
}
-
+
/* (non-Javadoc)
* @see javax.sound.midi.spi.MidiDeviceProvider#getDeviceInfo()
*/
diff --git a/gnu/javax/sound/midi/alsa/AlsaMidiSequencerDevice.java b/gnu/javax/sound/midi/alsa/AlsaMidiSequencerDevice.java
index 3810dff47..3603bb5a7 100644
--- a/gnu/javax/sound/midi/alsa/AlsaMidiSequencerDevice.java
+++ b/gnu/javax/sound/midi/alsa/AlsaMidiSequencerDevice.java
@@ -53,7 +53,7 @@ import javax.sound.midi.Transmitter;
/**
* The ALSA MIDI sequencer device. This is a singleton device.
- *
+ *
* @author green@redhat.com
*
*/
@@ -61,16 +61,16 @@ public class AlsaMidiSequencerDevice implements Sequencer
{
// The singleton instance.
public final static AlsaMidiSequencerDevice instance = new AlsaMidiSequencerDevice();
-
+
// A pointer to a native chunk of memory
private long nativeState;
-
+
// The sequence to process
private Sequence sequence;
-
+
/**
* A private constructor. There should only be one instance of this
- * device.
+ * device.
*/
private AlsaMidiSequencerDevice()
{
@@ -79,14 +79,14 @@ public class AlsaMidiSequencerDevice implements Sequencer
/**
* Return the sequencer singleton.
- *
+ *
* @return the sequencer singleton
*/
public static AlsaMidiSequencerDevice getInstance()
{
return instance;
}
-
+
/* (non-Javadoc)
* @see javax.sound.midi.Sequencer#setSequence(javax.sound.midi.Sequence)
*/
@@ -438,23 +438,23 @@ public class AlsaMidiSequencerDevice implements Sequencer
// Check to see if we're open already.
if (nativeState != 0)
return;
-
+
nativeState = open_();
}
}
/**
* Allocate the native state object, and open the sequencer.
- *
+ *
* @return a long representation of a pointer to the nativeState.
*/
private native long open_();
-
+
/**
* Close the sequencer and free the native state object.
*/
private native void close_(long nativeState);
-
+
/* (non-Javadoc)
* @see javax.sound.midi.MidiDevice#close()
*/
diff --git a/gnu/javax/sound/midi/alsa/AlsaOutputPortDevice.java b/gnu/javax/sound/midi/alsa/AlsaOutputPortDevice.java
index bc5a55939..9140d59ad 100644
--- a/gnu/javax/sound/midi/alsa/AlsaOutputPortDevice.java
+++ b/gnu/javax/sound/midi/alsa/AlsaOutputPortDevice.java
@@ -46,7 +46,7 @@ import javax.sound.midi.Transmitter;
/**
* ALSA MIDI Out Device
- *
+ *
* @author Anthony Green (green@redhat.com)
*
*/
diff --git a/gnu/javax/sound/midi/alsa/AlsaPortDevice.java b/gnu/javax/sound/midi/alsa/AlsaPortDevice.java
index 0e59bc8d6..f55941ba5 100644
--- a/gnu/javax/sound/midi/alsa/AlsaPortDevice.java
+++ b/gnu/javax/sound/midi/alsa/AlsaPortDevice.java
@@ -47,7 +47,7 @@ import gnu.javax.sound.midi.alsa.AlsaMidiDeviceProvider.AlsaPortInfo;
/**
* ALSA Port Device
- *
+ *
* @author Anthony Green (green@redhat.com)
*
*/
@@ -55,7 +55,7 @@ public abstract class AlsaPortDevice implements MidiDevice
{
/**
* The ALSA Receiver class.
- *
+ *
* @author Anthony Green (green@redhat.com)
*
*/
@@ -82,22 +82,22 @@ public abstract class AlsaPortDevice implements MidiDevice
}
AlsaMidiDeviceProvider.AlsaPortInfo info;
-
+
public AlsaPortDevice (AlsaPortInfo info)
{
this.info = info;
}
-
+
public Info getDeviceInfo()
{
return info;
}
native void run_receiver_thread_ (long client, long port, Receiver receiver);
-
+
/**
* The ALSA Transmitter class.
- *
+ *
* @author Anthony Green (green@redhat.com)
*
*/
@@ -109,7 +109,7 @@ public abstract class AlsaPortDevice implements MidiDevice
{
run_receiver_thread_ (info.client, info.port, receiver);
}
-
+
/* (non-Javadoc)
* @see javax.sound.midi.Transmitter#setReceiver(javax.sound.midi.Receiver)
*/
@@ -119,7 +119,7 @@ public abstract class AlsaPortDevice implements MidiDevice
{
this.receiver = receiver;
}
-
+
// Create the processing thread
new Thread(this).start();
}
diff --git a/gnu/javax/sound/midi/dssi/DSSIMidiDeviceProvider.java b/gnu/javax/sound/midi/dssi/DSSIMidiDeviceProvider.java
index 740b124eb..605c6dfb7 100644
--- a/gnu/javax/sound/midi/dssi/DSSIMidiDeviceProvider.java
+++ b/gnu/javax/sound/midi/dssi/DSSIMidiDeviceProvider.java
@@ -50,12 +50,12 @@ import javax.sound.midi.spi.MidiDeviceProvider;
/**
* A DSSI MIDI device provider.
- *
- * DSSI (pronounced "dizzy") is an API for audio plugins, with particular
+ *
+ * DSSI (pronounced "dizzy") is an API for audio plugins, with particular
* application for software synthesis plugins with native user interfaces.
- *
+ *
* Read about DSSI at http://dssi.sourceforge.net
- *
+ *
* @author Anthony Green (green@redhat.com)
*
*/
@@ -63,7 +63,7 @@ public class DSSIMidiDeviceProvider extends MidiDeviceProvider
{
/**
* The MidiDevice.Info specialized for DSSI synthesizers.
- *
+ *
* @author Anthony Green (green@redhat.com)
*
*/
@@ -71,7 +71,7 @@ public class DSSIMidiDeviceProvider extends MidiDeviceProvider
{
String soname;
long index;
-
+
public DSSIInfo(String name, String vendor, String description,
String version, String soname, long index)
{
@@ -88,13 +88,13 @@ public class DSSIMidiDeviceProvider extends MidiDeviceProvider
static native String getDSSICopyright_(long handle);
static native String getDSSIVendor_(long handle);
static native String getDSSILabel_(long handle);
-
+
private static List examineLibrary(String soname)
{
List list = new ArrayList();
long index = 0;
long handle;
-
+
long sohandle = dlopen_(soname);
if (sohandle == 0)
return list;
@@ -107,19 +107,19 @@ public class DSSIMidiDeviceProvider extends MidiDeviceProvider
String copyright = getDSSICopyright_(handle);
String label = getDSSIName_(handle);
String vendor = getDSSIVendor_(handle);
- list.add(new DSSIInfo(name, vendor, label,
+ list.add(new DSSIInfo(name, vendor, label,
"DSSI-1", soname, index));
index++;
} while (true);
-
+
// Close the library and free memory
dlclose_(sohandle);
-
+
return list;
}
-
+
private static DSSIInfo[] infos;
-
+
static
{
if (Configuration.INIT_LOAD_LIBRARY)
@@ -131,19 +131,19 @@ public class DSSIMidiDeviceProvider extends MidiDeviceProvider
public boolean accept(File dir, String n)
{
return n.endsWith(".so");
- }
+ }
});
List ilist = new ArrayList();
for (int i = 0; i < sofiles.length; i++)
ilist.addAll(examineLibrary(new File(dssidir, sofiles[i]).getAbsolutePath()));
infos = (DSSIInfo[]) ilist.toArray(new DSSIInfo[ilist.size()]);
}
-
+
public DSSIMidiDeviceProvider()
{
// Empty.
}
-
+
/* Return the Info array.
* @see javax.sound.midi.spi.MidiDeviceProvider#getDeviceInfo()
*/
@@ -162,7 +162,7 @@ public class DSSIMidiDeviceProvider extends MidiDeviceProvider
if (info.equals(infos[i]))
{
return new DSSISynthesizer(infos[i],
- infos[i].soname,
+ infos[i].soname,
infos[i].index);
}
}
diff --git a/gnu/javax/sound/midi/dssi/DSSISynthesizer.java b/gnu/javax/sound/midi/dssi/DSSISynthesizer.java
index 268218626..9472ee4ad 100644
--- a/gnu/javax/sound/midi/dssi/DSSISynthesizer.java
+++ b/gnu/javax/sound/midi/dssi/DSSISynthesizer.java
@@ -57,9 +57,9 @@ import javax.sound.midi.VoiceStatus;
/**
* DSSI soft-synth support.
- *
+ *
* All DSSI soft-synths are expected to be installed in /usr/lib/dssi.
- *
+ *
* @author Anthony Green (green@redhat.com)
*
*/
@@ -67,7 +67,7 @@ public class DSSISynthesizer implements Synthesizer
{
/**
* The DSSI Instrument class.
- *
+ *
* @author Anthony Green (green@redhat.com)
*
*/
@@ -77,7 +77,7 @@ public class DSSISynthesizer implements Synthesizer
{
super (soundbank, patch, name, null);
}
-
+
/* @see javax.sound.midi.SoundbankResource#getData()
*/
public Object getData()
@@ -89,7 +89,7 @@ public class DSSISynthesizer implements Synthesizer
/**
* DSSISoundbank holds all instruments.
- *
+ *
* @author Anthony Green (green@redhat.com)
*
*/
@@ -101,7 +101,7 @@ public class DSSISynthesizer implements Synthesizer
private List resources = new ArrayList();
private String vendor;
private String version;
-
+
public DSSISoundbank(String name, String description, String vendor, String version)
{
this.name = name;
@@ -109,12 +109,12 @@ public class DSSISynthesizer implements Synthesizer
this.vendor = vendor;
this.version = version;
}
-
+
void add(Instrument instrument)
{
instruments.add(instrument);
}
-
+
/* @see javax.sound.midi.Soundbank#getName()
*/
public String getName()
@@ -164,14 +164,14 @@ public class DSSISynthesizer implements Synthesizer
public Instrument getInstrument(Patch patch)
{
Iterator itr = instruments.iterator();
-
+
while (itr.hasNext())
{
Instrument i = (Instrument) itr.next();
if (i.getPatch().equals(patch))
return i;
}
-
+
return null;
}
}
@@ -179,7 +179,7 @@ public class DSSISynthesizer implements Synthesizer
/**
* The Receiver class receives all MIDI messages from a connected
* Transmitter.
- *
+ *
* @author Anthony Green (green@redhat.com)
*
*/
@@ -194,13 +194,13 @@ public class DSSISynthesizer implements Synthesizer
if (message instanceof ShortMessage)
{
ShortMessage smessage = (ShortMessage) message;
-
+
switch (message.getStatus())
{
case ShortMessage.NOTE_ON:
int velocity = smessage.getData2();
if (velocity > 0)
- channels[smessage.getChannel()].noteOn(smessage.getData1(),
+ channels[smessage.getChannel()].noteOn(smessage.getData1(),
smessage.getData2());
else
channels[smessage.getChannel()].noteOff(smessage.getData1());
@@ -226,8 +226,8 @@ public class DSSISynthesizer implements Synthesizer
}
- static native void noteOn_(long handle, int channel, int noteNumber, int velocity);
- static native void noteOff_(long handle, int channel, int noteNumber, int velocity);
+ static native void noteOn_(long handle, int channel, int noteNumber, int velocity);
+ static native void noteOff_(long handle, int channel, int noteNumber, int velocity);
static native void setPolyPressure_(long handle, int channel, int noteNumber, int pressure);
static native int getPolyPressure_(long handle, int channel, int noteNumber);
static native void controlChange_(long handle, int channel, int control, int value);
@@ -237,7 +237,7 @@ public class DSSISynthesizer implements Synthesizer
static native int getProgramBank_(long handle, int index);
static native int getProgramProgram_(long handle, int index);
static native void selectProgram_(long handle, int bank, int program);
-
+
/**
* @author Anthony Green (green@redhat.com)
*
@@ -245,7 +245,7 @@ public class DSSISynthesizer implements Synthesizer
public class DSSIMidiChannel implements MidiChannel
{
int channel = 0;
-
+
/**
* Default contructor.
*/
@@ -484,18 +484,18 @@ public class DSSISynthesizer implements Synthesizer
}
long sohandle;
- long handle;
+ long handle;
private Info info;
-
+
MidiChannel channels[] = new MidiChannel[16];
-
+
// The list of known soundbanks, and the default one.
List soundbanks = new ArrayList();
DSSISoundbank defaultSoundbank;
-
+
/**
* Create a DSSI Synthesizer.
- *
+ *
* @param info the DSSIInfo for this soft-synth
* @param soname the name of the .so file for this DSSI synth
* @param index the DSSI index for this soft-synth
@@ -507,10 +507,10 @@ public class DSSISynthesizer implements Synthesizer
sohandle = DSSIMidiDeviceProvider.dlopen_(soname);
handle = DSSIMidiDeviceProvider.getDSSIHandle_(sohandle, index);
channels[0] = new DSSIMidiChannel(0);
- defaultSoundbank = new DSSISoundbank("name", "description",
+ defaultSoundbank = new DSSISoundbank("name", "description",
"vendor", "version");
soundbanks.add(defaultSoundbank);
-
+
int i = 0;
String name;
do
@@ -519,7 +519,7 @@ public class DSSISynthesizer implements Synthesizer
if (name != null)
{
defaultSoundbank.
- add(new DSSIInstrument(defaultSoundbank,
+ add(new DSSIInstrument(defaultSoundbank,
new Patch(getProgramBank_(sohandle, i),
getProgramProgram_(sohandle, i)),
name));
@@ -581,7 +581,7 @@ public class DSSISynthesizer implements Synthesizer
// be in any soundbank.
if (instrument.getSoundbank() != defaultSoundbank)
throw new IllegalArgumentException ("Synthesizer doesn't support this instrument's soundbank");
-
+
Patch patch = instrument.getPatch();
selectProgram_(sohandle, patch.getBank(), patch.getProgram());
return true;
diff --git a/gnu/javax/sound/midi/file/ExtendedMidiFileFormat.java b/gnu/javax/sound/midi/file/ExtendedMidiFileFormat.java
index cb5a8e82d..4b065f3dc 100644
--- a/gnu/javax/sound/midi/file/ExtendedMidiFileFormat.java
+++ b/gnu/javax/sound/midi/file/ExtendedMidiFileFormat.java
@@ -38,7 +38,7 @@ exception statement from your version. */
package gnu.javax.sound.midi.file;
/**
- * ExtendedMidiFileFormat is a package private class that simply
+ * ExtendedMidiFileFormat is a package private class that simply
* adds the number of MIDI tracks for the MidiFileFormat class.
*
* @author Anthony Green (green@redhat.com)
@@ -47,17 +47,17 @@ class ExtendedMidiFileFormat
extends javax.sound.midi.MidiFileFormat
{
private int ntracks;
-
+
/**
* Get the number of tracks for this MIDI file.
- *
+ *
* @return the number of tracks for this MIDI file
*/
public int getNumberTracks()
{
return ntracks;
}
-
+
/**
* Create an ExtendedMidiFileFormat object from the given parameters.
*
@@ -68,7 +68,7 @@ class ExtendedMidiFileFormat
* @param microseconds the MIDI file length in microseconds
* @param ntracks the number of tracks
*/
- public ExtendedMidiFileFormat(int type, float divisionType, int resolution,
+ public ExtendedMidiFileFormat(int type, float divisionType, int resolution,
int bytes, long microseconds, int ntracks)
{
super(type, divisionType, resolution, bytes, microseconds);
diff --git a/gnu/javax/sound/midi/file/MidiDataInputStream.java b/gnu/javax/sound/midi/file/MidiDataInputStream.java
index 010d17093..d91970b9f 100644
--- a/gnu/javax/sound/midi/file/MidiDataInputStream.java
+++ b/gnu/javax/sound/midi/file/MidiDataInputStream.java
@@ -57,7 +57,7 @@ public class MidiDataInputStream
{
super(is);
}
-
+
/**
* Read an int encoded in the MIDI-style variable length
* encoding format.
@@ -68,7 +68,7 @@ public class MidiDataInputStream
throws IOException
{
int c, value = readByte();
-
+
if ((value & 0x80) != 0)
{
value &= 0x7F;
@@ -77,7 +77,7 @@ public class MidiDataInputStream
value = (value << 7) + ((c = readByte()) & 0x7F);
} while ((c & 0x80) != 0);
}
-
- return value;
+
+ return value;
}
}
diff --git a/gnu/javax/sound/midi/file/MidiDataOutputStream.java b/gnu/javax/sound/midi/file/MidiDataOutputStream.java
index f9a3dac8e..79c66e8a2 100644
--- a/gnu/javax/sound/midi/file/MidiDataOutputStream.java
+++ b/gnu/javax/sound/midi/file/MidiDataOutputStream.java
@@ -71,44 +71,44 @@ public class MidiDataOutputStream
while ((value >>= 7) != 0)
{
- buffer <<= 8;
- buffer |= ((value & 0x7F) | 0x80);
+ buffer <<= 8;
+ buffer |= ((value & 0x7F) | 0x80);
}
-
+
while (true)
{
- length++;
- if ((buffer & 0x80) != 0)
- buffer >>>= 8;
- else
- break;
+ length++;
+ if ((buffer & 0x80) != 0)
+ buffer >>>= 8;
+ else
+ break;
}
return length;
}
-
+
/**
* Write an int encoded in the MIDI-style variable length
* encoding format.
*/
- public synchronized void writeVariableLengthInt (int value)
+ public synchronized void writeVariableLengthInt (int value)
throws IOException
{
int buffer = value & 0x7F;
while ((value >>= 7) != 0)
{
- buffer <<= 8;
- buffer |= ((value & 0x7F) | 0x80);
+ buffer <<= 8;
+ buffer |= ((value & 0x7F) | 0x80);
}
-
+
while (true)
{
- writeByte(buffer & 0xff);
- if ((buffer & 0x80) != 0)
- buffer >>>= 8;
- else
- break;
+ writeByte(buffer & 0xff);
+ if ((buffer & 0x80) != 0)
+ buffer >>>= 8;
+ else
+ break;
}
}
}
diff --git a/gnu/javax/sound/midi/file/MidiFileReader.java b/gnu/javax/sound/midi/file/MidiFileReader.java
index cb640e14a..fb2a472fa 100644
--- a/gnu/javax/sound/midi/file/MidiFileReader.java
+++ b/gnu/javax/sound/midi/file/MidiFileReader.java
@@ -56,8 +56,8 @@ import javax.sound.midi.Track;
/**
* A MIDI file reader.
- *
- * This code reads MIDI file types 0 and 1.
+ *
+ * This code reads MIDI file types 0 and 1.
*
* There are many decent documents on the web describing the MIDI file
* format. I didn't bother looking for the official document. If it
@@ -67,7 +67,7 @@ import javax.sound.midi.Track;
* @author Anthony Green (green@redhat.com)
*
*/
-public class MidiFileReader extends javax.sound.midi.spi.MidiFileReader
+public class MidiFileReader extends javax.sound.midi.spi.MidiFileReader
{
/* Get the MidiFileFormat for the given input stream.
* @see javax.sound.midi.spi.MidiFileReader#getMidiFileFormat(java.io.InputStream)
@@ -80,28 +80,28 @@ public class MidiFileReader extends javax.sound.midi.spi.MidiFileReader
din = (DataInputStream) in;
else
din = new DataInputStream(in);
-
+
int type, ntracks, division, resolution, bytes;
float divisionType;
-
+
if (din.readInt() != 0x4d546864) // "MThd"
throw new InvalidMidiDataException("Invalid MIDI chunk header.");
bytes = din.readInt();
if (bytes < 6)
- throw new
- InvalidMidiDataException("Invalid MIDI chunk header length: " + bytes);
+ throw new
+ InvalidMidiDataException("Invalid MIDI chunk header length: " + bytes);
type = din.readShort();
if (type < 0 || type > 2)
- throw new
- InvalidMidiDataException("Invalid MIDI file type value: " + type);
-
+ throw new
+ InvalidMidiDataException("Invalid MIDI file type value: " + type);
+
ntracks = din.readShort();
if (ntracks <= 0)
- throw new
- InvalidMidiDataException("Invalid number of MIDI tracks: " + ntracks);
-
+ throw new
+ InvalidMidiDataException("Invalid number of MIDI tracks: " + ntracks);
+
division = din.readShort();
if ((division & 0x8000) != 0)
{
@@ -125,9 +125,9 @@ public class MidiFileReader extends javax.sound.midi.spi.MidiFileReader
break;
default:
- throw new
- InvalidMidiDataException("Invalid MIDI frame division type: "
- + division);
+ throw new
+ InvalidMidiDataException("Invalid MIDI frame division type: "
+ + division);
}
resolution = division & 0xff;
}
@@ -136,10 +136,10 @@ public class MidiFileReader extends javax.sound.midi.spi.MidiFileReader
divisionType = Sequence.PPQ;
resolution = division & 0x7fff;
}
-
+
// If we haven't read every byte in the header now, just skip the rest.
din.skip(bytes - 6);
-
+
return new ExtendedMidiFileFormat(type, divisionType, resolution,
MidiFileFormat.UNKNOWN_LENGTH,
MidiFileFormat.UNKNOWN_LENGTH, ntracks);
@@ -150,7 +150,7 @@ public class MidiFileReader extends javax.sound.midi.spi.MidiFileReader
*/
public MidiFileFormat getMidiFileFormat(URL url)
throws InvalidMidiDataException, IOException
- {
+ {
InputStream is = url.openStream();
try
{
@@ -178,7 +178,7 @@ public class MidiFileReader extends javax.sound.midi.spi.MidiFileReader
is.close();
}
}
-
+
/* Get the MIDI Sequence found in this input stream.
* @see javax.sound.midi.spi.MidiFileReader#getSequence(java.io.InputStream)
*/
@@ -272,7 +272,7 @@ public class MidiFileReader extends javax.sound.midi.spi.MidiFileReader
case ShortMessage.CHANNEL_PRESSURE:
case ShortMessage.SONG_SELECT:
case 0xF5: // FIXME: unofficial bus select. Not in
- // spec??
+ // spec??
sm = new ShortMessage();
sm.setMessage(runningStatus, sbyte, 0);
continue;
@@ -290,15 +290,15 @@ public class MidiFileReader extends javax.sound.midi.spi.MidiFileReader
continue;
default:
- throw new
- InvalidMidiDataException("Invalid Short MIDI Event: "
- + sbyte);
+ throw new
+ InvalidMidiDataException("Invalid Short MIDI Event: "
+ + sbyte);
}
}
else
- throw new
- InvalidMidiDataException("Invalid Short MIDI Event: "
- + sbyte);
+ throw new
+ InvalidMidiDataException("Invalid Short MIDI Event: "
+ + sbyte);
}
mm = sm;
}
@@ -346,16 +346,16 @@ public class MidiFileReader extends javax.sound.midi.spi.MidiFileReader
* @see javax.sound.midi.spi.MidiFileReader#getSequence(java.net.URL)
*/
public Sequence getSequence(URL url) throws InvalidMidiDataException,
- IOException
+ IOException
{
InputStream is = url.openStream();
try
{
- return getSequence(is);
+ return getSequence(is);
}
finally
{
- is.close();
+ is.close();
}
}
@@ -363,16 +363,16 @@ public class MidiFileReader extends javax.sound.midi.spi.MidiFileReader
* @see javax.sound.midi.spi.MidiFileReader#getSequence(java.io.File)
*/
public Sequence getSequence(File file) throws InvalidMidiDataException,
- IOException
+ IOException
{
InputStream is = new FileInputStream(file);
try
{
- return getSequence(is);
+ return getSequence(is);
}
finally
{
- is.close();
+ is.close();
}
}
}
diff --git a/gnu/javax/sound/midi/file/MidiFileWriter.java b/gnu/javax/sound/midi/file/MidiFileWriter.java
index b9b6fe87a..5170fc1e7 100644
--- a/gnu/javax/sound/midi/file/MidiFileWriter.java
+++ b/gnu/javax/sound/midi/file/MidiFileWriter.java
@@ -49,8 +49,8 @@ import javax.sound.midi.Track;
/**
* A MIDI file writer.
- *
- * This code writes MIDI file types 0 and 1.
+ *
+ * This code writes MIDI file types 0 and 1.
*
* There are many decent documents on the web describing the MIDI file
* format. I didn't bother looking for the official document. If it
@@ -92,7 +92,7 @@ public class MidiFileWriter
MidiDataOutputStream dos = new MidiDataOutputStream (out);
Track[] tracks = in.getTracks();
dos.writeInt(0x4d546864); // MThd
- dos.writeInt(6);
+ dos.writeInt(6);
dos.writeShort(fileType);
dos.writeShort(tracks.length);
float divisionType = in.getDivisionType();
@@ -101,7 +101,7 @@ public class MidiFileWriter
int division = 0;
if (divisionType == Sequence.PPQ)
division = resolution & 0x7fff;
- dos.writeShort(division);
+ dos.writeShort(division);
int length = 14;
for (int i = 0; i < tracks.length; i++)
length += writeTrack(tracks[i], dos);
@@ -122,13 +122,13 @@ public class MidiFileWriter
long ptick = 0;
while (i < eventCount)
{
- MidiEvent me = track.get(i);
- long tick = me.getTick();
- length += dos.variableLengthIntLength((int) (tick - ptick));
- ptick = tick;
- length += me.getMessage().getLength();
- i++;
- }
+ MidiEvent me = track.get(i);
+ long tick = me.getTick();
+ length += dos.variableLengthIntLength((int) (tick - ptick));
+ ptick = tick;
+ length += me.getMessage().getLength();
+ i++;
+ }
return length;
}
@@ -149,24 +149,24 @@ public class MidiFileWriter
dos.writeInt(trackLength);
while (i < elength)
{
- MidiEvent me = track.get(i);
- int dtime = 0;
- if (pme != null)
- dtime = (int) (me.getTick() - pme.getTick());
- dos.writeVariableLengthInt(dtime);
- // FIXME: use running status byte
- byte msg[] = me.getMessage().getMessage();
- dos.write(msg);
- pme = me;
- i++;
- }
+ MidiEvent me = track.get(i);
+ int dtime = 0;
+ if (pme != null)
+ dtime = (int) (me.getTick() - pme.getTick());
+ dos.writeVariableLengthInt(dtime);
+ // FIXME: use running status byte
+ byte msg[] = me.getMessage().getMessage();
+ dos.write(msg);
+ pme = me;
+ i++;
+ }
// We're done if the last event was an End of Track meta message.
if (pme != null && (pme.getMessage() instanceof MetaMessage))
{
- MetaMessage mm = (MetaMessage) pme.getMessage();
- if (mm.getType() == 0x2f) // End of Track message
- return trackLength + 8;
+ MetaMessage mm = (MetaMessage) pme.getMessage();
+ if (mm.getType() == 0x2f) // End of Track message
+ return trackLength + 8;
}
// Write End of Track meta message
@@ -186,12 +186,12 @@ public class MidiFileWriter
OutputStream os = new FileOutputStream(out);
try
{
- return write(in, fileType, os);
+ return write(in, fileType, os);
}
finally
{
- os.close();
- }
+ os.close();
+ }
}
}
diff --git a/gnu/javax/sound/sampled/AU/AUReader.java b/gnu/javax/sound/sampled/AU/AUReader.java
index ed5852e6c..fe0df6eb1 100644
--- a/gnu/javax/sound/sampled/AU/AUReader.java
+++ b/gnu/javax/sound/sampled/AU/AUReader.java
@@ -55,11 +55,11 @@ public class AUReader extends AudioFileReader
{
private static class AUHeader
{
- // Magic number identifying the file. '.snd'
+ // Magic number identifying the file. '.snd'
private static final int MAGIC = 0x2e736e64;
-
+
public static final int SIZE = 24; // size of the header
-
+
// Encoding types
public static final int ULAW = 1; // 8-bit u-law
public static final int PCM8 = 2; // 8-bit PCM
@@ -68,10 +68,10 @@ public class AUReader extends AudioFileReader
public static final int PCM32 = 5; // 32-bit PCM
public static final int IEEE32 = 6; // 32-bit IEEE f.p.
public static final int IEEE64 = 7; // 64-bit IEEE f.p.
- public static final int G721 = 23;
- public static final int G722 = 24;
- public static final int G723 = 25;
- public static final int G723_5BIT = 26;
+ public static final int G721 = 23;
+ public static final int G722 = 24;
+ public static final int G723 = 25;
+ public static final int G723_5BIT = 26;
public static final int ALAW = 27; // 8-bit a-law
// Header data.
@@ -90,56 +90,56 @@ public class AUReader extends AudioFileReader
ByteBuffer buf = ByteBuffer.wrap(hdr);
if( buf.getInt() != MAGIC )
- throw new UnsupportedAudioFileException("Not an AU format audio file.");
- headerSize = buf.getInt();
- fileSize = buf.getInt();
- encoding = buf.getInt();
+ throw new UnsupportedAudioFileException("Not an AU format audio file.");
+ headerSize = buf.getInt();
+ fileSize = buf.getInt();
+ encoding = buf.getInt();
sampleRate = buf.getInt();
- channels = buf.getInt();
+ channels = buf.getInt();
switch(encoding)
- {
- case ULAW:
- case PCM8:
- case ALAW:
- sampleSizeInBits = 8;
- break;
- case PCM16:
- sampleSizeInBits = 16;
- break;
- case PCM24:
- sampleSizeInBits = 24;
- break;
- case PCM32:
- sampleSizeInBits = 32;
- break;
- default: // other types exist but are not supported. Yet.
- throw new UnsupportedAudioFileException("Unsupported encoding.");
- }
+ {
+ case ULAW:
+ case PCM8:
+ case ALAW:
+ sampleSizeInBits = 8;
+ break;
+ case PCM16:
+ sampleSizeInBits = 16;
+ break;
+ case PCM24:
+ sampleSizeInBits = 24;
+ break;
+ case PCM32:
+ sampleSizeInBits = 32;
+ break;
+ default: // other types exist but are not supported. Yet.
+ throw new UnsupportedAudioFileException("Unsupported encoding.");
+ }
}
public AudioFormat getAudioFormat()
{
AudioFormat.Encoding encType = AudioFormat.Encoding.PCM_SIGNED;
if(encoding == 1)
- encType = AudioFormat.Encoding.ULAW;
+ encType = AudioFormat.Encoding.ULAW;
if(encoding == 27)
- encType = AudioFormat.Encoding.ALAW;
-
- return new AudioFormat(encType,
- (float)sampleRate,
- sampleSizeInBits,
- channels,
- (sampleSizeInBits >> 3) * channels,
- (float)sampleRate,
- true);
+ encType = AudioFormat.Encoding.ALAW;
+
+ return new AudioFormat(encType,
+ (float)sampleRate,
+ sampleSizeInBits,
+ channels,
+ (sampleSizeInBits >> 3) * channels,
+ (float)sampleRate,
+ true);
}
public AudioFileFormat getAudioFileFormat()
{
- return new AudioFileFormat(new AUFormatType(),
- getAudioFormat(),
- AudioSystem.NOT_SPECIFIED);
+ return new AudioFileFormat(new AUFormatType(),
+ getAudioFormat(),
+ AudioSystem.NOT_SPECIFIED);
}
}
@@ -160,8 +160,8 @@ public class AUReader extends AudioFileReader
public AudioFileFormat getAudioFileFormat(InputStream stream)
throws IOException, UnsupportedAudioFileException
{
- if(!stream.markSupported())
- throw new IOException("Stream must support marking.");
+ if(!stream.markSupported())
+ throw new IOException("Stream must support marking.");
stream.mark(25);
AUHeader header = new AUHeader(stream);
@@ -169,10 +169,10 @@ public class AUReader extends AudioFileReader
return header.getAudioFileFormat();
}
-
+
public AudioFileFormat getAudioFileFormat(URL url)
throws IOException, UnsupportedAudioFileException
- {
+ {
return getAudioFileFormat(new BufferedInputStream(url.openStream()));
}
@@ -198,8 +198,8 @@ public class AUReader extends AudioFileReader
if( header.headerSize > AUHeader.SIZE )
stream.skip(header.headerSize - AUHeader.SIZE);
- return new AudioInputStream(stream, header.getAudioFormat(),
- AudioSystem.NOT_SPECIFIED);
+ return new AudioInputStream(stream, header.getAudioFormat(),
+ AudioSystem.NOT_SPECIFIED);
}
public AudioInputStream getAudioInputStream(URL url)
@@ -208,4 +208,3 @@ public class AUReader extends AudioFileReader
return getAudioInputStream(new BufferedInputStream(url.openStream()));
}
}
-
diff --git a/gnu/javax/sound/sampled/WAV/WAVReader.java b/gnu/javax/sound/sampled/WAV/WAVReader.java
index 0cf3c1377..5cd6efe5e 100644
--- a/gnu/javax/sound/sampled/WAV/WAVReader.java
+++ b/gnu/javax/sound/sampled/WAV/WAVReader.java
@@ -52,7 +52,7 @@ import javax.sound.sampled.spi.AudioFileReader;
/**
* A WAV file reader.
- *
+ *
* This code reads WAV files.
*
* There are many decent documents on the web describing the WAV file
@@ -66,24 +66,24 @@ import javax.sound.sampled.spi.AudioFileReader;
*/
public class WAVReader extends AudioFileReader
{
- private static long readUnsignedIntLE (DataInputStream is)
+ private static long readUnsignedIntLE (DataInputStream is)
throws IOException
{
byte[] buf = new byte[4];
is.readFully(buf);
- return (buf[0] & 0xFF
- | ((buf[1] & 0xFF) << 8)
- | ((buf[2] & 0xFF) << 16)
- | ((buf[3] & 0xFF) << 24));
+ return (buf[0] & 0xFF
+ | ((buf[1] & 0xFF) << 8)
+ | ((buf[2] & 0xFF) << 16)
+ | ((buf[3] & 0xFF) << 24));
}
- private static short readUnsignedShortLE (DataInputStream is)
+ private static short readUnsignedShortLE (DataInputStream is)
throws IOException
{
byte[] buf = new byte[2];
is.readFully(buf);
- return (short) (buf[0] & 0xFF
- | ((buf[1] & 0xFF) << 8));
+ return (short) (buf[0] & 0xFF
+ | ((buf[1] & 0xFF) << 8));
}
/* Get an AudioFileFormat from the given File.
@@ -115,7 +115,7 @@ public class WAVReader extends AudioFileReader
din = (DataInputStream) in;
else
din = new DataInputStream(in);
-
+
if (din.readInt() != 0x52494646) // "RIFF"
throw new UnsupportedAudioFileException("Invalid WAV chunk header.");
@@ -134,33 +134,33 @@ public class WAVReader extends AudioFileReader
while (! foundData)
{
- int chunkId = din.readInt();
- chunkLength = readUnsignedIntLE(din);
- switch (chunkId)
- {
- case 0x666D7420: // "fmt "
- foundFmt = true;
- compressionCode = readUnsignedShortLE(din);
- numberChannels = readUnsignedShortLE(din);
- sampleRate = readUnsignedIntLE(din);
- bytesPerSecond = readUnsignedIntLE(din);
- blockAlign = readUnsignedShortLE(din);
- bitsPerSample = readUnsignedShortLE(din);
- din.skip(chunkLength - 16);
- break;
- case 0x66616374: // "fact"
- // FIXME: hold compression format dependent data.
- din.skip(chunkLength);
- break;
- case 0x64617461: // "data"
- if (! foundFmt)
- throw new UnsupportedAudioFileException("This implementation requires WAV fmt chunks precede data chunks.");
- foundData = true;
- break;
- default:
- // Unrecognized chunk. Skip it.
- din.skip(chunkLength);
- }
+ int chunkId = din.readInt();
+ chunkLength = readUnsignedIntLE(din);
+ switch (chunkId)
+ {
+ case 0x666D7420: // "fmt "
+ foundFmt = true;
+ compressionCode = readUnsignedShortLE(din);
+ numberChannels = readUnsignedShortLE(din);
+ sampleRate = readUnsignedIntLE(din);
+ bytesPerSecond = readUnsignedIntLE(din);
+ blockAlign = readUnsignedShortLE(din);
+ bitsPerSample = readUnsignedShortLE(din);
+ din.skip(chunkLength - 16);
+ break;
+ case 0x66616374: // "fact"
+ // FIXME: hold compression format dependent data.
+ din.skip(chunkLength);
+ break;
+ case 0x64617461: // "data"
+ if (! foundFmt)
+ throw new UnsupportedAudioFileException("This implementation requires WAV fmt chunks precede data chunks.");
+ foundData = true;
+ break;
+ default:
+ // Unrecognized chunk. Skip it.
+ din.skip(chunkLength);
+ }
}
AudioFormat.Encoding encoding;
@@ -168,25 +168,25 @@ public class WAVReader extends AudioFileReader
switch (compressionCode)
{
case 1: // PCM/uncompressed
- if (bitsPerSample <= 8)
- encoding = AudioFormat.Encoding.PCM_UNSIGNED;
- else
- encoding = AudioFormat.Encoding.PCM_SIGNED;
- break;
+ if (bitsPerSample <= 8)
+ encoding = AudioFormat.Encoding.PCM_UNSIGNED;
+ else
+ encoding = AudioFormat.Encoding.PCM_SIGNED;
+ break;
default:
- throw new UnsupportedAudioFileException("Unrecognized WAV compression code: 0x"
- + Integer.toHexString(compressionCode));
+ throw new UnsupportedAudioFileException("Unrecognized WAV compression code: 0x"
+ + Integer.toHexString(compressionCode));
}
return new AudioFileFormat (AudioFileFormat.Type.WAVE,
- new AudioFormat(encoding,
- (float) sampleRate,
- bitsPerSample,
- numberChannels,
- ((bitsPerSample + 7) / 8) * numberChannels,
- (float) bytesPerSecond, false),
- (int) chunkLength);
+ new AudioFormat(encoding,
+ (float) sampleRate,
+ bitsPerSample,
+ numberChannels,
+ ((bitsPerSample + 7) / 8) * numberChannels,
+ (float) bytesPerSecond, false),
+ (int) chunkLength);
}
/* Get an AudioFileFormat from the given URL.
diff --git a/gnu/javax/sound/sampled/gstreamer/GStreamerMixer.java b/gnu/javax/sound/sampled/gstreamer/GStreamerMixer.java
index aa42a4c3d..1910ea655 100644
--- a/gnu/javax/sound/sampled/gstreamer/GStreamerMixer.java
+++ b/gnu/javax/sound/sampled/gstreamer/GStreamerMixer.java
@@ -58,43 +58,43 @@ public class GStreamerMixer
public static class GstInfo extends Info
{
/* Mixer Properties */
-
+
/** Name */
private static final String name = "Classpath GStreamer Sound Audio Engine";
-
+
/** Vendor */
private static final String vendor = "GNU Classpath";
-
+
/** Description */
private static final String desc = "GStreamer-based software mixer";
-
+
/** Version */
private static final String vers = "0.0.1";
-
+
protected GstInfo()
{
super(name, vendor, desc, vers);
}
}
-
+
public static final String GST_BACKEND = GstInfo.name;
public static final String GST_DECODER = "decoder";
public static final String GST_TYPE_NAME = "type";
public static final String GST_FILE_EXTENSION = "ext";
-
+
/** Mixer Info */
private static final Mixer.Info INFO = new GStreamerMixer.GstInfo();
-
+
public Line getLine(Line.Info info)
throws LineUnavailableException
{
// get all the lines formats supported by this mixer and
// and see if there is one matching the given line
- // if the format comes from the gstreamer backend
+ // if the format comes from the gstreamer backend
// gstreamer will be able to deal with it
Class clazz = info.getLineClass();
DataLine.Info _info = (DataLine.Info) info;
-
+
if (clazz == SourceDataLine.class)
{
for (AudioFormat format : _info.getFormats())
@@ -107,9 +107,9 @@ public class GStreamerMixer
}
}
}
-
+
// TODO: we also support basic PCM
-
+
throw new LineUnavailableException("Cannot open a line");
}
@@ -162,7 +162,7 @@ public class GStreamerMixer
public boolean isLineSupported(Line.Info info)
{
- // We support any kind of mixer that comes
+ // We support any kind of mixer that comes
// from our gstreamer backend.
// In addition, we support PCM based audio streams for
// direct playback.
@@ -171,7 +171,7 @@ public class GStreamerMixer
DataLine.Info _dinfo = (DataLine.Info) info;
_dinfo.getFormats();
}
-
+
return true;
}
@@ -228,7 +228,7 @@ public class GStreamerMixer
// TODO Auto-generated method stub
return false;
}
-
+
public boolean isOpen()
{
// TODO Auto-generated method stub
diff --git a/gnu/javax/sound/sampled/gstreamer/GStreamerMixerProvider.java b/gnu/javax/sound/sampled/gstreamer/GStreamerMixerProvider.java
index 61a8940e2..6a0d7faa7 100644
--- a/gnu/javax/sound/sampled/gstreamer/GStreamerMixerProvider.java
+++ b/gnu/javax/sound/sampled/gstreamer/GStreamerMixerProvider.java
@@ -43,20 +43,20 @@ import javax.sound.sampled.spi.MixerProvider;
/**
* Concrete provider class for GStreamerMixer.
- *
+ *
* @author Mario Torre
*/
public class GStreamerMixerProvider
extends MixerProvider
{
- private static final GStreamerMixer mixer = new GStreamerMixer();
-
+ private static final GStreamerMixer mixer = new GStreamerMixer();
+
@Override
public Mixer getMixer(Info info)
{
- if (info.equals(mixer.getMixerInfo()))
+ if (info.equals(mixer.getMixerInfo()))
return mixer;
-
+
throw new
IllegalArgumentException("This provider cannot handle a mixer or type: "
+ info.getName());
diff --git a/gnu/javax/sound/sampled/gstreamer/io/GstAudioFileReader.java b/gnu/javax/sound/sampled/gstreamer/io/GstAudioFileReader.java
index 0514c937a..26fb12b09 100644
--- a/gnu/javax/sound/sampled/gstreamer/io/GstAudioFileReader.java
+++ b/gnu/javax/sound/sampled/gstreamer/io/GstAudioFileReader.java
@@ -56,20 +56,20 @@ import javax.sound.sampled.spi.AudioFileReader;
/**
* An implementation of a general AudioFileReader. Uses GStreamer to
- * parse and retrieve informations about the file passed as input.
- *
+ * parse and retrieve informations about the file passed as input.
+ *
* @author Mario Torre <neugens@limasoftware.net>
*/
public class GstAudioFileReader
extends AudioFileReader
-{
+{
@Override
public AudioFileFormat getAudioFileFormat(File file)
throws UnsupportedAudioFileException, IOException
{
CPStringBuilder name = new CPStringBuilder(file.getName());
String _name = name.substring(name.lastIndexOf(".") + 1);
-
+
return getAudioFileFormat(
new BufferedInputStream(new FileInputStream(file)), _name);
}
@@ -93,30 +93,30 @@ public class GstAudioFileReader
{
UnsupportedAudioFileException ex =
new UnsupportedAudioFileException("Unsupported encoding.");
-
+
ex.initCause(ex.getCause());
throw ex;
}
-
+
if (format == null)
throw new UnsupportedAudioFileException("Unsupported encoding.");
-
+
String name = format.getProperty(GStreamerMixer.GST_DECODER).toString();
-
+
if (extension == null)
{
extension =
format.getProperty(GStreamerMixer.GST_FILE_EXTENSION).toString();
}
-
+
AudioFileFormat.Type type =
new AudioFileFormat.Type(name, extension);
-
+
// TODO: we should calculate this in some way. We don't need it, but
// application may want to use this data.
return new AudioFileFormat(type, format, AudioSystem.NOT_SPECIFIED);
}
-
+
@Override
public AudioFileFormat getAudioFileFormat(URL url)
throws UnsupportedAudioFileException, IOException
@@ -127,12 +127,12 @@ public class GstAudioFileReader
@Override
public AudioInputStream getAudioInputStream(File file)
throws UnsupportedAudioFileException, IOException
- {
+ {
InputStream stream = new FileInputStream(file);
long length = file.length();
-
+
AudioFormat format = null;
-
+
try
{
format = GstAudioFileReaderNativePeer.getAudioFormat(file);
@@ -141,11 +141,11 @@ public class GstAudioFileReader
{
UnsupportedAudioFileException ex =
new UnsupportedAudioFileException("Unsupported encoding.");
-
+
ex.initCause(ex.getCause());
throw ex;
}
-
+
// get the header size
if (format == null)
throw new UnsupportedAudioFileException("Unsupported encoding.");
@@ -158,7 +158,7 @@ public class GstAudioFileReader
throws UnsupportedAudioFileException, IOException
{
AudioFormat format = null;
-
+
try
{
format = GstAudioFileReaderNativePeer.getAudioFormat(is);
@@ -168,7 +168,7 @@ public class GstAudioFileReader
// TODO Auto-generated catch block
e.printStackTrace();
}
-
+
// get the header size
if (format == null)
throw new UnsupportedAudioFileException("Unsupported encoding.");
diff --git a/gnu/javax/sound/sampled/gstreamer/io/GstAudioFileReaderNativePeer.java b/gnu/javax/sound/sampled/gstreamer/io/GstAudioFileReaderNativePeer.java
index 761720fee..6345d7654 100644
--- a/gnu/javax/sound/sampled/gstreamer/io/GstAudioFileReaderNativePeer.java
+++ b/gnu/javax/sound/sampled/gstreamer/io/GstAudioFileReaderNativePeer.java
@@ -54,30 +54,30 @@ import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.AudioFormat.Encoding;
/**
- * GStreamer native peer for GstAudioFileReader.
- *
+ * GStreamer native peer for GstAudioFileReader.
+ *
* @author Mario Torre <neugens@limasoftware.net>
*/
final class GstAudioFileReaderNativePeer
{
private static final String GST_ENCODING = "GStreamer Generic Audio Reader";
-
+
private static class GstHeader
{
- /*
+ /*
* NOTE: these properties are accessed by the native code, be careful
* if you change them.
* Not all the fields are necessarily set.
- *
+ *
*/
public String file = null;
-
+
public String suffix = null;
-
+
public String name = null;
-
+
public String mimetype = null;
-
+
public String endianness = null;
public String channels = null;
@@ -87,62 +87,62 @@ final class GstAudioFileReaderNativePeer
public String width = null;
public String depth = null;
-
+
public String isSigned = null;
-
+
public String layer = null;
-
+
public String bitrate = null;
-
+
public String framed = null;
-
+
public String type = null;
}
-
+
public static AudioFormat getAudioFormat(File file) throws Exception
{
GstHeader header = new GstHeader();
header.file = file.getAbsolutePath();
-
+
if (!gstreamer_get_audio_format_file(header))
return null;
-
+
return getAudioFormat(header);
}
-
+
public static AudioFormat getAudioFormat(InputStream is) throws Exception
{
return getAudioFormat(is, new GstHeader());
}
-
+
public static AudioFormat getAudioFormat(URL url) throws Exception
{
GstHeader header = new GstHeader();
header.file = url.toExternalForm();
-
+
return getAudioFormat(url.openStream(), header);
}
-
+
private static AudioFormat getAudioFormat(InputStream is, GstHeader header)
throws Exception
{
BufferedInputStream stream = new BufferedInputStream(is);
- if(!stream.markSupported())
- throw new IOException("Stream must support marking.");
-
+ if(!stream.markSupported())
+ throw new IOException("Stream must support marking.");
+
stream.mark(0);
-
+
if (!gstreamer_get_audio_format_stream(header, new GstInputStream(stream).
getNativeClass()))
return null;
-
+
return getAudioFormat(header);
}
-
+
private static Encoding getEncoding(GstHeader header)
{
StringBuilder buffer = new StringBuilder();
-
+
if (header.name == null)
{
buffer.append(GST_ENCODING);
@@ -151,7 +151,7 @@ final class GstAudioFileReaderNativePeer
buffer.append(" ");
buffer.append(header.mimetype);
}
-
+
header.name = buffer.toString();
}
else
@@ -165,47 +165,47 @@ final class GstAudioFileReaderNativePeer
{
index = lowerCase.indexOf("demuxer");
}
-
+
if (index == -1)
index = lowerCase.length();
buffer.append(header.name.substring(0, index));
-
+
}
-
+
return new Encoding(buffer.toString().trim());
}
-
+
private static AudioFormat getAudioFormat(GstHeader header)
throws Exception
{
int na = AudioSystem.NOT_SPECIFIED;
-
+
/* we use mimetype as an header, but this could have some side effects */
Encoding encoding = getEncoding(header);
-
+
float sampleRate = ((header.rate != null) ?
new Float(header.rate).floatValue() : na);
-
+
int sampleSizeInBits = ((header.depth != null) ?
new Integer(header.depth).intValue() : na);
-
+
int channels = ((header.channels != null) ?
new Integer(header.channels).intValue() : na);
-
+
boolean bigEndian = false;
if (header.endianness != null)
{
if (header.endianness.compareTo("4321") == 0)
bigEndian = true;
}
-
+
String ext = null;
-
+
int frameSize = na;
float frameRate = na;
String lowerCase = header.name.toLowerCase();
-
+
// FIXME: frameRate = sampleRate in these cases under all the tests so far
// but I'm not sure if this is always correct...
if (lowerCase.contains("law") || lowerCase.contains("au"))
@@ -226,7 +226,7 @@ final class GstAudioFileReaderNativePeer
frameRate = sampleRate;
ext = "aiff";
}
-
+
// write all the additional properties we got to identify
// the gstreamer plugin actually used to deal with this stream
Map<String, Object> properties = new HashMap<String, Object>();
@@ -235,7 +235,7 @@ final class GstAudioFileReaderNativePeer
properties.put(GStreamerMixer.GST_TYPE_NAME, encoding.toString());
if (ext != null)
properties.put(GStreamerMixer.GST_FILE_EXTENSION, ext);
-
+
/* now we put in some of the additional properties if we have them */
if (header.type != null) properties.put("type", header.type);
if (header.framed != null) properties.put("framed", header.framed);
@@ -243,7 +243,7 @@ final class GstAudioFileReaderNativePeer
if (header.isSigned != null) properties.put("isSigned", header.isSigned);
if (header.depth != null) properties.put("depth", header.depth);
if (header.mimetype != null) properties.put("mimetype", header.mimetype);
-
+
AudioFormat format = new AudioFormat(encoding,
sampleRate,
sampleSizeInBits,
@@ -254,28 +254,28 @@ final class GstAudioFileReaderNativePeer
properties);
return format;
}
-
+
/* ***** native methods ***** */
-
+
/**
* Retrieve header information about the stream being played.
*/
native static final
protected boolean gstreamer_get_audio_format_stream(GstHeader info,
Pointer pointer);
-
+
/**
* Retrieve header information about the file being played.
*/
native static final
protected boolean gstreamer_get_audio_format_file(GstHeader info);
-
+
/**
* Initialize the native peer and enables the object cache.
* It is meant to be used by the static initializer.
*/
native private static final void init_id_cache();
-
+
static
{
System.loadLibrary("gstreamerpeer"); //$NON-NLS-1$
diff --git a/gnu/javax/sound/sampled/gstreamer/io/GstInputStream.java b/gnu/javax/sound/sampled/gstreamer/io/GstInputStream.java
index 0702eded7..56bddcaad 100644
--- a/gnu/javax/sound/sampled/gstreamer/io/GstInputStream.java
+++ b/gnu/javax/sound/sampled/gstreamer/io/GstInputStream.java
@@ -45,66 +45,66 @@ import java.io.InputStream;
/**
* Encapsulates the functionality of an InputStream Object.
- *
+ *
* This class is only meant to be used by the native code, to allow reading
* of the given InputStream as part of a the GStreamer InputStream Source
* Plugin.
- *
+ *
* <strong>Note:</strong> this class will be not garbage collected as the
* native code contains strong references to internal fields.
* The native layer provides a method that can be called by the C code to
* free the resources and to let the garbage collected to handle this class
* when not needed anymore.
- *
+ *
* @author Mario Torre <neugens@limasoftware.net>
*/
public class GstInputStream
{
/** The real InputStream on which to perform reading operations. */
private InputStream istream;
-
+
/**
- * Initialized in the native code, don't change without changes
+ * Initialized in the native code, don't change without changes
* in the native layer.
*/
private Pointer gstInputStream = null;
-
+
public GstInputStream(InputStream istream)
{
this.istream = istream;
init_instance();
}
-
+
public int read(byte[] buf, int off, int len) throws IOException
{
return this.istream.read(buf, off, len);
}
-
+
public int available() throws IOException
{
return this.istream.available();
}
-
+
/**
* Return a reference to the GstInputStream native class as a Pointer object.
* This method is intended as an helper accessor and the returned pointer
- * needs to be casted and used in the native code only.
- *
+ * needs to be casted and used in the native code only.
+ *
* @return Pointer to the native GstInputStream class.
*/
public Pointer getNativeClass()
{
return this.gstInputStream;
}
-
+
/* native methods */
-
+
/**
* Initialize the native peer and enables the object cache.
* It is meant to be used by the class constructor.
*/
native private final void init_instance();
-
+
/**
* Initialize the native peer and enables the object cache.
* It is meant to be used by the static initializer.
diff --git a/gnu/javax/sound/sampled/gstreamer/lines/GstDataLine.java b/gnu/javax/sound/sampled/gstreamer/lines/GstDataLine.java
index 33be15c58..4e8cb1bb2 100644
--- a/gnu/javax/sound/sampled/gstreamer/lines/GstDataLine.java
+++ b/gnu/javax/sound/sampled/gstreamer/lines/GstDataLine.java
@@ -47,19 +47,19 @@ public abstract class GstDataLine
implements DataLine
{
public static final int DEFAULT_BUFFER_SIZE = 1024;
-
+
/** Represents if this Line is opened or not. */
- protected Boolean open = false;
-
+ protected Boolean open = false;
+
private AudioFormat format = null;
private int bufferSize = 0;
-
+
public GstDataLine(AudioFormat format)
{
this.format = format;
this.bufferSize = DEFAULT_BUFFER_SIZE;
}
-
+
public GstDataLine(AudioFormat format, int bufferSize)
{
this.format = format;
@@ -81,7 +81,7 @@ public abstract class GstDataLine
// TODO Auto-generated method stub
return 0;
}
-
+
public void addLineListener(LineListener listener)
{
// TODO Auto-generated method stub
@@ -124,7 +124,7 @@ public abstract class GstDataLine
}
/* protected methods for subclasses */
-
+
/**
* @param open the open to set
*/
diff --git a/gnu/javax/sound/sampled/gstreamer/lines/GstNativeDataLine.java b/gnu/javax/sound/sampled/gstreamer/lines/GstNativeDataLine.java
index 84007ac97..896f0cb85 100644
--- a/gnu/javax/sound/sampled/gstreamer/lines/GstNativeDataLine.java
+++ b/gnu/javax/sound/sampled/gstreamer/lines/GstNativeDataLine.java
@@ -42,22 +42,22 @@ import gnu.classpath.Pointer;
import javax.sound.sampled.LineUnavailableException;
public class GstNativeDataLine
-{
+{
public static final GstPipeline createSourcePipeline(int bufferSize)
throws LineUnavailableException
{
GstPipeline pipeline = new GstPipeline(bufferSize);
-
+
pipeline.createForWrite();
-
+
if (!setup_sink_pipeline(pipeline.getNativeClass()))
throw new LineUnavailableException("Line unavailable");
-
+
return pipeline;
}
-
+
/* native methods */
-
+
/**
* Initialize the native peer and enables the object cache.
* It is meant to be used by the static initializer.
diff --git a/gnu/javax/sound/sampled/gstreamer/lines/GstPipeline.java b/gnu/javax/sound/sampled/gstreamer/lines/GstPipeline.java
index f561f71c2..9280e9f15 100644
--- a/gnu/javax/sound/sampled/gstreamer/lines/GstPipeline.java
+++ b/gnu/javax/sound/sampled/gstreamer/lines/GstPipeline.java
@@ -48,7 +48,7 @@ import gnu.classpath.Pointer;
/**
* This class represent a GStreamer pipeline and is resposible to handle the
* flow of data to and from the GStreamer native backend.
- *
+ *
* @author Mario Torre <neugens@limasoftware.net>
*/
public class GstPipeline
@@ -69,52 +69,52 @@ public class GstPipeline
* Opening the pipe to record audio data from the sound card works the same
* except that all the operation are inverted.
*/
-
+
// These enums are used in the native code also, changes here must reflect
// changes in the native code.
public static enum State
{
PLAY, PAUSE, STOP, CLOSE
}
-
+
private static final int READ = 0;
private static final int WRITE = 1;
private static final int QUEUED = 1;
-
- private static final String CAPACITY_KEY = "Capacity";
-
+
+ private static final String CAPACITY_KEY = "Capacity";
+
private static final Object [] lock = new Object[0];
-
+
/*
* Preference subsystem. We use this to store some system specific settings.
*/
protected Preferences prefs =
Preferences.userNodeForPackage(GstPipeline.class).node("GStreamer");
-
+
// used by the native code, stores the size of the named pipeline
// created by the operating system.
private long capacity = -1;
-
+
/** Represents the playing state of this Line. */
private State state = State.STOP;
-
+
/** The name of the named pipe. */
// Will be setup and filled in the native code. See the native library
// for details.
private String name = null;
-
+
/** This is the named pipe that will be read by the gstreamer backend. */
private FileOutputStream output = null;
-
+
/**
* Defines if we are getting data from a sink pipe
* or writing to a source pipe.
*/
private boolean source = true;
-
+
/** Indicate that we are ready to process audio data to/from the pipe. */
private boolean ready = false;
-
+
/**
* This is the native GStreamer Pipeline.
*/
@@ -125,20 +125,20 @@ public class GstPipeline
/**
* Creates a new GstPipeline with a capacity of
* {@link GstDataLine#DEFAULT_BUFFER_SIZE}.
- *
+ *
* @see GstDataLine#DEFAULT_BUFFER_SIZE
*/
public GstPipeline()
{
this(GstDataLine.DEFAULT_BUFFER_SIZE);
}
-
+
/**
* Creates a new GstPipeline with a capacity of bufferSize.
* @see GstDataLine#DEFAULT_BUFFER_SIZE
*/
public GstPipeline(int bufferSize)
- {
+ {
// see if we need to detect the size of the named pipe or we can use
// an already computet default for this system.
// Note that this is very different from the bufferSize parameter,
@@ -150,35 +150,35 @@ public class GstPipeline
{
capacity = detect_pipe_size();
}
-
+
prefs.putLong(CAPACITY_KEY, capacity);
}
-
+
// FIXME: bufferSize actually not used nor needed by the backend.
// Applications that expects a buffer of different size will be a
// bit disappointed by that..
init_instance();
-
+
// need to remove the named pipe in case of abnormal termination
Runtime.getRuntime().addShutdownHook(new CleanPipeline());
}
-
+
/**
* Creates a source pipeline. A source pipeline is a pipe you send data for
* processing using the write method.
*/
public void createForWrite() throws LineUnavailableException
- {
+ {
// create the named pipe
if (!create_named_pipe(this.pipeline))
throw new LineUnavailableException("Unable to create filesystem pipe");
-
+
open_native_pipe(this.pipeline, READ);
prepareWrite();
-
+
this.source = true;
}
-
+
/**
* @return the state
*/
@@ -195,7 +195,7 @@ public class GstPipeline
{
setState(State.STOP);
}
-
+
/**
* @param state the state to set
*/
@@ -211,7 +211,7 @@ public class GstPipeline
case PAUSE:
_state = 1;
break;
-
+
case STOP: case CLOSE:
_state = 2;
closePipe();
@@ -221,38 +221,38 @@ public class GstPipeline
if (set_state(pipeline, _state))
GstPipeline.this.state = state;
}
-
+
/**
* Return a reference to the GstPipeline native class as a Pointer object.
* This method is intended as an helper accessor and the returned pointer
- * needs to be casted and used in the native code only.
- *
+ * needs to be casted and used in the native code only.
+ *
* @return Pointer to the native GstPipeline class.
*/
public Pointer getNativeClass()
{
return this.pipeline;
}
-
+
/**
* Write length bytes from the given buffer into this pipeline,
* starting at offset.
- * This method block if the pipeline can't accept more data.
- *
+ * This method block if the pipeline can't accept more data.
+ *
* @param buffer
* @param offset
* @param length
* @return
*/
public int write(byte[] buffer, int offset, int length)
- {
+ {
if (this.state == State.STOP)
return -1;
else if (this.state == State.PAUSE)
return 0;
else if (!ready)
return -1;
-
+
try
{
if (output != null)
@@ -266,15 +266,15 @@ public class GstPipeline
{
/* nothing to do */
}
-
+
return -1;
}
-
+
public int read(byte[] buffer, int offset, int length)
{
return 0;
}
-
+
public int available()
{
if (this.source)
@@ -282,7 +282,7 @@ public class GstPipeline
else
return available(this.pipeline, WRITE);
}
-
+
/**
* Wait for remaining data to be enqueued in the pipeline.
*/
@@ -290,13 +290,13 @@ public class GstPipeline
{
if (this.state == State.STOP)
return;
-
+
try
{
// wait untill there is anymore data in the pipe
while (available(this.pipeline, QUEUED) > 0)
Thread.sleep(3000);
-
+
// plus a bit to allow data to be processed
Thread.sleep(1000);
}
@@ -305,7 +305,7 @@ public class GstPipeline
/* nothing to do*/
}
}
-
+
/**
* Flush all the data currently waiting to be processed.
*/
@@ -321,7 +321,7 @@ public class GstPipeline
/* nothing */
}
}
-
+
private void closePipe()
{
try
@@ -335,7 +335,7 @@ public class GstPipeline
/* nothing to do */
}
}
-
+
private void prepareWrite()
{
try
@@ -351,54 +351,54 @@ public class GstPipeline
GstPipeline.this.ready = false;
}
}
-
+
/* ***** native ***** */
-
+
/**
* Initialize the native peer and enables the object cache.
* It is meant to be used by the static initializer.
*/
native private static final void init_id_cache();
-
+
/**
* Set the playing state of this pipeline.
*/
native private static final boolean set_state(Pointer pipeline, int state);
-
+
/**
* Get the number of bytes currently available for reading or writing
* from the pipeline.
*/
native private static final int available(Pointer pipeline, int mode);
-
+
/**
* Open the native pipeline with the given mode.
*/
native private static final void open_native_pipe(Pointer jpipeline,
int mode);
-
+
/**
* Close the native pipeline.
*/
native private static final void close_native_pipe(Pointer jpipeline);
-
+
/**
* Initialize the native peer and enables the object cache.
* It is meant to be used by the class constructor.
*/
native private final void init_instance();
-
+
/**
* Crates the named pipe used to pass data between the application code
* and gstreamer.
*/
native private final boolean create_named_pipe(Pointer jpipeline);
-
+
/**
* Detect and return the size of the filesystem named pipe.
*/
native private final long detect_pipe_size();
-
+
private class CleanPipeline extends Thread
{
public void run()
@@ -406,7 +406,7 @@ public class GstPipeline
GstPipeline.close_native_pipe(GstPipeline.this.pipeline);
}
}
-
+
static
{
System.loadLibrary("gstreamerpeer"); //$NON-NLS-1$
diff --git a/gnu/javax/sound/sampled/gstreamer/lines/GstSourceDataLine.java b/gnu/javax/sound/sampled/gstreamer/lines/GstSourceDataLine.java
index f149ab39d..2bc2de454 100644
--- a/gnu/javax/sound/sampled/gstreamer/lines/GstSourceDataLine.java
+++ b/gnu/javax/sound/sampled/gstreamer/lines/GstSourceDataLine.java
@@ -51,7 +51,7 @@ public class GstSourceDataLine
{
private GstPipeline pipeline = null;
private boolean open = false;
-
+
public GstSourceDataLine(AudioFormat format)
{
super(format);
@@ -60,20 +60,20 @@ public class GstSourceDataLine
public void open() throws LineUnavailableException
{
AudioSecurityManager.checkPermissions(Permission.PLAY);
-
+
if (open)
throw new IllegalStateException("Line already opened");
-
+
// create the pipeline
pipeline = GstNativeDataLine.createSourcePipeline(getBufferSize());
-
+
this.open = true;
}
-
+
public void open(AudioFormat fmt) throws LineUnavailableException
{
AudioSecurityManager.checkPermissions(Permission.PLAY);
-
+
setFormat(fmt);
this.open();
}
@@ -81,13 +81,13 @@ public class GstSourceDataLine
public void open(AudioFormat fmt, int size) throws LineUnavailableException
{
AudioSecurityManager.checkPermissions(Permission.PLAY);
-
+
setBufferSize(size);
this.open(fmt);
}
public int write(byte[] buf, int offset, int length)
- {
+ {
return this.pipeline.write(buf, offset, length);
}
@@ -145,7 +145,7 @@ public class GstSourceDataLine
pipeline.close();
this.open = false;
}
-
+
public boolean isRunning()
{
return (pipeline.getState() == State.PLAY);
diff --git a/gnu/javax/swing/plaf/gnu/GNULookAndFeel.java b/gnu/javax/swing/plaf/gnu/GNULookAndFeel.java
index a9b504a38..75ba45506 100644
--- a/gnu/javax/swing/plaf/gnu/GNULookAndFeel.java
+++ b/gnu/javax/swing/plaf/gnu/GNULookAndFeel.java
@@ -72,25 +72,25 @@ public class GNULookAndFeel extends BasicLookAndFeel
"CheckBox.icon", new CheckBoxIcon(),
"RadioButton.icon", new RadioButtonIcon(),
"Tree.hash", new ColorUIResource(Color.black),
-
- "Tree.closedIcon",
- new IconUIResource(new ImageIcon
- (getClass().getResource
- (iconspath + "TreeClosed.png"))),
- "Tree.leafIcon",
- new IconUIResource(new ImageIcon
- (getClass().getResource
- (iconspath + "TreeLeaf.png"))),
- "Tree.openIcon",
- new IconUIResource(new ImageIcon
- (getClass().getResource
- (iconspath + "TreeOpen.png"))),
+
+ "Tree.closedIcon",
+ new IconUIResource(new ImageIcon
+ (getClass().getResource
+ (iconspath + "TreeClosed.png"))),
+ "Tree.leafIcon",
+ new IconUIResource(new ImageIcon
+ (getClass().getResource
+ (iconspath + "TreeLeaf.png"))),
+ "Tree.openIcon",
+ new IconUIResource(new ImageIcon
+ (getClass().getResource
+ (iconspath + "TreeOpen.png"))),
};
LAF_defaults.putDefaults(myDefaults);
}
return LAF_defaults;
}
-
+
/**
* The icon used for CheckBoxes in the BasicLookAndFeel. This is an empty
* icon with a size of 13x13 pixels.
@@ -133,21 +133,21 @@ public class GNULookAndFeel extends BasicLookAndFeel
{
Color save = g.getColor();
g.setColor(c.getForeground());
- g.drawRect(x, y, getIconWidth(), getIconHeight());
-
+ g.drawRect(x, y, getIconWidth(), getIconHeight());
+
JCheckBox item = (JCheckBox) c;
- if (item.isSelected())
+ if (item.isSelected())
{
g.drawLine(3 + x, 5 + y, 3 + x, 9 + y);
g.drawLine(4 + x, 5 + y, 4 + x, 9 + y);
g.drawLine(5 + x, 7 + y, 9 + x, 3 + y);
g.drawLine(5 + x, 8 + y, 9 + x, 4 + y);
}
-
+
g.setColor(save);
}
}
-
+
/**
* The icon used for RadioButtons in the GNULookAndFeel. This is an empty
* icon with a size of 13x13 pixels.
@@ -190,7 +190,7 @@ public class GNULookAndFeel extends BasicLookAndFeel
{
Color savedColor = g.getColor();
JRadioButton b = (JRadioButton) c;
-
+
// draw outer circle
if (b.isEnabled())
g.setColor(Color.GRAY);
@@ -218,13 +218,13 @@ public class GNULookAndFeel extends BasicLookAndFeel
g.drawLine(x + 10, y + 4, x + 10, y + 7);
g.fillRect(x + 2, y + 2, 8, 8);
}
- else
+ else
{
// only draw inner highlight if not filled
if (b.isEnabled())
{
g.setColor(Color.WHITE);
-
+
g.drawLine(x + 2, y + 8, x + 2, y + 9);
g.drawLine(x + 1, y + 4, x + 1, y + 7);
g.drawLine(x + 2, y + 2, x + 2, y + 3);
@@ -238,7 +238,7 @@ public class GNULookAndFeel extends BasicLookAndFeel
if (b.isEnabled())
{
g.setColor(Color.WHITE);
-
+
// outer
g.drawLine(x + 10, y + 1, x + 10, y + 1);
g.drawLine(x + 11, y + 2, x + 11, y + 3);
@@ -249,7 +249,7 @@ public class GNULookAndFeel extends BasicLookAndFeel
g.drawLine(x + 4, y + 12, x + 7, y + 12);
g.drawLine(x + 2, y + 11, x + 3, y + 11);
}
-
+
if (b.isSelected())
{
if (b.isEnabled())
@@ -261,6 +261,6 @@ public class GNULookAndFeel extends BasicLookAndFeel
g.drawLine(x + 4, y + 8, x + 7, y + 8);
}
g.setColor(savedColor);
- }
+ }
}
}
diff --git a/gnu/javax/swing/text/html/CharacterAttributeTranslator.java b/gnu/javax/swing/text/html/CharacterAttributeTranslator.java
index 77bac127d..d4e58eb5d 100644
--- a/gnu/javax/swing/text/html/CharacterAttributeTranslator.java
+++ b/gnu/javax/swing/text/html/CharacterAttributeTranslator.java
@@ -1,4 +1,4 @@
-/* CharacterAttributeTranslator.java --
+/* CharacterAttributeTranslator.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -56,7 +56,7 @@ public class CharacterAttributeTranslator
* Maps color name to its hex encoding.
*/
private static final HashMap colorMap = new HashMap();
- static
+ static
{
colorMap.put("aqua" , "#00FFFF");
colorMap.put("blue" , "#0000FF");
@@ -75,11 +75,11 @@ public class CharacterAttributeTranslator
colorMap.put("white" , "#FFFFFF");
colorMap.put("yellow" , "#FFFF00");
}
-
+
/**
* Convert the color string represenation into java.awt.Color. The valid
* values are like "aqua" , "#00FFFF" or "rgb(1,6,44)".
- *
+ *
* @param colorName the color to convert.
* @return the matching java.awt.color
*/
@@ -118,74 +118,74 @@ public class CharacterAttributeTranslator
return null;
}
}
-
+
/**
* Translate the HTML character attribute to the Swing style constant.
- *
+ *
* @param charAttr the character attributes of the html tag
* @param t the html tag itself
* @param a the attribute set where the translated attributes will be stored
- *
+ *
* @return true if some attributes were translated, false otherwise.
*/
- public static boolean translateTag(MutableAttributeSet charAttr,
- Tag t, MutableAttributeSet a)
+ public static boolean translateTag(MutableAttributeSet charAttr,
+ Tag t, MutableAttributeSet a)
{
if(t == Tag.FONT)
{
- Object color = a.getAttribute(Attribute.COLOR);
- if(color != null)
- {
- Color c = getColor(color.toString());
- if( c == null )
- return false;
- charAttr.addAttribute(StyleConstants.Foreground, c);
- return true;
- }
-
- if(a.getAttribute(Attribute.SIZE) != null)
- {
- // FIXME
- // charAttr.addAttribute(StyleConstants.FontSize,
- // new java.lang.Integer(72));
- return true;
- }
+ Object color = a.getAttribute(Attribute.COLOR);
+ if(color != null)
+ {
+ Color c = getColor(color.toString());
+ if( c == null )
+ return false;
+ charAttr.addAttribute(StyleConstants.Foreground, c);
+ return true;
+ }
+
+ if(a.getAttribute(Attribute.SIZE) != null)
+ {
+ // FIXME
+ // charAttr.addAttribute(StyleConstants.FontSize,
+ // new java.lang.Integer(72));
+ return true;
+ }
}
if( t == Tag.B )
{
- charAttr.addAttribute(StyleConstants.Bold, Boolean.TRUE);
- return true;
+ charAttr.addAttribute(StyleConstants.Bold, Boolean.TRUE);
+ return true;
}
if( t == Tag.I )
{
- charAttr.addAttribute(StyleConstants.Italic, Boolean.TRUE);
- return true;
+ charAttr.addAttribute(StyleConstants.Italic, Boolean.TRUE);
+ return true;
}
if( t == Tag.U )
{
- charAttr.addAttribute(StyleConstants.Underline, Boolean.TRUE);
- return true;
+ charAttr.addAttribute(StyleConstants.Underline, Boolean.TRUE);
+ return true;
}
if( t == Tag.STRIKE )
{
- charAttr.addAttribute(StyleConstants.StrikeThrough, Boolean.TRUE);
- return true;
+ charAttr.addAttribute(StyleConstants.StrikeThrough, Boolean.TRUE);
+ return true;
}
if( t == Tag.SUP )
{
- charAttr.addAttribute(StyleConstants.Superscript, Boolean.TRUE);
- return true;
+ charAttr.addAttribute(StyleConstants.Superscript, Boolean.TRUE);
+ return true;
}
if( t == Tag.SUB )
{
- charAttr.addAttribute(StyleConstants.Subscript, Boolean.TRUE);
- return true;
+ charAttr.addAttribute(StyleConstants.Subscript, Boolean.TRUE);
+ return true;
}
return false;
}
diff --git a/gnu/javax/swing/text/html/CombinedAttributes.java b/gnu/javax/swing/text/html/CombinedAttributes.java
index b1e3de604..c3fe66816 100644
--- a/gnu/javax/swing/text/html/CombinedAttributes.java
+++ b/gnu/javax/swing/text/html/CombinedAttributes.java
@@ -48,8 +48,8 @@ import javax.swing.text.SimpleAttributeSet;
* Contains the two combined attribute sets what are searched subsequently.
* This is used to combine style sheet attributes with the HTML view attributes.
* The parent cannot be used as the view may have its own attribute hierarchy.
- *
- * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public class CombinedAttributes implements AttributeSet, Serializable
{
@@ -60,7 +60,7 @@ public class CombinedAttributes implements AttributeSet, Serializable
{
/**
* Create a combined enumeration that enumerates over two enumerations.
- *
+ *
* @param first the first enumeration to enumerate
* @param second the second enumeration to enumerate
*/
@@ -69,46 +69,46 @@ public class CombinedAttributes implements AttributeSet, Serializable
a = first;
b = second;
}
-
+
/**
* The first enumeration (elements returned first)
*/
final Enumeration a;
-
+
/**
* The second enumeration (elements returned later)
*/
final Enumeration b;
-
+
/** @inheritDoc */
public boolean hasMoreElements()
{
return a.hasMoreElements() || b.hasMoreElements();
}
-
+
/** @inheritDoc */
public Object nextElement()
{
return a.hasMoreElements() ? a.nextElement():b.nextElement();
}
}
-
-
+
+
/**
* The first attribute set.
*/
final AttributeSet a;
-
+
/**
* The second attribute set.
*/
final AttributeSet b;
-
+
/**
* Create the CombinedAttributes what search in the two sets. If any of the
* two passed sets is null, another set is returned. Otherwise, the combined
* attribute set is returned.
- *
+ *
* @param primary the first set (searched first)
* @param secondary the second set (searched later).
*/
@@ -122,10 +122,10 @@ public class CombinedAttributes implements AttributeSet, Serializable
else
return new CombinedAttributes(primary, secondary);
}
-
+
/**
* Create the CombinedAttributes what search in the two sets.
- *
+ *
* @param primary the first set (searched first)
* @param secondary the second set (searched later).
*/
@@ -170,7 +170,7 @@ public class CombinedAttributes implements AttributeSet, Serializable
Object value = a.getAttribute(key);
if (value == null)
value = b.getAttribute(key);
-
+
return value;
}
@@ -188,7 +188,7 @@ public class CombinedAttributes implements AttributeSet, Serializable
/**
* There is no one.
- *
+ *
* @return null, always.
*/
public AttributeSet getResolveParent()
diff --git a/gnu/javax/swing/text/html/ImageViewIconFactory.java b/gnu/javax/swing/text/html/ImageViewIconFactory.java
index 862e690c9..ef3a1c6d1 100644
--- a/gnu/javax/swing/text/html/ImageViewIconFactory.java
+++ b/gnu/javax/swing/text/html/ImageViewIconFactory.java
@@ -14,7 +14,7 @@ import javax.swing.plaf.metal.MetalLookAndFeel;
* icons as they would be described in the text (sheet of paper with image and
* broken sheet of paper with image). They are not pixel to pixel identical and
* contain elements from the metal icon factory.
- *
+ *
* @author Audrius Meskauskas (audriusa@bioinformatics.org)
*/
public class ImageViewIconFactory
@@ -22,10 +22,10 @@ public class ImageViewIconFactory
private static Icon noImageIcon;
private static Icon loadingImageIcon;
-
+
/**
* This icon reflects the general concept (broken sheet of paper with
- * image), but is currently not pixel to pixel identical with the Sun's
+ * image), but is currently not pixel to pixel identical with the Sun's
* implementation.
*/
public static class NoImageIcon implements Icon, Serializable
@@ -40,7 +40,7 @@ public class ImageViewIconFactory
/**
* Returns the width of the icon, in pixels.
- *
+ *
* @return The width of the icon.
*/
public int getIconWidth()
@@ -50,7 +50,7 @@ public class ImageViewIconFactory
/**
* Returns the height of the icon, in pixels.
- *
+ *
* @return The height of the icon.
*/
public int getIconHeight()
@@ -60,7 +60,7 @@ public class ImageViewIconFactory
/**
* Paints the icon using colors from the {@link MetalLookAndFeel}.
- *
+ *
* @param c
* the component (ignored).
* @param g
@@ -166,7 +166,7 @@ public class ImageViewIconFactory
/**
* Returns the width of the icon, in pixels.
- *
+ *
* @return The width of the icon.
*/
public int getIconWidth()
@@ -176,7 +176,7 @@ public class ImageViewIconFactory
/**
* Returns the height of the icon, in pixels.
- *
+ *
* @return The height of the icon.
*/
public int getIconHeight()
@@ -186,7 +186,7 @@ public class ImageViewIconFactory
/**
* Paints the icon using colors from the {@link MetalLookAndFeel}.
- *
+ *
* @param c
* the component (ignored).
* @param g
@@ -219,7 +219,7 @@ public class ImageViewIconFactory
g.drawLine(x + 21, y + 24, x + 21, y + 7);
g.drawLine(x + 18, y + 2, x + 20, y + 4);
- // Picture (house)
+ // Picture (house)
y += 3;
x += 3;
diff --git a/gnu/javax/swing/text/html/css/BorderStyle.java b/gnu/javax/swing/text/html/css/BorderStyle.java
index d75beea52..3ccd38491 100644
--- a/gnu/javax/swing/text/html/css/BorderStyle.java
+++ b/gnu/javax/swing/text/html/css/BorderStyle.java
@@ -59,6 +59,6 @@ public class BorderStyle
|| value.equals("solid") || value.equals("double")
|| value.equals("groove") || value.equals("ridge")
|| value.equals("inset") || value.equals("outset");
-
+
}
}
diff --git a/gnu/javax/swing/text/html/css/CSSParser.java b/gnu/javax/swing/text/html/css/CSSParser.java
index 1f8fdfa22..4be315e37 100644
--- a/gnu/javax/swing/text/html/css/CSSParser.java
+++ b/gnu/javax/swing/text/html/css/CSSParser.java
@@ -113,7 +113,7 @@ public class CSSParser
*
* @return <code>true</code> if the stylesheet could be parsed successfully,
* <code>false</code> otherwise
- *
+ *
* @throws IOException if an IO or parse error occurs
*/
private boolean parseStylesheet()
@@ -137,7 +137,7 @@ public class CSSParser
* Parses a CSS statement.
* @return <code>true</code> if the stylesheet could be parsed successfully,
* <code>false</code> otherwise
- *
+ *
* @throws IOException if an IO or parse error occurs
*/
private boolean parseStatement()
@@ -151,7 +151,7 @@ public class CSSParser
*
* @return <code>true</code> if the ruleset could be parsed successfully,
* <code>false</code> otherwise
- *
+ *
* @throws IOException if an IO or parse error occurs
*/
private boolean parseRuleset()
@@ -232,7 +232,7 @@ public class CSSParser
*
* @return <code>true</code> if the ruleset could be parsed successfully,
* <code>false</code> otherwise
- *
+ *
* @throws IOException if an IO or parse error occurs
*/
private boolean parseDeclaration()
@@ -282,7 +282,7 @@ public class CSSParser
ret = false;
error = "Expected colon to separate property and value";
}
-
+
}
else
{
@@ -300,7 +300,7 @@ public class CSSParser
*
* @return <code>true</code> if the ruleset could be parsed successfully,
* <code>false</code> otherwise
- *
+ *
* @throws IOException if an IO or parse error occurs
*/
private boolean parseValue(StringBuilder s)
@@ -321,7 +321,7 @@ public class CSSParser
*
* @return <code>true</code> if the ruleset could be parsed successfully,
* <code>false</code> otherwise
- *
+ *
* @throws IOException if an IO or parse error occurs
*/
private boolean parseSelector(StringBuilder sel)
@@ -345,7 +345,7 @@ public class CSSParser
*
* @return <code>true</code> if the ruleset could be parsed successfully,
* <code>false</code> otherwise
- *
+ *
* @throws IOException if an IO or parse error occurs
*/
private boolean parseAny(StringBuilder s)
@@ -389,7 +389,7 @@ public class CSSParser
*
* @return <code>true</code> if the at-rule could be parsed successfully,
* <code>false</code> otherwise
- *
+ *
* @throws IOException if an IO or parse error occurs
*/
private boolean parseAtRule()
diff --git a/gnu/javax/swing/text/html/css/CSSScanner.java b/gnu/javax/swing/text/html/css/CSSScanner.java
index 9cc6209a5..37d544641 100644
--- a/gnu/javax/swing/text/html/css/CSSScanner.java
+++ b/gnu/javax/swing/text/html/css/CSSScanner.java
@@ -485,7 +485,7 @@ class CSSScanner
}
else
throw new CSSLexicalException("Escape must start with '\\'");
-
+
}
private void readName()
@@ -595,7 +595,7 @@ class CSSScanner
}
// Push back last character read.
lookahead[0] = ch;
-
+
}
private void readURI()
@@ -642,7 +642,7 @@ class CSSScanner
}
if (ch == -1)
throw new CSSLexicalException("Unterminated comment");
-
+
// Push back last character read.
lookahead[0] = ch;
}
@@ -675,7 +675,7 @@ class CSSScanner
parseBuffer[tokenEnd] = (char) ch;
tokenEnd++;
ch = read();
- }
+ }
}
else
throw new CSSLexicalException("Invalid number");
diff --git a/gnu/javax/swing/text/html/css/Selector.java b/gnu/javax/swing/text/html/css/Selector.java
index 06d515c62..97e582194 100644
--- a/gnu/javax/swing/text/html/css/Selector.java
+++ b/gnu/javax/swing/text/html/css/Selector.java
@@ -46,7 +46,7 @@ import java.util.StringTokenizer;
/**
* A CSS selector. This provides methods to interpret a selector and
- * query matches with an actual HTML element tree.
+ * query matches with an actual HTML element tree.
*/
public class Selector
{
@@ -107,7 +107,7 @@ public class Selector
// However, the CSS spec defines a couple of more sophisticated matches
// which should be implemented.
// http://www.w3.org/TR/CSS21/selector.html
-
+
// All parts of the selector must match at some point.
boolean match = false;
int numTags = tags.length;
diff --git a/gnu/javax/swing/text/html/parser/GnuParserDelegator.java b/gnu/javax/swing/text/html/parser/GnuParserDelegator.java
index 273461a72..9f3666d3a 100644
--- a/gnu/javax/swing/text/html/parser/GnuParserDelegator.java
+++ b/gnu/javax/swing/text/html/parser/GnuParserDelegator.java
@@ -53,8 +53,8 @@ import javax.swing.text.html.parser.TagElement;
/**
* This parser delegator uses the different DTD ({@link HTML_401Swing}).
* It is derived from the ParserDelegator for the compatibility reasons.
- *
- * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public class GnuParserDelegator extends ParserDelegator implements Serializable
{
@@ -121,7 +121,7 @@ public class GnuParserDelegator extends ParserDelegator implements Serializable
*/
private static final long serialVersionUID = -1276686502624777206L;
- private DTD theDtd;
+ private DTD theDtd;
/**
* The callback.
@@ -135,10 +135,10 @@ public class GnuParserDelegator extends ParserDelegator implements Serializable
* This is package-private to avoid an accessor method.
*/
gnuParser gnu;
-
+
/**
* Create the parser that uses the given DTD to parse the document.
- *
+ *
* @param theDtd the DTD
*/
public GnuParserDelegator(DTD theDtd)
@@ -150,7 +150,7 @@ public class GnuParserDelegator extends ParserDelegator implements Serializable
/**
* Parses the HTML document, calling methods of the provided callback. This
* method must be multithread - safe.
- *
+ *
* @param reader The reader to read the HTML document from
* @param a_callback The callback that is notifyed about the presence of HTML
* elements in the document.
diff --git a/gnu/javax/swing/text/html/parser/HTML_401F.java b/gnu/javax/swing/text/html/parser/HTML_401F.java
index 5555412d0..d4b061465 100644
--- a/gnu/javax/swing/text/html/parser/HTML_401F.java
+++ b/gnu/javax/swing/text/html/parser/HTML_401F.java
@@ -2499,7 +2499,7 @@ public class HTML_401F
attr(VALUE, null, null, 0, IMPLIED)
}
);
-
+
// Headers in the paragraph are not allowed.
defElement(P, 0, false, true, new ContentModel( 0,
new noTagModel(new String[] { P, H1, H2, H3, H4, H5, H6 }), null),
@@ -3775,7 +3775,7 @@ public class HTML_401F
li.type = ul.type = ol.type = '|';
return li;
}
-
+
/**
* Get elements that are allowed in the document body, at the zero level.
*/
diff --git a/gnu/javax/swing/text/html/parser/SmallHtmlAttributeSet.java b/gnu/javax/swing/text/html/parser/SmallHtmlAttributeSet.java
index 930a324f9..8739ad453 100644
--- a/gnu/javax/swing/text/html/parser/SmallHtmlAttributeSet.java
+++ b/gnu/javax/swing/text/html/parser/SmallHtmlAttributeSet.java
@@ -50,18 +50,18 @@ import javax.swing.text.html.HTML.Tag;
* Small fixed HTML attribute set. The most of the HTML elements contain only
* several attributes. With four attributes, the number of operations in more
* complex algorithms is not larger than using the naive algorithm.
- *
+ *
* Same as HtmlAttributeSet, this set allows both strings and non-string as
* keys. The strings are case insensitive, the non strings are compared with
* .equals.
- *
- * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public class SmallHtmlAttributeSet
implements AttributeSet, Cloneable, Serializable
{
private static final long serialVersionUID = 1;
-
+
/**
* The keys, stored in this attribute set.
*/
@@ -80,7 +80,7 @@ public class SmallHtmlAttributeSet
/**
* Create a new small fixed attribute set that contains the unchangeable copy
* of the passed attribute set and inherits its parent.
- *
+ *
* @param copyFrom the attribute set, containing the attribute values to copy.
*/
public SmallHtmlAttributeSet(AttributeSet copyFrom)
@@ -143,7 +143,7 @@ public class SmallHtmlAttributeSet
/**
* Get the attribute value, matching this key. If not found in this set, the
* call is delegated to parent.
- *
+ *
* @return the value, matching key (or null if none).
*/
public Object getAttribute(Object key)
@@ -218,7 +218,7 @@ public class SmallHtmlAttributeSet
}
};
}
-
+
/**
* Get the parent that this set uses to resolve the not found attributes.
*/
@@ -226,7 +226,7 @@ public class SmallHtmlAttributeSet
{
return parent;
}
-
+
/**
* Check if the given attribute is defined in this set (not in the parent).
*/
@@ -242,7 +242,7 @@ public class SmallHtmlAttributeSet
}
return false;
}
-
+
/**
* Check this set and another set for equality by content.
*/
diff --git a/gnu/javax/swing/text/html/parser/htmlAttributeSet.java b/gnu/javax/swing/text/html/parser/htmlAttributeSet.java
index b89eec619..7eb0f616e 100644
--- a/gnu/javax/swing/text/html/parser/htmlAttributeSet.java
+++ b/gnu/javax/swing/text/html/parser/htmlAttributeSet.java
@@ -46,7 +46,7 @@ import javax.swing.text.html.HTML;
/**
* A set, adapted to store HTML attributes.
- *
+ *
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public class htmlAttributeSet
@@ -54,13 +54,13 @@ public class htmlAttributeSet
{
public static final htmlAttributeSet EMPTY_HTML_ATTRIBUTE_SET =
new htmlAttributeSet();
-
+
AttributeSet parent;
/**
* Looks in this set and, if not found, later looks in the parent set. Calls
* toString(), allowing to pass as HTML.Attribute, as String to this method.
- *
+ *
* @param _key A key to search for a value.
* @return The value, if one is defined.
*/
@@ -119,7 +119,7 @@ public class htmlAttributeSet
/**
* Set the parent set, containing the default values.
- *
+ *
* @param a_parent
*/
public void setResolveParent(AttributeSet a_parent)
@@ -129,7 +129,7 @@ public class htmlAttributeSet
/**
* Get the parent set, containing the default values.
- *
+ *
* @return the parent, used to resolve the attributes.
*/
public AttributeSet getResolveParent()
@@ -139,7 +139,7 @@ public class htmlAttributeSet
/**
* Add the attribute to this attribute set.
- *
+ *
* @param key Attribute key (if string, it will be case insensitive)
* @param value Attribute value
*/
@@ -164,11 +164,11 @@ public class htmlAttributeSet
return new SmallHtmlAttributeSet(this);
else
return (AttributeSet) clone();
- }
-
+ }
+
/**
* Returns a clone of the attribute set.
- *
+ *
* @return A clone of the attribute set.
*/
public Object clone()
@@ -179,5 +179,5 @@ public class htmlAttributeSet
if (parent != null)
set.setResolveParent(parent);
return set;
- }
+ }
}
diff --git a/gnu/javax/swing/text/html/parser/htmlValidator.java b/gnu/javax/swing/text/html/parser/htmlValidator.java
index 7f16f1f2d..2b624cc3c 100644
--- a/gnu/javax/swing/text/html/parser/htmlValidator.java
+++ b/gnu/javax/swing/text/html/parser/htmlValidator.java
@@ -178,7 +178,7 @@ public abstract class htmlValidator
// If the tag has a content model defined, forcibly close all
// tags that were opened after the tag being currently closed.
- closing:
+ closing:
if (x.element.content != null)
{
iter = stack.listIterator(stack.size());
@@ -272,7 +272,7 @@ public abstract class htmlValidator
{
if (!stack.isEmpty())
{
- closing:
+ closing:
do
{
hTag last = (hTag) stack.getLast();
@@ -311,7 +311,7 @@ public abstract class htmlValidator
* content model recommends to insert making the situation ok. If Boolean.True
* is returned, the content model current position is moved forward. Otherwise
* this position remains the same.
- *
+ *
* @param tElement
* @return
*/
@@ -503,9 +503,9 @@ public abstract class htmlValidator
{
CPStringBuilder valid =
new CPStringBuilder("The tag <" + tag.getHTMLTag() +
- "> cannot contain the attribute '" + foundAttribute +
- "'. The valid attributes for this tag are: "
- );
+ "> cannot contain the attribute '" + foundAttribute +
+ "'. The valid attributes for this tag are: "
+ );
AttributeList a = tag.getElement().getAttributes();
@@ -551,18 +551,18 @@ public abstract class htmlValidator
if (dtdAttribute.values.size() == 1)
valid =
new CPStringBuilder("The attribute '" + foundAttribute +
- "' of the tag <" + tag.getHTMLTag() +
- "> cannot have the value '" + value +
- "'. The only valid value is "
- );
+ "' of the tag <" + tag.getHTMLTag() +
+ "> cannot have the value '" + value +
+ "'. The only valid value is "
+ );
else
valid =
new CPStringBuilder("The attribute '" + foundAttribute +
- "' of the tag <" + tag.getHTMLTag() +
- "> cannot have the value '" + value + "'. The " +
- dtdAttribute.values.size() +
- " valid values are: "
- );
+ "' of the tag <" + tag.getHTMLTag() +
+ "> cannot have the value '" + value + "'. The " +
+ dtdAttribute.values.size() +
+ " valid values are: "
+ );
Enumeration vv = dtdAttribute.values.elements();
while (vv.hasMoreElements())
diff --git a/gnu/javax/swing/text/html/parser/models/list.java b/gnu/javax/swing/text/html/parser/models/list.java
index c303ae857..1ff22f8cd 100644
--- a/gnu/javax/swing/text/html/parser/models/list.java
+++ b/gnu/javax/swing/text/html/parser/models/list.java
@@ -156,7 +156,7 @@ public class list
matched = false;
x = tokens [ i ];
- nodescan:
+ nodescan:
for (int j = 0; j < nodes.length; j++)
{
if (!nodes [ j ].isClosed())
@@ -204,7 +204,7 @@ public class list
public boolean performMatch(Object token)
{
boolean ok = false;
- Matching:
+ Matching:
for (int i = 0; i < nodes.length; i++)
{
ok = nodes [ i ].performMatch(token);
@@ -248,7 +248,7 @@ public class list
boolean m;
boolean matched = false;
- nodescan:
+ nodescan:
for (int j = 0; j < nodes.length; j++)
{
if (!nodes [ j ].isClosed())
diff --git a/gnu/javax/swing/text/html/parser/support/Parser.java b/gnu/javax/swing/text/html/parser/support/Parser.java
index b087c3c00..cdefb75c8 100644
--- a/gnu/javax/swing/text/html/parser/support/Parser.java
+++ b/gnu/javax/swing/text/html/parser/support/Parser.java
@@ -400,7 +400,7 @@ public class Parser
if (start.kind == EOF)
return;
- read:
+ read:
while (true)
{
t = getTokenAhead();
@@ -446,7 +446,7 @@ public class Parser
Token t;
Token last;
- comment:
+ comment:
while (true)
{
t = getTokenAhead();
@@ -525,7 +525,7 @@ public class Parser
restOfTag(false, name, start);
buffer.setLength(0);
-
+
while (!SCRIPT_CLOSE.matches(this))
{
append(getNextToken());
@@ -554,7 +554,7 @@ public class Parser
mustBe(EXCLAMATION);
buffer.setLength(0);
- read:
+ read:
while (true)
{
t = getNextToken();
@@ -607,7 +607,7 @@ public class Parser
restOfTag(false, name, start);
buffer.setLength(0);
-
+
while (!STYLE_CLOSE.matches(this))
{
append(getNextToken());
@@ -944,7 +944,7 @@ public class Parser
optional(WS);
- attributeReading:
+ attributeReading:
while (getTokenAhead().kind == NUMTOKEN)
{
name = getNextToken();
@@ -1012,7 +1012,7 @@ public class Parser
case SLASH:
value = next;
optional(WS);
-
+
// Check maybe the opening quote is missing.
next = getTokenAhead();
if (bQUOTING.get(next.kind))
@@ -1289,7 +1289,7 @@ public class Parser
int closeAt = 0;
buffer.setLength(0);
- ahead:
+ ahead:
for (int i = 1; i < 100; i++)
{
t = getTokenAhead(i - 1);
@@ -1356,7 +1356,7 @@ public class Parser
throws ParseException
{
buffer.setLength(0);
- read:
+ read:
while (true)
{
t = getNextToken();
diff --git a/gnu/javax/swing/text/html/parser/support/low/ReaderTokenizer.java b/gnu/javax/swing/text/html/parser/support/low/ReaderTokenizer.java
index 80bb333a5..45ac181b3 100644
--- a/gnu/javax/swing/text/html/parser/support/low/ReaderTokenizer.java
+++ b/gnu/javax/swing/text/html/parser/support/low/ReaderTokenizer.java
@@ -247,7 +247,7 @@ public class ReaderTokenizer
{
if (numberOfTokens <= 0)
return;
-
+
for (int i = 0; i < numberOfTokens; i++)
readToken();
}
@@ -261,7 +261,7 @@ public class ReaderTokenizer
Token t;
int ch;
- enlarging:
+ enlarging:
while (true)
{
t = tokenMatches();
diff --git a/gnu/javax/swing/text/html/parser/support/textPreProcessor.java b/gnu/javax/swing/text/html/parser/support/textPreProcessor.java
index 0cb6d7a59..22c44be4f 100644
--- a/gnu/javax/swing/text/html/parser/support/textPreProcessor.java
+++ b/gnu/javax/swing/text/html/parser/support/textPreProcessor.java
@@ -51,7 +51,7 @@ public class textPreProcessor
* Pre - process non-preformatted text. \t, \r and \n mutate into spaces, then
* multiple spaces mutate into single one, all whitespace around tags is
* consumed. The content of the passed buffer is destroyed.
- *
+ *
* @param a_text A text to pre-process.
*/
public char[] preprocess(StringBuffer a_text)
diff --git a/gnu/javax/swing/tree/GnuPath.java b/gnu/javax/swing/tree/GnuPath.java
index dd576e8d3..568ffd102 100644
--- a/gnu/javax/swing/tree/GnuPath.java
+++ b/gnu/javax/swing/tree/GnuPath.java
@@ -43,7 +43,7 @@ import javax.swing.tree.TreePath;
/**
* The tree path with additional data. Needed for the optimized tree drawing.
* Returned by layout caches.
- *
+ *
* @author Audrius Meskauskas
*/
public class GnuPath extends TreePath
@@ -52,10 +52,10 @@ public class GnuPath extends TreePath
* The flag, marking the last visible child.
*/
public boolean isLastChild;
-
+
/**
* Create a new path, specifying flag if this path is the path to the
- * last visible child (needed for optimized tree drawing).
+ * last visible child (needed for optimized tree drawing).
*/
public GnuPath(Object[] path, boolean lastChild)
{
diff --git a/gnu/test/Fail.java b/gnu/test/Fail.java
index f1c4a0cd2..b3a032077 100644
--- a/gnu/test/Fail.java
+++ b/gnu/test/Fail.java
@@ -1,4 +1,4 @@
-/* Fail.java -- Result code returned when test failed but was expected to
+/* Fail.java -- Result code returned when test failed but was expected to
Copyright (c) 1998 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/gnu/test/Pass.java b/gnu/test/Pass.java
index abec54ef6..fbbd3b29f 100644
--- a/gnu/test/Pass.java
+++ b/gnu/test/Pass.java
@@ -1,4 +1,4 @@
-/* Pass.java -- Result code returned when test passed and was excepted to
+/* Pass.java -- Result code returned when test passed and was excepted to
Copyright (c) 1998 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/gnu/test/Test.java b/gnu/test/Test.java
index 6b2e18df1..f60c6dffc 100644
--- a/gnu/test/Test.java
+++ b/gnu/test/Test.java
@@ -41,7 +41,7 @@ package gnu.test;
* Interface which all GNU Classpath tests must implement.
* The method <code>test</code> is invoked once for each test.
*/
-public interface Test
+public interface Test
{
/**
* Returns the name of the test.
diff --git a/gnu/test/Unsupported.java b/gnu/test/Unsupported.java
index c6dabb09a..a1ad03290 100644
--- a/gnu/test/Unsupported.java
+++ b/gnu/test/Unsupported.java
@@ -40,7 +40,7 @@ package gnu.test;
/**
* Test does not have the required support to run. For example,
* Unsupported could be returned when a needed resource
- * (ie. multicasting) is not available.
+ * (ie. multicasting) is not available.
*/
public class Unsupported extends Result
{
diff --git a/gnu/xml/aelfred2/JAXPFactory.java b/gnu/xml/aelfred2/JAXPFactory.java
index 011ca3c6a..094442765 100644
--- a/gnu/xml/aelfred2/JAXPFactory.java
+++ b/gnu/xml/aelfred2/JAXPFactory.java
@@ -1,4 +1,4 @@
-/* JAXPFactory.java --
+/* JAXPFactory.java --
Copyright (C) 2001 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -63,7 +63,7 @@ import javax.xml.parsers.SAXParserFactory;
public final class JAXPFactory
extends SAXParserFactory
{
-
+
private Hashtable flags = new Hashtable();
/**
@@ -86,7 +86,7 @@ public final class JAXPFactory
parser.setFeature(SAXDriver.FEATURE + "validation",
isValidating());
// that makes SAX2 feature flags trump JAXP
-
+
while (e.hasMoreElements())
{
String uri = (String) e.nextElement();
@@ -98,8 +98,8 @@ public final class JAXPFactory
}
// yes, this "feature transfer" mechanism doesn't play well
-
- public void setFeature(String name, boolean value)
+
+ public void setFeature(String name, boolean value)
throws ParserConfigurationException, SAXNotRecognizedException,
SAXNotSupportedException
{
@@ -108,7 +108,7 @@ public final class JAXPFactory
// force "early" detection of errors where possible
// (flags can't necessarily be set before parsing)
new JaxpParser().getXMLReader().setFeature(name, value);
-
+
flags.put(name, Boolean.valueOf(value));
}
catch (SAXNotRecognizedException e)
@@ -127,12 +127,12 @@ public final class JAXPFactory
}
}
- public boolean getFeature(String name)
+ public boolean getFeature(String name)
throws ParserConfigurationException, SAXNotRecognizedException,
SAXNotSupportedException
{
Boolean value = (Boolean) flags.get(name);
-
+
if (value != null)
{
return value.booleanValue();
@@ -159,25 +159,25 @@ public final class JAXPFactory
}
}
}
-
+
private static class JaxpParser
extends SAXParser
{
-
+
private XmlReader ae2 = new XmlReader();
private XMLReaderAdapter parser = null;
-
+
JaxpParser()
{
}
- public void setProperty(String id, Object value)
+ public void setProperty(String id, Object value)
throws SAXNotRecognizedException, SAXNotSupportedException
{
ae2.setProperty(id, value);
}
- public Object getProperty(String id)
+ public Object getProperty(String id)
throws SAXNotRecognizedException, SAXNotSupportedException
{
return ae2.getProperty(id);
@@ -210,7 +210,7 @@ public final class JAXPFactory
throw new Error();
}
}
-
+
public boolean isValidating()
{
try
@@ -222,10 +222,9 @@ public final class JAXPFactory
throw new Error();
}
}
-
+
// TODO isXIncludeAware()
-
+
}
-
-}
+}
diff --git a/gnu/xml/aelfred2/SAXDriver.java b/gnu/xml/aelfred2/SAXDriver.java
index e7c4d5a3f..6ce14707b 100644
--- a/gnu/xml/aelfred2/SAXDriver.java
+++ b/gnu/xml/aelfred2/SAXDriver.java
@@ -1,4 +1,4 @@
-/* SAXDriver.java --
+/* SAXDriver.java --
Copyright (C) 1999,2000,2001,2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -80,45 +80,45 @@ import org.xml.sax.helpers.NamespaceSupport;
*
* <table border="1" width='100%' cellpadding='3' cellspacing='0'>
* <tr bgcolor='#ccccff'>
- * <th><font size='+1'>Name</font></th>
- * <th><font size='+1'>Notes</font></th></tr>
+ * <th><font size='+1'>Name</font></th>
+ * <th><font size='+1'>Notes</font></th></tr>
*
* <tr><td colspan=2><center><em>Features ... URL prefix is
* <b>http://xml.org/sax/features/</b></em></center></td></tr>
*
* <tr><td>(URL)/external-general-entities</td>
- * <td>Value defaults to <em>true</em></td></tr>
+ * <td>Value defaults to <em>true</em></td></tr>
* <tr><td>(URL)/external-parameter-entities</td>
- * <td>Value defaults to <em>true</em></td></tr>
+ * <td>Value defaults to <em>true</em></td></tr>
* <tr><td>(URL)/is-standalone</td>
- * <td>(PRELIMINARY) Returns true iff the document's parsing
- * has started (some non-error event after <em>startDocument()</em>
- * was reported) and the document's standalone flag is set.</td></tr>
+ * <td>(PRELIMINARY) Returns true iff the document's parsing
+ * has started (some non-error event after <em>startDocument()</em>
+ * was reported) and the document's standalone flag is set.</td></tr>
* <tr><td>(URL)/namespace-prefixes</td>
- * <td>Value defaults to <em>false</em> (but XML 1.0 names are
- * always reported)</td></tr>
+ * <td>Value defaults to <em>false</em> (but XML 1.0 names are
+ * always reported)</td></tr>
* <tr><td>(URL)/lexical-handler/parameter-entities</td>
- * <td>Value is fixed at <em>true</em></td></tr>
+ * <td>Value is fixed at <em>true</em></td></tr>
* <tr><td>(URL)/namespaces</td>
- * <td>Value defaults to <em>true</em></td></tr>
+ * <td>Value defaults to <em>true</em></td></tr>
* <tr><td>(URL)/resolve-dtd-uris</td>
- * <td>(PRELIMINARY) Value defaults to <em>true</em></td></tr>
+ * <td>(PRELIMINARY) Value defaults to <em>true</em></td></tr>
* <tr><td>(URL)/string-interning</td>
- * <td>Value is fixed at <em>true</em></td></tr>
+ * <td>Value is fixed at <em>true</em></td></tr>
* <tr><td>(URL)/use-attributes2</td>
- * <td>(PRELIMINARY) Value is fixed at <em>true</em></td></tr>
+ * <td>(PRELIMINARY) Value is fixed at <em>true</em></td></tr>
* <tr><td>(URL)/use-entity-resolver2</td>
- * <td>(PRELIMINARY) Value defaults to <em>true</em></td></tr>
+ * <td>(PRELIMINARY) Value defaults to <em>true</em></td></tr>
* <tr><td>(URL)/validation</td>
- * <td>Value is fixed at <em>false</em></td></tr>
+ * <td>Value is fixed at <em>false</em></td></tr>
*
* <tr><td colspan=2><center><em>Handler Properties ... URL prefix is
* <b>http://xml.org/sax/properties/</b></em></center></td></tr>
*
* <tr><td>(URL)/declaration-handler</td>
- * <td>A declaration handler may be provided. </td></tr>
+ * <td>A declaration handler may be provided. </td></tr>
* <tr><td>(URL)/lexical-handler</td>
- * <td>A lexical handler may be provided. </td></tr>
+ * <td>A lexical handler may be provided. </td></tr>
* </table>
*
* <p>This parser currently implements the SAX1 Parser API, but
@@ -131,10 +131,10 @@ import org.xml.sax.helpers.NamespaceSupport;
final public class SAXDriver
implements Locator, Attributes2, XMLReader, Parser, AttributeList
{
-
+
private final DefaultHandler2 base = new DefaultHandler2();
private XmlParser parser;
-
+
private EntityResolver entityResolver = base;
private EntityResolver2 resolver2 = null;
private ContentHandler contentHandler = base;
@@ -142,28 +142,28 @@ final public class SAXDriver
private ErrorHandler errorHandler = base;
private DeclHandler declHandler = base;
private LexicalHandler lexicalHandler = base;
-
+
private String elementName;
private Stack entityStack;
-
+
// one vector (of object/struct): faster, smaller
private List attributesList;
-
+
private boolean namespaces = true;
private boolean xmlNames = false;
private boolean extGE = true;
private boolean extPE = true;
private boolean resolveAll = true;
private boolean useResolver2 = true;
-
+
// package private to allow (read-only) access in XmlParser
boolean stringInterning = true;
-
+
private int attributeCount;
private boolean attributes;
private String[] nsTemp;
private NamespaceSupport prefixStack;
-
+
//
// Constructor.
//
@@ -355,12 +355,12 @@ final public class SAXDriver
throw new IllegalStateException();
}
parser.setHandler(this);
-
+
try
{
Reader r = source.getCharacterStream();
InputStream in = source.getByteStream();
-
+
parser.doParse(source.getSystemId(),
source.getPublicId(),
r,
@@ -430,7 +430,7 @@ final public class SAXDriver
{
return extPE;
}
-
+
// element/attribute names are as written in document; no mangling
if ((FEATURE + "namespace-prefixes").equals(featureId))
{
@@ -454,15 +454,15 @@ final public class SAXDriver
{
return stringInterning;
}
-
+
// EXTENSIONS 1.1
-
+
// always returns isSpecified info
if ((FEATURE + "use-attributes2").equals(featureId))
{
return true;
}
-
+
// meaningful between startDocument/endDocument
if ((FEATURE + "is-standalone").equals(featureId))
{
@@ -484,7 +484,7 @@ final public class SAXDriver
{
return useResolver2;
}
-
+
throw new SAXNotRecognizedException(featureId);
}
@@ -518,7 +518,7 @@ final public class SAXDriver
{
return (lexicalHandler == base) ? null : lexicalHandler;
}
-
+
// unknown properties
throw new SAXNotRecognizedException(propertyId);
}
@@ -531,10 +531,10 @@ final public class SAXDriver
throws SAXNotRecognizedException, SAXNotSupportedException
{
boolean state;
-
+
// Features with a defined value, we just change it if we can.
state = getFeature (featureId);
-
+
if (state == value)
{
return;
@@ -601,9 +601,9 @@ final public class SAXDriver
{
// see if the property is recognized
getProperty(propertyId);
-
+
// Properties with a defined value, we just change it if we can.
-
+
if ((PROPERTY + "declaration-handler").equals(propertyId))
{
if (value == null)
@@ -620,7 +620,7 @@ final public class SAXDriver
}
return ;
}
-
+
if ((PROPERTY + "lexical-handler").equals(propertyId))
{
if (value == null)
@@ -637,7 +637,7 @@ final public class SAXDriver
}
return;
}
-
+
throw new SAXNotSupportedException(propertyId);
}
@@ -676,7 +676,7 @@ final public class SAXDriver
throws SAXException, IOException
{
InputSource source;
-
+
// external entities might be skipped
if (isPE && !extPE)
{
@@ -724,7 +724,7 @@ final public class SAXDriver
// FIXME normalize system IDs -- when?
// - Convert to UTF-8
// - Map reserved and non-ASCII characters to %HH
-
+
try
{
if (baseURI == null)
@@ -749,7 +749,7 @@ final public class SAXDriver
{
throw e;
}
-
+
// sometimes sysids for notations or unparsed entities
// aren't really URIs...
warn("Can't absolutize SYSTEM id: " + e.getMessage());
@@ -800,15 +800,15 @@ final public class SAXDriver
throws SAXException
{
lexicalHandler.startDTD(name, publicId, systemId);
-
+
// ... the "name" is a declaration and should be given
// to the DeclHandler (but sax2 doesn't).
-
+
// the IDs for the external subset are lexical details,
// as are the contents of the internal subset; but sax2
// doesn't provide the internal subset "pre-parse"
}
-
+
void notationDecl(String name, String publicId, String systemId,
String baseUri)
throws SAXException
@@ -857,7 +857,7 @@ final public class SAXDriver
{
int index = uri.indexOf(':');
- // many versions of nwalsh docbook stylesheets
+ // many versions of nwalsh docbook stylesheets
// have bogus URLs; so this can't be an error...
if (index < 1 && uri.length() != 0)
{
@@ -866,7 +866,7 @@ final public class SAXDriver
// FIXME: char [0] must be ascii alpha; chars [1..index]
// must be ascii alphanumeric or in "+-." [RFC 2396]
-
+
//Namespace Constraints
//name for xml prefix must be http://www.w3.org/XML/1998/namespace
boolean prefixEquality = prefix.equals("xml");
@@ -876,13 +876,13 @@ final public class SAXDriver
fatal("xml is by definition bound to the namespace name " +
"http://www.w3.org/XML/1998/namespace");
}
-
+
//xmlns prefix declaration is illegal but xml prefix declaration is llegal...
if (prefixEquality && uriEquality)
{
return;
}
-
+
//name for xmlns prefix must be http://www.w3.org/2000/xmlns/
prefixEquality = prefix.equals("xmlns");
uriEquality = uri.equals("http://www.w3.org/2000/xmlns/");
@@ -891,14 +891,14 @@ final public class SAXDriver
fatal("http://www.w3.org/2000/xmlns/ is by definition bound" +
" to prefix xmlns");
}
-
+
//even if the uri is http://www.w3.org/2000/xmlns/
// it is illegal to declare it
if (prefixEquality && uriEquality)
{
fatal ("declaring the xmlns prefix is illegal");
}
-
+
uri = uri.intern();
prefixStack.declarePrefix(prefix, uri);
contentHandler.startPrefixMapping(prefix, uri);
@@ -915,13 +915,13 @@ final public class SAXDriver
prefixStack.pushContext();
}
}
-
+
// process namespace decls immediately;
// then maybe forget this as an attribute
if (namespaces)
{
int index;
-
+
// default NS declaration?
if (stringInterning)
{
@@ -938,11 +938,11 @@ final public class SAXDriver
&& qname.startsWith("xmlns"))
{
String prefix = qname.substring(6);
-
+
if (prefix.equals(""))
{
fatal("missing prefix " +
- "in namespace declaration attribute");
+ "in namespace declaration attribute");
}
if (value.length() == 0)
{
@@ -974,7 +974,7 @@ final public class SAXDriver
&& qname.startsWith("xmlns"))
{
String prefix = qname.substring(6);
-
+
if (value.length() == 0)
{
verror("missing URI in namespace decl attribute: "
@@ -993,12 +993,12 @@ final public class SAXDriver
}
// remember this attribute ...
attributeCount++;
-
+
// attribute type comes from querying parser's DTD records
attributesList.add(new Attribute(qname, value, isSpecified));
-
+
}
-
+
void startElement(String elname)
throws SAXException
{
@@ -1016,7 +1016,7 @@ final public class SAXDriver
// String.hashCode() (1.5%) and about 1.3% each for pushing
// the context, and two chunks of name processing.
//
-
+
if (!attributes)
{
if (namespaces)
@@ -1026,7 +1026,7 @@ final public class SAXDriver
}
else if (namespaces)
{
-
+
// now we can patch up namespace refs; we saw all the
// declarations, so now we'll do the Right Thing
Iterator itt = attributesList.iterator();
@@ -1035,7 +1035,7 @@ final public class SAXDriver
Attribute attribute = (Attribute) itt.next();
String qname = attribute.name;
int index;
-
+
// default NS declaration?
if (stringInterning)
{
@@ -1059,13 +1059,13 @@ final public class SAXDriver
"character are invalid");
}
index = qname.indexOf(':');
-
+
// NS prefix declaration?
if (index == 5 && qname.startsWith("xmlns"))
{
continue;
}
-
+
// it's not a NS decl; patch namespace info items
if (prefixStack.processName(qname, nsTemp, true) == null)
{
@@ -1078,7 +1078,7 @@ final public class SAXDriver
}
}
}
-
+
// save element name so attribute callbacks work
elementName = elname;
if (namespaces)
@@ -1095,7 +1095,7 @@ final public class SAXDriver
handler.startElement("", "", elname, this);
}
// elementName = null;
-
+
// elements with no attributes are pretty common!
if (attributes)
{
@@ -1104,7 +1104,7 @@ final public class SAXDriver
attributes = false;
}
}
-
+
void endElement(String elname)
throws SAXException
{
@@ -1117,9 +1117,9 @@ final public class SAXDriver
}
prefixStack.processName(elname, nsTemp, false);
handler.endElement(nsTemp[0], nsTemp[1], elname);
-
+
Enumeration prefixes = prefixStack.getDeclaredPrefixes();
-
+
while (prefixes.hasMoreElements())
{
handler.endPrefixMapping((String) prefixes.nextElement());
@@ -1170,7 +1170,7 @@ final public class SAXDriver
throws SAXException
{
SAXParseException fatal;
-
+
fatal = new SAXParseException(message, this);
errorHandler.fatalError(fatal);
@@ -1184,16 +1184,16 @@ final public class SAXDriver
throws SAXException
{
SAXParseException err;
-
+
err = new SAXParseException(message, this);
errorHandler.error(err);
}
-
+
void warn(String message)
throws SAXException
{
SAXParseException err;
-
+
err = new SAXParseException(message, this);
errorHandler.warning(err);
}
@@ -1307,7 +1307,7 @@ final public class SAXDriver
public int getIndex(String uri, String local)
{
int length = getLength();
-
+
for (int i = 0; i < length; i++)
{
if (!getURI(i).equals(uri))
@@ -1328,7 +1328,7 @@ final public class SAXDriver
public int getIndex(String xmlName)
{
int length = getLength();
-
+
for (int i = 0; i < length; i++)
{
if (getQName(i).equals(xmlName))
@@ -1345,7 +1345,7 @@ final public class SAXDriver
public String getType(String uri, String local)
{
int index = getIndex(uri, local);
-
+
if (index < 0)
{
return null;
@@ -1360,7 +1360,7 @@ final public class SAXDriver
public String getType(String xmlName)
{
int index = getIndex(xmlName);
-
+
if (index < 0)
{
return null;
@@ -1374,7 +1374,7 @@ final public class SAXDriver
public String getValue(String uri, String local)
{
int index = getIndex(uri, local);
-
+
if (index < 0)
{
return null;
@@ -1389,7 +1389,7 @@ final public class SAXDriver
public String getValue(String xmlName)
{
int index = getIndex(xmlName);
-
+
if (index < 0)
{
return null;
@@ -1404,7 +1404,7 @@ final public class SAXDriver
/** @return false unless the attribute was declared in the DTD.
* @throws java.lang.ArrayIndexOutOfBoundsException
* When the supplied index does not identify an attribute.
- */
+ */
public boolean isDeclared(int index)
{
if (index < 0 || index >= attributeCount)
@@ -1513,7 +1513,7 @@ final public class SAXDriver
private static class Adapter
implements ContentHandler
{
-
+
private DocumentHandler docHandler;
Adapter(DocumentHandler dh)
@@ -1525,19 +1525,19 @@ final public class SAXDriver
{
docHandler.setDocumentLocator(l);
}
-
+
public void startDocument()
throws SAXException
{
docHandler.startDocument();
}
-
+
public void processingInstruction(String target, String data)
throws SAXException
{
docHandler.processingInstruction(target, data);
}
-
+
public void startPrefixMapping(String prefix, String uri)
{
/* ignored */
@@ -1589,13 +1589,13 @@ final public class SAXDriver
private static class Attribute
{
-
+
String name;
String value;
String nameSpace;
String localName;
boolean specified;
-
+
Attribute(String name, String value, boolean specified)
{
this.name = name;
@@ -1603,7 +1603,7 @@ final public class SAXDriver
this.nameSpace = "";
this.specified = specified;
}
-
+
}
}
diff --git a/gnu/xml/aelfred2/XmlParser.java b/gnu/xml/aelfred2/XmlParser.java
index c0fd8027c..813593d93 100644
--- a/gnu/xml/aelfred2/XmlParser.java
+++ b/gnu/xml/aelfred2/XmlParser.java
@@ -1,4 +1,4 @@
-/* XmlParser.java --
+/* XmlParser.java --
Copyright (C) 1999,2000,2001 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -81,7 +81,7 @@ import org.xml.sax.SAXException;
* internal parser interfaces are subject to change.
*
* @author Written by David Megginson &lt;dmeggins@microstar.com&gt;
- * (version 1.2a with bugfixes)
+ * (version 1.2a with bugfixes)
* @author Updated by David Brownell &lt;dbrownell@users.sourceforge.net&gt;
* @see SAXDriver
*/
@@ -94,74 +94,74 @@ final class XmlParser
////////////////////////////////////////////////////////////////////////
// Constants.
////////////////////////////////////////////////////////////////////////
-
+
//
// Constants for element content type.
//
-
+
/**
* Constant: an element has not been declared.
* @see #getElementContentType
*/
public final static int CONTENT_UNDECLARED = 0;
-
+
/**
* Constant: the element has a content model of ANY.
* @see #getElementContentType
*/
public final static int CONTENT_ANY = 1;
-
+
/**
* Constant: the element has declared content of EMPTY.
* @see #getElementContentType
*/
public final static int CONTENT_EMPTY = 2;
-
+
/**
* Constant: the element has mixed content.
* @see #getElementContentType
*/
public final static int CONTENT_MIXED = 3;
-
+
/**
* Constant: the element has element content.
* @see #getElementContentType
*/
public final static int CONTENT_ELEMENTS = 4;
-
-
+
+
//
// Constants for the entity type.
//
-
+
/**
* Constant: the entity has not been declared.
* @see #getEntityType
*/
public final static int ENTITY_UNDECLARED = 0;
-
+
/**
* Constant: the entity is internal.
* @see #getEntityType
*/
public final static int ENTITY_INTERNAL = 1;
-
+
/**
* Constant: the entity is external, non-parsable data.
* @see #getEntityType
*/
public final static int ENTITY_NDATA = 2;
-
+
/**
* Constant: the entity is external XML data.
* @see #getEntityType
*/
public final static int ENTITY_TEXT = 3;
-
+
//
// Attribute type constants are interned literal strings.
//
-
+
//
// Constants for supported encodings. "external" is just a flag.
//
@@ -175,43 +175,43 @@ final class XmlParser
private final static int ENCODING_UCS_4_2143 = 7;
private final static int ENCODING_UCS_4_3412 = 8;
private final static int ENCODING_ASCII = 9;
-
+
//
// Constants for attribute default value.
//
-
+
/**
* Constant: the attribute is not declared.
* @see #getAttributeDefaultValueType
*/
public final static int ATTRIBUTE_DEFAULT_UNDECLARED = 30;
-
+
/**
* Constant: the attribute has a literal default value specified.
* @see #getAttributeDefaultValueType
* @see #getAttributeDefaultValue
*/
public final static int ATTRIBUTE_DEFAULT_SPECIFIED = 31;
-
+
/**
* Constant: the attribute was declared #IMPLIED.
* @see #getAttributeDefaultValueType
*/
public final static int ATTRIBUTE_DEFAULT_IMPLIED = 32;
-
+
/**
* Constant: the attribute was declared #REQUIRED.
* @see #getAttributeDefaultValueType
*/
public final static int ATTRIBUTE_DEFAULT_REQUIRED = 33;
-
+
/**
* Constant: the attribute was declared #FIXED.
* @see #getAttributeDefaultValueType
* @see #getAttributeDefaultValue
*/
public final static int ATTRIBUTE_DEFAULT_FIXED = 34;
-
+
//
// Constants for input.
//
@@ -219,7 +219,7 @@ final class XmlParser
private final static int INPUT_INTERNAL = 1;
private final static int INPUT_STREAM = 3;
private final static int INPUT_READER = 5;
-
+
//
// Flags for reading literals.
//
@@ -227,7 +227,7 @@ final class XmlParser
private final static int LIT_ENTITY_REF = 2;
// normalize this value (space chars) (attributes, public ids)
private final static int LIT_NORMALIZE = 4;
- // literal is an attribute value
+ // literal is an attribute value
private final static int LIT_ATTRIBUTE = 8;
// don't expand parameter entities
private final static int LIT_DISABLE_PE = 16;
@@ -235,30 +235,30 @@ final class XmlParser
private final static int LIT_DISABLE_CREF = 32;
// don't parse general entity refs
private final static int LIT_DISABLE_EREF = 64;
- // literal is a public ID value
+ // literal is a public ID value
private final static int LIT_PUBID = 256;
-
+
//
// Flags affecting PE handling in DTDs (if expandPE is true).
// PEs expand with space padding, except inside literals.
//
private final static int CONTEXT_NORMAL = 0;
private final static int CONTEXT_LITERAL = 1;
-
+
// Emit warnings for relative URIs with no base URI.
static boolean uriWarnings;
static
{
String key = "gnu.xml.aelfred2.XmlParser.uriWarnings";
GetPropertyAction a = new GetPropertyAction(key);
- uriWarnings = "true".equals(AccessController.doPrivileged(a));
+ uriWarnings = "true".equals(AccessController.doPrivileged(a));
}
-
+
//
// The current XML handler interface.
//
private SAXDriver handler;
-
+
//
// I/O information.
//
@@ -272,7 +272,7 @@ final class XmlParser
private int encoding; // current character encoding
private int currentByteCount; // bytes read from current source
private InputSource scratch; // temporary
-
+
//
// Buffers for decoded but unparsed character input.
//
@@ -280,33 +280,33 @@ final class XmlParser
private int readBufferPos;
private int readBufferLength;
private int readBufferOverflow; // overflow from last data chunk.
-
+
//
// Buffer for undecoded raw byte input.
//
private final static int READ_BUFFER_MAX = 16384;
private byte[] rawReadBuffer;
-
-
+
+
//
// Buffer for attribute values, char refs, DTD stuff.
//
private static int DATA_BUFFER_INITIAL = 4096;
private char[] dataBuffer;
private int dataBufferPos;
-
+
//
// Buffer for parsed names.
//
private static int NAME_BUFFER_INITIAL = 1024;
private char[] nameBuffer;
private int nameBufferPos;
-
+
//
// Save any standalone flag
//
private boolean docIsStandalone;
-
+
//
// Hashtables for DTD information on elements, entities, and notations.
// Populated until we start ignoring decls (because of skipping a PE)
@@ -315,18 +315,18 @@ final class XmlParser
private HashMap entityInfo;
private HashMap notationInfo;
private boolean skippedPE;
-
+
//
// Element type currently in force.
//
private String currentElement;
private int currentElementContent;
-
+
//
// Stack of entity names, to detect recursion.
//
private LinkedList entityStack;
-
+
//
// PE expansion is enabled in most chunks of the DTD, not all.
// When it's enabled, literals are treated differently.
@@ -334,14 +334,14 @@ final class XmlParser
private boolean inLiteral;
private boolean expandPE;
private boolean peIsError;
-
+
//
// can't report entity expansion inside two constructs:
// - attribute expansions (internal entities only)
// - markup declarations (parameter entities only)
//
private boolean doReport;
-
+
//
// Symbol table, for caching interned names.
//
@@ -358,38 +358,38 @@ final class XmlParser
// 32 bit hardware.
//
private final static int SYMBOL_TABLE_LENGTH = 2039;
-
+
private Object[][] symbolTable;
-
+
//
// Hash table of attributes found in current start tag.
//
private String[] tagAttributes;
private int tagAttributePos;
-
+
//
// Utility flag: have we noticed a CR while reading the last
// data chunk? If so, we will have to go back and normalise
// CR or CR/LF line ends.
//
private boolean sawCR;
-
+
//
// Utility flag: are we in CDATA? If so, whitespace isn't ignorable.
- //
+ //
private boolean inCDATA;
-
+
//
// Xml version.
- //
- private static final int XML_10 = 0;
- private static final int XML_11 = 1;
+ //
+ private static final int XML_10 = 0;
+ private static final int XML_11 = 1;
private int xmlVersion = XML_10;
//////////////////////////////////////////////////////////////////////
// Constructors.
////////////////////////////////////////////////////////////////////////
-
+
/**
* Construct a new parser with no associated handler.
* @see #setHandler
@@ -422,14 +422,14 @@ final class XmlParser
* which MUST NOT REUSE the parser (just null it).
*
* @param systemId Absolute URI of the document; should never be null,
- * but may be so iff a reader <em>or</em> a stream is provided.
+ * but may be so iff a reader <em>or</em> a stream is provided.
* @param publicId The public identifier of the document, or null.
* @param reader A character stream; must be null if stream isn't.
* @param stream A byte input stream; must be null if reader isn't.
* @param encoding The suggested encoding, or null if unknown.
* @exception java.lang.Exception Basically SAXException or IOException
*/
- // package private
+ // package private
void doParse(String systemId, String publicId, Reader reader,
InputStream stream, String encoding)
throws Exception
@@ -459,7 +459,7 @@ final class XmlParser
// default baseURI: null
new ExternalIdentifiers(publicId, systemId, null),
reader, stream, encoding, false);
-
+
parseDocument();
}
catch (EOFException e)
@@ -509,7 +509,7 @@ final class XmlParser
//////////////////////////////////////////////////////////////////////
// Error reporting.
//////////////////////////////////////////////////////////////////////
-
+
/**
* Report an error.
* @param message The error message.
@@ -529,7 +529,7 @@ final class XmlParser
message = message + " (expected \"" + textExpected + "\")";
}
handler.fatal(message);
-
+
// "can't happen"
throw new SAXException(message);
}
@@ -581,7 +581,7 @@ final class XmlParser
{ // added by MHK
error("premature end of file", "[EOF]", null);
}
-
+
try
{
parseMisc(); //skip all white, PIs, and comments
@@ -593,7 +593,7 @@ final class XmlParser
return;
}
}
-
+
static final char[] startDelimComment = { '<', '!', '-', '-' };
static final char[] endDelimComment = { '-', '-' };
@@ -609,7 +609,7 @@ final class XmlParser
{
char c;
boolean saved = expandPE;
-
+
expandPE = false;
parseUntil(endDelimComment);
require('>');
@@ -617,7 +617,7 @@ final class XmlParser
handler.comment(dataBuffer, 0, dataBufferPos);
dataBufferPos = 0;
}
-
+
static final char[] startDelimPI = { '<', '?' };
static final char[] endDelimPI = { '?', '>' };
@@ -636,7 +636,7 @@ final class XmlParser
{
String name;
boolean saved = expandPE;
-
+
expandPE = false;
name = readNmtoken(true);
//NE08
@@ -657,7 +657,7 @@ final class XmlParser
expandPE = saved;
handler.processingInstruction(name, dataBufferToString());
}
-
+
static final char[] endDelimCDATA = { ']', ']', '>' };
private boolean isDirtyCurrentElement;
@@ -756,7 +756,7 @@ final class XmlParser
String standalone = null;
int flags = LIT_DISABLE_CREF | LIT_DISABLE_PE | LIT_DISABLE_EREF;
String inputEncoding = null;
-
+
switch (this.encoding)
{
case ENCODING_EXTERNAL:
@@ -773,7 +773,7 @@ final class XmlParser
inputEncoding = "UTF-16LE";
break;
}
-
+
// Read the version.
require("version");
parseEq();
@@ -796,7 +796,7 @@ final class XmlParser
}
// Try reading an encoding declaration.
boolean white = tryWhitespace();
-
+
if (tryRead("encoding"))
{
if (!white)
@@ -810,7 +810,7 @@ final class XmlParser
setupDecoding(encodingName);
}
}
-
+
// Try reading a standalone declaration
if (encodingName != null)
{
@@ -869,13 +869,13 @@ final class XmlParser
String version;
parseEq();
checkLegalVersion(version = readLiteral(flags));
-
+
if (version.equals("1.1"))
{
if (xmlVersion == XML_10)
{
error("external subset has later version number.", "1.0",
- version);
+ version);
}
handler.warn("expected XML version 1.0, not: " + version);
xmlVersion = XML_11;
@@ -886,7 +886,7 @@ final class XmlParser
}
requireWhitespace();
}
-
+
// Read the encoding.
require("encoding");
parseEq();
@@ -897,7 +897,7 @@ final class XmlParser
}
skipWhitespace();
require("?>");
-
+
return encodingName;
}
@@ -921,14 +921,14 @@ final class XmlParser
throws SAXException, IOException
{
encodingName = encodingName.toUpperCase();
-
+
// ENCODING_EXTERNAL indicates an encoding that wasn't
// autodetected ... we can use builtin decoders, or
// ones from the JVM (InputStreamReader).
-
+
// Otherwise we can only tweak what was autodetected, and
// only for single byte (ASCII derived) builtin encodings.
-
+
// ASCII-derived encodings
if (encoding == ENCODING_UTF_8 || encoding == ENCODING_EXTERNAL)
{
@@ -959,7 +959,7 @@ final class XmlParser
// else fallthrough ...
// it's ASCII-ish and something other than a builtin
}
-
+
// Unicode and such
if (encoding == ENCODING_UCS_2_12 || encoding == ENCODING_UCS_2_21)
{
@@ -972,7 +972,7 @@ final class XmlParser
}
return;
}
-
+
// four byte encodings
if (encoding == ENCODING_UCS_4_1234
|| encoding == ENCODING_UCS_4_4321
@@ -987,11 +987,11 @@ final class XmlParser
}
return;
}
-
+
// assert encoding == ENCODING_EXTERNAL
// if (encoding != ENCODING_EXTERNAL)
// throw new RuntimeException ("encoding = " + encoding);
-
+
if (encodingName.equals("UTF-16BE"))
{
encoding = ENCODING_UCS_2_12;
@@ -1002,22 +1002,22 @@ final class XmlParser
encoding = ENCODING_UCS_2_21;
return;
}
-
+
// We couldn't use the builtin decoders at all. But we can try to
// create a reader, since we haven't messed up buffering. Tweak
// the encoding name if necessary.
-
+
if (encodingName.equals("UTF-16")
|| encodingName.equals("ISO-10646-UCS-2"))
{
encodingName = "Unicode";
}
// Ignoring all the EBCDIC aliases here
-
+
reader = new InputStreamReader(is, encodingName);
sourceType = INPUT_READER;
}
-
+
/**
* Parse miscellaneous markup outside the document element and DOCTYPE
* declaration.
@@ -1070,12 +1070,12 @@ final class XmlParser
// report (a) declaration of name, (b) lexical info (ids)
handler.doctypeDecl(rootName, ids.publicId, ids.systemId);
-
+
// Internal subset is parsed first, if present
skipWhitespace();
if (tryRead('['))
{
-
+
// loop until the subset ends
while (true)
{
@@ -1097,10 +1097,10 @@ final class XmlParser
}
skipWhitespace();
require('>');
-
+
// Read the external subset, if any
InputSource subset;
-
+
if (ids.systemId == null)
{
subset = handler.getExternalSubset(rootName,
@@ -1113,7 +1113,7 @@ final class XmlParser
if (ids.systemId != null || subset != null)
{
pushString(null, ">");
-
+
// NOTE: [dtd] is so we say what SAX2 expects,
// though it's misleading (subset, not entire dtd)
if (ids.systemId != null)
@@ -1132,7 +1132,7 @@ final class XmlParser
subset.getEncoding(),
false);
}
-
+
// Loop until we end up back at '>'
while (true)
{
@@ -1150,20 +1150,20 @@ final class XmlParser
expandPE = false;
}
}
-
+
// the ">" string isn't popped yet
if (inputStack.size() != 1)
{
error("external subset has unmatched '>'");
}
}
-
+
// done dtd
handler.endDoctype();
expandPE = false;
doReport = true;
}
-
+
/**
* Parse a markup declaration in the internal or external DTD subset.
* <pre>
@@ -1185,7 +1185,7 @@ final class XmlParser
require('<');
unread('<');
expandPE = false;
-
+
if (tryRead("<!ELEMENT"))
{
saved = readBuffer;
@@ -1246,7 +1246,7 @@ final class XmlParser
handler.verror("Illegal Declaration/PE nesting");
}
}
-
+
/**
* Parse an element, with its tags.
* <pre>
@@ -1270,10 +1270,10 @@ final class XmlParser
// This is the (global) counter for the
// array of specified attributes.
tagAttributePos = 0;
-
+
// Read the element type name.
gi = readNmtoken(true);
-
+
// If we saw no DTD, and this is the document root element,
// let the application modify the input stream by providing one.
if (maybeGetSubset)
@@ -1284,11 +1284,11 @@ final class XmlParser
{
String publicId = subset.getPublicId();
String systemId = subset.getSystemId();
-
+
handler.warn("modifying document by adding DTD");
handler.doctypeDecl(gi, publicId, systemId);
pushString(null, ">");
-
+
// NOTE: [dtd] is so we say what SAX2 expects,
// though it's misleading (subset, not entire dtd)
pushURL(true, "[dtd]",
@@ -1297,7 +1297,7 @@ final class XmlParser
subset.getByteStream(),
subset.getEncoding(),
false);
-
+
// Loop until we end up back at '>'
while (true)
{
@@ -1315,17 +1315,17 @@ final class XmlParser
expandPE = false;
}
}
-
+
// the ">" string isn't popped yet
if (inputStack.size() != 1)
{
error("external subset has unmatched '>'");
}
-
+
handler.endDoctype();
}
}
-
+
// Determine the current content type.
currentElement = gi;
element = (ElementDecl) elementInfo.get(gi);
@@ -1346,7 +1346,7 @@ final class XmlParser
white = tryWhitespace();
c = readCh();
}
-
+
// Supply any defaulted attributes.
Iterator atts = declaredAttributes(element);
if (atts != null)
@@ -1366,7 +1366,7 @@ loop:
}
// ... or has a default
String value = getAttributeDefaultValue(gi, aname);
-
+
if (value == null)
{
continue;
@@ -1395,7 +1395,7 @@ loop:
currentElement = oldElement;
currentElementContent = oldElementContent;
}
-
+
/**
* Parse an attribute assignment.
* <pre>
@@ -1411,11 +1411,11 @@ loop:
String type;
String value;
int flags = LIT_ATTRIBUTE | LIT_ENTITY_REF;
-
+
// Read the attribute name.
aname = readNmtoken(true);
type = getAttributeType(name, aname);
-
+
// Parse '='
parseEq();
@@ -1457,7 +1457,7 @@ loop:
// attribute.
handler.attribute(aname, value, true);
dataBufferPos = 0;
-
+
// Note that the attribute has been
// specified.
if (tagAttributePos == tagAttributes.length)
@@ -1501,7 +1501,7 @@ loop:
// not re-reporting any SAXException re bogus end tags,
// even though that diagnostic might be clearer ...
}
-
+
/**
* Parse the content of an element.
* <pre>
@@ -1515,7 +1515,7 @@ loop:
throws Exception
{
char c;
-
+
while (true)
{
// consume characters (or ignorable whitspace) until delimiter
@@ -1538,7 +1538,7 @@ loop:
}
isDirtyCurrentElement = true;
break;
-
+
case '<': // Found "<"
dataBufferFlush();
c = readCh();
@@ -1567,17 +1567,17 @@ loop:
break;
}
break;
-
+
case '?': // Found "<?"
isDirtyCurrentElement = false;
parsePI();
break;
-
+
case '/': // Found "</"
isDirtyCurrentElement = false;
parseETag();
return;
-
+
default: // Found "<" followed by something else
isDirtyCurrentElement = false;
unread(c);
@@ -1587,7 +1587,7 @@ loop:
}
}
}
-
+
/**
* Parse an element type declaration.
* <pre>
@@ -1599,7 +1599,7 @@ loop:
throws Exception
{
String name;
-
+
requireWhitespace();
// Read the element type name.
name = readNmtoken(true);
@@ -1607,7 +1607,7 @@ loop:
requireWhitespace();
// Read the content model.
parseContentspec(name);
-
+
skipWhitespace();
require('>');
}
@@ -1643,8 +1643,8 @@ loop:
else
{
String model;
- char[] saved;
-
+ char[] saved;
+
require('(');
saved = readBuffer;
dataBufferAppend('(');
@@ -1668,7 +1668,7 @@ loop:
}
}
}
-
+
/**
* Parse an element-content model.
* <pre>
@@ -1686,11 +1686,11 @@ loop:
{
char c;
char sep;
-
+
// Parse the first content particle
skipWhitespace();
parseCp();
-
+
// Check for end or for a separator.
skipWhitespace();
c = readCh();
@@ -1702,7 +1702,7 @@ loop:
{
handler.verror("Illegal Group/PE nesting");
}
-
+
dataBufferAppend(')');
c = readCh();
switch (c)
@@ -1725,7 +1725,7 @@ loop:
error("bad separator in content model", c, null);
return;
}
-
+
// Parse the rest of the content model.
while (true)
{
@@ -1740,7 +1740,7 @@ loop:
{
handler.verror("Illegal Group/PE nesting");
}
-
+
dataBufferAppend(')');
break;
}
@@ -1754,7 +1754,7 @@ loop:
dataBufferAppend(c);
}
}
-
+
// Check for the occurrence indicator.
c = readCh();
switch (c)
@@ -1769,7 +1769,7 @@ loop:
return;
}
}
-
+
/**
* Parse a content particle.
* <pre>
@@ -1823,12 +1823,12 @@ loop:
{
handler.verror("Illegal Group/PE nesting");
}
-
+
dataBufferAppend(")*");
tryRead('*');
return;
}
-
+
// Parse mixed content.
skipWhitespace();
while (!tryRead(")"))
@@ -1839,17 +1839,17 @@ loop:
dataBufferAppend(readNmtoken(true));
skipWhitespace();
}
-
+
// VC: Proper Group/PE Nesting
if (readBuffer != saved)
{
handler.verror("Illegal Group/PE nesting");
}
-
+
require('*');
dataBufferAppend(")*");
}
-
+
/**
* Parse an attribute list declaration.
* <pre>
@@ -1861,7 +1861,7 @@ loop:
throws Exception
{
String elementName;
-
+
requireWhitespace();
elementName = readNmtoken(true);
boolean white = tryWhitespace();
@@ -1875,7 +1875,7 @@ loop:
white = tryWhitespace();
}
}
-
+
/**
* Parse a single attribute definition.
* <pre>
@@ -1888,7 +1888,7 @@ loop:
String name;
String type;
String enumer = null;
-
+
// Read the attribute name.
name = readNmtoken(true);
@@ -1911,7 +1911,7 @@ loop:
enumer = dataBufferToString();
}
}
-
+
// Read the default value.
requireWhitespace();
parseDefault(elementName, name, type, enumer);
@@ -1980,7 +1980,7 @@ loop:
return null;
}
}
-
+
/**
* Parse an enumeration.
* <pre>
@@ -2022,7 +2022,7 @@ loop:
{
requireWhitespace();
require('(');
-
+
parseEnumeration(true);
}
@@ -2042,11 +2042,11 @@ loop:
int flags = LIT_ATTRIBUTE;
boolean saved = expandPE;
String defaultType = null;
-
+
// LIT_ATTRIBUTE forces '<' checks now (ASAP) and turns whitespace
// chars to spaces (doesn't matter when that's done if it doesn't
// interfere with char refs expanding to whitespace).
-
+
if (!skippedPE)
{
flags |= LIT_ENTITY_REF;
@@ -2065,7 +2065,7 @@ loop:
}
}
}
-
+
expandPE = false;
if (tryRead('#'))
{
@@ -2125,7 +2125,7 @@ loop:
defaultType, value);
}
}
-
+
/**
* Parse a conditional section.
* <pre>
@@ -2197,7 +2197,7 @@ loop:
error("conditional section must begin with INCLUDE or IGNORE");
}
}
-
+
private void parseCharRef()
throws SAXException, IOException
{
@@ -2216,7 +2216,7 @@ loop:
{
int value = 0;
char c;
-
+
if (tryRead('x'))
{
loop1:
@@ -2263,7 +2263,7 @@ loop2:
}
}
}
-
+
// check for character refs being legal XML
if ((value < 0x0020
&& ! (value == '\n' || value == '\t' || value == '\r'))
@@ -2274,7 +2274,7 @@ loop2:
error("illegal XML character reference U+"
+ Integer.toHexString(value));
}
-
+
// Check for surrogates: 00000000 0000xxxx yyyyyyyy zzzzzzzz
// (1101|10xx|xxyy|yyyy + 1101|11yy|zzzz|zzzz:
if (value > 0x0010ffff)
@@ -2283,9 +2283,9 @@ loop2:
error("character reference " + value + " is too large for UTF-16",
Integer.toString(value), null);
}
-
+
}
-
+
/**
* Read and interpret a character reference.
* <pre>
@@ -2298,7 +2298,7 @@ loop2:
{
int value = 0;
char c;
-
+
if (tryRead('x'))
{
loop1:
@@ -2345,7 +2345,7 @@ loop2:
}
}
}
-
+
// check for character refs being legal XML
if ((value < 0x0020
&& ! (value == '\n' || value == '\t' || value == '\r'))
@@ -2356,7 +2356,7 @@ loop2:
error("illegal XML character reference U+"
+ Integer.toHexString(value));
}
-
+
// Check for surrogates: 00000000 0000xxxx yyyyyyyy zzzzzzzz
// (1101|10xx|xxyy|yyyy + 1101|11yy|zzzz|zzzz:
if (value <= 0x0000ffff)
@@ -2382,7 +2382,7 @@ loop2:
dataBufferFlush();
}
}
-
+
/**
* Parse and expand an entity reference.
* <pre>
@@ -2395,7 +2395,7 @@ loop2:
throws SAXException, IOException
{
String name;
-
+
name = readNmtoken(true);
require(';');
switch (getEntityType(name))
@@ -2406,7 +2406,7 @@ loop2:
// unless the processor might _legitimately_ not have seen a
// declaration ... which is what this implements.
String message;
-
+
message = "reference to undeclared general entity " + name;
if (skippedPE && !docIsStandalone)
{
@@ -2424,25 +2424,25 @@ loop2:
break;
case ENTITY_INTERNAL:
pushString(name, getEntityValue(name));
-
+
//workaround for possible input pop before marking
- //the buffer reading position
+ //the buffer reading position
char t = readCh();
unread(t);
int bufferPosMark = readBufferPos;
-
+
int end = readBufferPos + getEntityValue(name).length();
for (int k = readBufferPos; k < end; k++)
{
t = readCh();
if (t == '&')
{
- t = readCh();
+ t = readCh();
if (t == '#')
- {
+ {
//try to match a character ref
tryReadCharRef();
-
+
//everything has been read
if (readBufferPos >= end)
{
@@ -2457,7 +2457,7 @@ loop2:
unread(t);
readNmtoken(true);
require(';');
-
+
//everything has been read
if (readBufferPos >= end)
{
@@ -2468,7 +2468,7 @@ loop2:
}
error(" malformed entity reference");
}
-
+
}
readBufferPos = bufferPosMark;
break;
@@ -2499,7 +2499,7 @@ loop2:
throw new RuntimeException();
}
}
-
+
/**
* Parse and expand a parameter entity reference.
* <pre>
@@ -2511,7 +2511,7 @@ loop2:
throws SAXException, IOException
{
String name;
-
+
name = "%" + readNmtoken(true);
require(';');
switch (getEntityType(name))
@@ -2519,7 +2519,7 @@ loop2:
case ENTITY_UNDECLARED:
// VC: Entity Declared
handler.verror("reference to undeclared parameter entity " + name);
-
+
// we should disable handling of all subsequent declarations
// unless this is a standalone document (info discarded)
break;
@@ -2546,7 +2546,7 @@ loop2:
break;
}
}
-
+
/**
* Parse an entity declaration.
* <pre>
@@ -2566,7 +2566,7 @@ loop2:
{
boolean peFlag = false;
int flags = 0;
-
+
// Check for a parameter entity.
expandPE = false;
requireWhitespace();
@@ -2576,7 +2576,7 @@ loop2:
requireWhitespace();
}
expandPE = true;
-
+
// Read the entity name, and prepend
// '%' if necessary.
String name = readNmtoken(true);
@@ -2605,7 +2605,7 @@ loop2:
{
// Read the external IDs
ExternalIdentifiers ids = readExternalIds(false, false);
-
+
// Check for NDATA declaration.
boolean white = tryWhitespace();
if (!peFlag && tryRead("NDATA"))
@@ -2637,7 +2637,7 @@ loop2:
: ids.systemId);
}
}
-
+
// Finish the declaration.
skipWhitespace();
require('>');
@@ -2672,11 +2672,11 @@ loop2:
// Register the notation.
setNotation(nname, ids);
-
+
skipWhitespace();
require('>');
}
-
+
/**
* Parse character data.
* <pre>
@@ -2691,7 +2691,7 @@ loop2:
boolean pureWhite = false;
// assert (dataBufferPos == 0);
-
+
// are we expecting pure whitespace? it might be dirty...
if ((currentElementContent == CONTENT_ELEMENTS) && !isDirtyCurrentElement)
{
@@ -2705,7 +2705,7 @@ loop2:
int lineAugment = 0;
int columnAugment = 0;
int i;
-
+
loop:
for (i = readBufferPos; i < readBufferLength; i++)
{
@@ -2751,8 +2751,8 @@ loop:
break;
default:
if ((c < 0x0020 || c > 0xFFFD)
- || ((c >= 0x007f) && (c <= 0x009f) && (c != 0x0085)
- && xmlVersion == XML_11))
+ || ((c >= 0x007f) && (c <= 0x009f) && (c != 0x0085)
+ && xmlVersion == XML_11))
{
error("illegal XML character U+"
+ Integer.toHexString(c));
@@ -2762,7 +2762,7 @@ loop:
columnAugment++;
}
}
-
+
// report text thus far
if (lineAugment > 0)
{
@@ -2773,10 +2773,10 @@ loop:
{
column += columnAugment;
}
-
+
// report characters/whitspace
int length = i - readBufferPos;
-
+
if (length != 0)
{
if (pureWhite)
@@ -2790,12 +2790,12 @@ loop:
}
readBufferPos = i;
}
-
+
if (state != 0)
{
break;
}
-
+
// fill next buffer from this entity, or
// pop stack and continue with previous entity
unread(readCh());
@@ -2810,11 +2810,11 @@ loop:
error("character data may not contain ']]>'");
}
}
-
+
//////////////////////////////////////////////////////////////////////
// High-level reading and scanning methods.
//////////////////////////////////////////////////////////////////////
-
+
/**
* Require whitespace characters.
*/
@@ -2849,7 +2849,7 @@ loop:
{
int lineAugment = 0;
int columnAugment = 0;
-
+
loop:
for (int i = readBufferPos; i < readBufferLength; i++)
{
@@ -2885,7 +2885,7 @@ loop:
}
}
}
-
+
// OK, do it the slow way.
char c = readCh ();
while (isWhitespace(c))
@@ -2894,7 +2894,7 @@ loop:
}
unread(c);
}
-
+
/**
* Read a name or (when parsing an enumeration) name token.
* <pre>
@@ -2906,7 +2906,7 @@ loop:
throws SAXException, IOException
{
char c;
-
+
if (USE_CHEATS)
{
loop:
@@ -2921,7 +2921,7 @@ loop:
break loop;
}
// else fall through...
-
+
// What may legitimately come AFTER a name/nmtoken?
case '<': case '>': case '&':
case ',': case '|': case '*': case '+': case '?':
@@ -2939,10 +2939,10 @@ loop:
}
readBufferPos = i;
return intern(readBuffer, start, i - start);
-
+
default:
// FIXME ... per IBM's OASIS test submission, these:
- // ? U+06dd
+ // ? U+06dd
// Combining U+309B
//these switches are kind of ugly but at least we won't
//have to go over the whole lits for each char
@@ -2997,7 +2997,7 @@ loop:
+ Integer.toHexString(c));
}
}
-
+
break;
//starting with 11
case 0x1100:
@@ -3061,7 +3061,7 @@ loop:
}
break;
default:
- if (c == 0x0e46 || c == 0x1011
+ if (c == 0x0e46 || c == 0x1011
|| c == 0x212f || c == 0x0587
|| c == 0x0230 )
{
@@ -3091,7 +3091,7 @@ loop:
}
}
}
-
+
nameBufferPos = 0;
// Read the first character.
@@ -3128,7 +3128,7 @@ loop:
return s;
default:
// punt on exact tests from Appendix A, but approximate them
-
+
if ((nameBufferPos != 0 || !isName)
&& !Character.isUnicodeIdentifierPart(c)
&& ":-_.".indexOf(c) == -1
@@ -3147,7 +3147,7 @@ loop:
}
}
}
-
+
private static boolean isExtender(char c)
{
// [88] Extender ::= ...
@@ -3178,7 +3178,7 @@ loop:
int startLine = line;
boolean saved = expandPE;
boolean savedReport = doReport;
-
+
// Find the first delimiter.
delim = readCh();
if (delim != '"' && delim != '\'')
@@ -3192,7 +3192,7 @@ loop:
expandPE = false;
}
doReport = false;
-
+
// Each level of input source has its own buffer; remember
// ours, so we won't read the ending delimiter from any
// other input source, regardless of entity processing.
@@ -3235,11 +3235,11 @@ loop:
break;
}
parseCharRef(false /* Do not do flushDataBuffer */);
-
+
// exotic WFness risk: this is an entity literal,
// dataBuffer [dataBufferPos - 1] == '&', and
// following chars are a _partial_ entity/char ref
-
+
// It looks like an entity ref ...
}
else
@@ -3258,7 +3258,7 @@ loop:
else if ((flags & LIT_DISABLE_EREF) != 0)
{
dataBufferAppend('&');
-
+
// OK, it will be an entity ref -- expanded later.
}
else
@@ -3272,7 +3272,7 @@ loop:
}
c = readCh();
continue loop;
-
+
case '<':
// and why? Perhaps so "&foo;" expands the same
// inside and outside an attribute?
@@ -3283,7 +3283,7 @@ loop:
break;
// We don't worry about case '%' and PE refs, readCh does.
-
+
default:
break;
}
@@ -3299,17 +3299,17 @@ loop:
inLiteral = false;
expandPE = saved;
doReport = savedReport;
-
+
// Normalise whitespace if necessary.
if ((flags & LIT_NORMALIZE) > 0)
{
dataBufferNormalize();
}
-
+
// Return the value.
return dataBufferToString();
}
-
+
/**
* Try reading external identifiers.
* A system identifier is not required for notations.
@@ -3325,7 +3325,7 @@ loop:
char c;
ExternalIdentifiers ids = new ExternalIdentifiers();
int flags = LIT_DISABLE_CREF | LIT_DISABLE_PE | LIT_DISABLE_EREF;
-
+
if (tryRead("PUBLIC"))
{
requireWhitespace();
@@ -3345,7 +3345,7 @@ loop:
requireWhitespace();
ids.systemId = readLiteral(flags);
}
-
+
for (int i = 0; i < ids.publicId.length(); i++)
{
c = ids.publicId.charAt(i);
@@ -3374,7 +3374,7 @@ loop:
{
error("missing SYSTEM or PUBLIC keyword");
}
-
+
if (ids.systemId != null)
{
if (ids.systemId.indexOf('#') != -1)
@@ -3388,7 +3388,7 @@ loop:
+ ids.systemId);
}
}
-
+
return ids;
}
@@ -3416,7 +3416,7 @@ loop:
//////////////////////////////////////////////////////////////////////
// Utility routines.
//////////////////////////////////////////////////////////////////////
-
+
/**
* Add a character to the data buffer.
*/
@@ -3446,7 +3446,7 @@ loop:
{
dataBuffer = (char[]) extendArray(dataBuffer, dataBuffer.length,
dataBufferPos + length);
-
+
System.arraycopy(ch, start, dataBuffer, dataBufferPos, length);
dataBufferPos += length;
}
@@ -3459,13 +3459,13 @@ loop:
int i = 0;
int j = 0;
int end = dataBufferPos;
-
+
// Skip spaces at the start.
while (j < end && dataBuffer[j] == ' ')
{
j++;
}
-
+
// Skip whitespace at the end.
while (end > j && dataBuffer[end - 1] == ' ')
{
@@ -3475,9 +3475,9 @@ loop:
// Start copying to the left.
while (j < end)
{
-
+
char c = dataBuffer[j++];
-
+
// Normalise all other spaces to
// a single space.
if (c == ' ')
@@ -3494,7 +3494,7 @@ loop:
dataBuffer[i++] = c;
}
}
-
+
// The new length is <= the old one.
dataBufferPos = i;
}
@@ -3554,7 +3554,7 @@ loop:
{
int length = delim.length();
char[] ch;
-
+
if (length < dataBuffer.length)
{
ch = dataBuffer;
@@ -3564,11 +3564,11 @@ loop:
{
ch = delim.toCharArray();
}
-
+
if (USE_CHEATS && length <= (readBufferLength - readBufferPos))
{
int offset = readBufferPos;
-
+
for (int i = 0; i < length; i++, offset++)
{
if (ch[i] != readBuffer[offset])
@@ -3577,7 +3577,7 @@ loop:
}
}
readBufferPos = offset;
-
+
}
else
{
@@ -3595,13 +3595,13 @@ loop:
throws SAXException, IOException
{
char c = readCh();
-
+
if (c != delim)
{
error("required character", c, Character.toString(delim));
}
}
-
+
/**
* Create an interned string from a character array.
* &AElig;lfred uses this method to create an interned version
@@ -3631,13 +3631,13 @@ loop:
hash = 31 * hash + ch[i];
}
hash = (hash & 0x7fffffff) % SYMBOL_TABLE_LENGTH;
-
+
// Get the bucket -- consists of {array,String} pairs
if ((bucket = symbolTable[hash]) == null)
{
// first string in this bucket
bucket = new Object[8];
-
+
// Search for a matching tuple, and
// return the string if we find one.
}
@@ -3646,13 +3646,13 @@ loop:
while (index < bucket.length)
{
char[] chFound = (char[]) bucket[index];
-
+
// Stop when we hit an empty entry.
if (chFound == null)
{
break;
}
-
+
// If they're the same length, check for a match.
if (chFound.length == length)
{
@@ -3673,12 +3673,12 @@ loop:
index += 2;
}
// Not found -- we'll have to add it.
-
+
// Do we have to grow the bucket?
bucket = (Object[]) extendArray(bucket, bucket.length, index);
}
symbolTable[hash] = bucket;
-
+
// OK, add it to the end of the bucket -- "local" interning.
// Intern "globally" to let applications share interning benefits.
// That is, "!=" and "==" work on our strings, not just equals().
@@ -3690,7 +3690,7 @@ loop:
/**
* Ensure the capacity of an array, allocating a new one if
- * necessary. Usually extends only for name hash collisions.
+ * necessary. Usually extends only for name hash collisions.
*/
private Object extendArray(Object array, int currentSize, int requiredSize)
{
@@ -3702,12 +3702,12 @@ loop:
{
Object newArray = null;
int newSize = currentSize * 2;
-
+
if (newSize <= requiredSize)
{
newSize = requiredSize + 1;
}
-
+
if (array instanceof char[])
{
newArray = new char[newSize];
@@ -3720,7 +3720,7 @@ loop:
{
throw new RuntimeException();
}
-
+
System.arraycopy(array, 0, newArray, 0, currentSize);
return newArray;
}
@@ -3729,20 +3729,20 @@ loop:
//////////////////////////////////////////////////////////////////////
// XML query routines.
//////////////////////////////////////////////////////////////////////
-
+
boolean isStandalone()
{
return docIsStandalone;
}
-
+
//
// Elements
//
-
+
private int getContentType(ElementDecl element, int defaultType)
{
int retval;
-
+
if (element == null)
{
return defaultType;
@@ -3770,7 +3770,7 @@ loop:
ElementDecl element = (ElementDecl) elementInfo.get(name);
return getContentType(element, CONTENT_UNDECLARED);
}
-
+
/**
* Register an element.
* Array format:
@@ -3788,7 +3788,7 @@ loop:
}
ElementDecl element = (ElementDecl) elementInfo.get(name);
-
+
// first <!ELEMENT ...> or <!ATTLIST ...> for this type?
if (element == null)
{
@@ -3799,7 +3799,7 @@ loop:
elementInfo.put(name, element);
return;
}
-
+
// <!ELEMENT ...> declaration?
if (contentType != CONTENT_UNDECLARED)
{
@@ -3816,14 +3816,14 @@ loop:
+ name);
}
}
-
+
// first <!ATTLIST ...>, before <!ELEMENT ...> ?
else if (attributes != null)
{
element.attributes = attributes;
}
}
-
+
/**
* Look up the attribute hash table for an element.
* The hash table is the second item in the element array.
@@ -3837,7 +3837,7 @@ loop:
//
// Attributes
//
-
+
/**
* Get the declared attributes for an element type.
* @param elname The name of the element type.
@@ -3853,7 +3853,7 @@ loop:
private Iterator declaredAttributes(ElementDecl element)
{
HashMap attlist;
-
+
if (element == null)
{
return null;
@@ -3977,8 +3977,8 @@ loop:
AttributeDecl attribute = getAttribute(name, aname);
return (attribute == null) ? ATTRIBUTE_DEFAULT_UNDECLARED :
attribute.valueType;
- }
-
+ }
+
/**
* Register an attribute declaration for later retrieval.
* Format:
@@ -3993,19 +3993,19 @@ loop:
throws Exception
{
HashMap attlist;
-
+
if (skippedPE)
{
return;
}
-
+
// Create a new hashtable if necessary.
attlist = getElementAttributes(elName);
if (attlist == null)
{
attlist = new HashMap();
}
-
+
// ignore multiple attribute declarations!
if (attlist.get(name) != null)
{
@@ -4020,7 +4020,7 @@ loop:
attribute.valueType = valueType;
attribute.enumeration = enumeration;
attlist.put(name, attribute);
-
+
// save; but don't overwrite any existing <!ELEMENT ...>
setElement(elName, CONTENT_UNDECLARED, null, attlist);
}
@@ -4038,7 +4038,7 @@ loop:
//
// Entities
//
-
+
/**
* Find the type of an entity.
* @returns An integer constant representing the entity type.
@@ -4135,7 +4135,7 @@ loop:
//
// Notations.
//
-
+
/**
* Report a notation declaration, checking for duplicates.
*/
@@ -4146,7 +4146,7 @@ loop:
{
return;
}
-
+
handler.notationDecl(nname, ids.publicId, ids.systemId, ids.baseUri);
if (notationInfo.get(nname) == null)
{
@@ -4158,11 +4158,11 @@ loop:
handler.verror("Duplicate notation name decl: " + nname);
}
}
-
+
//
// Location.
//
-
+
/**
* Return the current line number.
*/
@@ -4182,7 +4182,7 @@ loop:
//////////////////////////////////////////////////////////////////////
// High-level I/O.
//////////////////////////////////////////////////////////////////////
-
+
/**
* Read a single character from the readBuffer.
* <p>The readDataChunk () method maintains the buffer.
@@ -4223,16 +4223,16 @@ loop:
}
}
break;
-
+
default:
-
+
popInput();
break;
}
}
-
+
char c = readBuffer[readBufferPos++];
-
+
if (c == '\n')
{
line++;
@@ -4245,7 +4245,7 @@ loop:
/* the most common return to parseContent () ... NOP */
}
else if (((c < 0x0020 && (c != '\t') && (c != '\r')) || c > 0xFFFD)
- || ((c >= 0x007f) && (c <= 0x009f) && (c != 0x0085)
+ || ((c >= 0x007f) && (c <= 0x009f) && (c != 0x0085)
&& xmlVersion == XML_11))
{
error("illegal XML character U+" + Integer.toHexString(c));
@@ -4274,7 +4274,7 @@ loop:
* Push a single character back onto the current input stream.
* <p>This method usually pushes the character back onto
* the readBuffer.
- * <p>I don't think that this would ever be called with
+ * <p>I don't think that this would ever be called with
* readBufferPos = 0, because the methods always reads a character
* before unreading it, but just in case, I've added a boundary
* condition.
@@ -4451,7 +4451,7 @@ loop:
scratch.setCharacterStream(null);
scratch.setByteStream(null);
scratch.setEncoding(null);
-
+
// Push the existing status.
pushInput(ename);
@@ -4475,7 +4475,7 @@ loop:
tryEncodingDecl(true);
return;
}
-
+
// Else we handle the conversion, and need to ensure
// it's done right.
sourceType = INPUT_STREAM;
@@ -4487,12 +4487,12 @@ loop:
{
// We have to open our own stream to the URL.
URL url = new URL(systemId);
-
+
externalEntity = url.openConnection();
externalEntity.connect();
is = externalEntity.getInputStream();
}
-
+
// If we get to here, there must be
// an InputStream available.
if (!is.markSupported())
@@ -4509,11 +4509,11 @@ loop:
if (!"file".equals(externalEntity.getURL().getProtocol()))
{
int temp;
-
+
// application/xml;charset=something;otherAttr=...
// ... with many variants on 'something'
encoding = externalEntity.getContentType();
-
+
// MHK code (fix for Saxon 5.5.1/007):
// protect against encoding==null
if (encoding == null)
@@ -4524,7 +4524,7 @@ loop:
{
temp = encoding.indexOf("charset");
}
-
+
// RFC 2376 sez MIME text defaults to ASCII, but since the
// JDK will create a MIME type out of thin air, we always
// autodetect when there's no explicit charset attribute.
@@ -4539,11 +4539,11 @@ loop:
{
encoding = encoding.substring(0, temp);
}
-
+
if ((temp = encoding.indexOf('=', temp + 7)) > 0)
{
encoding = encoding.substring(temp + 1);
-
+
// attributes can have comment fields (RFC 822)
if ((temp = encoding.indexOf('(')) > 0)
{
@@ -4567,14 +4567,14 @@ loop:
}
}
}
-
+
// if we got an external encoding label, use it ...
if (encoding != null)
{
this.encoding = ENCODING_EXTERNAL;
setupDecoding(encoding);
ignoreEncoding = true;
-
+
// ... else autodetect from first bytes.
}
else
@@ -4608,13 +4608,13 @@ loop:
readBufferOverflow = -1;
line = 1;
currentByteCount = column = 0;
-
+
sourceType = INPUT_READER;
this.reader = new InputStreamReader(is, encoding);
is = null;
-
+
tryEncodingDecl(true);
-
+
}
catch (IOException e)
{
@@ -4672,7 +4672,7 @@ loop:
/**
* Attempt to detect the encoding of an entity.
* <p>The trick here (as suggested in the XML standard) is that
- * any entity not in UTF-8, or in UCS-2 with a byte-order mark,
+ * any entity not in UTF-8, or in UCS-2 with a byte-order mark,
* <b>must</b> begin with an XML declaration or an encoding
* declaration; we simply have to look for "&lt;?xml" in various
* encodings.
@@ -4792,7 +4792,7 @@ loop:
{
// 4c 6f a7 94 ... we don't understand EBCDIC flavors
// ... but we COULD at least kick in some fixed code page
-
+
// (default) UTF-8 without encoding/XML declaration
encoding = ENCODING_UTF_8;
}
@@ -4832,7 +4832,7 @@ loop:
/**
* This method pushes a string back onto input.
- * <p>It is useful either as the expansion of an internal entity,
+ * <p>It is useful either as the expansion of an internal entity,
* or for backtracking during the parse.
* <p>Call pushCharArray () to do the actual work.
* @param s The string to push back onto input.
@@ -4918,13 +4918,13 @@ loop:
}
}
entityStack.addLast(ename);
-
+
// Don't bother if there is no current input.
if (sourceType == INPUT_NONE)
{
return;
}
-
+
// Set up a snapshot of the current
// input source.
Input input = new Input();
@@ -4941,7 +4941,7 @@ loop:
input.currentByteCount = currentByteCount;
input.column = column;
input.reader = reader;
-
+
// Push it onto the stack.
inputStack.addLast(input);
}
@@ -5010,7 +5010,7 @@ loop:
column = input.column;
reader = input.reader;
}
-
+
/**
* Return true if we can read the expected character.
* <p>Note that the character will be removed from the input stream
@@ -5026,7 +5026,7 @@ loop:
throws SAXException, IOException
{
char c;
-
+
// Read the character
c = readCh();
@@ -5069,7 +5069,7 @@ loop:
// Compare the input, character-
// by character.
-
+
for (int i = 0; i < ch.length; i++)
{
c = readCh();
@@ -5109,7 +5109,7 @@ loop:
return false;
}
}
-
+
/**
* Read all data until we find the specified string.
* This is useful for scanning CDATA sections and PIs.
@@ -5130,7 +5130,7 @@ loop:
{
char c;
int startLine = line;
-
+
try
{
while (!tryRead(delim))
@@ -5150,7 +5150,7 @@ loop:
//////////////////////////////////////////////////////////////////////
// Low-level I/O.
//////////////////////////////////////////////////////////////////////
-
+
/**
* Prefetch US-ASCII XML/text decl from input stream into read buffer.
* Doesn't buffer more than absolutely needed, so that when an encoding
@@ -5163,7 +5163,7 @@ loop:
{
int ch;
readBufferPos = readBufferLength = 0;
-
+
is.mark(readBuffer.length);
while (true)
{
@@ -5201,7 +5201,7 @@ loop:
throws SAXException, IOException
{
int count;
-
+
// See if we have any overflow (filterCR sets for CR at end)
if (readBufferOverflow > -1)
{
@@ -5236,7 +5236,7 @@ loop:
sawCR = false;
return;
}
-
+
// Read as many bytes as possible into the raw buffer.
count = is.read(rawReadBuffer, 0, READ_BUFFER_MAX);
@@ -5265,7 +5265,7 @@ loop:
case ENCODING_UCS_2_21:
copyUcs2ReadBuffer(count, 0, 8);
break;
-
+
// four byte builtins
case ENCODING_UCS_4_1234:
copyUcs4ReadBuffer(count, 24, 16, 8, 0);
@@ -5287,27 +5287,27 @@ loop:
}
readBufferPos = 0;
-
+
// Filter out all carriage returns if we've seen any
// (including any saved from a previous read)
if (sawCR)
{
filterCR(count >= 0);
sawCR = false;
-
+
// must actively report EOF, lest some CRs get lost.
if (readBufferLength == 0 && count >= 0)
{
readDataChunk();
}
}
-
+
if (count > 0)
{
currentByteCount += count;
}
}
-
+
/**
* Filter carriage returns in the read buffer.
* CRLF becomes LF; CR becomes LF.
@@ -5321,7 +5321,7 @@ loop:
int i, j;
readBufferOverflow = -1;
-
+
loop:
for (i = j = readBufferPos; j < readBufferLength; i++, j++)
{
@@ -5359,8 +5359,8 @@ loop:
/**
* Convert a buffer of UTF-8-encoded bytes into UTF-16 characters.
- * <p>When readDataChunk () calls this method, the raw bytes are in
- * rawReadBuffer, and the final characters will appear in
+ * <p>When readDataChunk () calls this method, the raw bytes are in
+ * rawReadBuffer, and the final characters will appear in
* readBuffer.
* <p>Note that as of Unicode 3.1, good practice became a requirement,
* so that each Unicode character has exactly one UTF-8 representation.
@@ -5377,7 +5377,7 @@ loop:
int j = readBufferPos;
int b1;
char c = 0;
-
+
/*
// check once, so the runtime won't (if it's smart enough)
if (count < 0 || count > rawReadBuffer.length)
@@ -5403,7 +5403,7 @@ loop:
encodingError("Illegal two byte UTF-8 sequence",
c, 0);
}
-
+
//Sec 2.11
// [1] the two-character sequence #xD #xA
// [2] the two-character sequence #xD #x85
@@ -5411,10 +5411,10 @@ loop:
{
continue;
}
-
+
// Sec 2.11
// [3] the single character #x85
-
+
if (c == 0x0085 && xmlVersion == XML_11)
{
readBuffer[j++] = '\r';
@@ -5453,7 +5453,7 @@ loop:
iso646 = (iso646 << 6) + getNextUtf8Byte(i++, count);
iso646 = (iso646 << 6) + getNextUtf8Byte(i++, count);
iso646 = (iso646 << 6) + getNextUtf8Byte(i++, count);
-
+
if (iso646 <= 0xffff)
{
encodingError("Illegal four byte UTF-8 sequence",
@@ -5497,7 +5497,7 @@ loop:
// How many characters have we read?
readBufferLength = j;
}
-
+
/**
* Return the next byte value in a UTF-8 sequence.
* If it is not possible to get a byte from the current
@@ -5512,7 +5512,7 @@ loop:
throws SAXException, IOException
{
int val;
-
+
// Take a character from the buffer
// or from the actual input stream.
if (pos < count)
@@ -5544,8 +5544,8 @@ loop:
* Convert a buffer of US-ASCII or ISO-8859-1-encoded bytes into
* UTF-16 characters.
*
- * <p>When readDataChunk () calls this method, the raw bytes are in
- * rawReadBuffer, and the final characters will appear in
+ * <p>When readDataChunk () calls this method, the raw bytes are in
+ * rawReadBuffer, and the final characters will appear in
* readBuffer.
*
* @param count The number of bytes to convert.
@@ -5583,8 +5583,8 @@ loop:
* Convert a buffer of UCS-2-encoded bytes into UTF-16 characters
* (as used in Java string manipulation).
*
- * <p>When readDataChunk () calls this method, the raw bytes are in
- * rawReadBuffer, and the final characters will appear in
+ * <p>When readDataChunk () calls this method, the raw bytes are in
+ * rawReadBuffer, and the final characters will appear in
* readBuffer.
* @param count The number of bytes to convert.
* @param shift1 The number of bits to shift byte 1.
@@ -5597,7 +5597,7 @@ loop:
throws SAXException
{
int j = readBufferPos;
-
+
if (count > 0 && (count % 2) != 0)
{
encodingError("odd number of bytes in UCS-2 encoding", -1, count);
@@ -5635,8 +5635,8 @@ loop:
/**
* Convert a buffer of UCS-4-encoded bytes into UTF-16 characters.
*
- * <p>When readDataChunk () calls this method, the raw bytes are in
- * rawReadBuffer, and the final characters will appear in
+ * <p>When readDataChunk () calls this method, the raw bytes are in
+ * rawReadBuffer, and the final characters will appear in
* readBuffer.
* <p>Java has Unicode chars, and this routine uses surrogate pairs
* for ISO-10646 values between 0x00010000 and 0x000fffff. An
@@ -5657,7 +5657,7 @@ loop:
throws SAXException
{
int j = readBufferPos;
-
+
if (count > 0 && (count % 4) != 0)
{
encodingError("number of bytes in UCS-4 encoding " +
@@ -5706,11 +5706,11 @@ loop:
error(message);
}
}
-
+
//////////////////////////////////////////////////////////////////////
// Local Variables.
//////////////////////////////////////////////////////////////////////
-
+
/**
* Re-initialize the variables for each parse.
*/
@@ -5719,7 +5719,7 @@ loop:
// First line
line = 1;
column = 0;
-
+
// Set up the buffers for data and names
dataBufferPos = 0;
dataBuffer = new char[DATA_BUFFER_INITIAL];
@@ -5736,7 +5736,7 @@ loop:
// element context.
currentElement = null;
currentElementContent = CONTENT_UNDECLARED;
-
+
// Set up the input variables
sourceType = INPUT_NONE;
inputStack = new LinkedList();
@@ -5752,11 +5752,11 @@ loop:
inLiteral = false;
expandPE = false;
peIsError = false;
-
+
doReport = false;
-
+
inCDATA = false;
-
+
symbolTable = new Object[SYMBOL_TABLE_LENGTH][];
}
@@ -5777,7 +5777,7 @@ loop:
this.systemId = systemId;
this.baseUri = baseUri;
}
-
+
}
static class EntityInfo
@@ -5787,12 +5787,12 @@ loop:
ExternalIdentifiers ids;
String value;
String notationName;
-
+
}
static class AttributeDecl
{
-
+
String type;
String value;
int valueType;
@@ -5803,16 +5803,16 @@ loop:
static class ElementDecl
{
-
+
int contentType;
String contentModel;
HashMap attributes;
-
+
}
-
+
static class Input
{
-
+
int sourceType;
URLConnection externalEntity;
char[] readBuffer;
@@ -5825,8 +5825,7 @@ loop:
int currentByteCount;
int column;
Reader reader;
-
+
}
-
-}
+}
diff --git a/gnu/xml/aelfred2/XmlReader.java b/gnu/xml/aelfred2/XmlReader.java
index a3bd03a86..e0a047612 100644
--- a/gnu/xml/aelfred2/XmlReader.java
+++ b/gnu/xml/aelfred2/XmlReader.java
@@ -1,4 +1,4 @@
-/* XmlReader.java --
+/* XmlReader.java --
Copyright (C) 1999,2000,2001 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -77,15 +77,15 @@ public final class XmlReader
static class FatalErrorHandler
extends DefaultHandler2
{
-
+
public void error(SAXParseException e)
throws SAXException
{
throw e;
}
-
+
}
-
+
private SAXDriver aelfred2 = new SAXDriver();
private EventFilter filter = new EventFilter();
private boolean isValidating;
@@ -109,7 +109,7 @@ public final class XmlReader
setErrorHandler(new FatalErrorHandler());
}
}
-
+
/**
* <b>SAX2</b>: Returns the object used to report the logical
* content of an XML document.
@@ -154,7 +154,7 @@ public final class XmlReader
}
filter.setDTDHandler(handler);
}
-
+
/**
* <b>SAX2</b>: Returns the object used when resolving external
* entities during parsing (both general and parameter entities).
@@ -224,7 +224,7 @@ public final class XmlReader
}
throw new SAXNotRecognizedException(propertyId);
}
-
+
private void forceValidating()
throws SAXNotRecognizedException, SAXNotSupportedException
{
@@ -371,4 +371,3 @@ public final class XmlReader
}
}
-
diff --git a/gnu/xml/dom/Consumer.java b/gnu/xml/dom/Consumer.java
index 026e2754e..836c8d257 100644
--- a/gnu/xml/dom/Consumer.java
+++ b/gnu/xml/dom/Consumer.java
@@ -1,4 +1,4 @@
-/* Consumer.java --
+/* Consumer.java --
Copyright (C) 2001,2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -81,8 +81,8 @@ public class Consumer extends DomConsumer
public Consumer ()
throws SAXException
{
- super (DomDocument.class);
- setHandler (new Backdoor (this));
+ super (DomDocument.class);
+ setHandler (new Backdoor (this));
}
/**
@@ -93,8 +93,8 @@ public class Consumer extends DomConsumer
public Consumer (EventConsumer next)
throws SAXException
{
- super (DomDocument.class, next);
- setHandler (new Backdoor (this));
+ super (DomDocument.class, next);
+ setHandler (new Backdoor (this));
}
/**
@@ -105,160 +105,160 @@ public class Consumer extends DomConsumer
*/
public static class Backdoor extends DomConsumer.Handler
{
- /**
- * Constructor.
- * @param consumer must have been initialized to use the
- * {@link DomDocument} class (or a subclass) for
- * constructing DOM trees
- */
- protected Backdoor (DomConsumer consumer)
- throws SAXException
- { super (consumer); }
-
- // helper routine
- private DomDoctype getDoctype ()
- throws SAXException
- {
- DomDocument doc = (DomDocument) getDocument ();
- DocumentType dt = doc.getDoctype ();
-
- if (dt == null)
- throw new SAXException ("doctype missing!");
- return (DomDoctype) dt;
- }
-
- // SAX2 "lexical" event
- public void startDTD (String name, String publicId, String systemId)
- throws SAXException
- {
- DomDocument doc = (DomDocument) getDocument ();
-
- super.startDTD (name, publicId, systemId);
- // DOM L2 doctype creation model is bizarre
- DomDoctype dt = new DomDoctype (doc, name, publicId, systemId);
- doc.appendChild (dt);
- }
-
- // SAX2 "lexical" event
- public void endDTD ()
- throws SAXException
- {
- super.endDTD ();
- // DOM L2 has no way to make things readonly
- getDoctype ().makeReadonly ();
- }
-
- // SAX1 DTD event
- public void notationDecl (
- String name,
- String publicId, String systemId
- ) throws SAXException
- {
- // DOM L2 can't create/save notation nodes
- getDoctype ().declareNotation (name, publicId, systemId);
- }
-
- // SAX1 DTD event
- public void unparsedEntityDecl (
- String name,
- String publicId, String systemId,
- String notationName
- ) throws SAXException
- {
- // DOM L2 can't create/save entity nodes
- getDoctype ().declareEntity (name, publicId, systemId,
- notationName);
- }
-
- // SAX2 declaration event
- public void internalEntityDecl (String name, String value)
- throws SAXException
- {
- // DOM L2 can't create/save entity nodes
- // NOTE: this doesn't save the value as a child of this
- // node, though it could realistically do so.
- getDoctype ().declareEntity (name, null, null, null);
- }
-
- // SAX2 declaration event
- public void externalEntityDecl (
- String name,
- String publicId,
- String systemId
- ) throws SAXException
- {
- // DOM L2 can't create/save entity nodes
- // NOTE: DOM allows for these to have children, if
- // they don't have unbound namespace references.
- getDoctype ().declareEntity (name, publicId, systemId, null);
- }
-
- // SAX2 element
- public void startElement (
- String uri,
- String localName,
- String qName,
- Attributes atts
- ) throws SAXException
- {
- Node top;
-
- super.startElement (uri, localName, qName, atts);
-
- // might there be more work?
- top = getTop ();
- if (!top.hasAttributes () || !(atts instanceof Attributes2))
- return;
-
- // remember any attributes that got defaulted
- DomNamedNodeMap map = (DomNamedNodeMap) top.getAttributes ();
- Attributes2 attrs = (Attributes2) atts;
- int length = atts.getLength ();
-
- //map.compact ();
- for (int i = 0; i < length; i++) {
- if (attrs.isSpecified (i))
- continue;
-
- // value was defaulted.
- String temp = attrs.getQName (i);
- DomAttr attr;
-
- if ("".equals (temp))
- attr = (DomAttr) map.getNamedItemNS (attrs.getURI (i),
- atts.getLocalName (i));
- else
- attr = (DomAttr) map.getNamedItem (temp);
-
- // DOM L2 can't write this flag, only read it
- attr.setSpecified (false);
- }
- }
-
- public void endElement (
- String uri,
- String localName,
- String qName
- ) throws SAXException
- {
- DomNode top = (DomNode) getTop ();
- top.compact ();
- super.endElement (uri, localName, qName);
- }
-
- protected Text createText (
- boolean isCDATA,
- char buf [],
- int off,
- int len
- ) {
- DomDocument doc = (DomDocument) getDocument ();
-
- if (isCDATA)
- return doc.createCDATASection (buf, off, len);
- else
- return doc.createTextNode (buf, off, len);
- }
+ /**
+ * Constructor.
+ * @param consumer must have been initialized to use the
+ * {@link DomDocument} class (or a subclass) for
+ * constructing DOM trees
+ */
+ protected Backdoor (DomConsumer consumer)
+ throws SAXException
+ { super (consumer); }
+
+ // helper routine
+ private DomDoctype getDoctype ()
+ throws SAXException
+ {
+ DomDocument doc = (DomDocument) getDocument ();
+ DocumentType dt = doc.getDoctype ();
+
+ if (dt == null)
+ throw new SAXException ("doctype missing!");
+ return (DomDoctype) dt;
+ }
+
+ // SAX2 "lexical" event
+ public void startDTD (String name, String publicId, String systemId)
+ throws SAXException
+ {
+ DomDocument doc = (DomDocument) getDocument ();
+
+ super.startDTD (name, publicId, systemId);
+ // DOM L2 doctype creation model is bizarre
+ DomDoctype dt = new DomDoctype (doc, name, publicId, systemId);
+ doc.appendChild (dt);
+ }
+
+ // SAX2 "lexical" event
+ public void endDTD ()
+ throws SAXException
+ {
+ super.endDTD ();
+ // DOM L2 has no way to make things readonly
+ getDoctype ().makeReadonly ();
+ }
+
+ // SAX1 DTD event
+ public void notationDecl (
+ String name,
+ String publicId, String systemId
+ ) throws SAXException
+ {
+ // DOM L2 can't create/save notation nodes
+ getDoctype ().declareNotation (name, publicId, systemId);
+ }
+
+ // SAX1 DTD event
+ public void unparsedEntityDecl (
+ String name,
+ String publicId, String systemId,
+ String notationName
+ ) throws SAXException
+ {
+ // DOM L2 can't create/save entity nodes
+ getDoctype ().declareEntity (name, publicId, systemId,
+ notationName);
+ }
+
+ // SAX2 declaration event
+ public void internalEntityDecl (String name, String value)
+ throws SAXException
+ {
+ // DOM L2 can't create/save entity nodes
+ // NOTE: this doesn't save the value as a child of this
+ // node, though it could realistically do so.
+ getDoctype ().declareEntity (name, null, null, null);
+ }
+
+ // SAX2 declaration event
+ public void externalEntityDecl (
+ String name,
+ String publicId,
+ String systemId
+ ) throws SAXException
+ {
+ // DOM L2 can't create/save entity nodes
+ // NOTE: DOM allows for these to have children, if
+ // they don't have unbound namespace references.
+ getDoctype ().declareEntity (name, publicId, systemId, null);
+ }
+
+ // SAX2 element
+ public void startElement (
+ String uri,
+ String localName,
+ String qName,
+ Attributes atts
+ ) throws SAXException
+ {
+ Node top;
+
+ super.startElement (uri, localName, qName, atts);
+
+ // might there be more work?
+ top = getTop ();
+ if (!top.hasAttributes () || !(atts instanceof Attributes2))
+ return;
+
+ // remember any attributes that got defaulted
+ DomNamedNodeMap map = (DomNamedNodeMap) top.getAttributes ();
+ Attributes2 attrs = (Attributes2) atts;
+ int length = atts.getLength ();
+
+ //map.compact ();
+ for (int i = 0; i < length; i++) {
+ if (attrs.isSpecified (i))
+ continue;
+
+ // value was defaulted.
+ String temp = attrs.getQName (i);
+ DomAttr attr;
+
+ if ("".equals (temp))
+ attr = (DomAttr) map.getNamedItemNS (attrs.getURI (i),
+ atts.getLocalName (i));
+ else
+ attr = (DomAttr) map.getNamedItem (temp);
+
+ // DOM L2 can't write this flag, only read it
+ attr.setSpecified (false);
+ }
+ }
+
+ public void endElement (
+ String uri,
+ String localName,
+ String qName
+ ) throws SAXException
+ {
+ DomNode top = (DomNode) getTop ();
+ top.compact ();
+ super.endElement (uri, localName, qName);
+ }
+
+ protected Text createText (
+ boolean isCDATA,
+ char buf [],
+ int off,
+ int len
+ ) {
+ DomDocument doc = (DomDocument) getDocument ();
+
+ if (isCDATA)
+ return doc.createCDATASection (buf, off, len);
+ else
+ return doc.createTextNode (buf, off, len);
+ }
public void elementDecl(String name, String model)
throws SAXException
@@ -266,87 +266,87 @@ public class Consumer extends DomConsumer
getDoctype().elementDecl(name, model);
}
- public void attributeDecl (
- String ename,
- String aname,
- String type,
- String mode,
- String value
- ) throws SAXException
- {
+ public void attributeDecl (
+ String ename,
+ String aname,
+ String type,
+ String mode,
+ String value
+ ) throws SAXException
+ {
getDoctype().attributeDecl(ename, aname, type, mode, value);
/*
- if (value == null && !"ID".equals (type))
- return;
-
- DomDoctype.ElementInfo info;
-
- info = getDoctype ().getElementInfo (ename);
- if (value != null)
- info.setAttrDefault (aname, value);
- if ("ID".equals (type))
- info.setIdAttr (aname);
+ if (value == null && !"ID".equals (type))
+ return;
+
+ DomDoctype.ElementInfo info;
+
+ info = getDoctype ().getElementInfo (ename);
+ if (value != null)
+ info.setAttrDefault (aname, value);
+ if ("ID".equals (type))
+ info.setIdAttr (aname);
*/
-
- }
-
- // force duplicate name checking off while we're
- // using parser output (don't duplicate the work)
- public void startDocument () throws SAXException
- {
- super.startDocument ();
-
+
+ }
+
+ // force duplicate name checking off while we're
+ // using parser output (don't duplicate the work)
+ public void startDocument () throws SAXException
+ {
+ super.startDocument ();
+
DomDocument doc = (DomDocument) getDocument ();
doc.setStrictErrorChecking(false);
doc.setBuilding(true);
- }
+ }
- public void endDocument ()
- throws SAXException
- {
- DomDocument doc = (DomDocument) getDocument ();
- doc.setStrictErrorChecking(true);
+ public void endDocument ()
+ throws SAXException
+ {
+ DomDocument doc = (DomDocument) getDocument ();
+ doc.setStrictErrorChecking(true);
doc.setBuilding(false);
- doc.compact ();
+ doc.compact ();
DomDoctype doctype = (DomDoctype) doc.getDoctype();
if (doctype != null)
{
doctype.makeReadonly();
}
- super.endDocument ();
- }
-
- // these three methods collaborate to populate entity
- // refs, marking contents readonly on end-of-entity
-
- public boolean canPopulateEntityRefs ()
- { return true; }
-
- public void startEntity (String name)
- throws SAXException
- {
- if (name.charAt (0) == '%' || "[dtd]".equals (name))
- return;
- super.startEntity (name);
-
- DomNode top = (DomNode) getTop ();
-
- if (top.getNodeType () == Node.ENTITY_REFERENCE_NODE)
- top.readonly = false;
- }
-
- public void endEntity (String name)
- throws SAXException
- {
- if (name.charAt (0) == '%' || "[dtd]".equals (name))
- return;
- DomNode top = (DomNode) getTop ();
-
- if (top.getNodeType () == Node.ENTITY_REFERENCE_NODE) {
- top.compact ();
- top.makeReadonly ();
- }
- super.endEntity (name);
- }
+ super.endDocument ();
+ }
+
+ // these three methods collaborate to populate entity
+ // refs, marking contents readonly on end-of-entity
+
+ public boolean canPopulateEntityRefs ()
+ { return true; }
+
+ public void startEntity (String name)
+ throws SAXException
+ {
+ if (name.charAt (0) == '%' || "[dtd]".equals (name))
+ return;
+ super.startEntity (name);
+
+ DomNode top = (DomNode) getTop ();
+
+ if (top.getNodeType () == Node.ENTITY_REFERENCE_NODE)
+ top.readonly = false;
+ }
+
+ public void endEntity (String name)
+ throws SAXException
+ {
+ if (name.charAt (0) == '%' || "[dtd]".equals (name))
+ return;
+ DomNode top = (DomNode) getTop ();
+
+ if (top.getNodeType () == Node.ENTITY_REFERENCE_NODE) {
+ top.compact ();
+ top.makeReadonly ();
+ }
+ super.endEntity (name);
+ }
}
}
diff --git a/gnu/xml/dom/DTDAttributeTypeInfo.java b/gnu/xml/dom/DTDAttributeTypeInfo.java
index e3c69c43e..d6e25529d 100644
--- a/gnu/xml/dom/DTDAttributeTypeInfo.java
+++ b/gnu/xml/dom/DTDAttributeTypeInfo.java
@@ -1,4 +1,4 @@
-/* DTDAttributeTypeInfo.java --
+/* DTDAttributeTypeInfo.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -81,4 +81,3 @@ class DTDAttributeTypeInfo
}
}
-
diff --git a/gnu/xml/dom/DTDElementTypeInfo.java b/gnu/xml/dom/DTDElementTypeInfo.java
index c5553e20e..9063d4c79 100644
--- a/gnu/xml/dom/DTDElementTypeInfo.java
+++ b/gnu/xml/dom/DTDElementTypeInfo.java
@@ -1,4 +1,4 @@
-/* DTDElementTypeInfo.java --
+/* DTDElementTypeInfo.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -107,6 +107,5 @@ class DTDElementTypeInfo
}
return attributes.values().iterator();
}
-
-}
+}
diff --git a/gnu/xml/dom/DomAttr.java b/gnu/xml/dom/DomAttr.java
index 6a8da8371..421baf76a 100644
--- a/gnu/xml/dom/DomAttr.java
+++ b/gnu/xml/dom/DomAttr.java
@@ -1,4 +1,4 @@
-/* DomAttr.java --
+/* DomAttr.java --
Copyright (C) 1999,2000,2001,2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -65,7 +65,7 @@ import org.w3c.dom.events.MutationEvent;
* methods (setNodeValue, setValue, and Element.setAttribute) to modify
* those values. That is, if you manipulate those children directly,
* elements won't get notified that attribute values have changed.
- * The natural fix for that will report other modifications, but won't
+ * The natural fix for that will report other modifications, but won't
* be able to expose "previous" attribute value; it'll need to be cached
* or something (at which point why bother using child nodes). </p>
*
@@ -79,10 +79,10 @@ public class DomAttr
extends DomNsNode
implements Attr
{
-
+
private boolean specified;
private String value; // string value cache
-
+
/**
* Constructs an Attr node associated with the specified document.
* The "specified" flag is initialized to true, since this DOM has
@@ -95,7 +95,7 @@ public class DomAttr
*
* @param owner The document with which this node is associated
* @param namespaceURI Combined with the local part of the name,
- * this is used to uniquely identify a type of attribute
+ * this is used to uniquely identify a type of attribute
* @param name Name of this attribute, which may include a prefix
*/
protected DomAttr(DomDocument owner, String namespaceURI, String name)
@@ -103,7 +103,7 @@ public class DomAttr
super(ATTRIBUTE_NODE, owner, namespaceURI, name);
specified = true;
length = 1;
-
+
// XXX register self to get insertion/removal events
// and character data change events and when they happen,
// report self-mutation
@@ -121,18 +121,18 @@ public class DomAttr
* <p>
* With this constructor, the prefix and local part are given explicitly
* rather than being computed. This allows them to be explicitly set to
- * {@code null} as required by {@link Document#createAttribute(String)}.
+ * {@code null} as required by {@link Document#createAttribute(String)}.
* </p>
*
* @param owner The document with which this node is associated
* @param namespaceURI Combined with the local part of the name,
- * this is used to uniquely identify a type of attribute
+ * this is used to uniquely identify a type of attribute
* @param name Name of this attribute, which may include a prefix
* @param prefix the namespace prefix of the name. May be {@code null}.
* @param localName the local part of the name. May be {@code null}.
*/
protected DomAttr(DomDocument owner, String namespaceURI, String name,
- String prefix, String localName)
+ String prefix, String localName)
{
super(ATTRIBUTE_NODE, owner, namespaceURI, name, prefix, localName);
specified = true;
@@ -147,7 +147,7 @@ public class DomAttr
{
return getNodeName();
}
-
+
/**
* <b>DOM L1</b>
* Returns true if a parser reported this was in the source text.
@@ -156,7 +156,7 @@ public class DomAttr
{
return specified;
}
-
+
/**
* Records whether this attribute was in the source text.
*/
@@ -194,7 +194,7 @@ public class DomAttr
}
return buf.toString();
}
-
+
/**
* <b>DOM L1</b>
* Assigns the value of the attribute; it will have one child,
@@ -205,7 +205,7 @@ public class DomAttr
{
setNodeValue(value);
}
-
+
/**
* <b>DOM L1</b>
* Returns the value of the attribute as a non-null string; same
@@ -216,7 +216,7 @@ public class DomAttr
{
return getNodeValue();
}
-
+
/**
* <b>DOM L1</b>
* Assigns the attribute value; using this API, no entity or
@@ -246,7 +246,7 @@ public class DomAttr
this.value = value;
length = 1;
specified = true;
-
+
mutating(oldValue, value, MutationEvent.MODIFICATION);
}
@@ -334,7 +334,7 @@ public class DomAttr
{
return null;
}
-
+
/**
* Shallow clone of the attribute, breaking all ties with any
* elements.
@@ -345,18 +345,18 @@ public class DomAttr
retval.specified = true;
return retval;
}
-
+
private void mutating(String oldValue, String newValue, short why)
{
if (!reportMutations || parent == null || equal(newValue, oldValue))
{
return;
}
-
+
// EVENT: DOMAttrModified, target = parent,
- // prev/new values provided, also attr name
- MutationEvent event;
-
+ // prev/new values provided, also attr name
+ MutationEvent event;
+
event = (MutationEvent) createEvent ("MutationEvents");
event.initMutationEvent ("DOMAttrModified",
true /* bubbles */, false /* nocancel */,
@@ -365,7 +365,7 @@ public class DomAttr
}
// DOM Level 3 methods
-
+
public TypeInfo getSchemaTypeInfo()
{
if (parent != null)
@@ -409,4 +409,3 @@ public class DomAttr
}
}
-
diff --git a/gnu/xml/dom/DomCDATASection.java b/gnu/xml/dom/DomCDATASection.java
index e34359e71..770f7d5dd 100644
--- a/gnu/xml/dom/DomCDATASection.java
+++ b/gnu/xml/dom/DomCDATASection.java
@@ -1,4 +1,4 @@
-/* DomCDATASection.java --
+/* DomCDATASection.java --
Copyright (C) 1999,2000,2001,2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -58,7 +58,7 @@ public class DomCDATASection
extends DomText
implements CDATASection
{
-
+
/**
* Constructs a CDATA section node associated with the specified
* document and holding the specified data.
@@ -86,6 +86,5 @@ public class DomCDATASection
{
return "#cdata-section";
}
-
-}
+}
diff --git a/gnu/xml/dom/DomCharacterData.java b/gnu/xml/dom/DomCharacterData.java
index 1eec5bea7..396c5f7a7 100644
--- a/gnu/xml/dom/DomCharacterData.java
+++ b/gnu/xml/dom/DomCharacterData.java
@@ -1,4 +1,4 @@
-/* DomCharacterData.java --
+/* DomCharacterData.java --
Copyright (C) 1999,2000,2001,2004,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -73,7 +73,7 @@ public abstract class DomCharacterData
{
return null;
}
-
+
}
/**
@@ -82,7 +82,7 @@ public abstract class DomCharacterData
static final NodeList CHILD_NODES = new EmptyNodeList();
private String text;
-
+
// package private
DomCharacterData(short nodeType, DomDocument doc, String value)
{
@@ -113,7 +113,7 @@ public abstract class DomCharacterData
mutating(value);
text = value;
}
-
+
/**
* <b>DOM L1</b>
* Modifies the value of this node.
@@ -153,7 +153,7 @@ public abstract class DomCharacterData
throw new DomDOMException(DOMException.INDEX_SIZE_ERR);
}
}
-
+
/**
* <b>DOM L1</b>
* Returns the value of this node.
@@ -162,7 +162,7 @@ public abstract class DomCharacterData
{
return text;
}
-
+
/**
* <b>DOM L1</b>
* Returns the value of this node; same as getNodeValue.
@@ -180,7 +180,7 @@ public abstract class DomCharacterData
{
return text.length();
}
-
+
/**
* <b>DOM L1</b>
* Modifies the value of this node.
@@ -194,7 +194,7 @@ public abstract class DomCharacterData
char[] raw = text.toCharArray();
char[] tmp = arg.toCharArray ();
char[] buf = new char[raw.length + tmp.length];
-
+
try
{
System.arraycopy(raw, 0, buf, 0, offset);
@@ -210,7 +210,7 @@ public abstract class DomCharacterData
throw new DomDOMException(DOMException.INDEX_SIZE_ERR);
}
}
-
+
/**
* <b>DOM L1</b>
* Modifies the value of this node. Causes DOMCharacterDataModified
@@ -223,7 +223,7 @@ public abstract class DomCharacterData
throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);
}
char[] raw = text.toCharArray();
-
+
// deleteData
if (offset < 0 || count < 0 || offset > raw.length)
{
@@ -239,7 +239,7 @@ public abstract class DomCharacterData
System.arraycopy(raw, 0, buf, 0, offset);
System.arraycopy(raw, offset + count, buf, offset,
raw.length - (offset + count));
-
+
// insertData
char[] tmp = arg.toCharArray ();
char[] buf2 = new char[buf.length + tmp.length];
@@ -256,7 +256,7 @@ public abstract class DomCharacterData
throw new DomDOMException(DOMException.INDEX_SIZE_ERR);
}
}
-
+
/**
* <b>DOM L1</b>
* Assigns the value of this node.
@@ -275,7 +275,7 @@ public abstract class DomCharacterData
mutating(value);
text = value;
}
-
+
/**
* <b>DOM L1</b>
* Assigns the value of this node; same as setNodeValue.
@@ -329,17 +329,16 @@ public abstract class DomCharacterData
{
return;
}
-
+
// EVENT: DOMCharacterDataModified, target = this,
// prev/new values provided
MutationEvent event;
-
+
event = (MutationEvent) createEvent("MutationEvents");
event.initMutationEvent("DOMCharacterDataModified",
true /* bubbles */, false /* nocancel */,
null, text, newValue, null, (short) 0);
dispatchEvent(event);
}
-
-}
+}
diff --git a/gnu/xml/dom/DomComment.java b/gnu/xml/dom/DomComment.java
index 71c816048..5be6bd518 100644
--- a/gnu/xml/dom/DomComment.java
+++ b/gnu/xml/dom/DomComment.java
@@ -1,4 +1,4 @@
-/* DomComment.java --
+/* DomComment.java --
Copyright (C) 1999,2000,2001,2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -54,7 +54,7 @@ public class DomComment
extends DomCharacterData
implements Comment
{
-
+
/**
* Constructs a comment node associated with the specified
* document and holding the specified data.
@@ -67,7 +67,7 @@ public class DomComment
{
super(COMMENT_NODE, owner, value);
}
-
+
/**
* <b>DOM L1</b>
* Returns the string "#comment".
@@ -78,4 +78,3 @@ public class DomComment
}
}
-
diff --git a/gnu/xml/dom/DomDOMException.java b/gnu/xml/dom/DomDOMException.java
index cf93fcf97..4a3ba7a8c 100644
--- a/gnu/xml/dom/DomDOMException.java
+++ b/gnu/xml/dom/DomDOMException.java
@@ -1,4 +1,4 @@
-/* DomDOMException.java --
+/* DomDOMException.java --
Copyright (C) 1999,2000,2001,2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -48,7 +48,7 @@ import org.w3c.dom.Node;
* that is being reported, in terms of the relevant DOM structures
* and data.
*
- * @author David Brownell
+ * @author David Brownell
*/
public class DomDOMException
extends DOMException
@@ -56,13 +56,13 @@ public class DomDOMException
/** @serial Data that caused an error to be reported */
private String data;
-
+
/** @serial Node associated with the error. */
private Node node;
-
+
/** @serial Data associated with the error. */
private int value;
-
+
/**
* Constructs an exception, with the diagnostic message
* corresponding to the specified code.
@@ -71,7 +71,7 @@ public class DomDOMException
{
super(code, diagnostic(code));
}
-
+
/**
* Constructs an exception, with the diagnostic message
* corresponding to the specified code and additional
@@ -110,7 +110,7 @@ public class DomDOMException
public String getMessage()
{
String retval = super.getMessage();
-
+
if (data != null)
{
retval += "\nMore Information: " + data;
@@ -127,11 +127,11 @@ public class DomDOMException
}
// these strings should be localizable.
-
+
private static String diagnostic(short code)
{
switch (code)
- {
+ {
// DOM L1:
case INDEX_SIZE_ERR:
return "An index or size is out of range.";
@@ -153,7 +153,7 @@ public class DomDOMException
return "That object is not supported.";
case INUSE_ATTRIBUTE_ERR:
return "The attribute belongs to a different element.";
-
+
// DOM L2:
case INVALID_STATE_ERR:
return "The object is not usable.";
@@ -172,4 +172,3 @@ public class DomDOMException
}
}
-
diff --git a/gnu/xml/dom/DomDoctype.java b/gnu/xml/dom/DomDoctype.java
index d35eedc7f..ecf7a9588 100644
--- a/gnu/xml/dom/DomDoctype.java
+++ b/gnu/xml/dom/DomDoctype.java
@@ -1,4 +1,4 @@
-/* DomDoctype.java --
+/* DomDoctype.java --
Copyright (C) 1999,2000,2001,2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -72,22 +72,22 @@ import org.w3c.dom.Notation;
* @see DomEntityReference
* @see DomNotation
*
- * @author David Brownell
+ * @author David Brownell
* @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
*/
public class DomDoctype
extends DomExtern
implements DocumentType
{
-
+
private DomNamedNodeMap notations;
private DomNamedNodeMap entities;
private final DOMImplementation implementation;
private String subset;
-
+
private HashMap elements = new HashMap();
private boolean ids;
-
+
/**
* Constructs a DocumentType node associated with the specified
* implementation, with the specified name.
@@ -103,11 +103,11 @@ public class DomDoctype
* @param impl The implementation with which this object is associated
* @param name Name of this root element
* @param publicId If non-null, provides the external subset's
- * PUBLIC identifier
+ * PUBLIC identifier
* @param systemId If non-null, provides the external subset's
- * SYSTEM identifier
+ * SYSTEM identifier
* @param internalSubset Provides the literal value (unparsed, no
- * entities expanded) of the DTD's internal subset.
+ * entities expanded) of the DTD's internal subset.
*/
protected DomDoctype(DOMImplementation impl,
String name,
@@ -154,7 +154,7 @@ public class DomDoctype
* then it doesn't have the strange construction rules of L2.</em>
*
* @exception DOMException HIERARCHY_REQUEST_ERR if the DocumentType
- * is not associated with a document.
+ * is not associated with a document.
*/
public NamedNodeMap getEntities()
{
@@ -172,15 +172,15 @@ public class DomDoctype
* @param publicId If non-null, provides the entity's PUBLIC identifier
* @param systemId Provides the entity's SYSTEM identifier
* @param notation If non-null, provides the entity's notation
- * (indicating an unparsed entity)
+ * (indicating an unparsed entity)
* @return The Entity that was declared, or null if the entity wasn't
- * recorded (because it's a parameter entity or because an entity with
- * this name was already declared).
+ * recorded (because it's a parameter entity or because an entity with
+ * this name was already declared).
*
* @exception DOMException NO_MODIFICATION_ALLOWED_ERR if the
- * DocumentType is no longer writable.
+ * DocumentType is no longer writable.
* @exception DOMException HIERARCHY_REQUEST_ERR if the DocumentType
- * is not associated with a document.
+ * is not associated with a document.
*/
public Entity declareEntity(String name,
String publicId,
@@ -188,7 +188,7 @@ public class DomDoctype
String notation)
{
DomEntity entity;
-
+
if (name.charAt(0) == '%' || "[dtd]".equals(name))
{
return null;
@@ -198,19 +198,19 @@ public class DomDoctype
throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);
}
getEntities();
-
+
DomDocument.checkName(name, (owner != null) ?
"1.1".equals(owner.getXmlVersion()) : false);
if (entities.getNamedItem(name) != null)
{
return null;
}
-
+
entity = new DomEntity(owner, name, publicId, systemId, notation);
entities.setNamedItem(entity);
return entity;
}
-
+
/**
* <b>DOM L1</b>
* Returns information about any notations declared in the DTD.
@@ -219,7 +219,7 @@ public class DomDoctype
* then it doesn't have the strange construction rules of L2.</em>
*
* @exception DOMException HIERARCHY_REQUEST_ERR if the DocumentType
- * is not associated with a document.
+ * is not associated with a document.
*/
public NamedNodeMap getNotations()
{
@@ -239,25 +239,25 @@ public class DomDoctype
* @return The notation that was declared.
*
* @exception DOMException NO_MODIFICATION_ALLOWED_ERR if the
- * DocumentType is no longer writable.
+ * DocumentType is no longer writable.
* @exception DOMException HIERARCHY_REQUEST_ERR if the DocumentType
- * is not associated with a document.
+ * is not associated with a document.
*/
public Notation declareNotation(String name,
String publicId,
String systemId)
{
DomNotation notation;
-
+
if (isReadonly())
{
throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);
}
getNotations();
-
+
DomDocument.checkName(name, (owner != null) ?
"1.1".equals(owner.getXmlVersion()) : false);
-
+
notation = new DomNotation(owner, name, publicId, systemId);
notations.setNamedItem(notation);
return notation;
@@ -290,7 +290,7 @@ public class DomDoctype
{
return null;
}
-
+
/**
* Sets the internal "readonly" flag so the node and its associated
* data (only lists of entities and notations, no type information
@@ -337,7 +337,7 @@ public class DomDoctype
{
return implementation.hasFeature(feature, version);
}
-
+
/**
* Returns the implementation associated with this document type.
*/
@@ -395,7 +395,7 @@ public class DomDoctype
{
return ids;
}
-
+
public boolean isSameNode(Node arg)
{
if (equals(arg))
@@ -423,7 +423,7 @@ public class DomDoctype
// TODO notations
return true;
}
-
+
/**
* Shallow clone of the doctype, except that associated
* entities and notations are (deep) cloned.
diff --git a/gnu/xml/dom/DomDocument.java b/gnu/xml/dom/DomDocument.java
index b32c6b82d..b1e99f46d 100644
--- a/gnu/xml/dom/DomDocument.java
+++ b/gnu/xml/dom/DomDocument.java
@@ -1,4 +1,4 @@
-/* DomDocument.java --
+/* DomDocument.java --
Copyright (C) 1999,2000,2001,2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -76,7 +76,7 @@ import org.w3c.dom.xpath.XPathNSResolver;
* of basic XML conformance tests. (The huge XML character tables are
* hairy to implement.)
*
- * @author David Brownell
+ * @author David Brownell
* @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
*/
public class DomDocument
@@ -90,7 +90,7 @@ public class DomDocument
private boolean defaultAttributes = true;
boolean building; // if true, skip mutation events in the tree
-
+
DomDocumentConfiguration config;
String inputEncoding;
@@ -98,7 +98,7 @@ public class DomDocument
String version = "1.0";
boolean standalone;
String systemId;
-
+
/**
* Constructs a Document node, associating it with an instance
* of the DomImpl class.
@@ -115,7 +115,7 @@ public class DomDocument
{
this(new DomImpl());
}
-
+
/**
* Constructs a Document node, associating it with the specified
* implementation. This should only be used in conjunction with
@@ -165,7 +165,7 @@ public class DomDocument
{
defaultAttributes = flag;
}
-
+
/**
* <b>DOM L1</b>
* Returns the constant "#document".
@@ -236,12 +236,12 @@ public class DomDocument
{
doctype = null;
}
-
+
// yes, this is linear in size of document.
// it'd be easy enough to maintain a hashtable.
Node current = getDocumentElement();
Node temp;
-
+
if (current == null)
{
return null;
@@ -286,14 +286,14 @@ public class DomDocument
return element;
}
}
-
+
// descend?
if (current.hasChildNodes())
{
current = current.getFirstChild();
continue;
}
-
+
// lateral?
temp = current.getNextSibling();
if (temp != null)
@@ -301,8 +301,8 @@ public class DomDocument
current = temp;
continue;
}
-
- // back up ...
+
+ // back up ...
do
{
temp = current.getParentNode();
@@ -385,13 +385,13 @@ public class DomDocument
}
return super.replaceChild(newChild, refChild);
}
-
+
// NOTE: DOM can't really tell when the name of an entity,
// notation, or PI must follow the namespace rules (excluding
// colons) instead of the XML rules (which allow them without
// much restriction). That's an API issue. verifyXmlName
// aims to enforce the XML rules, not the namespace rules.
-
+
/**
* Throws a DOM exception if the specified name is not a legal XML 1.0
* Name.
@@ -417,7 +417,7 @@ public class DomDocument
}
// dog: rewritten to use the rules for XML 1.0 and 1.1
-
+
// Name start character
char c = name.charAt(0);
if (xml11)
@@ -565,13 +565,13 @@ public class DomDocument
char[] chars = value.toCharArray();
checkChar(chars, 0, chars.length, xml11);
}
-
+
static void checkChar(char[] buf, int off, int len, boolean xml11)
{
for (int i = 0; i < len; i++)
{
char c = buf[i];
-
+
// assume surrogate pairing checks out OK, for simplicity
if ((c >= 0x0020 && c <= 0xd7ff) ||
(c == 0x000a || c == 0x000d || c == 0x0009) ||
@@ -603,7 +603,7 @@ public class DomDocument
public Element createElement(String name)
{
Element element;
-
+
if (checkingCharacters)
{
checkName(name, "1.1".equals(version));
@@ -633,7 +633,7 @@ public class DomDocument
{
checkNCName(name, "1.1".equals(version));
}
-
+
if ("".equals(namespaceURI))
{
namespaceURI = null;
@@ -661,13 +661,13 @@ public class DomDocument
"prefixed name '" + name +
"' needs a URI", this, 0);
}
-
+
Element element = new DomElement(this, namespaceURI, name);
if (defaultAttributes)
setDefaultAttributes(element, name);
return element;
}
-
+
private void setDefaultAttributes(Element element, String name)
{
DomDoctype doctype = (DomDoctype) getDoctype();
@@ -687,7 +687,7 @@ public class DomDocument
if ("#IMPLIED".equals(attr.mode) && value == null)
continue;
DomAttr node = (DomAttr) createAttribute(attr.name);
-
+
if (value == null)
{
value = "";
@@ -830,7 +830,7 @@ public class DomDocument
{
checkNCName(name, "1.1".equals(version));
}
-
+
if ("".equals(namespaceURI))
{
namespaceURI = null;
@@ -871,7 +871,7 @@ public class DomDocument
}
return new DomAttr(this, namespaceURI, name);
}
-
+
/**
* <b>DOM L1</b>
* Returns a newly created reference to the specified entity.
@@ -1006,7 +1006,7 @@ public class DomDocument
{
Attr a = (Attr) srcAttrs.item(i);
Attr dflt;
-
+
// maybe update defaulted attributes
dflt = (Attr) dstAttrs.getNamedItem(a.getNodeName());
if (dflt != null)
@@ -1019,7 +1019,7 @@ public class DomDocument
}
continue;
}
-
+
dstAttrs.setNamedItem((Attr) importNode(a, false));
}
if (deep)
@@ -1039,7 +1039,7 @@ public class DomDocument
default:
throw new DomDOMException(DOMException.NOT_SUPPORTED_ERR, null, src, 0);
}
-
+
// FIXME cleanup a bit -- for deep copies, copy those
// children in one place, here (code sharing is healthy)
@@ -1077,7 +1077,7 @@ public class DomDocument
}
// DOM Level 3 methods
-
+
/**
* DOM L3
*/
@@ -1090,7 +1090,7 @@ public class DomDocument
{
this.inputEncoding = inputEncoding;
}
-
+
/**
* DOM L3
*/
@@ -1098,12 +1098,12 @@ public class DomDocument
{
return encoding;
}
-
+
public void setXmlEncoding(String encoding)
{
this.encoding = encoding;
}
-
+
public boolean getXmlStandalone()
{
return standalone;
@@ -1181,7 +1181,7 @@ public class DomDocument
return systemId;
*/
}
-
+
public String getDocumentURI()
{
return systemId;
@@ -1454,7 +1454,7 @@ public class DomDocument
ctx = ctxNext;
}
}
-
+
public Node renameNode(Node n, String namespaceURI, String qualifiedName)
throws DOMException
{
@@ -1514,7 +1514,7 @@ public class DomDocument
"xmlns namespace must be " +
XMLConstants.XMLNS_ATTRIBUTE_NS_URI, src, 0);
}
-
+
}
src.setNodeName(qualifiedName);
src.setNamespaceURI(namespaceURI);
@@ -1527,19 +1527,19 @@ public class DomDocument
}
// -- XPathEvaluator --
-
+
public XPathExpression createExpression(String expression,
XPathNSResolver resolver)
throws XPathException, DOMException
{
return new DomXPathExpression(this, expression, resolver);
}
-
+
public XPathNSResolver createNSResolver(Node nodeResolver)
{
return new DomXPathNSResolver(nodeResolver);
}
-
+
public Object evaluate(String expression,
Node contextNode,
XPathNSResolver resolver,
@@ -1553,4 +1553,3 @@ public class DomDocument
}
}
-
diff --git a/gnu/xml/dom/DomDocumentBuilder.java b/gnu/xml/dom/DomDocumentBuilder.java
index e62ce2076..99c254481 100644
--- a/gnu/xml/dom/DomDocumentBuilder.java
+++ b/gnu/xml/dom/DomDocumentBuilder.java
@@ -1,4 +1,4 @@
-/* DomDocumentBuilder.java --
+/* DomDocumentBuilder.java --
Copyright (C) 2004,2006,2007 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -68,7 +68,7 @@ class DomDocumentBuilder
final DOMImplementation impl;
final DOMImplementationLS ls;
final LSParser parser;
-
+
DomDocumentBuilder(DOMImplementation impl,
DOMImplementationLS ls,
LSParser parser)
@@ -83,7 +83,7 @@ class DomDocumentBuilder
DOMConfiguration config = parser.getDomConfig();
return ((Boolean) config.getParameter("namespaces")).booleanValue();
}
-
+
public boolean isValidating()
{
DOMConfiguration config = parser.getDomConfig();
@@ -112,7 +112,7 @@ class DomDocumentBuilder
{
return impl;
}
-
+
public Document newDocument()
{
return impl.createDocument(null, null, null);
@@ -225,4 +225,3 @@ class DomDocumentBuilder
}
}
-
diff --git a/gnu/xml/dom/DomDocumentBuilderFactory.java b/gnu/xml/dom/DomDocumentBuilderFactory.java
index 4d2828af8..1e3eaa582 100644
--- a/gnu/xml/dom/DomDocumentBuilderFactory.java
+++ b/gnu/xml/dom/DomDocumentBuilderFactory.java
@@ -1,4 +1,4 @@
-/* DomDocumentBuilderFactory.java --
+/* DomDocumentBuilderFactory.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -156,7 +156,7 @@ public class DomDocumentBuilderFactory
{
// TODO
}
-
+
public void setFeature(String name, boolean value)
throws ParserConfigurationException
{
@@ -177,6 +177,5 @@ public class DomDocumentBuilderFactory
return secureProcessing;
throw new ParserConfigurationException(name);
}
-
-}
+}
diff --git a/gnu/xml/dom/DomDocumentConfiguration.java b/gnu/xml/dom/DomDocumentConfiguration.java
index 5c589f82f..9aab44532 100644
--- a/gnu/xml/dom/DomDocumentConfiguration.java
+++ b/gnu/xml/dom/DomDocumentConfiguration.java
@@ -1,4 +1,4 @@
-/* DomDocumentConfiguration.java --
+/* DomDocumentConfiguration.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -245,12 +245,12 @@ class DomDocumentConfiguration
return null;
}
}
-
+
public int getLength()
{
return SUPPORTED_PARAMETERS.size();
}
-
+
public boolean contains(String str)
{
str = str.toLowerCase();
diff --git a/gnu/xml/dom/DomDocumentFragment.java b/gnu/xml/dom/DomDocumentFragment.java
index 8d2603778..8c4e0db3b 100644
--- a/gnu/xml/dom/DomDocumentFragment.java
+++ b/gnu/xml/dom/DomDocumentFragment.java
@@ -1,4 +1,4 @@
-/* DomDocumentFragment.java --
+/* DomDocumentFragment.java --
Copyright (C) 1999,2000,2001,2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -42,14 +42,14 @@ import org.w3c.dom.DocumentFragment;
/**
* <p> "DocumentFragment" implementation. </p>
*
- * @author David Brownell
+ * @author David Brownell
* @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
*/
public class DomDocumentFragment
extends DomNode
implements DocumentFragment
{
-
+
/**
* Constructs a DocumentFragment node associated with the
* specified document.
@@ -71,6 +71,5 @@ public class DomDocumentFragment
{
return "#document-fragment";
}
-
-}
+}
diff --git a/gnu/xml/dom/DomElement.java b/gnu/xml/dom/DomElement.java
index 462cb9178..429749978 100644
--- a/gnu/xml/dom/DomElement.java
+++ b/gnu/xml/dom/DomElement.java
@@ -1,4 +1,4 @@
-/* DomElement.java --
+/* DomElement.java --
Copyright (C) 1999,2000,2001,2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -51,7 +51,7 @@ import org.w3c.dom.TypeInfo;
/**
* <p> "Element" implementation.
*
- * @author David Brownell
+ * @author David Brownell
* @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
*/
public class DomElement
@@ -81,7 +81,7 @@ public class DomElement
*
* @param owner The document with which this node is associated
* @param namespaceURI Combined with the local part of the name,
- * this is used to uniquely identify a type of element
+ * this is used to uniquely identify a type of element
* @param name Name of this element, which may include a prefix
*/
protected DomElement(DomDocument owner, String namespaceURI, String name)
@@ -99,18 +99,18 @@ public class DomElement
* <p>
* With this constructor, the prefix and local part are given explicitly
* rather than being computed. This allows them to be explicitly set to
- * {@code null} as required by {@link Document#createElement(String)}.
+ * {@code null} as required by {@link Document#createElement(String)}.
* </p>
*
* @param owner The document with which this node is associated
* @param namespaceURI Combined with the local part of the name,
- * this is used to uniquely identify a type of element
+ * this is used to uniquely identify a type of element
* @param name Name of this element, which may include a prefix
* @param prefix the namespace prefix of the name. May be {@code null}.
* @param localName the local part of the name. May be {@code null}.
*/
protected DomElement(DomDocument owner, String namespaceURI, String name,
- String prefix, String localName)
+ String prefix, String localName)
{
super(ELEMENT_NODE, owner, namespaceURI, name, prefix, localName);
}
@@ -263,7 +263,7 @@ public class DomElement
* <b>DOM L1</b>
* Modifies an existing attribute to have the specified value,
* or creates a new one with that value. The name used is the
- * nodeName value.
+ * nodeName value.
*/
public void setAttribute(String name, String value)
{
@@ -476,7 +476,7 @@ public class DomElement
}
return super.lookupNamespaceURI(prefix);
}
-
+
public String getBaseURI()
{
if (attributes != null)
@@ -490,7 +490,7 @@ public class DomElement
}
return super.getBaseURI();
}
-
+
public TypeInfo getSchemaTypeInfo()
{
// DTD implementation
@@ -509,7 +509,7 @@ public class DomElement
Attr attr = (Attr) attrs.getNamedItem(name);
setIdAttributeNode(attr, isId);
}
-
+
public void setIdAttributeNode(Attr attr, boolean isId)
{
if (readonly)
@@ -578,5 +578,5 @@ public class DomElement
}
return true;
}
-
+
}
diff --git a/gnu/xml/dom/DomEntity.java b/gnu/xml/dom/DomEntity.java
index 3a76479a3..be44d7359 100644
--- a/gnu/xml/dom/DomEntity.java
+++ b/gnu/xml/dom/DomEntity.java
@@ -1,4 +1,4 @@
-/* DomEntity.java --
+/* DomEntity.java --
Copyright (C) 1999,2000,2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -45,17 +45,17 @@ import org.w3c.dom.Entity;
* particularly well in this API:</p><dl>
*
* <dt><em>Unparsed Entities</em></dt>
- * <dd>Since ENTITY/ENTITIES attributes, the only legal use of unparsed
- * entities in XML, can't be detected with DOM, there isn't much point in
- * trying to use unparsed entities in DOM applications. (XML Linking is
- * working to provide a better version of this functionality.) </dd>
+ * <dd>Since ENTITY/ENTITIES attributes, the only legal use of unparsed
+ * entities in XML, can't be detected with DOM, there isn't much point in
+ * trying to use unparsed entities in DOM applications. (XML Linking is
+ * working to provide a better version of this functionality.) </dd>
*
* <dt><em>Parsed Entities</em></dt>
- * <dd> While the DOM specification permits nodes for parsed entities
- * to have a readonly set of children, this is not required and there
- * is no portable way to provide such children. <em>This implementation
- * currently does not permit children to be added to Entities.</em>
- * There are related issues with the use of EntityReference nodes. </dd>
+ * <dd> While the DOM specification permits nodes for parsed entities
+ * to have a readonly set of children, this is not required and there
+ * is no portable way to provide such children. <em>This implementation
+ * currently does not permit children to be added to Entities.</em>
+ * There are related issues with the use of EntityReference nodes. </dd>
*
* </dl>
*
@@ -65,14 +65,14 @@ import org.w3c.dom.Entity;
* @see DomEntityReference
* @see DomNotation
*
- * @author David Brownell
+ * @author David Brownell
* @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
*/
public class DomEntity
extends DomExtern
implements Entity
{
-
+
private String notation;
/**
@@ -113,13 +113,13 @@ public class DomEntity
}
// DOM Level 3 methods
-
+
public String getInputEncoding()
{
// TODO
- return null;
+ return null;
}
-
+
public String getXmlEncoding()
{
// TODO
@@ -142,6 +142,5 @@ public class DomEntity
String systemId = getSystemId();
return (systemId == null) ? owner.getBaseURI() : systemId;
}
-
-}
+}
diff --git a/gnu/xml/dom/DomEntityReference.java b/gnu/xml/dom/DomEntityReference.java
index d4596b405..1fa2ea628 100644
--- a/gnu/xml/dom/DomEntityReference.java
+++ b/gnu/xml/dom/DomEntityReference.java
@@ -1,4 +1,4 @@
-/* DomEntityReference.java --
+/* DomEntityReference.java --
Copyright (C) 1999,2000,2001,2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -71,7 +71,7 @@ import org.w3c.dom.EntityReference;
* @see DomDoctype
* @see DomEntity
*
- * @author David Brownell
+ * @author David Brownell
* @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
*/
public class DomEntityReference
@@ -80,7 +80,7 @@ public class DomEntityReference
{
private String name;
-
+
/**
* Constructs an EntityReference node associated with the specified
* document. The creator should populate this with whatever contents
@@ -97,7 +97,7 @@ public class DomEntityReference
super(ENTITY_REFERENCE_NODE, owner);
this.name = name;
}
-
+
/**
* Returns the name of the referenced entity.
* @since DOM Level 1 Core
diff --git a/gnu/xml/dom/DomEvent.java b/gnu/xml/dom/DomEvent.java
index 9190ed8eb..3e9a6550a 100644
--- a/gnu/xml/dom/DomEvent.java
+++ b/gnu/xml/dom/DomEvent.java
@@ -1,4 +1,4 @@
-/* DomEvent.java --
+/* DomEvent.java --
Copyright (C) 1999,2000,2001 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -46,7 +46,7 @@ import org.w3c.dom.events.EventTarget;
import org.w3c.dom.events.MutationEvent;
import org.w3c.dom.events.UIEvent;
-import org.w3c.dom.views.AbstractView; // used by UIEvent
+import org.w3c.dom.views.AbstractView; // used by UIEvent
/**
* "Event" implementation. Events are
@@ -62,7 +62,7 @@ import org.w3c.dom.views.AbstractView; // used by UIEvent
public class DomEvent
implements Event
{
-
+
String type; // init
EventTarget target;
EventTarget currentNode;
@@ -130,10 +130,10 @@ public class DomEvent
{
return timeStamp;
}
-
+
boolean stop;
boolean doDefault;
-
+
/**
* Requests the event no longer be captured or bubbled; only
* listeners on the event target will see the event, if they
@@ -174,7 +174,7 @@ public class DomEvent
cancelable = cancelableArg;
timeStamp = System.currentTimeMillis();
}
-
+
/** Constructs, but does not initialize, an event. */
public DomEvent(String type)
{
@@ -216,7 +216,7 @@ public class DomEvent
buf.append("]");
return buf.toString();
}
-
+
/**
* "MutationEvent" implementation.
*/
@@ -224,46 +224,46 @@ public class DomEvent
extends DomEvent
implements MutationEvent
{
-
+
// package private
Node relatedNode; // init
-
+
private String prevValue; // init
private String newValue; // init
-
+
private String attrName; // init
private short attrChange; // init
-
+
/** Returns any "related" node provided by this type of event */
public final Node getRelatedNode()
{
return relatedNode;
}
-
+
/** Returns any "previous value" provided by this type of event */
public final String getPrevValue()
{
return prevValue;
}
-
+
/** Returns any "new value" provided by this type of event */
public final String getNewValue()
{
return newValue;
}
-
+
/** For attribute change events, returns the attribute's name */
public final String getAttrName()
{
return attrName;
}
-
+
/** For attribute change events, returns how the attribuet changed */
public final short getAttrChange()
{
return attrChange;
}
-
+
/** Initializes a mutation event */
public final void initMutationEvent(String typeArg,
boolean canBubbleArg,
@@ -281,7 +281,7 @@ public class DomEvent
bubbles = canBubbleArg;
cancelable = cancelableArg;
timeStamp = System.currentTimeMillis();
-
+
relatedNode = relatedNodeArg;
prevValue = prevValueArg;
newValue = newValueArg;
@@ -304,7 +304,7 @@ public class DomEvent
{
super(type);
}
-
+
}
/**
@@ -314,16 +314,16 @@ public class DomEvent
extends DomEvent
implements UIEvent
{
-
+
private AbstractView view; // init
private int detail; // init
-
+
/** Constructs an uninitialized User Interface (UI) event */
public DomUIEvent (String type) { super (type); }
-
+
public final AbstractView getView () { return view; }
public final int getDetail () { return detail; }
-
+
/** Initializes a UI event */
public final void initUIEvent(String typeArg,
boolean canBubbleArg,
@@ -335,7 +335,7 @@ public class DomEvent
view = viewArg;
detail = detailArg;
}
-
+
}
/*
@@ -349,4 +349,3 @@ public class DomEvent
*/
}
-
diff --git a/gnu/xml/dom/DomExtern.java b/gnu/xml/dom/DomExtern.java
index 87a6909f7..7f2e55afc 100644
--- a/gnu/xml/dom/DomExtern.java
+++ b/gnu/xml/dom/DomExtern.java
@@ -1,4 +1,4 @@
-/* DomExtern.java --
+/* DomExtern.java --
Copyright (C) 1999,2000,2001,2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -48,17 +48,17 @@ package gnu.xml.dom;
* of them is defined fully enough to permit full use of the
* XML feature they partially expose. </p>
*
- * @author David Brownell
+ * @author David Brownell
* @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
*/
public abstract class DomExtern
extends DomNode
{
-
+
private final String name;
private final String publicId;
private final String systemId;
-
+
/**
* Constructs a node associated with the specified document,
* with the specified descriptive data.
@@ -98,7 +98,7 @@ public abstract class DomExtern
{
return publicId;
}
-
+
/**
* <b>DOM L1</b>
* Returns the object's name.
@@ -112,6 +112,5 @@ public abstract class DomExtern
{
return name;
}
-
-}
+}
diff --git a/gnu/xml/dom/DomImpl.java b/gnu/xml/dom/DomImpl.java
index cabe741c9..76a63caf6 100644
--- a/gnu/xml/dom/DomImpl.java
+++ b/gnu/xml/dom/DomImpl.java
@@ -1,4 +1,4 @@
-/* DomImpl.java --
+/* DomImpl.java --
Copyright (C) 1999,2000,2001,2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -64,13 +64,13 @@ import gnu.xml.dom.ls.DomLSSerializer;
* It is possible to compile the package so it doesn't support some of these
* features (notably, Traversal).
*
- * @author David Brownell
+ * @author David Brownell
* @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
*/
public class DomImpl
implements DOMImplementation, DOMImplementationLS
{
-
+
/**
* Constructs a DOMImplementation object which supports
* "XML" and other DOM Level 2 features.
@@ -95,7 +95,7 @@ public class DomImpl
{
name = name.substring(1);
}
-
+
if ("xml".equals(name) || "core".equals(name))
{
return (version == null ||
@@ -103,7 +103,7 @@ public class DomImpl
"1.0".equals(version) ||
"2.0".equals(version) ||
"3.0".equals(version));
-
+
}
else if ("ls".equals(name) || "ls-async".equals(name))
{
@@ -120,7 +120,7 @@ public class DomImpl
return (version == null ||
"".equals(version) ||
"2.0".equals(version));
-
+
// Extension: "USER-" prefix event types can
// be created and passed through the DOM.
@@ -131,11 +131,11 @@ public class DomImpl
"".equals(version) ||
"0.1".equals(version));
- // NOTE: "hasFeature" for events is here interpreted to
- // mean the DOM can manufacture those sorts of events,
- // since actually choosing to report the events is more
- // often part of the environment or application. It's
- // only really an issue for mutation events.
+ // NOTE: "hasFeature" for events is here interpreted to
+ // mean the DOM can manufacture those sorts of events,
+ // since actually choosing to report the events is more
+ // often part of the environment or application. It's
+ // only really an issue for mutation events.
}
else if (DomNode.reportMutations
@@ -143,7 +143,7 @@ public class DomImpl
{
return (version == null ||
"".equals(version) ||
- "2.0".equals(version));
+ "2.0".equals(version));
}
else if ("xpath".equals(name))
{
@@ -162,7 +162,7 @@ public class DomImpl
// stylesheets
// css, css2
// range
-
+
return false;
}
@@ -208,7 +208,7 @@ public class DomImpl
{
Document doc = createDocument();
Element root = null;
-
+
if (rootName != null)
{
root = doc.createElementNS(namespaceURI, rootName);
@@ -221,7 +221,7 @@ public class DomImpl
// Bleech -- L2 seemingly _requires_ omission of xmlns attributes.
if (doctype != null)
{
- doc.appendChild(doctype); // handles WRONG_DOCUMENT error
+ doc.appendChild(doctype); // handles WRONG_DOCUMENT error
}
if (root != null)
{
@@ -236,7 +236,7 @@ public class DomImpl
}
// DOM Level 3
-
+
public Object getFeature(String feature, String version)
{
if (hasFeature(feature, version))
@@ -273,6 +273,5 @@ public class DomImpl
{
return new DomLSOutput();
}
-
-}
+}
diff --git a/gnu/xml/dom/DomIterator.java b/gnu/xml/dom/DomIterator.java
index 31f998246..d5f305cd8 100644
--- a/gnu/xml/dom/DomIterator.java
+++ b/gnu/xml/dom/DomIterator.java
@@ -1,4 +1,4 @@
-/* DomIterator.java --
+/* DomIterator.java --
Copyright (C) 1999, 2000, 2001, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -50,21 +50,21 @@ import org.w3c.dom.traversal.NodeIterator;
* <p> "NodeIterator" implementation, usable with any L2 DOM which
* supports MutationEvents. </p>
*
- * @author David Brownell
+ * @author David Brownell
*/
public final class DomIterator
implements NodeIterator, EventListener
{
-
+
private Node reference;
private boolean right;
private boolean done;
-
+
private final Node root;
private final int whatToShow;
private final NodeFilter filter;
private final boolean expandEntityReferences;
-
+
/**
* Constructs and initializes an iterator.
*/
@@ -73,22 +73,22 @@ public final class DomIterator
NodeFilter filter,
boolean entityReferenceExpansion)
{
- if (!root.isSupported("MutationEvents", "2.0"))
+ if (!root.isSupported("MutationEvents", "2.0"))
{
throw new DomDOMException(DOMException.NOT_SUPPORTED_ERR,
"Iterator needs mutation events", root, 0);
}
-
+
this.root = root;
this.whatToShow = whatToShow;
this.filter = filter;
this.expandEntityReferences = entityReferenceExpansion;
-
+
// start condition: going right, seen nothing yet.
reference = null;
right = true;
-
- EventTarget target = (EventTarget) root;
+
+ EventTarget target = (EventTarget) root;
target.addEventListener("DOMNodeRemoved", this, false);
}
@@ -100,7 +100,7 @@ public final class DomIterator
*/
public void detach()
{
- EventTarget target = (EventTarget) root;
+ EventTarget target = (EventTarget) root;
target.removeEventListener("DOMNodeRemoved", this, false);
done = true;
}
@@ -114,7 +114,7 @@ public final class DomIterator
{
return expandEntityReferences;
}
-
+
/**
* <b>DOM L2</b>
* Returns the filter provided during construction.
@@ -123,7 +123,7 @@ public final class DomIterator
{
return filter;
}
-
+
/**
* <b>DOM L2</b>
* Returns the root of the tree this is iterating through.
@@ -132,7 +132,7 @@ public final class DomIterator
{
return root;
}
-
+
/**
* <b>DOM L2</b>
* Returns the mask of flags provided during construction.
@@ -141,7 +141,7 @@ public final class DomIterator
{
return whatToShow;
}
-
+
/**
* <b>DOM L2</b>
* Returns the next node in a forward iteration, masked and filtered.
@@ -228,7 +228,7 @@ public final class DomIterator
}
return leaf;
}
-
+
//
// Returns the immediate successor in a forward (or backward)
// document order walk, sans filtering ... except that it knows
@@ -253,13 +253,13 @@ public final class DomIterator
{
return here.getFirstChild();
}
-
+
// There's no way up or sideways from the root, so if we
// couldn't move down to a child, there's nowhere to go.
//
if (here == root)
return null;
-
+
//
// Siblings ... if forward, we visit them, if backwards
// we visit their children first.
@@ -284,7 +284,7 @@ public final class DomIterator
}
return next;
}
-
+
//
// We can't go down or lateral -- it's up, then. The logic is
// the converse of what's above: backwards is easy (the parent
@@ -295,7 +295,7 @@ public final class DomIterator
{
return next;
}
-
+
Node temp = null;
while (next != null
&& next != root
@@ -303,7 +303,7 @@ public final class DomIterator
{
next = next.getParentNode();
}
-
+
// If we have exceeded the root node then stop traversing.
if (next == root.getParentNode())
{
@@ -324,7 +324,7 @@ public final class DomIterator
{
MutationEvent event;
Node ancestor, removed;
-
+
if (reference == null
|| !"DOMNodeRemoved".equals(e.getType())
|| e.getEventPhase() != Event.BUBBLING_PHASE)
@@ -372,10 +372,9 @@ search:
}
return;
}
-
+
// The current DOM WD talks about a special case here;
// I've not yet seen it.
}
-
-}
+}
diff --git a/gnu/xml/dom/DomNSResolverContext.java b/gnu/xml/dom/DomNSResolverContext.java
index 4cf57772e..3dd957560 100644
--- a/gnu/xml/dom/DomNSResolverContext.java
+++ b/gnu/xml/dom/DomNSResolverContext.java
@@ -1,4 +1,4 @@
-/* DomNSResolverContext.java --
+/* DomNSResolverContext.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -50,41 +50,41 @@ class DomNSResolverContext
implements NamespaceContext, Iterator
{
- final XPathNSResolver resolver;
-
- DomNSResolverContext(XPathNSResolver resolver)
- {
- this.resolver = resolver;
- }
-
- public String getNamespaceURI(String prefix)
- {
- return resolver.lookupNamespaceURI(prefix);
- }
-
- public String getPrefix(String namespaceURI)
- {
- return null;
- }
-
- public Iterator getPrefixes(String namespaceURI)
- {
- return this;
- }
-
- public boolean hasNext()
- {
- return false;
- }
-
- public Object next()
- {
- return null;
- }
-
- public void remove()
- {
- throw new UnsupportedOperationException();
- }
+ final XPathNSResolver resolver;
+
+ DomNSResolverContext(XPathNSResolver resolver)
+ {
+ this.resolver = resolver;
+ }
+
+ public String getNamespaceURI(String prefix)
+ {
+ return resolver.lookupNamespaceURI(prefix);
+ }
+
+ public String getPrefix(String namespaceURI)
+ {
+ return null;
+ }
+
+ public Iterator getPrefixes(String namespaceURI)
+ {
+ return this;
+ }
+
+ public boolean hasNext()
+ {
+ return false;
+ }
+
+ public Object next()
+ {
+ return null;
+ }
+
+ public void remove()
+ {
+ throw new UnsupportedOperationException();
+ }
}
diff --git a/gnu/xml/dom/DomNamedNodeMap.java b/gnu/xml/dom/DomNamedNodeMap.java
index e37cc3dce..7a767355a 100644
--- a/gnu/xml/dom/DomNamedNodeMap.java
+++ b/gnu/xml/dom/DomNamedNodeMap.java
@@ -1,4 +1,4 @@
-/* DomNamedNodeMap.java --
+/* DomNamedNodeMap.java --
Copyright (C) 1999,2000,2001,2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -46,7 +46,7 @@ import org.w3c.dom.Node;
* Used mostly to hold element attributes, but sometimes also
* to list notations or entities.
*
- * @author David Brownell
+ * @author David Brownell
* @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
*/
public class DomNamedNodeMap
@@ -55,11 +55,11 @@ public class DomNamedNodeMap
final DomNode owner;
final short type;
-
+
DomNode first;
int length;
boolean readonly;
-
+
// package private
DomNamedNodeMap(DomNode owner, short type)
{
@@ -76,8 +76,8 @@ public class DomNamedNodeMap
public final boolean isReadonly()
{
return readonly;
- }
-
+ }
+
/**
* Sets the internal "readonly" flag so the node and its
* children can't be changed.
@@ -90,7 +90,7 @@ public class DomNamedNodeMap
ctx.makeReadonly();
}
}
-
+
/**
* <b>DOM L1</b>
* Returns the named item from the map, or null; names are just
@@ -189,7 +189,7 @@ public class DomNamedNodeMap
node.parent = owner;
node.depth = owner.depth + 1;
}
-
+
String nodeName = node.getNodeName();
String localName = ns ? node.getLocalName() : null;
String namespaceURI = ns ? node.getNamespaceURI() : null;
@@ -197,7 +197,7 @@ public class DomNamedNodeMap
{
namespaceURI = null;
}
-
+
// maybe attribute ADDITION events (?)
DomNode last = null;
for (DomNode ctx = first; ctx != null; ctx = ctx.next)
@@ -373,10 +373,10 @@ public class DomNamedNodeMap
ctx.index = 0;
return ctx;
}
- }
+ }
throw new DomDOMException(DOMException.NOT_FOUND_ERR);
}
-
+
String getDefaultValue(String name)
{
DomDoctype doctype = (DomDoctype) owner.owner.getDoctype();
@@ -417,5 +417,5 @@ public class DomNamedNodeMap
{
return length;
}
-
+
}
diff --git a/gnu/xml/dom/DomNode.java b/gnu/xml/dom/DomNode.java
index 78e1ab85c..879baaa8d 100644
--- a/gnu/xml/dom/DomNode.java
+++ b/gnu/xml/dom/DomNode.java
@@ -1,4 +1,4 @@
-/* DomNode.java --
+/* DomNode.java --
Copyright (C) 1999,2000,2001,2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -102,10 +102,10 @@ public abstract class DomNode
//final static String xmlnsURI = "http://www.w3.org/2000/xmlns/";
// tunable
- // NKIDS_* affects arrays of children (which grow)
+ // NKIDS_* affects arrays of children (which grow)
// (currently) fixed size:
- // ANCESTORS_* is for event capture/bubbling, # ancestors
- // NOTIFICATIONS_* is for per-node event delivery, # events
+ // ANCESTORS_* is for event capture/bubbling, # ancestors
+ // NOTIFICATIONS_* is for per-node event delivery, # events
private static final int NKIDS_DELTA = 8;
private static final int ANCESTORS_INIT = 20;
private static final int NOTIFICATIONS_INIT = 10;
@@ -193,7 +193,7 @@ public abstract class DomNode
this.owner = owner;
this.listeners = new HashSet();
}
-
+
/**
* <b>DOM L1</b>
@@ -314,7 +314,7 @@ public abstract class DomNode
this.owner;
DomDocument childOwner = child.owner;
short childNodeType = child.nodeType;
-
+
if (childOwner != owner)
{
// new in DOM L2, this case -- patch it up later, in reparent()
@@ -338,7 +338,7 @@ public abstract class DomNode
return;
}
break;
-
+
case ATTRIBUTE_NODE:
switch (childNodeType)
{
@@ -347,7 +347,7 @@ public abstract class DomNode
return;
}
break;
-
+
case DOCUMENT_FRAGMENT_NODE:
case ENTITY_REFERENCE_NODE:
case ELEMENT_NODE:
@@ -384,7 +384,7 @@ public abstract class DomNode
this, 0);
}
}
-
+
// Here's hoping a good optimizer will detect the case when the
// next several methods are never called, and won't allocate
// object code space of any kind. (Case: not reporting any
@@ -399,7 +399,7 @@ public abstract class DomNode
return;
}
boolean doFree = false;
-
+
if (event == null)
{
event = getMutationEvent();
@@ -531,7 +531,7 @@ public abstract class DomNode
{
try
{
- DomNode child = (DomNode) newChild;
+ DomNode child = (DomNode) newChild;
if (child.nodeType == DOCUMENT_FRAGMENT_NODE)
{
@@ -610,9 +610,9 @@ public abstract class DomNode
try
{
- DomNode child = (DomNode) newChild;
+ DomNode child = (DomNode) newChild;
DomNode ref = (DomNode) refChild;
-
+
if (child.nodeType == DOCUMENT_FRAGMENT_NODE)
{
// Append all nodes in the fragment to this node
@@ -641,7 +641,7 @@ public abstract class DomNode
"can't insert node before itself",
ref, 0);
}
-
+
if (child.parent != null)
{
child.parent.removeChild(child);
@@ -672,7 +672,7 @@ public abstract class DomNode
}
length++;
}
-
+
return child;
}
catch (ClassCastException e)
@@ -713,10 +713,10 @@ public abstract class DomNode
{
DomNode child = (DomNode) newChild;
DomNode ref = (DomNode) refChild;
-
+
DomEvent.DomMutationEvent event = getMutationEvent();
boolean doFree = (event != null);
-
+
if (child.nodeType == DOCUMENT_FRAGMENT_NODE)
{
// Append all nodes in the fragment to this node
@@ -729,14 +729,14 @@ public abstract class DomNode
throw new DomDOMException(DOMException.NOT_FOUND_ERR,
null, ref, 0);
}
-
+
if (reportMutations)
{
removalEvent(event, ref);
}
length--;
length += child.length;
-
+
if (child.length == 0)
{
// Removal
@@ -793,12 +793,12 @@ public abstract class DomNode
throw new DomDOMException(DOMException.NOT_FOUND_ERR,
null, ref, 0);
}
-
+
if (reportMutations)
{
removalEvent(event, ref);
}
-
+
if (child.parent != null)
{
child.parent.removeChild(child);
@@ -839,7 +839,7 @@ public abstract class DomNode
ref.setDepth(0);
ref.previous = null;
ref.next = null;
-
+
return ref;
}
catch (ClassCastException e)
@@ -875,7 +875,7 @@ public abstract class DomNode
throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR,
null, this, 0);
}
-
+
for (DomNode child = first; child != null; child = child.next)
{
if (child == ref)
@@ -913,7 +913,7 @@ public abstract class DomNode
ref.index = 0;
ref.previous = null;
ref.next = null;
-
+
return ref;
}
}
@@ -1002,9 +1002,9 @@ public abstract class DomNode
*/
public boolean isSupported(String feature, String version)
{
- Document doc = owner;
- DOMImplementation impl = null;
-
+ Document doc = owner;
+ DOMImplementation impl = null;
+
if (doc == null && nodeType == DOCUMENT_NODE)
{
doc = (Document) this;
@@ -1183,7 +1183,7 @@ public abstract class DomNode
try
{
DomNode node = (DomNode) super.clone();
-
+
node.parent = null;
node.depth = 0;
node.index = 0;
@@ -1192,7 +1192,7 @@ public abstract class DomNode
node.last = null;
node.previous = null;
node.next = null;
-
+
node.readonly = false;
node.listeners = new HashSet();
node.nListeners = 0;
@@ -1242,7 +1242,7 @@ public abstract class DomNode
{
private LiveNodeList liveList;
-
+
ShadowList(String ns, String local)
{
liveList = new LiveNodeList(ns, local);
@@ -1268,15 +1268,15 @@ public abstract class DomNode
final class LiveNodeList
implements NodeList, EventListener, NodeFilter
{
-
+
private final boolean matchAnyURI;
- private final boolean matchAnyName;
+ private final boolean matchAnyName;
private final String elementURI;
private final String elementName;
-
+
private DomIterator current;
private int lastIndex;
-
+
LiveNodeList(String uri, String name)
{
elementURI = uri;
@@ -1336,28 +1336,28 @@ public abstract class DomNode
{
return new DomIterator(DomNode.this,
NodeFilter.SHOW_ELEMENT,
- this, /* filter */
- true /* expand entity refs */
+ this, /* filter */
+ true /* expand entity refs */
);
}
public void handleEvent(Event e)
{
- MutationEvent mutation = (MutationEvent) e;
- Node related = mutation.getRelatedNode();
-
+ MutationEvent mutation = (MutationEvent) e;
+ Node related = mutation.getRelatedNode();
+
// XXX if it's got children ... check all kids too, they
// will invalidate our saved index
-
+
if (related.getNodeType() != Node.ELEMENT_NODE ||
related.getNodeName() != elementName ||
related.getNamespaceURI() != elementURI)
{
return;
}
-
+
if (current != null)
- current.detach();
+ current.detach();
current = null;
}
@@ -1368,7 +1368,7 @@ public abstract class DomNode
current = createIterator();
lastIndex = -1;
}
-
+
// last node or before? go backwards
if (index <= lastIndex) {
while (index != lastIndex) {
@@ -1376,11 +1376,11 @@ public abstract class DomNode
lastIndex--;
}
Node ret = current.previousNode ();
- current.detach();
+ current.detach();
current = null;
return ret;
- }
-
+ }
+
// somewhere after last node
while (++lastIndex != index)
current.nextNode ();
@@ -1390,12 +1390,12 @@ public abstract class DomNode
current = null;
return ret;
}
-
+
public int getLength()
{
int retval = 0;
NodeIterator iter = createIterator();
-
+
while (iter.nextNode() != null)
{
retval++;
@@ -1403,7 +1403,7 @@ public abstract class DomNode
iter.detach();
return retval;
}
-
+
}
//
@@ -1411,7 +1411,7 @@ public abstract class DomNode
//
static final class ListenerRecord
{
-
+
String type;
EventListener listener;
boolean useCapture;
@@ -1435,10 +1435,10 @@ public abstract class DomNode
&& useCapture == rec.useCapture
&& type == rec.type;
}
-
+
public int hashCode()
{
- return listener.hashCode() ^ type.hashCode();
+ return listener.hashCode() ^ type.hashCode();
}
}
@@ -1456,32 +1456,32 @@ public abstract class DomNode
* of DomEvent and pass that to dispatchEvent().
*
* @param eventType Identifies the particular DOM feature module
- * defining the type of event, such as "MutationEvents".
- * <em>The event "name" is a different kind of "type".</em>
+ * defining the type of event, such as "MutationEvents".
+ * <em>The event "name" is a different kind of "type".</em>
*/
public Event createEvent(String eventType)
{
eventType = eventType.toLowerCase();
-
+
if ("mutationevents".equals(eventType))
{
return new DomEvent.DomMutationEvent(null);
}
-
+
if ("htmlevents".equals(eventType)
|| "events".equals(eventType)
|| "user-events".equals(eventType))
{
return new DomEvent(null);
}
-
+
if ("uievents".equals(eventType))
{
return new DomEvent.DomUIEvent(null);
}
- // mouse events
-
+ // mouse events
+
throw new DomDOMException(DOMException.NOT_SUPPORTED_ERR,
eventType, null, 0);
}
@@ -1508,12 +1508,12 @@ public abstract class DomNode
static final class DomEventException
extends EventException
{
-
+
DomEventException()
{
super(UNSPECIFIED_EVENT_TYPE_ERR, "unspecified event type");
}
-
+
}
/**
@@ -1527,7 +1527,7 @@ public abstract class DomNode
*
* @exception NullPointerException When a null event is passed.
* @exception ClassCastException When the event wasn't provided by
- * the createEvent method, or otherwise isn't a DomEvent.
+ * the createEvent method, or otherwise isn't a DomEvent.
* @exception EventException If the event type wasn't specified
*/
public final boolean dispatchEvent(Event event)
@@ -1537,7 +1537,7 @@ public abstract class DomNode
DomNode[] ancestors = null;
int ancestorMax = 0;
boolean haveDispatchDataLock = false;
-
+
if (e.type == null)
{
throw new DomEventException();
@@ -1545,7 +1545,7 @@ public abstract class DomNode
e.doDefault = true;
e.target = this;
-
+
//
// Typical case: one nonrecursive dispatchEvent call at a time
// for this class. If that's our case, we can avoid allocating
@@ -1565,7 +1565,7 @@ public abstract class DomNode
boolean haveAncestorRegistrations = false;
ListenerRecord[] notificationSet;
int ancestorLen;
-
+
synchronized (lockNode)
{
if (!dispatchDataLock)
@@ -1581,7 +1581,7 @@ public abstract class DomNode
}
ancestorLen = ancestors.length;
}
-
+
// Climb to the top of this subtree and handle capture, letting
// each node (from the top down) capture until one stops it or
// until we get to this one.
@@ -1597,7 +1597,7 @@ public abstract class DomNode
{
if (current == null || current.depth == 0)
break;
-
+
if (current.nListeners != 0)
{
haveAncestorRegistrations = true;
@@ -1609,10 +1609,10 @@ public abstract class DomNode
{
throw new RuntimeException("dispatchEvent capture stack size");
}
-
+
ancestorMax = index;
e.stop = false;
-
+
if (haveAncestorRegistrations)
{
e.eventPhase = Event.CAPTURING_PHASE;
@@ -1625,7 +1625,7 @@ public abstract class DomNode
}
}
}
-
+
// Always deliver events to the target node (this)
// unless stopPropagation was called. If we saw
// no registrations yet (typical!), we never will.
@@ -1638,11 +1638,11 @@ public abstract class DomNode
{
e.stop = true;
}
-
+
// If the event bubbles and propagation wasn't halted,
// walk back up the ancestor list. Stop bubbling when
// any bubbled event handler stops it.
-
+
if (!e.stop && e.bubbles)
{
e.eventPhase = Event.BUBBLING_PHASE;
@@ -1659,11 +1659,11 @@ public abstract class DomNode
}
}
e.eventPhase = 0;
-
+
// Caller chooses whether to perform the default
// action based on return from this method.
return e.doDefault;
-
+
}
finally
{
@@ -1678,13 +1678,13 @@ public abstract class DomNode
ancestors [i] = null;
}
// notificationSet handled by notifyNode
-
+
dispatchDataLock = false;
}
}
}
}
-
+
private void notifyNode(DomEvent e,
DomNode current,
boolean capture,
@@ -1704,7 +1704,7 @@ public abstract class DomNode
{
continue;
}
- if (!e.type.equals (rec.type))
+ if (!e.type.equals (rec.type))
{
continue;
}
@@ -1722,18 +1722,18 @@ public abstract class DomNode
iter = null;
// Notify just those listeners
- e.currentNode = current;
+ e.currentNode = current;
for (int i = 0; i < count; i++)
{
try
{
- iter = current.listeners.iterator();
+ iter = current.listeners.iterator();
// Late in the DOM CR process (3rd or 4th CR?) the
// removeEventListener spec became asymmetric with respect
// to addEventListener ... effect is now immediate.
- while (iter.hasNext())
+ while (iter.hasNext())
{
- ListenerRecord rec = (ListenerRecord)iter.next();
+ ListenerRecord rec = (ListenerRecord)iter.next();
if (rec.equals(notificationSet[i]))
{
@@ -1747,7 +1747,7 @@ public abstract class DomNode
{
// ignore all exceptions
}
- notificationSet[i] = null; // free for GC
+ notificationSet[i] = null; // free for GC
}
}
@@ -2074,7 +2074,7 @@ public abstract class DomNode
}
if (ctx != null || argCtx != null)
return false;
-
+
// TODO DocumentType
return true;
}
@@ -2082,9 +2082,9 @@ public abstract class DomNode
boolean equal(String arg1, String arg2)
{
return ((arg1 == null && arg2 == null) ||
- (arg1 != null && arg1.equals(arg2)));
+ (arg1 != null && arg1.equals(arg2)));
}
-
+
public Object getFeature(String feature, String version)
{
DOMImplementation impl = (nodeType == DOCUMENT_NODE) ?
@@ -2145,7 +2145,7 @@ public abstract class DomNode
buf.append(']');
return buf.toString();
}
-
+
String encode(String value)
{
CPStringBuilder buf = null;
@@ -2220,4 +2220,3 @@ public abstract class DomNode
}
}
-
diff --git a/gnu/xml/dom/DomNodeIterator.java b/gnu/xml/dom/DomNodeIterator.java
index 8001556e5..9f9ec7e39 100644
--- a/gnu/xml/dom/DomNodeIterator.java
+++ b/gnu/xml/dom/DomNodeIterator.java
@@ -1,4 +1,4 @@
-/* DomNodeIterator.java --
+/* DomNodeIterator.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -140,7 +140,7 @@ public class DomNodeIterator
current = (ret == null) ? current : ret;
}
while (!accept(ret));
-
+
return ret;
}
diff --git a/gnu/xml/dom/DomNotation.java b/gnu/xml/dom/DomNotation.java
index 26e78724f..abb0e9da9 100644
--- a/gnu/xml/dom/DomNotation.java
+++ b/gnu/xml/dom/DomNotation.java
@@ -1,4 +1,4 @@
-/* DomNotation.java --
+/* DomNotation.java --
Copyright (C) 1999,2000,2001,2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -56,14 +56,14 @@ import org.w3c.dom.Notation;
* @see DomEntity
* @see DomPI
*
- * @author David Brownell
+ * @author David Brownell
* @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
*/
public class DomNotation
extends DomExtern
implements Notation
{
-
+
/**
* Constructs a Notation node associated with the specified document,
* with the specified descriptive data. Note that at least one of
@@ -72,7 +72,7 @@ public class DomNotation
*
* <p>This constructor should only be invoked by a DomDoctype object
* as part of its declareNotation functionality, or through a subclass
- * which is similarly used in a "Sub-DOM" style layer.
+ * which is similarly used in a "Sub-DOM" style layer.
*
* @param owner The document with which this notation is associated
* @param name Name of this notation
@@ -87,7 +87,7 @@ public class DomNotation
super(NOTATION_NODE, owner, name, publicId, systemId);
makeReadonly();
}
-
+
/**
* The base URI of an external entity is its system ID.
* The base URI of an internal entity is the parent document's base URI.
@@ -98,6 +98,5 @@ public class DomNotation
String systemId = getSystemId();
return (systemId == null) ? owner.getBaseURI() : systemId;
}
-
-}
+}
diff --git a/gnu/xml/dom/DomNsNode.java b/gnu/xml/dom/DomNsNode.java
index d3361515b..55e351185 100644
--- a/gnu/xml/dom/DomNsNode.java
+++ b/gnu/xml/dom/DomNsNode.java
@@ -1,4 +1,4 @@
-/* DomNsNode.java --
+/* DomNsNode.java --
Copyright (C) 1999,2000,2001,2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -44,25 +44,25 @@ import org.w3c.dom.DOMException;
* <p> Abstract implemention of namespace support. This facilitates
* sharing code for attribute and element nodes.
*
- * @author David Brownell
+ * @author David Brownell
* @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
*/
public abstract class DomNsNode
extends DomNode
{
-
+
private String name;
private String namespace;
private String prefix;
private String localName;
-
+
/**
* Constructs a node associated with the specified document, and
* with the specified namespace information.
*
* @param owner The document with which this entity is associated
* @param namespaceURI Combined with the local part of the name,
- * this identifies a type of element or attribute; may be null.
+ * this identifies a type of element or attribute; may be null.
* If this is the empty string, it is reassigned as null so that
* applications only need to test that case.
* @param name Name of this node, which may include a prefix
@@ -84,7 +84,7 @@ public abstract class DomNsNode
*
* @param owner The document with which this entity is associated
* @param namespaceURI Combined with the local part of the name,
- * this identifies a type of element or attribute; may be null.
+ * this identifies a type of element or attribute; may be null.
* If this is the empty string, it is reassigned as null so that
* applications only need to test that case.
* @param name Name of this node, which may include a prefix
@@ -93,7 +93,7 @@ public abstract class DomNsNode
*/
// package private
DomNsNode(short nodeType, DomDocument owner, String namespaceURI, String name,
- String prefix, String localName)
+ String prefix, String localName)
{
super(nodeType, owner);
this.name = name.intern();
@@ -126,7 +126,7 @@ public abstract class DomNsNode
localName = name.substring(index + 1).intern();
}
}
-
+
/**
* <b>DOM L2</b>
* Returns the node's namespace URI
@@ -145,7 +145,7 @@ public abstract class DomNsNode
}
namespace = (namespaceURI == null) ? null : namespaceURI.intern();
}
-
+
/**
* <b>DOM L2</b>
* Returns any prefix part of the node's name (before any colon).
@@ -222,6 +222,5 @@ public abstract class DomNsNode
{
return localName;
}
-
-}
+}
diff --git a/gnu/xml/dom/DomProcessingInstruction.java b/gnu/xml/dom/DomProcessingInstruction.java
index 2c90967d0..6d443a293 100644
--- a/gnu/xml/dom/DomProcessingInstruction.java
+++ b/gnu/xml/dom/DomProcessingInstruction.java
@@ -1,4 +1,4 @@
-/* DomProcessingInstruction.java --
+/* DomProcessingInstruction.java --
Copyright (C) 1999,2000,2001,2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -55,24 +55,24 @@ import org.w3c.dom.ProcessingInstruction;
*
* @see DomNotation
*
- * @author David Brownell
+ * @author David Brownell
* @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
*/
public class DomProcessingInstruction
extends DomNode
implements ProcessingInstruction
{
-
+
private String target;
private String data;
-
+
/**
* Constructs a ProcessingInstruction node associated with the
* specified document, with the specified data.
*
* <p>This constructor should only be invoked by a Document object as
* part of its createProcessingInstruction functionality, or through
- * a subclass which is similarly used in a "Sub-DOM" style layer.
+ * a subclass which is similarly used in a "Sub-DOM" style layer.
*/
protected DomProcessingInstruction(DomDocument owner,
String target, String data)
@@ -129,7 +129,7 @@ public class DomProcessingInstruction
{
setNodeValue(data);
}
-
+
/**
* <b>DOM L1</b>
* Assigns the data associated with the processing instruction.
@@ -142,6 +142,5 @@ public class DomProcessingInstruction
}
this.data = data;
}
-
-}
+}
diff --git a/gnu/xml/dom/DomText.java b/gnu/xml/dom/DomText.java
index 167eba3c1..b74c5b4c2 100644
--- a/gnu/xml/dom/DomText.java
+++ b/gnu/xml/dom/DomText.java
@@ -1,4 +1,4 @@
-/* DomText.java --
+/* DomText.java --
Copyright (C) 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -45,24 +45,24 @@ import org.w3c.dom.Text;
/**
* <p> "Text" implementation. </p>
*
- * @author David Brownell
+ * @author David Brownell
* @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
*/
public class DomText
extends DomCharacterData
implements Text
{
-
+
// NOTE: deleted unused per-instance "isIgnorable"
// support to reclaim its space.
-
+
/**
* Constructs a text node associated with the specified
* document and holding the specified data.
*
* <p>This constructor should only be invoked by a Document object
* as part of its createTextNode functionality, or through a subclass
- * which is similarly used in a "Sub-DOM" style layer.
+ * which is similarly used in a "Sub-DOM" style layer.
*/
protected DomText(DomDocument owner, String value)
{
@@ -112,7 +112,7 @@ public class DomText
String before = text.substring(0, offset);
String after = text.substring(offset);
Text next;
-
+
if (getNodeType() == TEXT_NODE)
{
next = owner.createTextNode(after);
@@ -121,7 +121,7 @@ public class DomText
{
next = owner.createCDATASection(after);
}
-
+
if (this.next != null)
{
parent.insertBefore(next, this.next);
@@ -132,16 +132,16 @@ public class DomText
}
setNodeValue(before);
return next;
-
+
}
catch (IndexOutOfBoundsException x)
{
throw new DomDOMException(DOMException.INDEX_SIZE_ERR);
}
}
-
+
// DOM Level 3
-
+
public boolean isElementContentWhitespace()
{
if (parent != null)
@@ -192,7 +192,7 @@ public class DomText
{
setNodeValue(content);
}
-
+
DomNode ref = this;
DomNode ctx;
for (ctx = previous; ctx != null &&
@@ -218,5 +218,5 @@ public class DomText
}
return (isEmpty) ? null : this;
}
-
+
}
diff --git a/gnu/xml/dom/DomXPathExpression.java b/gnu/xml/dom/DomXPathExpression.java
index 25187520c..0b6962930 100644
--- a/gnu/xml/dom/DomXPathExpression.java
+++ b/gnu/xml/dom/DomXPathExpression.java
@@ -1,4 +1,4 @@
-/* DomXPathExpression.java --
+/* DomXPathExpression.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -73,13 +73,13 @@ implements org.w3c.dom.xpath.XPathExpression
{
this.doc = doc;
this.resolver = resolver;
-
- XPathFactory factory = XPathFactory.newInstance();
- XPath xpath = factory.newXPath();
- if (resolver != null)
- {
- xpath.setNamespaceContext(new DomNSResolverContext(resolver));
- }
+
+ XPathFactory factory = XPathFactory.newInstance();
+ XPath xpath = factory.newXPath();
+ if (resolver != null)
+ {
+ xpath.setNamespaceContext(new DomNSResolverContext(resolver));
+ }
try
{
this.expression = xpath.compile(expression);
@@ -87,61 +87,61 @@ implements org.w3c.dom.xpath.XPathExpression
catch (XPathExpressionException e)
{
throw new XPathException(XPathException.INVALID_EXPRESSION_ERR,
- e.getMessage ());
+ e.getMessage ());
}
}
public Object evaluate(Node contextNode, short type, Object result)
throws XPathException, DOMException
{
- try
- {
- QName typeName = null;
- switch (type)
- {
- case XPathResult.BOOLEAN_TYPE:
- typeName = XPathConstants.BOOLEAN;
- break;
- case XPathResult.NUMBER_TYPE:
- typeName = XPathConstants.NUMBER;
- break;
- case XPathResult.STRING_TYPE:
- typeName = XPathConstants.STRING;
- break;
- case XPathResult.ANY_UNORDERED_NODE_TYPE:
- case XPathResult.FIRST_ORDERED_NODE_TYPE:
- typeName = XPathConstants.NODE;
- break;
- case XPathResult.UNORDERED_NODE_ITERATOR_TYPE:
- case XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE:
- case XPathResult.ORDERED_NODE_ITERATOR_TYPE:
- case XPathResult.ORDERED_NODE_SNAPSHOT_TYPE:
- typeName = XPathConstants.NODESET;
- break;
- default:
- throw new XPathException(XPathException.TYPE_ERR, null);
- }
- Object val = expression.evaluate(contextNode, typeName);
- switch (type)
- {
- case XPathResult.ORDERED_NODE_ITERATOR_TYPE:
- case XPathResult.ORDERED_NODE_SNAPSHOT_TYPE:
- // Sort the nodes
- List ns = new ArrayList((Collection) val);
- Collections.sort(ns, new DocumentOrderComparator());
- val = ns;
- }
- return new DomXPathResult(val, type);
- }
- catch (javax.xml.xpath.XPathException e)
- {
- throw new XPathException(XPathException.TYPE_ERR, e.getMessage());
- }
+ try
+ {
+ QName typeName = null;
+ switch (type)
+ {
+ case XPathResult.BOOLEAN_TYPE:
+ typeName = XPathConstants.BOOLEAN;
+ break;
+ case XPathResult.NUMBER_TYPE:
+ typeName = XPathConstants.NUMBER;
+ break;
+ case XPathResult.STRING_TYPE:
+ typeName = XPathConstants.STRING;
+ break;
+ case XPathResult.ANY_UNORDERED_NODE_TYPE:
+ case XPathResult.FIRST_ORDERED_NODE_TYPE:
+ typeName = XPathConstants.NODE;
+ break;
+ case XPathResult.UNORDERED_NODE_ITERATOR_TYPE:
+ case XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE:
+ case XPathResult.ORDERED_NODE_ITERATOR_TYPE:
+ case XPathResult.ORDERED_NODE_SNAPSHOT_TYPE:
+ typeName = XPathConstants.NODESET;
+ break;
+ default:
+ throw new XPathException(XPathException.TYPE_ERR, null);
+ }
+ Object val = expression.evaluate(contextNode, typeName);
+ switch (type)
+ {
+ case XPathResult.ORDERED_NODE_ITERATOR_TYPE:
+ case XPathResult.ORDERED_NODE_SNAPSHOT_TYPE:
+ // Sort the nodes
+ List ns = new ArrayList((Collection) val);
+ Collections.sort(ns, new DocumentOrderComparator());
+ val = ns;
+ }
+ return new DomXPathResult(val, type);
+ }
+ catch (javax.xml.xpath.XPathException e)
+ {
+ throw new XPathException(XPathException.TYPE_ERR, e.getMessage());
+ }
}
public String toString ()
{
return getClass ().getName () + "[expression=" + expression + "]";
}
-
+
}
diff --git a/gnu/xml/dom/DomXPathNSResolver.java b/gnu/xml/dom/DomXPathNSResolver.java
index 96dfd97d4..fb0719a4e 100644
--- a/gnu/xml/dom/DomXPathNSResolver.java
+++ b/gnu/xml/dom/DomXPathNSResolver.java
@@ -1,4 +1,4 @@
-/* DomXPathNSResolver.java --
+/* DomXPathNSResolver.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -60,5 +60,5 @@ implements XPathNSResolver
{
return node.lookupNamespaceURI (prefix);
}
-
+
}
diff --git a/gnu/xml/dom/DomXPathResult.java b/gnu/xml/dom/DomXPathResult.java
index bed249624..da8fcf513 100644
--- a/gnu/xml/dom/DomXPathResult.java
+++ b/gnu/xml/dom/DomXPathResult.java
@@ -1,4 +1,4 @@
-/* DomXPathResult.java --
+/* DomXPathResult.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/gnu/xml/dom/ImplementationList.java b/gnu/xml/dom/ImplementationList.java
index 8c0f44916..c99f55d0d 100644
--- a/gnu/xml/dom/ImplementationList.java
+++ b/gnu/xml/dom/ImplementationList.java
@@ -1,4 +1,4 @@
-/* ImplementationList.java --
+/* ImplementationList.java --
Copyright (C) 2004 Free Software Foundation, Inc..
This file is part of GNU Classpath.
diff --git a/gnu/xml/dom/ImplementationSource.java b/gnu/xml/dom/ImplementationSource.java
index 913079cd0..5f404423a 100644
--- a/gnu/xml/dom/ImplementationSource.java
+++ b/gnu/xml/dom/ImplementationSource.java
@@ -1,4 +1,4 @@
-/* ImplementationSource.java --
+/* ImplementationSource.java --
Copyright (C) 2004 Free Software Foundation, Inc..
This file is part of GNU Classpath.
@@ -72,7 +72,7 @@ public class ImplementationSource
}
catch (Exception e)
{
- // libxmlj not available
+ // libxmlj not available
}
catch (UnsatisfiedLinkError e)
{
diff --git a/gnu/xml/dom/JAXPFactory.java b/gnu/xml/dom/JAXPFactory.java
index ca14a8e9d..d7d399b5b 100644
--- a/gnu/xml/dom/JAXPFactory.java
+++ b/gnu/xml/dom/JAXPFactory.java
@@ -1,4 +1,4 @@
-/* JAXPFactory.java --
+/* JAXPFactory.java --
Copyright (C) 2001 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -66,20 +66,20 @@ import javax.xml.parsers.SAXParserFactory;
public final class JAXPFactory
extends DocumentBuilderFactory
{
-
- private static final String PROPERTY = "http://xml.org/sax/properties/";
- private static final String FEATURE = "http://xml.org/sax/features/";
-
- private SAXParserFactory pf;
+
+ private static final String PROPERTY = "http://xml.org/sax/properties/";
+ private static final String FEATURE = "http://xml.org/sax/features/";
+
+ private SAXParserFactory pf;
private boolean secureProcessing;
-
+
/**
* Default constructor.
*/
public JAXPFactory()
{
}
-
+
/**
* Constructs a JAXP document builder which uses the default
* JAXP SAX2 parser and the DOM implementation in this package.
@@ -94,14 +94,14 @@ public final class JAXPFactory
pf = new gnu.xml.aelfred2.JAXPFactory();
// pf = SAXParserFactory.newInstance ();
}
-
+
// JAXP default: false
pf.setValidating(isValidating());
// FIXME: this namespace setup may cause errors in some
// conformant SAX2 parsers, which we CAN patch up by
// splicing a "NSFilter" stage up front ...
-
+
// JAXP default: false
pf.setNamespaceAware(isNamespaceAware());
@@ -118,7 +118,7 @@ public final class JAXPFactory
throw new ParserConfigurationException(msg);
}
}
-
+
/** There seems to be no useful specification for attribute names */
public void setAttribute(String name, Object value)
throws IllegalArgumentException
@@ -160,21 +160,21 @@ public final class JAXPFactory
return secureProcessing;
throw new ParserConfigurationException(name);
}
-
+
static final class JAXPBuilder
extends DocumentBuilder
implements ErrorHandler
{
- private Consumer consumer;
- private XMLReader producer;
- private DomImpl impl;
-
+ private Consumer consumer;
+ private XMLReader producer;
+ private DomImpl impl;
+
JAXPBuilder(XMLReader parser, JAXPFactory factory)
throws ParserConfigurationException
{
impl = new DomImpl();
-
+
// set up consumer side
try
{
@@ -198,8 +198,8 @@ public final class JAXPFactory
try
{
- String id;
-
+ String id;
+
// if validating, report validity errors, and default
// to treating them as fatal
if (factory.isValidating ())
@@ -207,7 +207,7 @@ public final class JAXPFactory
producer.setFeature(FEATURE + "validation", true);
producer.setErrorHandler(this);
}
-
+
// always save prefix info, maybe do namespace processing
producer.setFeature(FEATURE + "namespace-prefixes", true);
producer.setFeature(FEATURE + "namespaces",
@@ -219,15 +219,15 @@ public final class JAXPFactory
id = PROPERTY + "declaration-handler";
producer.setProperty(id, consumer.getProperty(id));
-
+
}
catch (SAXException e)
{
throw new ParserConfigurationException(e.getMessage());
}
}
-
- public Document parse(InputSource source)
+
+ public Document parse(InputSource source)
throws SAXException, IOException
{
producer.parse(source);
@@ -283,27 +283,26 @@ public final class JAXPFactory
{
return new DomDocument();
}
-
+
// implementation of error handler that's used when validating
public void fatalError(SAXParseException e)
throws SAXException
{
throw e;
}
-
+
public void error(SAXParseException e)
throws SAXException
{
throw e;
}
-
+
public void warning(SAXParseException e)
throws SAXException
{
/* ignore */
}
-
+
}
}
-
diff --git a/gnu/xml/dom/html2/DomHTMLAnchorElement.java b/gnu/xml/dom/html2/DomHTMLAnchorElement.java
index 5da913306..4448dd580 100644
--- a/gnu/xml/dom/html2/DomHTMLAnchorElement.java
+++ b/gnu/xml/dom/html2/DomHTMLAnchorElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLAnchorElement.java --
+/* DomHTMLAnchorElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -64,7 +64,7 @@ public class DomHTMLAnchorElement
{
setHTMLAttribute("accesskey", accessKey);
}
-
+
public String getCharset()
{
return getHTMLAttribute("charset");
@@ -74,7 +74,7 @@ public class DomHTMLAnchorElement
{
setHTMLAttribute("charset", charset);
}
-
+
public String getCoords()
{
return getHTMLAttribute("coords");
@@ -84,7 +84,7 @@ public class DomHTMLAnchorElement
{
setHTMLAttribute("coords", coords);
}
-
+
public String getHref()
{
return getHTMLAttribute("href");
@@ -94,7 +94,7 @@ public class DomHTMLAnchorElement
{
setHTMLAttribute("href", href);
}
-
+
public String getHreflang()
{
return getHTMLAttribute("hreflang");
@@ -104,7 +104,7 @@ public class DomHTMLAnchorElement
{
setHTMLAttribute("hreflang", hreflang);
}
-
+
public String getName()
{
return getHTMLAttribute("name");
@@ -114,7 +114,7 @@ public class DomHTMLAnchorElement
{
setHTMLAttribute("name", name);
}
-
+
public String getRel()
{
return getHTMLAttribute("rel");
@@ -124,7 +124,7 @@ public class DomHTMLAnchorElement
{
setHTMLAttribute("rel", rel);
}
-
+
public String getRev()
{
return getHTMLAttribute("rev");
@@ -134,7 +134,7 @@ public class DomHTMLAnchorElement
{
setHTMLAttribute("rev", rev);
}
-
+
public String getShape()
{
return getHTMLAttribute("shape");
@@ -144,7 +144,7 @@ public class DomHTMLAnchorElement
{
setHTMLAttribute("shape", shape);
}
-
+
public int getTabIndex()
{
return getIntHTMLAttribute("tabindex");
@@ -154,7 +154,7 @@ public class DomHTMLAnchorElement
{
setIntHTMLAttribute("tabindex", tabIndex);
}
-
+
public String getTarget()
{
return getHTMLAttribute("target");
@@ -164,7 +164,7 @@ public class DomHTMLAnchorElement
{
setHTMLAttribute("target", target);
}
-
+
public String getType()
{
return getHTMLAttribute("type");
@@ -184,6 +184,5 @@ public class DomHTMLAnchorElement
{
dispatchUIEvent("focus");
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLAppletElement.java b/gnu/xml/dom/html2/DomHTMLAppletElement.java
index 918cf0d92..429fb0038 100644
--- a/gnu/xml/dom/html2/DomHTMLAppletElement.java
+++ b/gnu/xml/dom/html2/DomHTMLAppletElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLAppletElement.java --
+/* DomHTMLAppletElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -64,7 +64,7 @@ public class DomHTMLAppletElement
{
setHTMLAttribute("align", align);
}
-
+
public String getCls()
{
return getHTMLAttribute("class");
@@ -74,7 +74,7 @@ public class DomHTMLAppletElement
{
setHTMLAttribute("class", cls);
}
-
+
public String getSrc()
{
return getHTMLAttribute("src");
@@ -84,7 +84,7 @@ public class DomHTMLAppletElement
{
setHTMLAttribute("src", src);
}
-
+
public String getAlt()
{
return getHTMLAttribute("alt");
@@ -94,7 +94,7 @@ public class DomHTMLAppletElement
{
setHTMLAttribute("alt", alt);
}
-
+
public String getArchive()
{
return getHTMLAttribute("archive");
@@ -104,7 +104,7 @@ public class DomHTMLAppletElement
{
setHTMLAttribute("archive", archive);
}
-
+
public String getCode()
{
return getHTMLAttribute("code");
@@ -114,7 +114,7 @@ public class DomHTMLAppletElement
{
setHTMLAttribute("code", code);
}
-
+
public String getCodeBase()
{
return getHTMLAttribute("codebase");
@@ -124,7 +124,7 @@ public class DomHTMLAppletElement
{
setHTMLAttribute("codebase", codeBase);
}
-
+
public String getHeight()
{
return getHTMLAttribute("height");
@@ -134,7 +134,7 @@ public class DomHTMLAppletElement
{
setHTMLAttribute("height", height);
}
-
+
public int getHspace()
{
return getIntHTMLAttribute("hspace");
@@ -144,7 +144,7 @@ public class DomHTMLAppletElement
{
setIntHTMLAttribute("hspace", hspace);
}
-
+
public String getName()
{
return getHTMLAttribute("name");
@@ -154,7 +154,7 @@ public class DomHTMLAppletElement
{
setHTMLAttribute("name", name);
}
-
+
public String getObject()
{
return getHTMLAttribute("object");
@@ -164,7 +164,7 @@ public class DomHTMLAppletElement
{
setHTMLAttribute("object", object);
}
-
+
public int getVspace()
{
return getIntHTMLAttribute("vspace");
@@ -174,7 +174,7 @@ public class DomHTMLAppletElement
{
setIntHTMLAttribute("vspace", vspace);
}
-
+
public String getWidth()
{
return getHTMLAttribute("width");
@@ -185,4 +185,3 @@ public class DomHTMLAppletElement
setHTMLAttribute("width", width);
}
}
-
diff --git a/gnu/xml/dom/html2/DomHTMLAreaElement.java b/gnu/xml/dom/html2/DomHTMLAreaElement.java
index d7eed07dd..728b3fdfc 100644
--- a/gnu/xml/dom/html2/DomHTMLAreaElement.java
+++ b/gnu/xml/dom/html2/DomHTMLAreaElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLAreaElement.java --
+/* DomHTMLAreaElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -64,7 +64,7 @@ public class DomHTMLAreaElement
{
setHTMLAttribute("accesskey", accessKey);
}
-
+
public String getAlt()
{
return getHTMLAttribute("alt");
@@ -74,7 +74,7 @@ public class DomHTMLAreaElement
{
setHTMLAttribute("alt", alt);
}
-
+
public String getCoords()
{
return getHTMLAttribute("coords");
@@ -84,7 +84,7 @@ public class DomHTMLAreaElement
{
setHTMLAttribute("coords", coords);
}
-
+
public String getHref()
{
return getHTMLAttribute("href");
@@ -94,7 +94,7 @@ public class DomHTMLAreaElement
{
setHTMLAttribute("href", href);
}
-
+
public boolean getNoHref()
{
return getBooleanHTMLAttribute("nohref");
@@ -104,7 +104,7 @@ public class DomHTMLAreaElement
{
setBooleanHTMLAttribute("nohref", nohref);
}
-
+
public String getShape()
{
return getHTMLAttribute("shape");
@@ -114,7 +114,7 @@ public class DomHTMLAreaElement
{
setHTMLAttribute("shape", shape);
}
-
+
public int getTabIndex()
{
return getIntHTMLAttribute("tabindex");
@@ -124,7 +124,7 @@ public class DomHTMLAreaElement
{
setIntHTMLAttribute("tabindex", tabIndex);
}
-
+
public String getTarget()
{
return getHTMLAttribute("target");
@@ -134,6 +134,5 @@ public class DomHTMLAreaElement
{
setHTMLAttribute("target", target);
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLBRElement.java b/gnu/xml/dom/html2/DomHTMLBRElement.java
index 673699d52..5ad49c549 100644
--- a/gnu/xml/dom/html2/DomHTMLBRElement.java
+++ b/gnu/xml/dom/html2/DomHTMLBRElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLBRElement.java --
+/* DomHTMLBRElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -64,6 +64,5 @@ public class DomHTMLBRElement
{
setHTMLAttribute("clear", clear);
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLBaseElement.java b/gnu/xml/dom/html2/DomHTMLBaseElement.java
index ddc805307..99a0993ba 100644
--- a/gnu/xml/dom/html2/DomHTMLBaseElement.java
+++ b/gnu/xml/dom/html2/DomHTMLBaseElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLBaseElement.java --
+/* DomHTMLBaseElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -64,7 +64,7 @@ public class DomHTMLBaseElement
{
setHTMLAttribute("href", href);
}
-
+
public String getTarget()
{
return getHTMLAttribute("target");
@@ -74,6 +74,5 @@ public class DomHTMLBaseElement
{
setHTMLAttribute("target", target);
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLBaseFontElement.java b/gnu/xml/dom/html2/DomHTMLBaseFontElement.java
index 73172d3bf..73ec96dbd 100644
--- a/gnu/xml/dom/html2/DomHTMLBaseFontElement.java
+++ b/gnu/xml/dom/html2/DomHTMLBaseFontElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLBaseFontElement.java --
+/* DomHTMLBaseFontElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -64,7 +64,7 @@ public class DomHTMLBaseFontElement
{
setHTMLAttribute("color", color);
}
-
+
public String getFace()
{
return getHTMLAttribute("face");
@@ -74,7 +74,7 @@ public class DomHTMLBaseFontElement
{
setHTMLAttribute("face", face);
}
-
+
public int getSize()
{
return getIntHTMLAttribute("size");
@@ -84,6 +84,5 @@ public class DomHTMLBaseFontElement
{
setIntHTMLAttribute("size", size);
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLBodyElement.java b/gnu/xml/dom/html2/DomHTMLBodyElement.java
index 44fbcf23c..d4528625b 100644
--- a/gnu/xml/dom/html2/DomHTMLBodyElement.java
+++ b/gnu/xml/dom/html2/DomHTMLBodyElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLBodyElement.java --
+/* DomHTMLBodyElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -64,7 +64,7 @@ public class DomHTMLBodyElement
{
setHTMLAttribute("alink", alink);
}
-
+
public String getBackground()
{
return getHTMLAttribute("background");
@@ -74,7 +74,7 @@ public class DomHTMLBodyElement
{
setHTMLAttribute("background", background);
}
-
+
public String getBgColor()
{
return getHTMLAttribute("bgcolor");
@@ -84,7 +84,7 @@ public class DomHTMLBodyElement
{
setHTMLAttribute("bgcolor", bgcolor);
}
-
+
public String getLink()
{
return getHTMLAttribute("link");
@@ -94,7 +94,7 @@ public class DomHTMLBodyElement
{
setHTMLAttribute("link", link);
}
-
+
public String getText()
{
return getHTMLAttribute("text");
@@ -104,7 +104,7 @@ public class DomHTMLBodyElement
{
setHTMLAttribute("text", text);
}
-
+
public String getVLink()
{
return getHTMLAttribute("vlink");
@@ -114,6 +114,5 @@ public class DomHTMLBodyElement
{
setHTMLAttribute("vlink", vlink);
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLButtonElement.java b/gnu/xml/dom/html2/DomHTMLButtonElement.java
index 3bca44c09..696169ac2 100644
--- a/gnu/xml/dom/html2/DomHTMLButtonElement.java
+++ b/gnu/xml/dom/html2/DomHTMLButtonElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLButtonElement.java --
+/* DomHTMLButtonElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -70,7 +70,7 @@ public class DomHTMLButtonElement
{
setHTMLAttribute("accesskey", accessKey);
}
-
+
public boolean getDisabled()
{
return getBooleanHTMLAttribute("disabled");
@@ -80,7 +80,7 @@ public class DomHTMLButtonElement
{
setBooleanHTMLAttribute("disabled", disabled);
}
-
+
public String getName()
{
return getHTMLAttribute("name");
@@ -90,7 +90,7 @@ public class DomHTMLButtonElement
{
setHTMLAttribute("name", name);
}
-
+
public int getTabIndex()
{
return getIntHTMLAttribute("tabindex");
@@ -105,7 +105,7 @@ public class DomHTMLButtonElement
{
return getHTMLAttribute("type");
}
-
+
public String getValue()
{
return getHTMLAttribute("value");
@@ -115,6 +115,5 @@ public class DomHTMLButtonElement
{
setHTMLAttribute("value", value);
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLCollection.java b/gnu/xml/dom/html2/DomHTMLCollection.java
index c63620087..830028753 100644
--- a/gnu/xml/dom/html2/DomHTMLCollection.java
+++ b/gnu/xml/dom/html2/DomHTMLCollection.java
@@ -1,4 +1,4 @@
-/* DomHTMLCollection.java --
+/* DomHTMLCollection.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -221,6 +221,5 @@ class DomHTMLCollection
}
return null;
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLDListElement.java b/gnu/xml/dom/html2/DomHTMLDListElement.java
index 2b9dbf236..9acce856a 100644
--- a/gnu/xml/dom/html2/DomHTMLDListElement.java
+++ b/gnu/xml/dom/html2/DomHTMLDListElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLDListElement.java --
+/* DomHTMLDListElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -64,6 +64,5 @@ public class DomHTMLDListElement
{
setBooleanHTMLAttribute("compact", compact);
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLDirectoryElement.java b/gnu/xml/dom/html2/DomHTMLDirectoryElement.java
index 26af97e78..e0f94a1ed 100644
--- a/gnu/xml/dom/html2/DomHTMLDirectoryElement.java
+++ b/gnu/xml/dom/html2/DomHTMLDirectoryElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLDirectoryElement.java --
+/* DomHTMLDirectoryElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -64,6 +64,5 @@ public class DomHTMLDirectoryElement
{
setBooleanHTMLAttribute("compact", compact);
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLDivElement.java b/gnu/xml/dom/html2/DomHTMLDivElement.java
index 462069dcf..66b3ac743 100644
--- a/gnu/xml/dom/html2/DomHTMLDivElement.java
+++ b/gnu/xml/dom/html2/DomHTMLDivElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLDivElement.java --
+/* DomHTMLDivElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -64,6 +64,5 @@ public class DomHTMLDivElement
{
setHTMLAttribute("align", align);
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLDocument.java b/gnu/xml/dom/html2/DomHTMLDocument.java
index d45c1b223..1afed7beb 100644
--- a/gnu/xml/dom/html2/DomHTMLDocument.java
+++ b/gnu/xml/dom/html2/DomHTMLDocument.java
@@ -1,4 +1,4 @@
-/* DomHTMLDocument.java --
+/* DomHTMLDocument.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -424,4 +424,3 @@ public class DomHTMLDocument
}
}
-
diff --git a/gnu/xml/dom/html2/DomHTMLElement.java b/gnu/xml/dom/html2/DomHTMLElement.java
index b957083d6..deeefec60 100644
--- a/gnu/xml/dom/html2/DomHTMLElement.java
+++ b/gnu/xml/dom/html2/DomHTMLElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLElement.java --
+/* DomHTMLElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -242,7 +242,7 @@ public abstract class DomHTMLElement
{
setHTMLAttribute("id", id);
}
-
+
public String getTitle()
{
return getHTMLAttribute("title");
@@ -252,7 +252,7 @@ public abstract class DomHTMLElement
{
setHTMLAttribute("title", title);
}
-
+
public String getLang()
{
return getHTMLAttribute("lang");
@@ -262,7 +262,7 @@ public abstract class DomHTMLElement
{
setHTMLAttribute("lang", lang);
}
-
+
public String getDir()
{
return getHTMLAttribute("dir");
@@ -272,7 +272,7 @@ public abstract class DomHTMLElement
{
setHTMLAttribute("dir", dir);
}
-
+
public String getClassName()
{
return getHTMLAttribute("class");
@@ -282,6 +282,5 @@ public abstract class DomHTMLElement
{
setHTMLAttribute("class", className);
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLEmbedElement.java b/gnu/xml/dom/html2/DomHTMLEmbedElement.java
index 1ae081c28..221131533 100644
--- a/gnu/xml/dom/html2/DomHTMLEmbedElement.java
+++ b/gnu/xml/dom/html2/DomHTMLEmbedElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLEmbedElement.java --
+/* DomHTMLEmbedElement.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -46,7 +46,7 @@ public class DomHTMLEmbedElement
{
super(owner, namespaceURI, name);
}
-
+
public String getJavaObject()
{
return getHTMLAttribute("java_object");
@@ -56,7 +56,7 @@ public class DomHTMLEmbedElement
{
setHTMLAttribute("java_object", object);
}
-
+
public String getJavaCodeBase()
{
return getHTMLAttribute("java_codebase");
@@ -66,7 +66,7 @@ public class DomHTMLEmbedElement
{
setHTMLAttribute("java_codebase", codeBase);
}
-
+
public String getJavaArchive()
{
return getHTMLAttribute("java_archive");
@@ -81,42 +81,42 @@ public class DomHTMLEmbedElement
{
setHTMLAttribute("java_code", code);
}
-
+
public String getJavaCode()
{
return getHTMLAttribute("java_code");
}
-
+
public void setJavaType(String type)
{
setHTMLAttribute("java_type", type);
}
-
+
public String getJavaType()
{
return getHTMLAttribute("java_type");
}
-
+
public void setType(String type)
{
setHTMLAttribute("type", type);
}
-
+
public String getType()
{
return getHTMLAttribute("type");
}
-
+
public String getPluginsPage()
{
return getHTMLAttribute("pluginspage");
}
-
+
public void setPluginsPage(String pluginspage)
{
setHTMLAttribute("pluginspage", pluginspage);
}
-
+
public String getMayscript()
{
return getHTMLAttribute("mayscript");
diff --git a/gnu/xml/dom/html2/DomHTMLFieldSetElement.java b/gnu/xml/dom/html2/DomHTMLFieldSetElement.java
index 2c8577219..252cd3d2b 100644
--- a/gnu/xml/dom/html2/DomHTMLFieldSetElement.java
+++ b/gnu/xml/dom/html2/DomHTMLFieldSetElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLFieldSetElement.java --
+/* DomHTMLFieldSetElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -62,4 +62,3 @@ public class DomHTMLFieldSetElement
}
}
-
diff --git a/gnu/xml/dom/html2/DomHTMLFontElement.java b/gnu/xml/dom/html2/DomHTMLFontElement.java
index 08bd349fa..5bfbb6f36 100644
--- a/gnu/xml/dom/html2/DomHTMLFontElement.java
+++ b/gnu/xml/dom/html2/DomHTMLFontElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLFontElement.java --
+/* DomHTMLFontElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -64,7 +64,7 @@ public class DomHTMLFontElement
{
setHTMLAttribute("color", color);
}
-
+
public String getFace()
{
return getHTMLAttribute("face");
@@ -74,7 +74,7 @@ public class DomHTMLFontElement
{
setHTMLAttribute("face", face);
}
-
+
public String getSize()
{
return getHTMLAttribute("size");
@@ -84,6 +84,5 @@ public class DomHTMLFontElement
{
setHTMLAttribute("size", size);
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLFormElement.java b/gnu/xml/dom/html2/DomHTMLFormElement.java
index 119d97eb8..9fe2ae802 100644
--- a/gnu/xml/dom/html2/DomHTMLFormElement.java
+++ b/gnu/xml/dom/html2/DomHTMLFormElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLFormElement.java --
+/* DomHTMLFormElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -85,7 +85,7 @@ public class DomHTMLFormElement
{
setHTMLAttribute("name", name);
}
-
+
public String getAcceptCharset()
{
return getHTMLAttribute("accept-charset");
@@ -95,7 +95,7 @@ public class DomHTMLFormElement
{
setHTMLAttribute("accept-charset", acceptCharset);
}
-
+
public String getAction()
{
return getHTMLAttribute("action");
@@ -105,7 +105,7 @@ public class DomHTMLFormElement
{
setHTMLAttribute("action", action);
}
-
+
public String getEnctype()
{
return getHTMLAttribute("enctype");
@@ -115,7 +115,7 @@ public class DomHTMLFormElement
{
setHTMLAttribute("enctype", enctype);
}
-
+
public String getMethod()
{
return getHTMLAttribute("method");
@@ -125,7 +125,7 @@ public class DomHTMLFormElement
{
setHTMLAttribute("method", method);
}
-
+
public String getTarget()
{
return getHTMLAttribute("target");
@@ -145,6 +145,5 @@ public class DomHTMLFormElement
{
dispatchUIEvent("reset");
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLFrameElement.java b/gnu/xml/dom/html2/DomHTMLFrameElement.java
index 124f35268..2465c4b89 100644
--- a/gnu/xml/dom/html2/DomHTMLFrameElement.java
+++ b/gnu/xml/dom/html2/DomHTMLFrameElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLFrameElement.java --
+/* DomHTMLFrameElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -65,7 +65,7 @@ public class DomHTMLFrameElement
{
setHTMLAttribute("frameborder", frameBorder);
}
-
+
public String getLongDesc()
{
return getHTMLAttribute("longdesc");
@@ -75,7 +75,7 @@ public class DomHTMLFrameElement
{
setHTMLAttribute("longdesc", longDesc);
}
-
+
public String getMarginHeight()
{
return getHTMLAttribute("marginheight");
@@ -85,7 +85,7 @@ public class DomHTMLFrameElement
{
setHTMLAttribute("marginheight", marginHeight);
}
-
+
public String getMarginWidth()
{
return getHTMLAttribute("marginwidth");
@@ -95,7 +95,7 @@ public class DomHTMLFrameElement
{
setHTMLAttribute("marginwidth", marginWidth);
}
-
+
public String getName()
{
return getHTMLAttribute("name");
@@ -105,7 +105,7 @@ public class DomHTMLFrameElement
{
setHTMLAttribute("name", name);
}
-
+
public boolean getNoResize()
{
return getBooleanHTMLAttribute("noresize");
@@ -115,7 +115,7 @@ public class DomHTMLFrameElement
{
setBooleanHTMLAttribute("noresize", noResize);
}
-
+
public String getScrolling()
{
return getHTMLAttribute("scrolling");
@@ -125,7 +125,7 @@ public class DomHTMLFrameElement
{
setHTMLAttribute("scrolling", scrolling);
}
-
+
public String getSrc()
{
return getHTMLAttribute("src");
@@ -141,6 +141,5 @@ public class DomHTMLFrameElement
// TODO getContentDocument
return null;
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLFrameSetElement.java b/gnu/xml/dom/html2/DomHTMLFrameSetElement.java
index 44d317f64..dae9430fb 100644
--- a/gnu/xml/dom/html2/DomHTMLFrameSetElement.java
+++ b/gnu/xml/dom/html2/DomHTMLFrameSetElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLFrameSetElement.java --
+/* DomHTMLFrameSetElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -64,7 +64,7 @@ public class DomHTMLFrameSetElement
{
setHTMLAttribute("cols", cols);
}
-
+
public String getRows()
{
return getHTMLAttribute("rows");
@@ -74,6 +74,5 @@ public class DomHTMLFrameSetElement
{
setHTMLAttribute("rows", rows);
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLHRElement.java b/gnu/xml/dom/html2/DomHTMLHRElement.java
index d1b480121..e27ef5595 100644
--- a/gnu/xml/dom/html2/DomHTMLHRElement.java
+++ b/gnu/xml/dom/html2/DomHTMLHRElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLHRElement.java --
+/* DomHTMLHRElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -64,7 +64,7 @@ public class DomHTMLHRElement
{
setHTMLAttribute("align", align);
}
-
+
public boolean getNoShade()
{
return getBooleanHTMLAttribute("noshade");
@@ -74,7 +74,7 @@ public class DomHTMLHRElement
{
setBooleanHTMLAttribute("noshade", noShade);
}
-
+
public String getSize()
{
return getHTMLAttribute("size");
@@ -84,7 +84,7 @@ public class DomHTMLHRElement
{
setHTMLAttribute("size", size);
}
-
+
public String getWidth()
{
return getHTMLAttribute("width");
@@ -94,6 +94,5 @@ public class DomHTMLHRElement
{
setHTMLAttribute("width", width);
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLHeadElement.java b/gnu/xml/dom/html2/DomHTMLHeadElement.java
index f68e8c7fa..4a8ef995b 100644
--- a/gnu/xml/dom/html2/DomHTMLHeadElement.java
+++ b/gnu/xml/dom/html2/DomHTMLHeadElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLHeadElement.java --
+/* DomHTMLHeadElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -64,6 +64,5 @@ public class DomHTMLHeadElement
{
setHTMLAttribute("profile", profile);
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLHeadingElement.java b/gnu/xml/dom/html2/DomHTMLHeadingElement.java
index f1427ad89..6e78e9004 100644
--- a/gnu/xml/dom/html2/DomHTMLHeadingElement.java
+++ b/gnu/xml/dom/html2/DomHTMLHeadingElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLHeadingElement.java --
+/* DomHTMLHeadingElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -64,6 +64,5 @@ public class DomHTMLHeadingElement
{
setHTMLAttribute("align", align);
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLHtmlElement.java b/gnu/xml/dom/html2/DomHTMLHtmlElement.java
index 95d45264e..73f7243ed 100644
--- a/gnu/xml/dom/html2/DomHTMLHtmlElement.java
+++ b/gnu/xml/dom/html2/DomHTMLHtmlElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLHtmlElement.java --
+/* DomHTMLHtmlElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -64,6 +64,5 @@ public class DomHTMLHtmlElement
{
setHTMLAttribute("version", version);
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLIFrameElement.java b/gnu/xml/dom/html2/DomHTMLIFrameElement.java
index c5ca75d8c..1a58fb73e 100644
--- a/gnu/xml/dom/html2/DomHTMLIFrameElement.java
+++ b/gnu/xml/dom/html2/DomHTMLIFrameElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLIFrameElement.java --
+/* DomHTMLIFrameElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -65,7 +65,7 @@ public class DomHTMLIFrameElement
{
setHTMLAttribute("align", align);
}
-
+
public String getFrameBorder()
{
return getHTMLAttribute("frameborder");
@@ -75,7 +75,7 @@ public class DomHTMLIFrameElement
{
setHTMLAttribute("frameborder", frameBorder);
}
-
+
public String getHeight()
{
return getHTMLAttribute("height");
@@ -85,7 +85,7 @@ public class DomHTMLIFrameElement
{
setHTMLAttribute("height", height);
}
-
+
public String getLongDesc()
{
return getHTMLAttribute("longdesc");
@@ -95,7 +95,7 @@ public class DomHTMLIFrameElement
{
setHTMLAttribute("longdesc", longDesc);
}
-
+
public String getMarginHeight()
{
return getHTMLAttribute("marginheight");
@@ -105,7 +105,7 @@ public class DomHTMLIFrameElement
{
setHTMLAttribute("marginheight", marginHeight);
}
-
+
public String getMarginWidth()
{
return getHTMLAttribute("marginwidth");
@@ -115,7 +115,7 @@ public class DomHTMLIFrameElement
{
setHTMLAttribute("marginwidth", marginWidth);
}
-
+
public String getName()
{
return getHTMLAttribute("name");
@@ -125,7 +125,7 @@ public class DomHTMLIFrameElement
{
setHTMLAttribute("name", name);
}
-
+
public String getScrolling()
{
return getHTMLAttribute("scrolling");
@@ -135,7 +135,7 @@ public class DomHTMLIFrameElement
{
setHTMLAttribute("scrolling", scrolling);
}
-
+
public String getSrc()
{
return getHTMLAttribute("src");
@@ -155,12 +155,11 @@ public class DomHTMLIFrameElement
{
setHTMLAttribute("width", width);
}
-
+
public Document getContentDocument()
{
// TODO getContentDocument
return null;
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLImageElement.java b/gnu/xml/dom/html2/DomHTMLImageElement.java
index c96e5fede..c5d294c6f 100644
--- a/gnu/xml/dom/html2/DomHTMLImageElement.java
+++ b/gnu/xml/dom/html2/DomHTMLImageElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLImageElement.java --
+/* DomHTMLImageElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -64,7 +64,7 @@ public class DomHTMLImageElement
{
setHTMLAttribute("name", name);
}
-
+
public String getAlign()
{
return getHTMLAttribute("align");
@@ -74,7 +74,7 @@ public class DomHTMLImageElement
{
setHTMLAttribute("align", align);
}
-
+
public String getAlt()
{
return getHTMLAttribute("alt");
@@ -84,7 +84,7 @@ public class DomHTMLImageElement
{
setHTMLAttribute("alt", alt);
}
-
+
public String getBorder()
{
return getHTMLAttribute("border");
@@ -94,7 +94,7 @@ public class DomHTMLImageElement
{
setHTMLAttribute("border", border);
}
-
+
public int getHeight()
{
return getIntHTMLAttribute("height");
@@ -104,7 +104,7 @@ public class DomHTMLImageElement
{
setIntHTMLAttribute("height", height);
}
-
+
public int getHspace()
{
return getIntHTMLAttribute("hspace");
@@ -114,7 +114,7 @@ public class DomHTMLImageElement
{
setIntHTMLAttribute("hspace", hspace);
}
-
+
public boolean getIsMap()
{
return getBooleanHTMLAttribute("ismap");
@@ -124,7 +124,7 @@ public class DomHTMLImageElement
{
setBooleanHTMLAttribute("ismap", isMap);
}
-
+
public String getLongDesc()
{
return getHTMLAttribute("longdesc");
@@ -134,7 +134,7 @@ public class DomHTMLImageElement
{
setHTMLAttribute("longdesc", longDesc);
}
-
+
public String getSrc()
{
return getHTMLAttribute("src");
@@ -154,7 +154,7 @@ public class DomHTMLImageElement
{
setHTMLAttribute("usemap", useMap);
}
-
+
public int getVspace()
{
return getIntHTMLAttribute("vspace");
@@ -164,7 +164,7 @@ public class DomHTMLImageElement
{
setIntHTMLAttribute("vspace", vspace);
}
-
+
public int getWidth()
{
return getIntHTMLAttribute("width");
@@ -174,6 +174,5 @@ public class DomHTMLImageElement
{
setIntHTMLAttribute("width", width);
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLImpl.java b/gnu/xml/dom/html2/DomHTMLImpl.java
index 9f0db0850..a5faee5ce 100644
--- a/gnu/xml/dom/html2/DomHTMLImpl.java
+++ b/gnu/xml/dom/html2/DomHTMLImpl.java
@@ -1,4 +1,4 @@
-/* DomHTMLImpl.java --
+/* DomHTMLImpl.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -48,7 +48,7 @@ import org.w3c.dom.Document;
public class DomHTMLImpl
extends DomImpl
{
-
+
protected Document createDocument()
{
return new DomHTMLDocument(this);
@@ -64,4 +64,3 @@ public class DomHTMLImpl
}
}
-
diff --git a/gnu/xml/dom/html2/DomHTMLInputElement.java b/gnu/xml/dom/html2/DomHTMLInputElement.java
index 1dbc9c28d..21201889d 100644
--- a/gnu/xml/dom/html2/DomHTMLInputElement.java
+++ b/gnu/xml/dom/html2/DomHTMLInputElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLInputElement.java --
+/* DomHTMLInputElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -68,7 +68,7 @@ public class DomHTMLInputElement
{
setHTMLAttribute("value", defaultValue);
}
-
+
public boolean getDefaultChecked()
{
return getBooleanHTMLAttribute("checked");
@@ -83,7 +83,7 @@ public class DomHTMLInputElement
{
return (HTMLFormElement) getParentElement("form");
}
-
+
public String getAccept()
{
return getHTMLAttribute("accept");
@@ -93,7 +93,7 @@ public class DomHTMLInputElement
{
setHTMLAttribute("accept", accept);
}
-
+
public String getAccessKey()
{
return getHTMLAttribute("accesskey");
@@ -103,7 +103,7 @@ public class DomHTMLInputElement
{
setHTMLAttribute("accesskey", accessKey);
}
-
+
public String getAlign()
{
return getHTMLAttribute("align");
@@ -113,7 +113,7 @@ public class DomHTMLInputElement
{
setHTMLAttribute("align", align);
}
-
+
public String getAlt()
{
return getHTMLAttribute("alt");
@@ -123,7 +123,7 @@ public class DomHTMLInputElement
{
setHTMLAttribute("alt", alt);
}
-
+
public boolean getChecked()
{
if (checked == null)
@@ -137,7 +137,7 @@ public class DomHTMLInputElement
{
this.checked = Boolean.valueOf(checked);
}
-
+
public boolean getDisabled()
{
return getBooleanHTMLAttribute("disabled");
@@ -147,7 +147,7 @@ public class DomHTMLInputElement
{
setBooleanHTMLAttribute("disabled", disabled);
}
-
+
public int getMaxLength()
{
return getIntHTMLAttribute("maxLength");
@@ -157,7 +157,7 @@ public class DomHTMLInputElement
{
setIntHTMLAttribute("maxLength", maxLength);
}
-
+
public String getName()
{
return getHTMLAttribute("name");
@@ -167,7 +167,7 @@ public class DomHTMLInputElement
{
setHTMLAttribute("name", name);
}
-
+
public boolean getReadOnly()
{
return getBooleanHTMLAttribute("readonly");
@@ -177,7 +177,7 @@ public class DomHTMLInputElement
{
setBooleanHTMLAttribute("readonly", readOnly);
}
-
+
public int getSize()
{
return getIntHTMLAttribute("size");
@@ -187,7 +187,7 @@ public class DomHTMLInputElement
{
setIntHTMLAttribute("size", size);
}
-
+
public String getSrc()
{
return getHTMLAttribute("src");
@@ -197,7 +197,7 @@ public class DomHTMLInputElement
{
setHTMLAttribute("src", src);
}
-
+
public int getTabIndex()
{
return getIntHTMLAttribute("tabindex");
@@ -207,7 +207,7 @@ public class DomHTMLInputElement
{
setIntHTMLAttribute("tabindex", tabIndex);
}
-
+
public String getType()
{
return getHTMLAttribute("type");
@@ -217,7 +217,7 @@ public class DomHTMLInputElement
{
setHTMLAttribute("type", type);
}
-
+
public String getUseMap()
{
return getHTMLAttribute("usemap");
@@ -227,7 +227,7 @@ public class DomHTMLInputElement
{
setHTMLAttribute("usemap", useMap);
}
-
+
public String getValue()
{
if (value == null)
@@ -261,6 +261,5 @@ public class DomHTMLInputElement
{
dispatchUIEvent("click");
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLIsIndexElement.java b/gnu/xml/dom/html2/DomHTMLIsIndexElement.java
index 087f4a0cd..8578cb6c0 100644
--- a/gnu/xml/dom/html2/DomHTMLIsIndexElement.java
+++ b/gnu/xml/dom/html2/DomHTMLIsIndexElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLIsIndexElement.java --
+/* DomHTMLIsIndexElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -70,6 +70,5 @@ public class DomHTMLIsIndexElement
{
setHTMLAttribute("prompt", prompt);
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLLIElement.java b/gnu/xml/dom/html2/DomHTMLLIElement.java
index 11eccdf5d..cab1412dd 100644
--- a/gnu/xml/dom/html2/DomHTMLLIElement.java
+++ b/gnu/xml/dom/html2/DomHTMLLIElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLLIElement.java --
+/* DomHTMLLIElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -64,7 +64,7 @@ public class DomHTMLLIElement
{
setHTMLAttribute("type", type);
}
-
+
public int getValue()
{
return getIntHTMLAttribute("value");
@@ -74,6 +74,5 @@ public class DomHTMLLIElement
{
setIntHTMLAttribute("value", value);
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLLabelElement.java b/gnu/xml/dom/html2/DomHTMLLabelElement.java
index c0cc39f8e..96cfbaab5 100644
--- a/gnu/xml/dom/html2/DomHTMLLabelElement.java
+++ b/gnu/xml/dom/html2/DomHTMLLabelElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLLabelElement.java --
+/* DomHTMLLabelElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -70,7 +70,7 @@ public class DomHTMLLabelElement
{
setHTMLAttribute("accesskey", accessKey);
}
-
+
public String getHtmlFor()
{
return getHTMLAttribute("for");
@@ -80,6 +80,5 @@ public class DomHTMLLabelElement
{
setHTMLAttribute("for", htmlFor);
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLLegendElement.java b/gnu/xml/dom/html2/DomHTMLLegendElement.java
index a500f8fa1..045861cae 100644
--- a/gnu/xml/dom/html2/DomHTMLLegendElement.java
+++ b/gnu/xml/dom/html2/DomHTMLLegendElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLLegendElement.java --
+/* DomHTMLLegendElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -70,7 +70,7 @@ public class DomHTMLLegendElement
{
setHTMLAttribute("accesskey", accessKey);
}
-
+
public String getAlign()
{
return getHTMLAttribute("align");
@@ -80,6 +80,5 @@ public class DomHTMLLegendElement
{
setHTMLAttribute("align", align);
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLLinkElement.java b/gnu/xml/dom/html2/DomHTMLLinkElement.java
index 127726ef7..292ec9305 100644
--- a/gnu/xml/dom/html2/DomHTMLLinkElement.java
+++ b/gnu/xml/dom/html2/DomHTMLLinkElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLLinkElement.java --
+/* DomHTMLLinkElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -64,7 +64,7 @@ public class DomHTMLLinkElement
{
setBooleanHTMLAttribute("disabled", disabled);
}
-
+
public String getCharset()
{
return getHTMLAttribute("charset");
@@ -74,7 +74,7 @@ public class DomHTMLLinkElement
{
setHTMLAttribute("charset", charset);
}
-
+
public String getHref()
{
return getHTMLAttribute("href");
@@ -84,7 +84,7 @@ public class DomHTMLLinkElement
{
setHTMLAttribute("href", href);
}
-
+
public String getHreflang()
{
return getHTMLAttribute("hreflang");
@@ -94,7 +94,7 @@ public class DomHTMLLinkElement
{
setHTMLAttribute("hreflang", hreflang);
}
-
+
public String getMedia()
{
return getHTMLAttribute("media");
@@ -104,7 +104,7 @@ public class DomHTMLLinkElement
{
setHTMLAttribute("media", media);
}
-
+
public String getRel()
{
return getHTMLAttribute("rel");
@@ -114,7 +114,7 @@ public class DomHTMLLinkElement
{
setHTMLAttribute("rel", rel);
}
-
+
public String getRev()
{
return getHTMLAttribute("rev");
@@ -124,7 +124,7 @@ public class DomHTMLLinkElement
{
setHTMLAttribute("rev", rev);
}
-
+
public String getTarget()
{
return getHTMLAttribute("target");
@@ -134,7 +134,7 @@ public class DomHTMLLinkElement
{
setHTMLAttribute("target", target);
}
-
+
public String getType()
{
return getHTMLAttribute("type");
@@ -144,6 +144,5 @@ public class DomHTMLLinkElement
{
setHTMLAttribute("type", type);
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLMapElement.java b/gnu/xml/dom/html2/DomHTMLMapElement.java
index 1f7182f4f..4497b00e2 100644
--- a/gnu/xml/dom/html2/DomHTMLMapElement.java
+++ b/gnu/xml/dom/html2/DomHTMLMapElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLMapElement.java --
+/* DomHTMLMapElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -64,7 +64,7 @@ public class DomHTMLMapElement
ret.evaluate();
return ret;
}
-
+
public String getName()
{
return getHTMLAttribute("name");
@@ -74,6 +74,5 @@ public class DomHTMLMapElement
{
setHTMLAttribute("name", name);
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLMenuElement.java b/gnu/xml/dom/html2/DomHTMLMenuElement.java
index 17f6f589f..2a6ff08f1 100644
--- a/gnu/xml/dom/html2/DomHTMLMenuElement.java
+++ b/gnu/xml/dom/html2/DomHTMLMenuElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLMenuElement.java --
+/* DomHTMLMenuElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -64,6 +64,5 @@ public class DomHTMLMenuElement
{
setBooleanHTMLAttribute("compact", compact);
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLMetaElement.java b/gnu/xml/dom/html2/DomHTMLMetaElement.java
index 1a0440504..e555a4273 100644
--- a/gnu/xml/dom/html2/DomHTMLMetaElement.java
+++ b/gnu/xml/dom/html2/DomHTMLMetaElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLMetaElement.java --
+/* DomHTMLMetaElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -64,7 +64,7 @@ public class DomHTMLMetaElement
{
setHTMLAttribute("content", content);
}
-
+
public String getHttpEquiv()
{
return getHTMLAttribute("http-equiv");
@@ -74,7 +74,7 @@ public class DomHTMLMetaElement
{
setHTMLAttribute("http-equiv", httpEquiv);
}
-
+
public String getName()
{
return getHTMLAttribute("name");
@@ -84,7 +84,7 @@ public class DomHTMLMetaElement
{
setHTMLAttribute("name", name);
}
-
+
public String getScheme()
{
return getHTMLAttribute("scheme");
@@ -94,6 +94,5 @@ public class DomHTMLMetaElement
{
setHTMLAttribute("scheme", scheme);
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLModElement.java b/gnu/xml/dom/html2/DomHTMLModElement.java
index 493f7242b..8c158f48a 100644
--- a/gnu/xml/dom/html2/DomHTMLModElement.java
+++ b/gnu/xml/dom/html2/DomHTMLModElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLModElement.java --
+/* DomHTMLModElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -64,7 +64,7 @@ public class DomHTMLModElement
{
setHTMLAttribute("cite", cite);
}
-
+
public String getDateTime()
{
return getHTMLAttribute("datetime");
@@ -74,6 +74,5 @@ public class DomHTMLModElement
{
setHTMLAttribute("datetime", dateTime);
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLOListElement.java b/gnu/xml/dom/html2/DomHTMLOListElement.java
index fb98cf40d..54f7fd46b 100644
--- a/gnu/xml/dom/html2/DomHTMLOListElement.java
+++ b/gnu/xml/dom/html2/DomHTMLOListElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLOListElement.java --
+/* DomHTMLOListElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -64,7 +64,7 @@ public class DomHTMLOListElement
{
setBooleanHTMLAttribute("compact", compact);
}
-
+
public int getStart()
{
return getIntHTMLAttribute("start");
@@ -74,7 +74,7 @@ public class DomHTMLOListElement
{
setIntHTMLAttribute("start", start);
}
-
+
public String getType()
{
return getHTMLAttribute("type");
@@ -84,6 +84,5 @@ public class DomHTMLOListElement
{
setHTMLAttribute("type", type);
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLObjectElement.java b/gnu/xml/dom/html2/DomHTMLObjectElement.java
index 9bb621122..2ce5f45c3 100644
--- a/gnu/xml/dom/html2/DomHTMLObjectElement.java
+++ b/gnu/xml/dom/html2/DomHTMLObjectElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLObjectElement.java --
+/* DomHTMLObjectElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -71,7 +71,7 @@ public class DomHTMLObjectElement
{
setHTMLAttribute("code", code);
}
-
+
public String getJavaCode()
{
return getHTMLAttribute("java_code");
@@ -81,7 +81,7 @@ public class DomHTMLObjectElement
{
setHTMLAttribute("java_code", code);
}
-
+
public String getObject()
{
return getHTMLAttribute("object");
@@ -91,7 +91,7 @@ public class DomHTMLObjectElement
{
setHTMLAttribute("object", obj);
}
-
+
public String getJavaObject()
{
return getHTMLAttribute("java_object");
@@ -101,7 +101,7 @@ public class DomHTMLObjectElement
{
setHTMLAttribute("java_object", obj);
}
-
+
public String getAlign()
{
return getHTMLAttribute("align");
@@ -111,7 +111,7 @@ public class DomHTMLObjectElement
{
setHTMLAttribute("align", align);
}
-
+
public String getArchive()
{
return getHTMLAttribute("archive");
@@ -121,7 +121,7 @@ public class DomHTMLObjectElement
{
setHTMLAttribute("archive", archive);
}
-
+
public String getJavaArchive()
{
return getHTMLAttribute("java_archive");
@@ -131,7 +131,7 @@ public class DomHTMLObjectElement
{
setHTMLAttribute("java_archive", archive);
}
-
+
public String getBorder()
{
return getHTMLAttribute("border");
@@ -141,7 +141,7 @@ public class DomHTMLObjectElement
{
setHTMLAttribute("border", border);
}
-
+
public String getCodeBase()
{
return getHTMLAttribute("codebase");
@@ -151,7 +151,7 @@ public class DomHTMLObjectElement
{
setHTMLAttribute("codebase", codeBase);
}
-
+
public String getJavaCodeBase()
{
return getHTMLAttribute("java_codebase");
@@ -161,7 +161,7 @@ public class DomHTMLObjectElement
{
setHTMLAttribute("java_codebase", codeBase);
}
-
+
public String getCodeType()
{
return getHTMLAttribute("codetype");
@@ -171,7 +171,7 @@ public class DomHTMLObjectElement
{
setHTMLAttribute("codetype", codeType);
}
-
+
public String getData()
{
return getHTMLAttribute("data");
@@ -181,7 +181,7 @@ public class DomHTMLObjectElement
{
setHTMLAttribute("data", data);
}
-
+
public boolean getDeclare()
{
return getBooleanHTMLAttribute("declare");
@@ -191,7 +191,7 @@ public class DomHTMLObjectElement
{
setBooleanHTMLAttribute("declare", declare);
}
-
+
public String getHeight()
{
return getHTMLAttribute("height");
@@ -201,7 +201,7 @@ public class DomHTMLObjectElement
{
setHTMLAttribute("height", height);
}
-
+
public int getHspace()
{
return getIntHTMLAttribute("hspace");
@@ -211,7 +211,7 @@ public class DomHTMLObjectElement
{
setIntHTMLAttribute("hspace", hspace);
}
-
+
public String getName()
{
return getHTMLAttribute("name");
@@ -221,7 +221,7 @@ public class DomHTMLObjectElement
{
setHTMLAttribute("name", name);
}
-
+
public String getStandby()
{
return getHTMLAttribute("standby");
@@ -231,7 +231,7 @@ public class DomHTMLObjectElement
{
setHTMLAttribute("standby", standby);
}
-
+
public int getTabIndex()
{
return getIntHTMLAttribute("tabindex");
@@ -241,7 +241,7 @@ public class DomHTMLObjectElement
{
setIntHTMLAttribute("tabindex", tabIndex);
}
-
+
public String getType()
{
return getHTMLAttribute("type");
@@ -251,7 +251,7 @@ public class DomHTMLObjectElement
{
setHTMLAttribute("type", type);
}
-
+
public String getJavaType()
{
return getHTMLAttribute("java_type");
@@ -261,7 +261,7 @@ public class DomHTMLObjectElement
{
setHTMLAttribute("java_type", type);
}
-
+
public String getUseMap()
{
return getHTMLAttribute("usemap");
@@ -271,7 +271,7 @@ public class DomHTMLObjectElement
{
setHTMLAttribute("usemap", useMap);
}
-
+
public int getVspace()
{
return getIntHTMLAttribute("vspace");
@@ -281,7 +281,7 @@ public class DomHTMLObjectElement
{
setIntHTMLAttribute("vspace", vspace);
}
-
+
public String getWidth()
{
return getHTMLAttribute("width");
@@ -297,25 +297,24 @@ public class DomHTMLObjectElement
// TODO getContentDocument
return null;
}
-
+
public void setMayscript(String may)
{
setHTMLAttribute("mayscript", may);
}
-
+
public String getMayscript()
{
return getHTMLAttribute("mayscript");
}
-
+
public void setScriptable(String scr)
{
setHTMLAttribute("scriptable", scr);
}
-
+
public String getScriptable()
{
return getHTMLAttribute("scriptable");
}
}
-
diff --git a/gnu/xml/dom/html2/DomHTMLOptGroupElement.java b/gnu/xml/dom/html2/DomHTMLOptGroupElement.java
index 76545e130..acb948484 100644
--- a/gnu/xml/dom/html2/DomHTMLOptGroupElement.java
+++ b/gnu/xml/dom/html2/DomHTMLOptGroupElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLOptGroupElement.java --
+/* DomHTMLOptGroupElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -74,6 +74,5 @@ public class DomHTMLOptGroupElement
{
setHTMLAttribute("label", label);
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLOptionElement.java b/gnu/xml/dom/html2/DomHTMLOptionElement.java
index 69c059d9d..f775c138a 100644
--- a/gnu/xml/dom/html2/DomHTMLOptionElement.java
+++ b/gnu/xml/dom/html2/DomHTMLOptionElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLOptionElement.java --
+/* DomHTMLOptionElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -82,7 +82,7 @@ public class DomHTMLOptionElement
{
return super.getIndex();
}
-
+
public boolean getDisabled()
{
return getBooleanHTMLAttribute("disabled");
@@ -92,7 +92,7 @@ public class DomHTMLOptionElement
{
setBooleanHTMLAttribute("disabled", disabled);
}
-
+
public String getLabel()
{
return getHTMLAttribute("label");
@@ -102,7 +102,7 @@ public class DomHTMLOptionElement
{
setHTMLAttribute("label", label);
}
-
+
public boolean getSelected()
{
if (selected == null)
@@ -116,7 +116,7 @@ public class DomHTMLOptionElement
{
this.selected = Boolean.valueOf(selected);
}
-
+
public String getValue()
{
return getHTMLAttribute("value");
@@ -126,6 +126,5 @@ public class DomHTMLOptionElement
{
setHTMLAttribute("value", value);
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLParagraphElement.java b/gnu/xml/dom/html2/DomHTMLParagraphElement.java
index 2a8c4f6fb..4c867fdc1 100644
--- a/gnu/xml/dom/html2/DomHTMLParagraphElement.java
+++ b/gnu/xml/dom/html2/DomHTMLParagraphElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLParagraphElement.java --
+/* DomHTMLParagraphElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -64,6 +64,5 @@ public class DomHTMLParagraphElement
{
setHTMLAttribute("align", align);
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLParamElement.java b/gnu/xml/dom/html2/DomHTMLParamElement.java
index 81c655952..cdd74ad4a 100644
--- a/gnu/xml/dom/html2/DomHTMLParamElement.java
+++ b/gnu/xml/dom/html2/DomHTMLParamElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLParamElement.java --
+/* DomHTMLParamElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -64,7 +64,7 @@ public class DomHTMLParamElement
{
setHTMLAttribute("name", name);
}
-
+
public String getType()
{
return getHTMLAttribute("type");
@@ -74,7 +74,7 @@ public class DomHTMLParamElement
{
setHTMLAttribute("type", type);
}
-
+
public String getValue()
{
return getHTMLAttribute("value");
@@ -84,7 +84,7 @@ public class DomHTMLParamElement
{
setHTMLAttribute("value", value);
}
-
+
public String getValueType()
{
return getHTMLAttribute("valuetype");
@@ -94,6 +94,5 @@ public class DomHTMLParamElement
{
setHTMLAttribute("valuetype", valueType);
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLParser.java b/gnu/xml/dom/html2/DomHTMLParser.java
index c6d8c4c5c..88656d2d3 100644
--- a/gnu/xml/dom/html2/DomHTMLParser.java
+++ b/gnu/xml/dom/html2/DomHTMLParser.java
@@ -60,11 +60,11 @@ import org.w3c.dom.html2.HTMLDocument;
* The tag attributes become the node attributes. The text inside
* HTML tag is inserted as one or several text nodes. The nested
* HTML tags are inserted as child nodes.
- *
+ *
* If the strict tree structure, closing the tag means closing all
* nested tags. To work around this, this parser closes the nested
* tags and immediately reopens them after the closed tag.
- * In this way, <code>&lt;b&gt;&lt;i&gt;c&lt;/b&gt;d</code>
+ * In this way, <code>&lt;b&gt;&lt;i&gt;c&lt;/b&gt;d</code>
* is parsed as <code>&lt;b&gt;&lt;i&gt;c&lt;/i&gt;&lt;/b&gt;&lt;i&gt;d</code> .
*
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
@@ -124,9 +124,9 @@ public class DomHTMLParser
document = new DomHTMLDocument();
document.setCheckWellformedness(false);
document.setCheckingCharacters(false);
-
+
cursor = document;
-
+
parse(input);
DomHTMLDocument h = document;
@@ -139,7 +139,7 @@ public class DomHTMLParser
throw new IOException("Exception: " + ex.getMessage());
}
}
-
+
/**
* Create a new node.
* @param name the name of node, case insensitive.
@@ -165,13 +165,13 @@ public class DomHTMLParser
natts.setNamedItem(attribute);
}
- // The default values are stored in a parent node.
+ // The default values are stored in a parent node.
hatts = hatts.getResolveParent();
}
return new_node;
}
-
+
/**
* Handle comment by inserting the comment node.
* @param text the comment text.
@@ -181,7 +181,7 @@ public class DomHTMLParser
Node c = document.createComment(new String(text));
cursor.appendChild(c);
}
-
+
/**
* Handle the tag with no content.
* @param tag the tag to handle.
@@ -196,7 +196,7 @@ public class DomHTMLParser
Node c = createNode(name);
cursor.appendChild(c);
}
-
+
/**
* Close the given tag. Close and reopen all nested tags.
* @param tag the tag to close.
@@ -229,7 +229,7 @@ public class DomHTMLParser
else
cursor = close.getParentNode();
- // Insert the copies of the opened nodes.
+ // Insert the copies of the opened nodes.
Iterator iter = open.iterator();
while (iter.hasNext())
{
@@ -251,7 +251,7 @@ public class DomHTMLParser
cursor.appendChild(c);
cursor = c;
}
-
+
/**
* Handle text by inserting the text node.
* @param text the text to insert.
diff --git a/gnu/xml/dom/html2/DomHTMLPreElement.java b/gnu/xml/dom/html2/DomHTMLPreElement.java
index 9b36a2887..9a51aaeeb 100644
--- a/gnu/xml/dom/html2/DomHTMLPreElement.java
+++ b/gnu/xml/dom/html2/DomHTMLPreElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLPreElement.java --
+/* DomHTMLPreElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -64,6 +64,5 @@ public class DomHTMLPreElement
{
setIntHTMLAttribute("width", width);
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLQuoteElement.java b/gnu/xml/dom/html2/DomHTMLQuoteElement.java
index 678a5ada6..811aed58b 100644
--- a/gnu/xml/dom/html2/DomHTMLQuoteElement.java
+++ b/gnu/xml/dom/html2/DomHTMLQuoteElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLQuoteElement.java --
+/* DomHTMLQuoteElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -64,6 +64,5 @@ public class DomHTMLQuoteElement
{
setHTMLAttribute("cite", cite);
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLScriptElement.java b/gnu/xml/dom/html2/DomHTMLScriptElement.java
index 8f8fff58a..1bd7b3417 100644
--- a/gnu/xml/dom/html2/DomHTMLScriptElement.java
+++ b/gnu/xml/dom/html2/DomHTMLScriptElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLScriptElement.java --
+/* DomHTMLScriptElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -124,6 +124,5 @@ public class DomHTMLScriptElement
{
setHTMLAttribute("type", type);
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLSelectElement.java b/gnu/xml/dom/html2/DomHTMLSelectElement.java
index 09752e1ff..fc1debbd6 100644
--- a/gnu/xml/dom/html2/DomHTMLSelectElement.java
+++ b/gnu/xml/dom/html2/DomHTMLSelectElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLSelectElement.java --
+/* DomHTMLSelectElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -60,7 +60,7 @@ public class DomHTMLSelectElement
{
super(owner, namespaceURI, name);
}
-
+
public String getType()
{
return getHTMLAttribute("type");
@@ -95,7 +95,7 @@ public class DomHTMLSelectElement
option.setSelected(i == selectedIndex);
}
}
-
+
public String getValue()
{
return getHTMLAttribute("value");
@@ -105,7 +105,7 @@ public class DomHTMLSelectElement
{
setHTMLAttribute("value", value);
}
-
+
public int getLength()
{
return getIntHTMLAttribute("length");
@@ -129,7 +129,7 @@ public class DomHTMLSelectElement
ret.evaluate();
return ret;
}
-
+
public boolean getDisabled()
{
return getBooleanHTMLAttribute("disabled");
@@ -139,7 +139,7 @@ public class DomHTMLSelectElement
{
setBooleanHTMLAttribute("disabled", disabled);
}
-
+
public boolean getMultiple()
{
return getBooleanHTMLAttribute("multiple");
@@ -149,7 +149,7 @@ public class DomHTMLSelectElement
{
setBooleanHTMLAttribute("multiple", multiple);
}
-
+
public String getName()
{
return getHTMLAttribute("name");
@@ -159,7 +159,7 @@ public class DomHTMLSelectElement
{
setHTMLAttribute("name", name);
}
-
+
public int getSize()
{
return getIntHTMLAttribute("size");
@@ -169,7 +169,7 @@ public class DomHTMLSelectElement
{
setIntHTMLAttribute("size", size);
}
-
+
public int getTabIndex()
{
return getIntHTMLAttribute("tabindex");
@@ -206,6 +206,5 @@ public class DomHTMLSelectElement
{
dispatchUIEvent("focus");
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLStyleElement.java b/gnu/xml/dom/html2/DomHTMLStyleElement.java
index f6f1fcc68..78cef3b18 100644
--- a/gnu/xml/dom/html2/DomHTMLStyleElement.java
+++ b/gnu/xml/dom/html2/DomHTMLStyleElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLStyleElement.java --
+/* DomHTMLStyleElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -64,7 +64,7 @@ public class DomHTMLStyleElement
{
setBooleanHTMLAttribute("disabled", disabled);
}
-
+
public String getMedia()
{
return getHTMLAttribute("media");
@@ -74,7 +74,7 @@ public class DomHTMLStyleElement
{
setHTMLAttribute("media", media);
}
-
+
public String getType()
{
return getHTMLAttribute("type");
@@ -84,6 +84,5 @@ public class DomHTMLStyleElement
{
setHTMLAttribute("type", type);
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLTableCaptionElement.java b/gnu/xml/dom/html2/DomHTMLTableCaptionElement.java
index 28ea34188..2133b1412 100644
--- a/gnu/xml/dom/html2/DomHTMLTableCaptionElement.java
+++ b/gnu/xml/dom/html2/DomHTMLTableCaptionElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLTableCaptionElement.java --
+/* DomHTMLTableCaptionElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -65,6 +65,5 @@ public class DomHTMLTableCaptionElement
{
setHTMLAttribute("align", align);
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLTableCellElement.java b/gnu/xml/dom/html2/DomHTMLTableCellElement.java
index 41d33af26..350f0bf42 100644
--- a/gnu/xml/dom/html2/DomHTMLTableCellElement.java
+++ b/gnu/xml/dom/html2/DomHTMLTableCellElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLTableCellElement.java --
+/* DomHTMLTableCellElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -70,7 +70,7 @@ public class DomHTMLTableCellElement
{
setHTMLAttribute("abbr", abbr);
}
-
+
public String getAlign()
{
return getHTMLAttribute("align");
@@ -80,7 +80,7 @@ public class DomHTMLTableCellElement
{
setHTMLAttribute("align", align);
}
-
+
public String getAxis()
{
return getHTMLAttribute("axis");
@@ -90,7 +90,7 @@ public class DomHTMLTableCellElement
{
setHTMLAttribute("axis", axis);
}
-
+
public String getBgColor()
{
return getHTMLAttribute("bgcolor");
@@ -100,7 +100,7 @@ public class DomHTMLTableCellElement
{
setHTMLAttribute("bgcolor", bgColor);
}
-
+
public String getCh()
{
return getHTMLAttribute("char");
@@ -110,7 +110,7 @@ public class DomHTMLTableCellElement
{
setHTMLAttribute("char", ch);
}
-
+
public String getChOff()
{
return getHTMLAttribute("charoff");
@@ -120,7 +120,7 @@ public class DomHTMLTableCellElement
{
setHTMLAttribute("charoff", chOff);
}
-
+
public int getColSpan()
{
return getIntHTMLAttribute("colspan");
@@ -130,7 +130,7 @@ public class DomHTMLTableCellElement
{
setIntHTMLAttribute("colspan", colSpan);
}
-
+
public String getHeaders()
{
return getHTMLAttribute("headers");
@@ -140,7 +140,7 @@ public class DomHTMLTableCellElement
{
setHTMLAttribute("headers", headers);
}
-
+
public String getHeight()
{
return getHTMLAttribute("height");
@@ -150,7 +150,7 @@ public class DomHTMLTableCellElement
{
setHTMLAttribute("height", height);
}
-
+
public boolean getNoWrap()
{
return getBooleanHTMLAttribute("nowrap");
@@ -160,7 +160,7 @@ public class DomHTMLTableCellElement
{
setBooleanHTMLAttribute("nowrap", noWrap);
}
-
+
public int getRowSpan()
{
return getIntHTMLAttribute("rowspan");
@@ -170,7 +170,7 @@ public class DomHTMLTableCellElement
{
setIntHTMLAttribute("rowspan", rowSpan);
}
-
+
public String getScope()
{
return getHTMLAttribute("scope");
@@ -180,7 +180,7 @@ public class DomHTMLTableCellElement
{
setHTMLAttribute("scope", scope);
}
-
+
public String getVAlign()
{
return getHTMLAttribute("valign");
@@ -190,7 +190,7 @@ public class DomHTMLTableCellElement
{
setHTMLAttribute("valign", vAlign);
}
-
+
public String getWidth()
{
return getHTMLAttribute("width");
@@ -200,6 +200,5 @@ public class DomHTMLTableCellElement
{
setHTMLAttribute("width", width);
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLTableColElement.java b/gnu/xml/dom/html2/DomHTMLTableColElement.java
index 799447dc8..c7cef31eb 100644
--- a/gnu/xml/dom/html2/DomHTMLTableColElement.java
+++ b/gnu/xml/dom/html2/DomHTMLTableColElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLTableColElement.java --
+/* DomHTMLTableColElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -65,7 +65,7 @@ public class DomHTMLTableColElement
{
setHTMLAttribute("align", align);
}
-
+
public String getCh()
{
return getHTMLAttribute("char");
@@ -75,7 +75,7 @@ public class DomHTMLTableColElement
{
setHTMLAttribute("char", ch);
}
-
+
public String getChOff()
{
return getHTMLAttribute("charoff");
@@ -85,7 +85,7 @@ public class DomHTMLTableColElement
{
setHTMLAttribute("charoff", chOff);
}
-
+
public int getSpan()
{
return getIntHTMLAttribute("span");
@@ -95,7 +95,7 @@ public class DomHTMLTableColElement
{
setIntHTMLAttribute("span", span);
}
-
+
public String getVAlign()
{
return getHTMLAttribute("valign");
@@ -105,7 +105,7 @@ public class DomHTMLTableColElement
{
setHTMLAttribute("valign", vAlign);
}
-
+
public String getWidth()
{
return getHTMLAttribute("width");
@@ -115,6 +115,5 @@ public class DomHTMLTableColElement
{
setHTMLAttribute("width", width);
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLTableElement.java b/gnu/xml/dom/html2/DomHTMLTableElement.java
index ea925400e..ade463ef7 100644
--- a/gnu/xml/dom/html2/DomHTMLTableElement.java
+++ b/gnu/xml/dom/html2/DomHTMLTableElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLTableElement.java --
+/* DomHTMLTableElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -79,7 +79,7 @@ public class DomHTMLTableElement
replaceChild(caption, ref);
}
}
-
+
public HTMLTableSectionElement getTHead()
{
return (HTMLTableSectionElement) getChildElement("thead");
@@ -133,7 +133,7 @@ public class DomHTMLTableElement
ret.evaluate();
return ret;
}
-
+
public String getAlign()
{
return getHTMLAttribute("align");
@@ -143,7 +143,7 @@ public class DomHTMLTableElement
{
setHTMLAttribute("align", align);
}
-
+
public String getBgColor()
{
return getHTMLAttribute("bgcolor");
@@ -153,7 +153,7 @@ public class DomHTMLTableElement
{
setHTMLAttribute("bgcolor", bgColor);
}
-
+
public String getBorder()
{
return getHTMLAttribute("border");
@@ -163,7 +163,7 @@ public class DomHTMLTableElement
{
setHTMLAttribute("border", border);
}
-
+
public String getCellPadding()
{
return getHTMLAttribute("cellpadding");
@@ -173,7 +173,7 @@ public class DomHTMLTableElement
{
setHTMLAttribute("cellpadding", cellPadding);
}
-
+
public String getCellSpacing()
{
return getHTMLAttribute("cellspacing");
@@ -183,7 +183,7 @@ public class DomHTMLTableElement
{
setHTMLAttribute("cellspacing", cellSpacing);
}
-
+
public String getFrame()
{
return getHTMLAttribute("frame");
@@ -193,7 +193,7 @@ public class DomHTMLTableElement
{
setHTMLAttribute("frame", frame);
}
-
+
public String getRules()
{
return getHTMLAttribute("rules");
@@ -203,7 +203,7 @@ public class DomHTMLTableElement
{
setHTMLAttribute("rules", rules);
}
-
+
public String getSummary()
{
return getHTMLAttribute("summary");
@@ -213,7 +213,7 @@ public class DomHTMLTableElement
{
setHTMLAttribute("summary", summary);
}
-
+
public String getWidth()
{
return getHTMLAttribute("width");
@@ -320,9 +320,9 @@ public class DomHTMLTableElement
}
ref.getParentNode().removeChild(ref);
}
-
+
Node getRow(final int index)
- {
+ {
int i = 0;
Node thead = getChildElement("thead");
if (thead != null)
@@ -395,4 +395,3 @@ public class DomHTMLTableElement
}
}
-
diff --git a/gnu/xml/dom/html2/DomHTMLTableRowElement.java b/gnu/xml/dom/html2/DomHTMLTableRowElement.java
index ecd07a743..9943585f4 100644
--- a/gnu/xml/dom/html2/DomHTMLTableRowElement.java
+++ b/gnu/xml/dom/html2/DomHTMLTableRowElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLTableRowElement.java --
+/* DomHTMLTableRowElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -134,7 +134,7 @@ public class DomHTMLTableRowElement
{
setHTMLAttribute("align", align);
}
-
+
public String getBgColor()
{
return getHTMLAttribute("bgcolor");
@@ -144,7 +144,7 @@ public class DomHTMLTableRowElement
{
setHTMLAttribute("bgcolor", bgColor);
}
-
+
public String getCh()
{
return getHTMLAttribute("char");
@@ -154,7 +154,7 @@ public class DomHTMLTableRowElement
{
setHTMLAttribute("char", ch);
}
-
+
public String getChOff()
{
return getHTMLAttribute("charoff");
@@ -164,7 +164,7 @@ public class DomHTMLTableRowElement
{
setHTMLAttribute("charoff", chOff);
}
-
+
public String getVAlign()
{
return getHTMLAttribute("valign");
@@ -199,9 +199,9 @@ public class DomHTMLTableRowElement
}
removeChild(ref);
}
-
+
Node getCell(final int index)
- {
+ {
int i = 0;
for (Node ctx = getFirstChild(); ctx != null;
ctx = ctx.getNextSibling())
@@ -224,6 +224,5 @@ public class DomHTMLTableRowElement
}
return null;
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLTableSectionElement.java b/gnu/xml/dom/html2/DomHTMLTableSectionElement.java
index da015f1f6..389eb591b 100644
--- a/gnu/xml/dom/html2/DomHTMLTableSectionElement.java
+++ b/gnu/xml/dom/html2/DomHTMLTableSectionElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLTableSectionElement.java --
+/* DomHTMLTableSectionElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -70,7 +70,7 @@ public class DomHTMLTableSectionElement
{
setHTMLAttribute("align", align);
}
-
+
public String getCh()
{
return getHTMLAttribute("char");
@@ -80,7 +80,7 @@ public class DomHTMLTableSectionElement
{
setHTMLAttribute("char", ch);
}
-
+
public String getChOff()
{
return getHTMLAttribute("charoff");
@@ -90,7 +90,7 @@ public class DomHTMLTableSectionElement
{
setHTMLAttribute("charoff", chOff);
}
-
+
public String getVAlign()
{
return getHTMLAttribute("valign");
@@ -134,9 +134,9 @@ public class DomHTMLTableSectionElement
}
removeChild(ref);
}
-
+
Node getRow(final int index)
- {
+ {
int i = 0;
for (Node ctx = getFirstChild(); ctx != null;
ctx = ctx.getNextSibling())
@@ -158,6 +158,5 @@ public class DomHTMLTableSectionElement
}
return null;
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLTextAreaElement.java b/gnu/xml/dom/html2/DomHTMLTextAreaElement.java
index 22d610569..9acfab134 100644
--- a/gnu/xml/dom/html2/DomHTMLTextAreaElement.java
+++ b/gnu/xml/dom/html2/DomHTMLTextAreaElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLTextAreaElement.java --
+/* DomHTMLTextAreaElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -73,7 +73,7 @@ public class DomHTMLTextAreaElement
{
return (HTMLFormElement) getParentElement("form");
}
-
+
public String getAccessKey()
{
return getHTMLAttribute("accesskey");
@@ -83,7 +83,7 @@ public class DomHTMLTextAreaElement
{
setHTMLAttribute("accesskey", accessKey);
}
-
+
public int getCols()
{
return getIntHTMLAttribute("cols");
@@ -93,7 +93,7 @@ public class DomHTMLTextAreaElement
{
setIntHTMLAttribute("cols", cols);
}
-
+
public boolean getDisabled()
{
return getBooleanHTMLAttribute("disabled");
@@ -103,7 +103,7 @@ public class DomHTMLTextAreaElement
{
setBooleanHTMLAttribute("disabled", disabled);
}
-
+
public String getName()
{
return getHTMLAttribute("name");
@@ -113,7 +113,7 @@ public class DomHTMLTextAreaElement
{
setHTMLAttribute("name", name);
}
-
+
public boolean getReadOnly()
{
return getBooleanHTMLAttribute("readOnly");
@@ -123,7 +123,7 @@ public class DomHTMLTextAreaElement
{
setBooleanHTMLAttribute("readonly", readOnly);
}
-
+
public int getRows()
{
return getIntHTMLAttribute("rows");
@@ -133,7 +133,7 @@ public class DomHTMLTextAreaElement
{
setIntHTMLAttribute("rows", rows);
}
-
+
public int getTabIndex()
{
return getIntHTMLAttribute("tabindex");
@@ -143,7 +143,7 @@ public class DomHTMLTextAreaElement
{
setIntHTMLAttribute("tabindex", tabIndex);
}
-
+
public String getType()
{
return "textarea";
@@ -172,11 +172,10 @@ public class DomHTMLTextAreaElement
{
dispatchUIEvent("focus");
}
-
+
public void select()
{
dispatchUIEvent("select");
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLTitleElement.java b/gnu/xml/dom/html2/DomHTMLTitleElement.java
index f62342d6f..4f581061b 100644
--- a/gnu/xml/dom/html2/DomHTMLTitleElement.java
+++ b/gnu/xml/dom/html2/DomHTMLTitleElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLTitleElement.java --
+/* DomHTMLTitleElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -64,6 +64,5 @@ public class DomHTMLTitleElement
{
setTextContent(text);
}
-
-}
+}
diff --git a/gnu/xml/dom/html2/DomHTMLUListElement.java b/gnu/xml/dom/html2/DomHTMLUListElement.java
index c07adeabf..39cdce7d3 100644
--- a/gnu/xml/dom/html2/DomHTMLUListElement.java
+++ b/gnu/xml/dom/html2/DomHTMLUListElement.java
@@ -1,4 +1,4 @@
-/* DomHTMLUListElement.java --
+/* DomHTMLUListElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -64,7 +64,7 @@ public class DomHTMLUListElement
{
setBooleanHTMLAttribute("compact", compact);
}
-
+
public String getType()
{
return getHTMLAttribute("type");
@@ -74,6 +74,5 @@ public class DomHTMLUListElement
{
setHTMLAttribute("type", type);
}
-
-}
+}
diff --git a/gnu/xml/dom/ls/DomLSException.java b/gnu/xml/dom/ls/DomLSException.java
index 6ac49e669..31efc845f 100644
--- a/gnu/xml/dom/ls/DomLSException.java
+++ b/gnu/xml/dom/ls/DomLSException.java
@@ -1,4 +1,4 @@
-/* DomLSException.java --
+/* DomLSException.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/gnu/xml/dom/ls/DomLSInput.java b/gnu/xml/dom/ls/DomLSInput.java
index 68705fdee..39b17694f 100644
--- a/gnu/xml/dom/ls/DomLSInput.java
+++ b/gnu/xml/dom/ls/DomLSInput.java
@@ -1,4 +1,4 @@
-/* DomLSInput.java --
+/* DomLSInput.java --
Copyright (C) 1999,2000,2001 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -155,6 +155,5 @@ public class DomLSInput
{
this.certifiedText = certifiedText;
}
-
-}
+}
diff --git a/gnu/xml/dom/ls/DomLSOutput.java b/gnu/xml/dom/ls/DomLSOutput.java
index c2f4d4132..e8bec2ec1 100644
--- a/gnu/xml/dom/ls/DomLSOutput.java
+++ b/gnu/xml/dom/ls/DomLSOutput.java
@@ -1,4 +1,4 @@
-/* DomLSOutput.java --
+/* DomLSOutput.java --
Copyright (C) 1999,2000,2001 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -94,5 +94,5 @@ public class DomLSOutput
{
this.encoding = encoding;
}
-
+
}
diff --git a/gnu/xml/dom/ls/DomLSParser.java b/gnu/xml/dom/ls/DomLSParser.java
index f4f555e8c..99db79d64 100644
--- a/gnu/xml/dom/ls/DomLSParser.java
+++ b/gnu/xml/dom/ls/DomLSParser.java
@@ -1,4 +1,4 @@
-/* DomLSParser.java --
+/* DomLSParser.java --
Copyright (C) 1999,2000,2001,2007 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -125,12 +125,12 @@ public class DomLSParser
}
// -- LSParser --
-
+
public DOMConfiguration getDomConfig()
{
return this;
}
-
+
public LSParserFilter getFilter()
{
return filter;
@@ -283,7 +283,7 @@ public class DomLSParser
catch (SAXNotRecognizedException e)
{
// ignore
- }
+ }
try
{
reader.setFeature("http://xml.org/sax/features/use-attributes2",
@@ -563,6 +563,5 @@ public class DomLSParser
}
abort();
}
-
-}
+}
diff --git a/gnu/xml/dom/ls/DomLSSerializer.java b/gnu/xml/dom/ls/DomLSSerializer.java
index cedaf151e..c282b0b9f 100644
--- a/gnu/xml/dom/ls/DomLSSerializer.java
+++ b/gnu/xml/dom/ls/DomLSSerializer.java
@@ -1,4 +1,4 @@
-/* DomLSSerializer.java --
+/* DomLSSerializer.java --
Copyright (C) 1999,2000,2001 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -85,7 +85,7 @@ public class DomLSSerializer
}
// -- LSSerializer --
-
+
public DOMConfiguration getDomConfig()
{
return this;
@@ -349,6 +349,5 @@ public class DomLSSerializer
{
return SUPPORTED_PARAMETERS.contains(str);
}
-
-}
+}
diff --git a/gnu/xml/dom/ls/FilteredSAXEventSink.java b/gnu/xml/dom/ls/FilteredSAXEventSink.java
index 1c99ee524..65c1d37a4 100644
--- a/gnu/xml/dom/ls/FilteredSAXEventSink.java
+++ b/gnu/xml/dom/ls/FilteredSAXEventSink.java
@@ -1,4 +1,4 @@
-/* FilteredSAXEventSink.java --
+/* FilteredSAXEventSink.java --
Copyright (C) 1999,2000,2001 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -64,7 +64,7 @@ class FilteredSAXEventSink
* Stack of elements to insert.
*/
LinkedList nodes;
-
+
/**
* Corresponding stack of filter decisions about the nodes.
*/
@@ -90,7 +90,7 @@ class FilteredSAXEventSink
}
nodes = new LinkedList();
decisions = new LinkedList();
-
+
super.startDocument();
}
@@ -110,7 +110,7 @@ class FilteredSAXEventSink
doc = null;
break;
}
-
+
nodes = null;
decisions = null;
}
@@ -125,7 +125,7 @@ class FilteredSAXEventSink
}
Element element = createElement(uri, localName, qName, atts);
ctx = element;
-
+
short decision = getDecision(element, true);
nodes.addLast(element);
decisions.addLast(new Short(decision));
@@ -164,7 +164,7 @@ class FilteredSAXEventSink
return;
}
super.endElement(uri, localName, qName);
-
+
Element element = (Element) nodes.removeLast();
Node parent = nodes.isEmpty() ? doc : (Node) nodes.getLast();
ctx = parent;
@@ -303,40 +303,40 @@ class FilteredSAXEventSink
{
case Node.ATTRIBUTE_NODE:
show = ((whatToShow & NodeFilter.SHOW_ATTRIBUTE) != 0);
- break;
+ break;
case Node.TEXT_NODE:
show = ((whatToShow & NodeFilter.SHOW_TEXT) != 0);
- break;
+ break;
case Node.CDATA_SECTION_NODE:
show = ((whatToShow & NodeFilter.SHOW_CDATA_SECTION) != 0);
- break;
+ break;
case Node.ELEMENT_NODE:
show = ((whatToShow & NodeFilter.SHOW_ELEMENT) != 0);
- break;
+ break;
case Node.COMMENT_NODE:
show = ((whatToShow & NodeFilter.SHOW_COMMENT) != 0);
- break;
+ break;
case Node.DOCUMENT_NODE:
show = ((whatToShow & NodeFilter.SHOW_DOCUMENT) != 0);
- break;
+ break;
case Node.PROCESSING_INSTRUCTION_NODE:
show = ((whatToShow & NodeFilter.SHOW_PROCESSING_INSTRUCTION) != 0);
- break;
+ break;
case Node.DOCUMENT_FRAGMENT_NODE:
show = ((whatToShow & NodeFilter.SHOW_DOCUMENT_FRAGMENT) != 0);
- break;
+ break;
case Node.DOCUMENT_TYPE_NODE:
show = ((whatToShow & NodeFilter.SHOW_DOCUMENT_TYPE) != 0);
- break;
+ break;
case Node.ENTITY_REFERENCE_NODE:
show = ((whatToShow & NodeFilter.SHOW_ENTITY_REFERENCE) != 0);
- break;
+ break;
case Node.ENTITY_NODE:
show = ((whatToShow & NodeFilter.SHOW_ENTITY) != 0);
- break;
+ break;
case Node.NOTATION_NODE:
show = ((whatToShow & NodeFilter.SHOW_NOTATION) != 0);
- break;
+ break;
}
}
if (!show)
@@ -351,4 +351,3 @@ class FilteredSAXEventSink
}
}
-
diff --git a/gnu/xml/dom/ls/ReaderInputStream.java b/gnu/xml/dom/ls/ReaderInputStream.java
index 5b41abd3d..cf279ab39 100644
--- a/gnu/xml/dom/ls/ReaderInputStream.java
+++ b/gnu/xml/dom/ls/ReaderInputStream.java
@@ -1,4 +1,4 @@
-/* ReaderInputStream.java --
+/* ReaderInputStream.java --
Copyright (C) 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -124,7 +124,7 @@ public class ReaderInputStream
String s = new String(c, 0, l);
byte[] d = s.getBytes(encoding);
-
+
int available = d.length;
int more = d.length - len;
if (more > 0)
@@ -134,7 +134,7 @@ public class ReaderInputStream
System.arraycopy(d, len, extra, 0, more);
available -= more;
}
-
+
System.arraycopy(d, 0, b, off, available);
return available;
}
@@ -232,6 +232,5 @@ public class ReaderInputStream
{
return getClass().getName() + "[" + reader + ", " + encoding + "]";
}
-
-}
+}
diff --git a/gnu/xml/dom/ls/SAXEventSink.java b/gnu/xml/dom/ls/SAXEventSink.java
index 1f8de046d..06333dd7e 100644
--- a/gnu/xml/dom/ls/SAXEventSink.java
+++ b/gnu/xml/dom/ls/SAXEventSink.java
@@ -1,4 +1,4 @@
-/* SAXEventSink.java --
+/* SAXEventSink.java --
Copyright (C) 1999,2000,2001 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -96,7 +96,7 @@ public class SAXEventSink
boolean coalescing;
XMLReader reader; // reference back to the parser to get features
-
+
DomDocument doc; // document being constructed
Node ctx; // current context (parent node)
LinkedList entityCtx; // entity context
@@ -122,7 +122,7 @@ public class SAXEventSink
}
// -- ContentHandler2 --
-
+
public void setDocumentLocator(Locator locator)
{
this.locator = locator;
@@ -378,7 +378,7 @@ public class SAXEventSink
}
// -- LexicalHandler --
-
+
public void startDTD(String name, String publicId, String systemId)
throws SAXException
{
@@ -534,7 +534,7 @@ public class SAXEventSink
}
// -- DeclHandler --
-
+
public void elementDecl(String name, String model)
throws SAXException
{
@@ -599,6 +599,5 @@ public class SAXEventSink
DomDoctype doctype = (DomDoctype) ctx;
Entity entity = doctype.declareEntity(name, publicId, systemId, null);
}
-
-}
+}
diff --git a/gnu/xml/dom/ls/WriterOutputStream.java b/gnu/xml/dom/ls/WriterOutputStream.java
index 2fb206147..f1ae344f4 100644
--- a/gnu/xml/dom/ls/WriterOutputStream.java
+++ b/gnu/xml/dom/ls/WriterOutputStream.java
@@ -1,4 +1,4 @@
-/* WriterOutputStream.java --
+/* WriterOutputStream.java --
Copyright (C) 1999,2000,2001 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -93,6 +93,5 @@ public class WriterOutputStream
{
writer.flush();
}
-
-}
+}
diff --git a/gnu/xml/libxmlj/dom/GnomeAttr.java b/gnu/xml/libxmlj/dom/GnomeAttr.java
index 144aaf828..da9c62c9d 100644
--- a/gnu/xml/libxmlj/dom/GnomeAttr.java
+++ b/gnu/xml/libxmlj/dom/GnomeAttr.java
@@ -1,4 +1,4 @@
-/* GnomeAttr.java -
+/* GnomeAttr.java -
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -59,31 +59,31 @@ class GnomeAttr
{
super(id);
}
-
+
public String getName()
{
return getNodeName();
}
-
+
public native boolean getSpecified();
-
+
public native String getValue();
-
+
public native void setValue(String value)
throws DOMException;
-
+
public Node getParentNode()
{
return null;
}
-
+
public Element getOwnerElement()
{
return (Element) super.getParentNode();
}
-
+
// DOM Level 3 methods
-
+
public TypeInfo getSchemaTypeInfo()
{
return new GnomeTypeInfo(id);
@@ -100,7 +100,7 @@ class GnomeAttr
element.userIdAttrs != null &&
element.userIdAttrs.contains(this));
}
-
+
private native boolean xmljIsId();
public String toString()
@@ -113,6 +113,5 @@ class GnomeAttr
buffer.append("]");
return buffer.toString();
}
-
-}
+}
diff --git a/gnu/xml/libxmlj/dom/GnomeCDATASection.java b/gnu/xml/libxmlj/dom/GnomeCDATASection.java
index 8fb89ff4d..3e408e653 100644
--- a/gnu/xml/libxmlj/dom/GnomeCDATASection.java
+++ b/gnu/xml/libxmlj/dom/GnomeCDATASection.java
@@ -1,4 +1,4 @@
-/* GnomeCDATASection.java -
+/* GnomeCDATASection.java -
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/gnu/xml/libxmlj/dom/GnomeCharacterData.java b/gnu/xml/libxmlj/dom/GnomeCharacterData.java
index aa98652ba..3f3d6ecb5 100644
--- a/gnu/xml/libxmlj/dom/GnomeCharacterData.java
+++ b/gnu/xml/libxmlj/dom/GnomeCharacterData.java
@@ -1,4 +1,4 @@
-/* GnomeCharacterData.java -
+/* GnomeCharacterData.java -
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/gnu/xml/libxmlj/dom/GnomeComment.java b/gnu/xml/libxmlj/dom/GnomeComment.java
index a0cad5b3e..b6985c4a4 100644
--- a/gnu/xml/libxmlj/dom/GnomeComment.java
+++ b/gnu/xml/libxmlj/dom/GnomeComment.java
@@ -1,4 +1,4 @@
-/* GnomeComment.java -
+/* GnomeComment.java -
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/gnu/xml/libxmlj/dom/GnomeDOMException.java b/gnu/xml/libxmlj/dom/GnomeDOMException.java
index eae07876f..a1af82335 100644
--- a/gnu/xml/libxmlj/dom/GnomeDOMException.java
+++ b/gnu/xml/libxmlj/dom/GnomeDOMException.java
@@ -1,4 +1,4 @@
-/* GnomeDOMException.java -
+/* GnomeDOMException.java -
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -94,5 +94,5 @@ class GnomeDOMException
return null;
}
}
-
+
}
diff --git a/gnu/xml/libxmlj/dom/GnomeDOMStringList.java b/gnu/xml/libxmlj/dom/GnomeDOMStringList.java
index 3456acd99..c415ec782 100644
--- a/gnu/xml/libxmlj/dom/GnomeDOMStringList.java
+++ b/gnu/xml/libxmlj/dom/GnomeDOMStringList.java
@@ -1,4 +1,4 @@
-/* GnomeDOMStringList.java -
+/* GnomeDOMStringList.java -
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -80,5 +80,5 @@ class GnomeDOMStringList
}
return false;
}
-
+
}
diff --git a/gnu/xml/libxmlj/dom/GnomeDocument.java b/gnu/xml/libxmlj/dom/GnomeDocument.java
index a5333550e..0d1b487d8 100644
--- a/gnu/xml/libxmlj/dom/GnomeDocument.java
+++ b/gnu/xml/libxmlj/dom/GnomeDocument.java
@@ -1,4 +1,4 @@
-/* GnomeDocument.java -
+/* GnomeDocument.java -
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -102,18 +102,18 @@ public class GnomeDocument
boolean validate = false;
boolean validateIfSchema = false;
boolean wellFormed = true;
-
+
GnomeDocument(Object id)
{
super(id);
strictErrorChecking = true;
}
-
+
protected void finalize()
{
free(id);
}
-
+
private native void free(Object id);
public native DocumentType getDoctype();
@@ -177,7 +177,7 @@ public class GnomeDocument
public native Element createElementNS(String namespaceURI, String
qualifiedName)
throws DOMException;
-
+
public native Attr createAttributeNS(String namespaceURI, String
qualifiedName)
throws DOMException;
@@ -211,7 +211,7 @@ public class GnomeDocument
}
return element;
}
-
+
private native Element xmljGetElementById(String elementId);
// DOM Level 3 methods
@@ -237,7 +237,7 @@ public class GnomeDocument
{
this.strictErrorChecking = strictErrorChecking;
}
-
+
public native String getDocumentURI();
public native void setDocumentURI(String documentURI);
@@ -410,14 +410,14 @@ public class GnomeDocument
else if ("infoset".equals(name))
{
return Boolean.valueOf(!validateIfSchema &&
- !entities &&
- !datatypeNormalization &&
- !cdataSections &&
- namespaceDeclarations &&
- wellFormed &&
- elementContentWhitespace &&
- comments &&
- namespaces);
+ !entities &&
+ !datatypeNormalization &&
+ !cdataSections &&
+ namespaceDeclarations &&
+ wellFormed &&
+ elementContentWhitespace &&
+ comments &&
+ namespaces);
}
else if ("namespaces".equals(name))
{
@@ -466,7 +466,7 @@ public class GnomeDocument
"namespace-declarations".equals(name) ||
"split-cdata-sections".equals(name));
}
-
+
public DOMStringList getParameterNames()
{
String[] names = new String[] {
@@ -547,7 +547,7 @@ public class GnomeDocument
}
// -- Debugging --
-
+
public String toString()
{
CPStringBuilder buffer = new CPStringBuilder(getClass().getName());
diff --git a/gnu/xml/libxmlj/dom/GnomeDocumentBuilder.java b/gnu/xml/libxmlj/dom/GnomeDocumentBuilder.java
index 4decee0d8..6dea87226 100644
--- a/gnu/xml/libxmlj/dom/GnomeDocumentBuilder.java
+++ b/gnu/xml/libxmlj/dom/GnomeDocumentBuilder.java
@@ -1,4 +1,4 @@
-/* GnomeDocumentBuilder.java -
+/* GnomeDocumentBuilder.java -
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -89,7 +89,7 @@ public class GnomeDocumentBuilder
{
this(true, false, false);
}
-
+
/**
* Constructs a new document builder.
* @param validate whether to validate during parsing
@@ -151,7 +151,7 @@ public class GnomeDocumentBuilder
true, //entityResolver != null,
errorHandler != null);
}
-
+
private native Document parseStream(InputStream in,
byte[] detectBuffer,
String publicId,
@@ -162,7 +162,7 @@ public class GnomeDocumentBuilder
boolean expandEntities,
boolean entityResolver,
boolean errorHandler);
-
+
public void setEntityResolver(EntityResolver resolver)
{
entityResolver = resolver;
@@ -186,7 +186,7 @@ public class GnomeDocumentBuilder
{
name = name.substring(1);
}
-
+
if ("xml".equals(name) || "core".equals(name))
{
return (version == null ||
@@ -194,7 +194,7 @@ public class GnomeDocumentBuilder
"1.0".equals(version) ||
"2.0".equals(version) ||
"3.0".equals(version));
-
+
}
else if ("ls".equals(name) || "ls-async".equals(name))
{
@@ -210,7 +210,7 @@ public class GnomeDocumentBuilder
{
return (version == null ||
"".equals(version) ||
- "2.0".equals(version));
+ "2.0".equals(version));
}
else if ("xpath".equals(name))
{
@@ -220,7 +220,7 @@ public class GnomeDocumentBuilder
}
return false;
}
-
+
// DOM Level 3
public Object getFeature(String feature, String version)
@@ -231,25 +231,25 @@ public class GnomeDocumentBuilder
}
return null;
}
-
+
public native Document createDocument(String namespaceURI,
String qualifiedName,
DocumentType doctype);
-
+
public DocumentType createDocumentType(String qualifiedName,
String publicId,
String systemId)
{
return new StandaloneDocumentType(qualifiedName, publicId, systemId);
}
-
+
// Callback hooks from JNI
-
+
private void setDocumentLocator(Object ctx, Object loc)
{
// ignore
}
-
+
private InputStream resolveEntity(String publicId, String systemId,
String base)
throws SAXException, IOException
@@ -270,7 +270,7 @@ public class GnomeDocumentBuilder
}
return in;
}
-
+
private void warning(String message,
int lineNumber,
int columnNumber,
diff --git a/gnu/xml/libxmlj/dom/GnomeDocumentBuilderFactory.java b/gnu/xml/libxmlj/dom/GnomeDocumentBuilderFactory.java
index c8918aa72..448e12351 100644
--- a/gnu/xml/libxmlj/dom/GnomeDocumentBuilderFactory.java
+++ b/gnu/xml/libxmlj/dom/GnomeDocumentBuilderFactory.java
@@ -1,4 +1,4 @@
-/* GnomeDocumentBuilderFactory.java -
+/* GnomeDocumentBuilderFactory.java -
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -93,7 +93,7 @@ public class GnomeDocumentBuilderFactory
{
// TODO
}
-
+
public void setFeature(String name, boolean value)
throws ParserConfigurationException
{
@@ -114,5 +114,5 @@ public class GnomeDocumentBuilderFactory
return secureProcessing;
throw new ParserConfigurationException(name);
}
-
+
}
diff --git a/gnu/xml/libxmlj/dom/GnomeDocumentFragment.java b/gnu/xml/libxmlj/dom/GnomeDocumentFragment.java
index e5b355e42..3623eb6cf 100644
--- a/gnu/xml/libxmlj/dom/GnomeDocumentFragment.java
+++ b/gnu/xml/libxmlj/dom/GnomeDocumentFragment.java
@@ -1,4 +1,4 @@
-/* GnomeDocumentFragment.java -
+/* GnomeDocumentFragment.java -
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/gnu/xml/libxmlj/dom/GnomeDocumentType.java b/gnu/xml/libxmlj/dom/GnomeDocumentType.java
index eb3a65f1d..7649b7339 100644
--- a/gnu/xml/libxmlj/dom/GnomeDocumentType.java
+++ b/gnu/xml/libxmlj/dom/GnomeDocumentType.java
@@ -1,4 +1,4 @@
-/* GnomeDocumentType.java -
+/* GnomeDocumentType.java -
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -56,7 +56,7 @@ implements DocumentType
{
super (id);
}
-
+
public String getName ()
{
return getNodeName ();
diff --git a/gnu/xml/libxmlj/dom/GnomeElement.java b/gnu/xml/libxmlj/dom/GnomeElement.java
index e87e3adfe..19889d663 100644
--- a/gnu/xml/libxmlj/dom/GnomeElement.java
+++ b/gnu/xml/libxmlj/dom/GnomeElement.java
@@ -1,4 +1,4 @@
-/* GnomeElement.java -
+/* GnomeElement.java -
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -67,7 +67,7 @@ class GnomeElement
{
super(id);
}
-
+
public String getTagName()
{
return getNodeName();
@@ -77,7 +77,7 @@ class GnomeElement
public native void setAttribute(String name, String value)
throws DOMException;
-
+
public void removeAttribute(String name)
throws DOMException
{
@@ -89,7 +89,7 @@ class GnomeElement
}
public native Attr getAttributeNode(String name);
-
+
public native Attr setAttributeNode(Attr newAttr)
throws DOMException;
@@ -97,9 +97,9 @@ class GnomeElement
throws DOMException;
public native NodeList getElementsByTagName(String name);
-
+
public native String getAttributeNS(String namespaceURI, String localName);
-
+
public native void setAttributeNS(String namespaceURI, String
qualifiedName, String value)
throws DOMException;
@@ -113,7 +113,7 @@ class GnomeElement
removeAttributeNode(attr);
}
}
-
+
public native Attr getAttributeNodeNS(String namespaceURI,
String localName);
@@ -122,7 +122,7 @@ class GnomeElement
public native NodeList getElementsByTagNameNS(String namespaceURI,
String localName);
-
+
public native boolean hasAttribute(String name);
public native boolean hasAttributeNS(String namespaceURI,
diff --git a/gnu/xml/libxmlj/dom/GnomeEntity.java b/gnu/xml/libxmlj/dom/GnomeEntity.java
index 8d61a26c1..a05217473 100644
--- a/gnu/xml/libxmlj/dom/GnomeEntity.java
+++ b/gnu/xml/libxmlj/dom/GnomeEntity.java
@@ -1,4 +1,4 @@
-/* GnomeEntity.java -
+/* GnomeEntity.java -
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -63,25 +63,25 @@ implements Entity
public native String getNotationName ();
// DOM Level 3 methods
-
+
public String getInputEncoding ()
{
// TODO
- return null;
+ return null;
}
-
+
public String getXmlEncoding ()
{
// TODO
return null;
}
-
+
public String getXmlVersion ()
{
// TODO
return null;
}
-
+
public String toString ()
{
String publicId = getPublicId ();
diff --git a/gnu/xml/libxmlj/dom/GnomeEntityReference.java b/gnu/xml/libxmlj/dom/GnomeEntityReference.java
index 136b3a69d..aa2fcf1e5 100644
--- a/gnu/xml/libxmlj/dom/GnomeEntityReference.java
+++ b/gnu/xml/libxmlj/dom/GnomeEntityReference.java
@@ -1,4 +1,4 @@
-/* GnomeEntityReference.java -
+/* GnomeEntityReference.java -
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/gnu/xml/libxmlj/dom/GnomeNamedNodeMap.java b/gnu/xml/libxmlj/dom/GnomeNamedNodeMap.java
index 8ca892128..b8df4fede 100644
--- a/gnu/xml/libxmlj/dom/GnomeNamedNodeMap.java
+++ b/gnu/xml/libxmlj/dom/GnomeNamedNodeMap.java
@@ -1,4 +1,4 @@
-/* GnomeNamedNodeMap.java -
+/* GnomeNamedNodeMap.java -
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -78,7 +78,7 @@ implements NamedNodeMap
throws DOMException;
public native Node item (int index);
-
+
public native int getLength ();
public native Node getNamedItemNS (String namespaceURI, String localName);
@@ -88,5 +88,5 @@ implements NamedNodeMap
public native Node removeNamedItemNS (String namespaceURI,
String localName);
-
+
}
diff --git a/gnu/xml/libxmlj/dom/GnomeNode.java b/gnu/xml/libxmlj/dom/GnomeNode.java
index 6f574ec29..5874916e5 100644
--- a/gnu/xml/libxmlj/dom/GnomeNode.java
+++ b/gnu/xml/libxmlj/dom/GnomeNode.java
@@ -1,4 +1,4 @@
-/* GnomeNode.java -
+/* GnomeNode.java -
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -145,7 +145,7 @@ class GnomeNode
docNodes.put(node, nodeInstance);
return nodeInstance;
}
-
+
/**
* Frees the specified document.
* This removes all its nodes from the cache.
@@ -159,7 +159,7 @@ class GnomeNode
instances.remove(doc);
//System.out.println("Freed "+instances.remove(doc));
}
-
+
/**
* xmlNodePtr
*/
@@ -302,7 +302,7 @@ class GnomeNode
notifyUserDataHandlers(UserDataHandler.NODE_CLONED, this, ret);
return ret;
}
-
+
private native Node xmljCloneNode(boolean deep);
public native void normalize();
@@ -359,7 +359,7 @@ class GnomeNode
}
private native int xmljCompareTo(Object other);
-
+
public String getTextContent()
throws DOMException
{
@@ -392,7 +392,7 @@ class GnomeNode
return null;
}
}
-
+
public void setTextContent(String textContent)
throws DOMException
{
@@ -427,20 +427,20 @@ class GnomeNode
break;
}
}
-
+
public boolean isSameNode(Node other)
{
return equals(other);
}
-
+
public native String lookupPrefix(String namespaceURI);
-
+
public native boolean isDefaultNamespace(String namespaceURI);
-
+
public native String lookupNamespaceURI(String prefix);
-
+
public native boolean isEqualNode(Node arg);
-
+
public Object getFeature(String feature, String version)
{
return getOwnerDocument().getImplementation()
diff --git a/gnu/xml/libxmlj/dom/GnomeNodeList.java b/gnu/xml/libxmlj/dom/GnomeNodeList.java
index efd07acb0..51a6d0bfa 100644
--- a/gnu/xml/libxmlj/dom/GnomeNodeList.java
+++ b/gnu/xml/libxmlj/dom/GnomeNodeList.java
@@ -1,4 +1,4 @@
-/* GnomeNodeList.java -
+/* GnomeNodeList.java -
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -62,5 +62,5 @@ implements NodeList
public native Node item (int index);
public native int getLength ();
-
+
}
diff --git a/gnu/xml/libxmlj/dom/GnomeNotation.java b/gnu/xml/libxmlj/dom/GnomeNotation.java
index 7f6fdf448..50e48e2a3 100644
--- a/gnu/xml/libxmlj/dom/GnomeNotation.java
+++ b/gnu/xml/libxmlj/dom/GnomeNotation.java
@@ -1,4 +1,4 @@
-/* GnomeNotation.java -
+/* GnomeNotation.java -
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/gnu/xml/libxmlj/dom/GnomeProcessingInstruction.java b/gnu/xml/libxmlj/dom/GnomeProcessingInstruction.java
index d2ecd1890..fad6e108a 100644
--- a/gnu/xml/libxmlj/dom/GnomeProcessingInstruction.java
+++ b/gnu/xml/libxmlj/dom/GnomeProcessingInstruction.java
@@ -1,4 +1,4 @@
-/* GnomeProcessingInstruction.java -
+/* GnomeProcessingInstruction.java -
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/gnu/xml/libxmlj/dom/GnomeText.java b/gnu/xml/libxmlj/dom/GnomeText.java
index 8b8e5e0c1..e00be18a9 100644
--- a/gnu/xml/libxmlj/dom/GnomeText.java
+++ b/gnu/xml/libxmlj/dom/GnomeText.java
@@ -1,4 +1,4 @@
-/* GnomeText.java -
+/* GnomeText.java -
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -57,7 +57,7 @@ implements Text
{
super (id);
}
-
+
public Text splitText (int offset)
throws DOMException
{
@@ -69,14 +69,14 @@ implements Text
setNodeValue (part2);
return text;
}
-
+
// DOM Level 3
public boolean isElementContentWhitespace ()
{
return getTextContent ().trim ().length () == 0;
}
-
+
public String getWholeText ()
{
Node first = this;
@@ -103,7 +103,7 @@ implements Text
{
setNodeValue (content);
}
-
+
Node first = this;
Node node = getPreviousSibling ();
while (node != null && node instanceof Text)
diff --git a/gnu/xml/libxmlj/dom/GnomeTypeInfo.java b/gnu/xml/libxmlj/dom/GnomeTypeInfo.java
index d365f0d9f..5517e8a99 100644
--- a/gnu/xml/libxmlj/dom/GnomeTypeInfo.java
+++ b/gnu/xml/libxmlj/dom/GnomeTypeInfo.java
@@ -1,4 +1,4 @@
-/* GnomeTypeInfo.java -
+/* GnomeTypeInfo.java -
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -61,5 +61,5 @@ class GnomeTypeInfo implements TypeInfo
public native boolean isDerivedFrom (String typeNamespaceArg,
String typeNameArg,
int derivationMethod);
-
+
}
diff --git a/gnu/xml/libxmlj/dom/GnomeXPathExpression.java b/gnu/xml/libxmlj/dom/GnomeXPathExpression.java
index 815804799..52f4daa21 100644
--- a/gnu/xml/libxmlj/dom/GnomeXPathExpression.java
+++ b/gnu/xml/libxmlj/dom/GnomeXPathExpression.java
@@ -1,4 +1,4 @@
-/* GnomeXPathExpression.java -
+/* GnomeXPathExpression.java -
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -78,9 +78,9 @@ implements XPathExpression
{
return doEvaluate (expr, contextNode, type, result);
}
-
+
private native Object doEvaluate (Object expr, Node contextNode,
short type, Object result)
throws XPathException, DOMException;
-
+
}
diff --git a/gnu/xml/libxmlj/dom/GnomeXPathNSResolver.java b/gnu/xml/libxmlj/dom/GnomeXPathNSResolver.java
index a9ba85509..039a79a03 100644
--- a/gnu/xml/libxmlj/dom/GnomeXPathNSResolver.java
+++ b/gnu/xml/libxmlj/dom/GnomeXPathNSResolver.java
@@ -1,4 +1,4 @@
-/* GnomeXPathNSResolver.java -
+/* GnomeXPathNSResolver.java -
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -60,6 +60,5 @@ class GnomeXPathNSResolver
{
return node.lookupNamespaceURI(prefix);
}
-
-}
+}
diff --git a/gnu/xml/libxmlj/dom/GnomeXPathNodeList.java b/gnu/xml/libxmlj/dom/GnomeXPathNodeList.java
index dde3be2d9..b8d0a3d0a 100644
--- a/gnu/xml/libxmlj/dom/GnomeXPathNodeList.java
+++ b/gnu/xml/libxmlj/dom/GnomeXPathNodeList.java
@@ -1,4 +1,4 @@
-/* GnomeXPathNodeList.java -
+/* GnomeXPathNodeList.java -
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/gnu/xml/libxmlj/dom/GnomeXPathResult.java b/gnu/xml/libxmlj/dom/GnomeXPathResult.java
index 850b5fae0..b2c706f65 100644
--- a/gnu/xml/libxmlj/dom/GnomeXPathResult.java
+++ b/gnu/xml/libxmlj/dom/GnomeXPathResult.java
@@ -1,4 +1,4 @@
-/* GnomeXPathResult.java -
+/* GnomeXPathResult.java -
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -69,7 +69,7 @@ implements XPathResult
}
private native void free (Object obj);
-
+
public native short getResultType ();
public native double getNumberValue ()
@@ -130,5 +130,5 @@ implements XPathResult
getSnapshotLength () + ']';
}
}
-
+
}
diff --git a/gnu/xml/libxmlj/sax/GnomeLocator.java b/gnu/xml/libxmlj/sax/GnomeLocator.java
index 0c812f683..dba0a72c0 100644
--- a/gnu/xml/libxmlj/sax/GnomeLocator.java
+++ b/gnu/xml/libxmlj/sax/GnomeLocator.java
@@ -1,4 +1,4 @@
-/* GnomeLocator.java -
+/* GnomeLocator.java -
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -67,7 +67,7 @@ implements Locator
throw new NullPointerException ("loc");
}
}
-
+
public String getPublicId ()
{
return publicId (ctx, loc);
@@ -86,14 +86,14 @@ implements Locator
{
return lineNumber (ctx, loc);
}
-
+
private native int lineNumber (Object ctx, Object loc);
public int getColumnNumber ()
{
return columnNumber (ctx, loc);
}
-
+
private native int columnNumber (Object ctx, Object loc);
}
diff --git a/gnu/xml/libxmlj/sax/GnomeSAXParser.java b/gnu/xml/libxmlj/sax/GnomeSAXParser.java
index a5cdc42b7..86d326b7c 100644
--- a/gnu/xml/libxmlj/sax/GnomeSAXParser.java
+++ b/gnu/xml/libxmlj/sax/GnomeSAXParser.java
@@ -1,4 +1,4 @@
-/* GnomeSAXParser.java -
+/* GnomeSAXParser.java -
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -101,5 +101,5 @@ extends SAXParser
{
return validating;
}
-
+
}
diff --git a/gnu/xml/libxmlj/sax/GnomeSAXParserFactory.java b/gnu/xml/libxmlj/sax/GnomeSAXParserFactory.java
index 5152d540f..0c2881240 100644
--- a/gnu/xml/libxmlj/sax/GnomeSAXParserFactory.java
+++ b/gnu/xml/libxmlj/sax/GnomeSAXParserFactory.java
@@ -1,4 +1,4 @@
-/* GnomeSAXParserFactory.java -
+/* GnomeSAXParserFactory.java -
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -88,5 +88,5 @@ extends SAXParserFactory
GnomeXMLReader.checkFeatureName (name);
features.put (name, flag ? Boolean.TRUE : Boolean.FALSE);
}
-
+
}
diff --git a/gnu/xml/libxmlj/sax/GnomeXMLReader.java b/gnu/xml/libxmlj/sax/GnomeXMLReader.java
index 846015a1c..3a34bc934 100644
--- a/gnu/xml/libxmlj/sax/GnomeXMLReader.java
+++ b/gnu/xml/libxmlj/sax/GnomeXMLReader.java
@@ -1,4 +1,4 @@
-/* GnomeXMLReader.java -
+/* GnomeXMLReader.java -
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -83,7 +83,7 @@ implements XMLReader
private static final String FEATURES_PREFIX =
"http://xml.org/sax/features/";
-
+
private static final List RECOGNIZED_FEATURES =
Arrays.asList (new String[]
{
@@ -100,10 +100,10 @@ implements XMLReader
"use-entity-resolver2",
"validation"
});
-
+
private static final String PROPERTIES_PREFIX =
"http://xml.org/sax/properties/";
-
+
private static final List RECOGNIZED_PROPERTIES =
Arrays.asList (new String[]
{
@@ -671,7 +671,7 @@ implements XMLReader
{
}
}
-
+
private void startDocument (boolean standalone)
throws SAXException
{
diff --git a/gnu/xml/libxmlj/sax/Namespaces.java b/gnu/xml/libxmlj/sax/Namespaces.java
index 646d7b408..473d02028 100644
--- a/gnu/xml/libxmlj/sax/Namespaces.java
+++ b/gnu/xml/libxmlj/sax/Namespaces.java
@@ -1,4 +1,4 @@
-/* Namespaces.java -
+/* Namespaces.java -
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -44,14 +44,14 @@ import java.util.Iterator;
/**
* Helper class for managing namespaces.
- *
+ *
* @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
*/
class Namespaces
{
ArrayList stack = new ArrayList ();
-
+
/**
* Increments the tree depth.
* This allocates a new potential namespace entry.
diff --git a/gnu/xml/libxmlj/sax/StringArrayAttributes.java b/gnu/xml/libxmlj/sax/StringArrayAttributes.java
index f534efbcf..f5a753c56 100644
--- a/gnu/xml/libxmlj/sax/StringArrayAttributes.java
+++ b/gnu/xml/libxmlj/sax/StringArrayAttributes.java
@@ -1,4 +1,4 @@
-/* StringArrayAttributes.java -
+/* StringArrayAttributes.java -
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -168,4 +168,3 @@ implements Attributes
}
}
-
diff --git a/gnu/xml/libxmlj/sax/XMLName.java b/gnu/xml/libxmlj/sax/XMLName.java
index 5950a7996..b9bdf9159 100644
--- a/gnu/xml/libxmlj/sax/XMLName.java
+++ b/gnu/xml/libxmlj/sax/XMLName.java
@@ -1,4 +1,4 @@
-/* XMLName.java -
+/* XMLName.java -
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -46,7 +46,7 @@ class XMLName
{
private static final String XML_URI = "http://www.w3.org/XML/1998/namespace";
-
+
final String uri;
final String localName;
final String qName;
diff --git a/gnu/xml/libxmlj/transform/ErrorListenerErrorHandler.java b/gnu/xml/libxmlj/transform/ErrorListenerErrorHandler.java
index 0601e5e89..398a0ba2e 100644
--- a/gnu/xml/libxmlj/transform/ErrorListenerErrorHandler.java
+++ b/gnu/xml/libxmlj/transform/ErrorListenerErrorHandler.java
@@ -1,4 +1,4 @@
-/* ErrorListenerErrorHandler.java -
+/* ErrorListenerErrorHandler.java -
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -71,7 +71,7 @@ implements ErrorHandler
throw getSAXException (te);
}
}
-
+
public void error (SAXParseException e)
throws SAXException
{
@@ -84,7 +84,7 @@ implements ErrorHandler
throw getSAXException (te);
}
}
-
+
public void fatalError (SAXParseException e)
throws SAXException
{
@@ -107,5 +107,5 @@ implements ErrorHandler
}
return new SAXException (e);
}
-
+
}
diff --git a/gnu/xml/libxmlj/transform/GnomeTransformer.java b/gnu/xml/libxmlj/transform/GnomeTransformer.java
index 37aa05b93..5f31cb898 100755
--- a/gnu/xml/libxmlj/transform/GnomeTransformer.java
+++ b/gnu/xml/libxmlj/transform/GnomeTransformer.java
@@ -1,4 +1,4 @@
-/* GnomeTransformer.java -
+/* GnomeTransformer.java -
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -120,19 +120,19 @@ public class GnomeTransformer
* @param errorListener the error listener for transformation errors
*/
GnomeTransformer (Source source,
- URIResolver resolver,
- ErrorListener errorListener)
+ URIResolver resolver,
+ ErrorListener errorListener)
throws TransformerConfigurationException
{
this.resolver = resolver;
this.errorListener = errorListener;
parameters = new HashMap ();
outputProperties = new Properties ();
-
+
if (source == null)
{
stylesheet = newStylesheet ();
- }
+ }
else if (source instanceof StreamSource)
{
try
@@ -176,12 +176,12 @@ public class GnomeTransformer
throw new TransformerConfigurationException (msg);
}
}
-
+
/**
* Copy constructor.
*/
private GnomeTransformer (Object stylesheet,
- URIResolver resolver,
+ URIResolver resolver,
ErrorListener errorListener,
Map parameters,
Properties outputProperties)
@@ -215,7 +215,7 @@ public class GnomeTransformer
public synchronized void setParameter (String parameter, Object value)
{
parameters.put (parameter, value);
- }
+ }
public synchronized Object getParameter (String name)
{
@@ -232,7 +232,7 @@ public class GnomeTransformer
public void setErrorListener (ErrorListener listener)
{
this.errorListener = listener;
- }
+ }
public ErrorListener getErrorListener ()
{
@@ -244,7 +244,7 @@ public class GnomeTransformer
public void setURIResolver (URIResolver resolver)
{
this.resolver = resolver;
- }
+ }
public URIResolver getURIResolver ()
{
@@ -259,12 +259,12 @@ public class GnomeTransformer
{
// Note: defensive copying
this.outputProperties = new Properties (outputProperties);
- }
+ }
public void setOutputProperty (String name, String value)
{
outputProperties.setProperty (name, value);
- }
+ }
public Properties getOutputProperties ()
{
@@ -510,7 +510,7 @@ public class GnomeTransformer
throw new TransformerException (e);
}
}
-
+
private void setDocumentLocator (Object ctx, Object loc)
{
}
@@ -550,7 +550,7 @@ public class GnomeTransformer
systemId);
errorListener.error (new TransformerException (message, l));
}
-
+
private void fatalError (String message,
int lineNumber,
int columnNumber,
@@ -568,5 +568,5 @@ public class GnomeTransformer
systemId);
errorListener.fatalError (new TransformerException (message, l));
}
-
+
}
diff --git a/gnu/xml/libxmlj/transform/GnomeTransformerFactory.java b/gnu/xml/libxmlj/transform/GnomeTransformerFactory.java
index 78dfe2148..4a0100a21 100755
--- a/gnu/xml/libxmlj/transform/GnomeTransformerFactory.java
+++ b/gnu/xml/libxmlj/transform/GnomeTransformerFactory.java
@@ -1,4 +1,4 @@
-/* GnomeTransformerFactory.java -
+/* GnomeTransformerFactory.java -
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -86,7 +86,7 @@ public class GnomeTransformerFactory
{
XMLJ.init ();
}
-
+
/**
* URIResolver set by user, or default implementation.
*/
@@ -104,7 +104,7 @@ public class GnomeTransformerFactory
//--- Implementation of javax.xml.transform.TransformerFactory
//--- follows.
-
+
// -- begin getAssociatedStylesheet implementation --
/**
@@ -112,7 +112,7 @@ public class GnomeTransformerFactory
* <code>null</code> if no associated stylesheet could be found.
*/
public Source getAssociatedStylesheet(Source source, String media,
- String title, String charset)
+ String title, String charset)
throws TransformerConfigurationException
{
String href= null;
@@ -225,7 +225,7 @@ public class GnomeTransformerFactory
class AssociatedStylesheetHandler
extends DefaultHandler
{
-
+
String media;
String title;
String href;
@@ -246,7 +246,7 @@ public class GnomeTransformerFactory
href = parseParameter(data, "href");
}
}
-
+
}
String parseParameter(String data, String name)
@@ -270,33 +270,33 @@ public class GnomeTransformerFactory
public synchronized void setAttribute (String name, Object value)
{
this.attributes.put (name, value);
- }
+ }
public synchronized Object getAttribute (String name)
{
return attributes.get (name);
}
-
+
public void setErrorListener (ErrorListener errorListener)
{
this.errorListener = errorListener;
- }
+ }
public ErrorListener getErrorListener ()
{
return errorListener;
}
-
+
public void setURIResolver (URIResolver uriResolver)
{
this.uriResolver = uriResolver;
- }
+ }
public URIResolver getURIResolver ()
{
return uriResolver;
}
-
+
public boolean getFeature (String name)
{
return (StreamSource.FEATURE.equals (name) ||
@@ -335,7 +335,7 @@ public class GnomeTransformerFactory
* Returns a new instance of class {@link Templates} for
* the given souce.
*/
- public Templates newTemplates (Source source)
+ public Templates newTemplates (Source source)
throws TransformerConfigurationException
{
return new GnomeTransformer (source, uriResolver, errorListener);
diff --git a/gnu/xml/libxmlj/transform/URIResolverEntityResolver.java b/gnu/xml/libxmlj/transform/URIResolverEntityResolver.java
index 88a58e1a2..0ce71d0ef 100644
--- a/gnu/xml/libxmlj/transform/URIResolverEntityResolver.java
+++ b/gnu/xml/libxmlj/transform/URIResolverEntityResolver.java
@@ -1,4 +1,4 @@
-/* URIResolverEntityResolver.java -
+/* URIResolverEntityResolver.java -
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/gnu/xml/libxmlj/util/EmptyNodeList.java b/gnu/xml/libxmlj/util/EmptyNodeList.java
index 24a08229c..60019ddd4 100644
--- a/gnu/xml/libxmlj/util/EmptyNodeList.java
+++ b/gnu/xml/libxmlj/util/EmptyNodeList.java
@@ -1,4 +1,4 @@
-/* EmptyNodeList.java -
+/* EmptyNodeList.java -
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -58,5 +58,5 @@ implements NodeList
{
return 0;
}
-
+
}
diff --git a/gnu/xml/libxmlj/util/NamedInputStream.java b/gnu/xml/libxmlj/util/NamedInputStream.java
index 8d20ec4e5..01b3af90d 100644
--- a/gnu/xml/libxmlj/util/NamedInputStream.java
+++ b/gnu/xml/libxmlj/util/NamedInputStream.java
@@ -1,4 +1,4 @@
-/* NamedInputStream.java -
+/* NamedInputStream.java -
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -54,7 +54,7 @@ extends FilterInputStream
{
private static int DETECT_BUFFER_SIZE = 50;
-
+
private String name;
NamedInputStream (String name, InputStream in, int size)
@@ -95,5 +95,5 @@ extends FilterInputStream
return ret;
}
}
-
+
}
diff --git a/gnu/xml/libxmlj/util/StandaloneDocumentType.java b/gnu/xml/libxmlj/util/StandaloneDocumentType.java
index d47cdb05d..5c3316611 100644
--- a/gnu/xml/libxmlj/util/StandaloneDocumentType.java
+++ b/gnu/xml/libxmlj/util/StandaloneDocumentType.java
@@ -1,4 +1,4 @@
-/* StandaloneDocumentType.java -
+/* StandaloneDocumentType.java -
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -75,7 +75,7 @@ implements DocumentType
// TODO
return null;
}
-
+
public NamedNodeMap getNotations ()
{
// TODO
@@ -96,7 +96,7 @@ implements DocumentType
{
return null;
}
-
+
// -- Node --
public String getNodeName ()
@@ -109,7 +109,7 @@ implements DocumentType
{
return null;
}
-
+
public void setNodeValue (String nodeValue)
throws DOMException
{
@@ -254,12 +254,12 @@ implements DocumentType
{
return equals (other);
}
-
+
public String lookupPrefix (String namespace)
{
return null;
}
-
+
public boolean isDefaultNamespace (String namespace)
{
return false;
diff --git a/gnu/xml/libxmlj/util/StandaloneLocator.java b/gnu/xml/libxmlj/util/StandaloneLocator.java
index 5430330cc..75b40bdf1 100644
--- a/gnu/xml/libxmlj/util/StandaloneLocator.java
+++ b/gnu/xml/libxmlj/util/StandaloneLocator.java
@@ -1,4 +1,4 @@
-/* StandaloneLocator.java -
+/* StandaloneLocator.java -
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -65,12 +65,12 @@ implements Locator, SourceLocator
this.publicId = publicId;
this.systemId = systemId;
}
-
+
public String getPublicId ()
{
return publicId;
}
-
+
public String getSystemId ()
{
return systemId;
diff --git a/gnu/xml/libxmlj/util/XMLJ.java b/gnu/xml/libxmlj/util/XMLJ.java
index 0d5f9f689..8d954d0be 100644
--- a/gnu/xml/libxmlj/util/XMLJ.java
+++ b/gnu/xml/libxmlj/util/XMLJ.java
@@ -1,4 +1,4 @@
-/* XMLJ.java -
+/* XMLJ.java -
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -70,35 +70,35 @@ public final class XMLJ
static class XMLJShutdownHook
implements Runnable
{
-
+
public void run ()
{
// Make sure finalizers are run
System.gc ();
Runtime.getRuntime ().runFinalization ();
-
+
// Perform global cleanup on the native level
GnomeTransformerFactory.freeLibxsltGlobal ();
}
-
+
}
private static boolean initialised = false;
-
+
public static void init ()
{
if (!initialised)
{
System.loadLibrary ("xmlj");
-
- XMLJShutdownHook hook = new XMLJShutdownHook ();
+
+ XMLJShutdownHook hook = new XMLJShutdownHook ();
Runtime.getRuntime ().addShutdownHook (new Thread (hook));
}
initialised = true;
}
private static final int LOOKAHEAD = 50;
-
+
/**
* Returns an input stream for the specified input source.
* This returns a pushback stream that libxmlj can use to detect the
@@ -276,5 +276,5 @@ public final class XMLJ
}
return uri;
}
-
+
}
diff --git a/gnu/xml/pipeline/CallFilter.java b/gnu/xml/pipeline/CallFilter.java
index 3b3375173..2398b8685 100644
--- a/gnu/xml/pipeline/CallFilter.java
+++ b/gnu/xml/pipeline/CallFilter.java
@@ -1,4 +1,4 @@
-/* CallFilter.java --
+/* CallFilter.java --
Copyright (C) 1999,2000,2001 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -99,11 +99,11 @@ import gnu.xml.util.XMLWriter;
*/
final public class CallFilter implements EventConsumer
{
- private Requestor req;
- private EventConsumer next;
- private URL target;
- private URLConnection conn;
- private ErrorHandler errHandler;
+ private Requestor req;
+ private EventConsumer next;
+ private URL target;
+ private URLConnection conn;
+ private ErrorHandler errHandler;
/**
@@ -113,13 +113,13 @@ final public class CallFilter implements EventConsumer
*
* @exception IOException if the URI isn't accepted as a URL
*/
- // constructor used by PipelineFactory
+ // constructor used by PipelineFactory
public CallFilter (String uri, EventConsumer next)
throws IOException
{
- this.next = next;
- req = new Requestor ();
- setCallTarget (uri);
+ this.next = next;
+ req = new Requestor ();
+ setCallTarget (uri);
}
/**
@@ -129,7 +129,7 @@ final public class CallFilter implements EventConsumer
final public void setCallTarget (String uri)
throws IOException
{
- target = new URL (uri);
+ target = new URL (uri);
}
/**
@@ -138,7 +138,7 @@ final public class CallFilter implements EventConsumer
*/
public void setErrorHandler (ErrorHandler handler)
{
- req.setErrorHandler (handler);
+ req.setErrorHandler (handler);
}
@@ -147,19 +147,19 @@ final public class CallFilter implements EventConsumer
*/
final public String getCallTarget ()
{
- return target.toString ();
+ return target.toString ();
}
/** Returns the content handler currently in use. */
final public org.xml.sax.ContentHandler getContentHandler ()
{
- return req;
+ return req;
}
/** Returns the DTD handler currently in use. */
final public DTDHandler getDTDHandler ()
{
- return req;
+ return req;
}
@@ -170,11 +170,11 @@ final public class CallFilter implements EventConsumer
final public Object getProperty (String id)
throws SAXNotRecognizedException
{
- if (EventFilter.DECL_HANDLER.equals (id))
- return req;
- if (EventFilter.LEXICAL_HANDLER.equals (id))
- return req;
- throw new SAXNotRecognizedException (id);
+ if (EventFilter.DECL_HANDLER.equals (id))
+ return req;
+ if (EventFilter.LEXICAL_HANDLER.equals (id))
+ return req;
+ throw new SAXNotRecognizedException (id);
}
@@ -187,71 +187,71 @@ final public class CallFilter implements EventConsumer
//
final class Requestor extends XMLWriter
{
- Requestor ()
- {
- super ((Writer)null);
- }
-
- public synchronized void startDocument () throws SAXException
- {
- // Connect to remote object and set up to send it XML text
- try {
- if (conn != null)
- throw new IllegalStateException ("call is being made");
-
- conn = target.openConnection ();
- conn.setDoOutput (true);
- conn.setRequestProperty ("Content-Type",
- "application/xml;charset=UTF-8");
-
- setWriter (new OutputStreamWriter (
- conn.getOutputStream (),
- "UTF8"), "UTF-8");
-
- } catch (IOException e) {
- fatal ("can't write (POST) to URI: " + target, e);
- }
-
- // NOW base class can safely write that text!
- super.startDocument ();
- }
-
- public void endDocument () throws SAXException
- {
- //
- // Finish writing the request (for HTTP, a POST);
- // this closes the output stream.
- //
- super.endDocument ();
-
- //
- // Receive the response.
- // Produce events for the next stage.
- //
- InputSource source;
- XMLReader producer;
- String encoding;
-
- try {
-
- source = new InputSource (conn.getInputStream ());
+ Requestor ()
+ {
+ super ((Writer)null);
+ }
+
+ public synchronized void startDocument () throws SAXException
+ {
+ // Connect to remote object and set up to send it XML text
+ try {
+ if (conn != null)
+ throw new IllegalStateException ("call is being made");
+
+ conn = target.openConnection ();
+ conn.setDoOutput (true);
+ conn.setRequestProperty ("Content-Type",
+ "application/xml;charset=UTF-8");
+
+ setWriter (new OutputStreamWriter (
+ conn.getOutputStream (),
+ "UTF8"), "UTF-8");
+
+ } catch (IOException e) {
+ fatal ("can't write (POST) to URI: " + target, e);
+ }
+
+ // NOW base class can safely write that text!
+ super.startDocument ();
+ }
+
+ public void endDocument () throws SAXException
+ {
+ //
+ // Finish writing the request (for HTTP, a POST);
+ // this closes the output stream.
+ //
+ super.endDocument ();
+
+ //
+ // Receive the response.
+ // Produce events for the next stage.
+ //
+ InputSource source;
+ XMLReader producer;
+ String encoding;
+
+ try {
+
+ source = new InputSource (conn.getInputStream ());
// FIXME if status is anything but success, report it!! It'd be good to
// save the request data just in case we need to deal with a forward.
- encoding = Resolver.getEncoding (conn.getContentType ());
- if (encoding != null)
- source.setEncoding (encoding);
+ encoding = Resolver.getEncoding (conn.getContentType ());
+ if (encoding != null)
+ source.setEncoding (encoding);
- producer = XMLReaderFactory.createXMLReader ();
- producer.setErrorHandler (getErrorHandler ());
- EventFilter.bind (producer, next);
- producer.parse (source);
- conn = null;
+ producer = XMLReaderFactory.createXMLReader ();
+ producer.setErrorHandler (getErrorHandler ());
+ EventFilter.bind (producer, next);
+ producer.parse (source);
+ conn = null;
- } catch (IOException e) {
- fatal ("I/O Exception reading response, " + e.getMessage (), e);
- }
- }
+ } catch (IOException e) {
+ fatal ("I/O Exception reading response, " + e.getMessage (), e);
+ }
+ }
}
}
diff --git a/gnu/xml/pipeline/DomConsumer.java b/gnu/xml/pipeline/DomConsumer.java
index 53f7f24a2..141f36eca 100644
--- a/gnu/xml/pipeline/DomConsumer.java
+++ b/gnu/xml/pipeline/DomConsumer.java
@@ -1,4 +1,4 @@
-/* DomConsumer.java --
+/* DomConsumer.java --
Copyright (C) 1999,2000,2001 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -105,17 +105,17 @@ import org.w3c.dom.Text;
*/
public class DomConsumer implements EventConsumer
{
- private Class domImpl;
+ private Class domImpl;
- private boolean hidingCDATA = true;
- private boolean hidingComments = true;
- private boolean hidingWhitespace = true;
- private boolean hidingReferences = true;
+ private boolean hidingCDATA = true;
+ private boolean hidingComments = true;
+ private boolean hidingWhitespace = true;
+ private boolean hidingReferences = true;
- private Handler handler;
- private ErrorHandler errHandler;
+ private Handler handler;
+ private ErrorHandler errHandler;
- private EventConsumer next;
+ private EventConsumer next;
// FIXME: this can't be a generic pipeline stage just now,
// since its input became a Class not a String (to be turned
@@ -127,16 +127,16 @@ public class DomConsumer implements EventConsumer
* of DOM when constructing its result value.
*
* @param impl class implementing {@link org.w3c.dom.Document Document}
- * which publicly exposes a default constructor
+ * which publicly exposes a default constructor
*
* @exception SAXException when there is a problem creating an
- * empty DOM document using the specified implementation
+ * empty DOM document using the specified implementation
*/
public DomConsumer (Class impl)
throws SAXException
{
- domImpl = impl;
- handler = new Handler (this);
+ domImpl = impl;
+ handler = new Handler (this);
}
/**
@@ -148,22 +148,22 @@ public class DomConsumer implements EventConsumer
*/
protected void setHandler (Handler h)
{
- handler = h;
+ handler = h;
}
private Document emptyDocument ()
throws SAXException
{
- try {
- return (Document) domImpl.newInstance ();
- } catch (IllegalAccessException e) {
- throw new SAXException ("can't access constructor: "
- + e.getMessage ());
- } catch (InstantiationException e) {
- throw new SAXException ("can't instantiate Document: "
- + e.getMessage ());
- }
+ try {
+ return (Document) domImpl.newInstance ();
+ } catch (IllegalAccessException e) {
+ throw new SAXException ("can't access constructor: "
+ + e.getMessage ());
+ } catch (InstantiationException e) {
+ throw new SAXException ("can't instantiate Document: "
+ + e.getMessage ());
+ }
}
@@ -178,18 +178,18 @@ public class DomConsumer implements EventConsumer
* copy of the input event stream, use a {@link TeeConsumer}.
*
* @param impl class implementing {@link org.w3c.dom.Document Document}
- * which publicly exposes a default constructor
+ * which publicly exposes a default constructor
* @param next receives a "replayed" sequence of parse events when
- * the <em>endDocument</em> method is invoked.
+ * the <em>endDocument</em> method is invoked.
*
* @exception SAXException when there is a problem creating an
- * empty DOM document using the specified DOM implementation
+ * empty DOM document using the specified DOM implementation
*/
public DomConsumer (Class impl, EventConsumer n)
throws SAXException
{
- this (impl);
- next = n;
+ this (impl);
+ next = n;
}
@@ -197,16 +197,16 @@ public class DomConsumer implements EventConsumer
* Returns the document constructed from the preceding
* sequence of events. This method should not be
* used again until another sequence of events has been
- * given to this EventConsumer.
+ * given to this EventConsumer.
*/
final public Document getDocument ()
{
- return handler.clearDocument ();
+ return handler.clearDocument ();
}
public void setErrorHandler (ErrorHandler handler)
{
- errHandler = handler;
+ errHandler = handler;
}
@@ -219,8 +219,8 @@ public class DomConsumer implements EventConsumer
*
* @see #setHidingReferences
*/
- final public boolean isHidingReferences ()
- { return hidingReferences; }
+ final public boolean isHidingReferences ()
+ { return hidingReferences; }
/**
* Controls whether the consumer will hide entity expansions,
@@ -229,9 +229,9 @@ public class DomConsumer implements EventConsumer
* @see #isHidingReferences
* @param flag False if entity reference nodes will appear
*/
- final public void setHidingReferences (boolean flag)
- { hidingReferences = flag; }
-
+ final public void setHidingReferences (boolean flag)
+ { hidingReferences = flag; }
+
/**
* Returns true if the consumer is hiding comments (the default),
@@ -240,7 +240,7 @@ public class DomConsumer implements EventConsumer
* @see #setHidingComments
*/
public final boolean isHidingComments ()
- { return hidingComments; }
+ { return hidingComments; }
/**
* Controls whether the consumer is hiding comments.
@@ -248,7 +248,7 @@ public class DomConsumer implements EventConsumer
* @see #isHidingComments
*/
public final void setHidingComments (boolean flag)
- { hidingComments = flag; }
+ { hidingComments = flag; }
/**
@@ -259,7 +259,7 @@ public class DomConsumer implements EventConsumer
* @see #setHidingWhitespace
*/
public final boolean isHidingWhitespace ()
- { return hidingWhitespace; }
+ { return hidingWhitespace; }
/**
* Controls whether the consumer hides ignorable whitespace
@@ -267,7 +267,7 @@ public class DomConsumer implements EventConsumer
* @see #isHidingComments
*/
public final void setHidingWhitespace (boolean flag)
- { hidingWhitespace = flag; }
+ { hidingWhitespace = flag; }
/**
@@ -276,28 +276,28 @@ public class DomConsumer implements EventConsumer
*
* @see #setHidingCDATA
*/
- final public boolean isHidingCDATA ()
- { return hidingCDATA; }
+ final public boolean isHidingCDATA ()
+ { return hidingCDATA; }
/**
* Controls whether the consumer will save CDATA boundaries.
*
* @see #isHidingCDATA
* @param flag True to treat CDATA text differently from other
- * text nodes
+ * text nodes
*/
- final public void setHidingCDATA (boolean flag)
- { hidingCDATA = flag; }
-
+ final public void setHidingCDATA (boolean flag)
+ { hidingCDATA = flag; }
+
/** Returns the document handler being used. */
final public ContentHandler getContentHandler ()
- { return handler; }
+ { return handler; }
/** Returns the DTD handler being used. */
final public DTDHandler getDTDHandler ()
- { return handler; }
+ { return handler; }
/**
* Returns the lexical handler being used.
@@ -306,11 +306,11 @@ public class DomConsumer implements EventConsumer
final public Object getProperty (String id)
throws SAXNotRecognizedException
{
- if ("http://xml.org/sax/properties/lexical-handler".equals (id))
- return handler;
- if ("http://xml.org/sax/properties/declaration-handler".equals (id))
- return handler;
- throw new SAXNotRecognizedException (id);
+ if ("http://xml.org/sax/properties/lexical-handler".equals (id))
+ return handler;
+ if ("http://xml.org/sax/properties/declaration-handler".equals (id))
+ return handler;
+ throw new SAXNotRecognizedException (id);
}
EventConsumer getNext () { return next; }
@@ -320,7 +320,7 @@ public class DomConsumer implements EventConsumer
/**
* Class used to intercept various parsing events and use them to
* populate a DOM document. Subclasses would typically know and use
- * backdoors into specific DOM implementations, used to implement
+ * backdoors into specific DOM implementations, used to implement
* DTD-related functionality.
*
* <p> Note that if this ever throws a DOMException (runtime exception)
@@ -329,639 +329,639 @@ public class DomConsumer implements EventConsumer
* accepted illegal input data). </p>
*/
public static class Handler
- implements ContentHandler, LexicalHandler,
- DTDHandler, DeclHandler
+ implements ContentHandler, LexicalHandler,
+ DTDHandler, DeclHandler
{
- protected DomConsumer consumer;
-
- private DOMImplementation impl;
- private Document document;
- private boolean isL2;
-
- private Locator locator;
- private Node top;
- private boolean inCDATA;
- private boolean mergeCDATA;
- private boolean inDTD;
- private String currentEntity;
-
- private boolean recreatedAttrs;
- private AttributesImpl attributes = new AttributesImpl ();
-
- /**
- * Subclasses may use SAX2 events to provide additional
- * behaviors in the resulting DOM.
- */
- protected Handler (DomConsumer consumer)
- throws SAXException
- {
- this.consumer = consumer;
- document = consumer.emptyDocument ();
- impl = document.getImplementation ();
- isL2 = impl.hasFeature ("XML", "2.0");
- }
-
- private void fatal (String message, Exception x)
- throws SAXException
- {
- SAXParseException e;
- ErrorHandler errHandler = consumer.getErrorHandler ();
-
- if (locator == null)
- e = new SAXParseException (message, null, null, -1, -1, x);
- else
- e = new SAXParseException (message, locator, x);
- if (errHandler != null)
- errHandler.fatalError (e);
- throw e;
- }
-
- /**
- * Returns and forgets the document produced. If the handler is
- * reused, a new document may be created.
- */
- Document clearDocument ()
- {
- Document retval = document;
- document = null;
- locator = null;
- return retval;
- }
-
- /**
- * Returns the document under construction.
- */
- protected Document getDocument ()
- { return document; }
-
- /**
- * Returns the current node being populated. This is usually
- * an Element or Document, but it might be an EntityReference
- * node if some implementation-specific code knows how to put
- * those into the result tree and later mark them as readonly.
- */
- protected Node getTop ()
- { return top; }
-
-
- // SAX1
- public void setDocumentLocator (Locator locator)
- {
- this.locator = locator;
- }
-
- // SAX1
- public void startDocument ()
- throws SAXException
- {
- if (document == null)
- try {
- if (isL2) {
- // couple to original implementation
- document = impl.createDocument (null, "foo", null);
- document.removeChild (document.getFirstChild ());
- } else {
- document = consumer.emptyDocument ();
- }
- } catch (Exception e) {
- fatal ("DOM create document", e);
- }
- top = document;
- }
-
- // SAX1
- public void endDocument ()
- throws SAXException
- {
- try {
- if (consumer.getNext () != null && document != null) {
- DomParser parser = new DomParser (document);
-
- EventFilter.bind (parser, consumer.getNext ());
- parser.parse ("ignored");
- }
- } finally {
- top = null;
- }
- }
-
- // SAX1
- public void processingInstruction (String target, String data)
- throws SAXException
- {
- // we can't create populated entity ref nodes using
- // only public DOM APIs (they've got to be readonly)
- if (currentEntity != null)
- return;
-
- ProcessingInstruction pi;
-
- if (isL2
- // && consumer.isUsingNamespaces ()
- && target.indexOf (':') != -1)
- namespaceError (
- "PI target name is namespace nonconformant: "
- + target);
- if (inDTD)
- return;
- pi = document.createProcessingInstruction (target, data);
- top.appendChild (pi);
- }
-
- /**
- * Subclasses may overrride this method to provide a more efficient
- * way to construct text nodes.
- * Typically, copying the text into a single character array will
- * be more efficient than doing that as well as allocating other
- * needed for a String, including an internal StringBuffer.
- * Those additional memory and CPU costs can be incurred later,
- * if ever needed.
- * Unfortunately the standard DOM factory APIs encourage those costs
- * to be incurred early.
- */
- protected Text createText (
- boolean isCDATA,
- char ch [],
- int start,
- int length
- ) {
- String value = new String (ch, start, length);
-
- if (isCDATA)
- return document.createCDATASection (value);
- else
- return document.createTextNode (value);
- }
-
- // SAX1
- public void characters (char ch [], int start, int length)
- throws SAXException
- {
- // we can't create populated entity ref nodes using
- // only public DOM APIs (they've got to be readonly
- // at creation time)
- if (currentEntity != null)
- return;
-
- Node lastChild = top.getLastChild ();
-
- // merge consecutive text or CDATA nodes if appropriate.
- if (lastChild instanceof Text) {
- if (consumer.isHidingCDATA ()
- // consecutive Text content ... always merge
- || (!inCDATA
- && !(lastChild instanceof CDATASection))
- // consecutive CDATASection content ... don't
- // merge between sections, only within them
- || (inCDATA && mergeCDATA
- && lastChild instanceof CDATASection)
- ) {
- CharacterData last = (CharacterData) lastChild;
- String value = new String (ch, start, length);
-
- last.appendData (value);
- return;
- }
- }
- if (inCDATA && !consumer.isHidingCDATA ()) {
- top.appendChild (createText (true, ch, start, length));
- mergeCDATA = true;
- } else
- top.appendChild (createText (false, ch, start, length));
- }
-
- // SAX2
- public void skippedEntity (String name)
- throws SAXException
- {
- // this callback is useless except to report errors, since
- // we can't know if the ref was in content, within an
- // attribute, within a declaration ... only one of those
- // cases supports more intelligent action than a panic.
- fatal ("skipped entity: " + name, null);
- }
-
- // SAX2
- public void startPrefixMapping (String prefix, String uri)
- throws SAXException
- {
- // reconstruct "xmlns" attributes deleted by all
- // SAX2 parsers without "namespace-prefixes" = true
- if ("".equals (prefix))
- attributes.addAttribute ("", "", "xmlns",
- "CDATA", uri);
- else
- attributes.addAttribute ("", "", "xmlns:" + prefix,
- "CDATA", uri);
- recreatedAttrs = true;
- }
-
- // SAX2
- public void endPrefixMapping (String prefix)
- throws SAXException
- { }
-
- // SAX2
- public void startElement (
- String uri,
- String localName,
- String qName,
- Attributes atts
- ) throws SAXException
- {
- // we can't create populated entity ref nodes using
- // only public DOM APIs (they've got to be readonly)
- if (currentEntity != null)
- return;
-
- // parser discarded basic information; DOM tree isn't writable
- // without massaging to assign prefixes to all nodes.
- // the "NSFilter" class does that massaging.
- if (qName.length () == 0)
- qName = localName;
-
-
- Element element;
- int length = atts.getLength ();
-
- if (!isL2) {
- element = document.createElement (qName);
-
- // first the explicit attributes ...
- length = atts.getLength ();
- for (int i = 0; i < length; i++)
- element.setAttribute (atts.getQName (i),
- atts.getValue (i));
- // ... then any recreated ones (DOM deletes duplicates)
- if (recreatedAttrs) {
- recreatedAttrs = false;
- length = attributes.getLength ();
- for (int i = 0; i < length; i++)
- element.setAttribute (attributes.getQName (i),
- attributes.getValue (i));
- attributes.clear ();
- }
-
- top.appendChild (element);
- top = element;
- return;
- }
-
- // For an L2 DOM when namespace use is enabled, use
- // createElementNS/createAttributeNS except when
- // (a) it's an element in the default namespace, or
- // (b) it's an attribute with no prefix
- String namespace;
-
- if (localName.length () != 0)
- namespace = (uri.length () == 0) ? null : uri;
- else
- namespace = getNamespace (getPrefix (qName), atts);
-
- if (namespace == null)
- element = document.createElement (qName);
- else
- element = document.createElementNS (namespace, qName);
-
- populateAttributes (element, atts);
- if (recreatedAttrs) {
- recreatedAttrs = false;
- // ... DOM deletes any duplicates
- populateAttributes (element, attributes);
- attributes.clear ();
- }
-
- top.appendChild (element);
- top = element;
- }
-
- final static String xmlnsURI = "http://www.w3.org/2000/xmlns/";
-
- private void populateAttributes (Element element, Attributes attrs)
- throws SAXParseException
- {
- int length = attrs.getLength ();
-
- for (int i = 0; i < length; i++) {
- String type = attrs.getType (i);
- String value = attrs.getValue (i);
- String name = attrs.getQName (i);
- String local = attrs.getLocalName (i);
- String uri = attrs.getURI (i);
-
- // parser discarded basic information, DOM tree isn't writable
- if (name.length () == 0)
- name = local;
-
- // all attribute types other than these three may not
- // contain scoped names... enumerated attributes get
- // reported as NMTOKEN, except for NOTATION values
- if (!("CDATA".equals (type)
- || "NMTOKEN".equals (type)
- || "NMTOKENS".equals (type))) {
- if (value.indexOf (':') != -1) {
- namespaceError (
- "namespace nonconformant attribute value: "
- + "<" + element.getNodeName ()
- + " " + name + "='" + value + "' ...>");
- }
- }
-
- // xmlns="" is legal (undoes default NS)
- // xmlns:foo="" is illegal
- String prefix = getPrefix (name);
- String namespace;
-
- if ("xmlns".equals (prefix)) {
- if ("".equals (value))
- namespaceError ("illegal null namespace decl, " + name);
- namespace = xmlnsURI;
- } else if ("xmlns".equals (name))
- namespace = xmlnsURI;
-
- else if (prefix == null)
- namespace = null;
- else if (!"".equals(uri) && uri.length () != 0)
- namespace = uri;
- else
- namespace = getNamespace (prefix, attrs);
-
- if (namespace == null)
- element.setAttribute (name, value);
- else
- element.setAttributeNS (namespace, name, value);
- }
- }
-
- private String getPrefix (String name)
- {
- int temp;
-
- if ((temp = name.indexOf (':')) > 0)
- return name.substring (0, temp);
- return null;
- }
-
- // used with SAX1-level parser output
- private String getNamespace (String prefix, Attributes attrs)
- throws SAXParseException
- {
- String namespace;
- String decl;
-
- // defaulting
- if (prefix == null) {
- decl = "xmlns";
- namespace = attrs.getValue (decl);
- if ("".equals (namespace))
- return null;
- else if (namespace != null)
- return namespace;
-
- // "xmlns" is like a keyword
- // ... according to the Namespace REC, but DOM L2 CR2+
- // and Infoset violate that by assigning a namespace.
- // that conflict is resolved elsewhere.
- } else if ("xmlns".equals (prefix))
- return null;
-
- // "xml" prefix is fixed
- else if ("xml".equals (prefix))
- return "http://www.w3.org/XML/1998/namespace";
-
- // otherwise, expect a declaration
- else {
- decl = "xmlns:" + prefix;
- namespace = attrs.getValue (decl);
- }
-
- // if we found a local declaration, great
- if (namespace != null)
- return namespace;
-
-
- // ELSE ... search up the tree we've been building
- for (Node n = top;
- n != null && n.getNodeType () != Node.DOCUMENT_NODE;
- n = n.getParentNode ()) {
- if (n.getNodeType () == Node.ENTITY_REFERENCE_NODE)
- continue;
- Element e = (Element) n;
- Attr attr = e.getAttributeNode (decl);
- if (attr != null)
- return attr.getNodeValue ();
- }
- // see above re "xmlns" as keyword
- if ("xmlns".equals (decl))
- return null;
-
- namespaceError ("Undeclared namespace prefix: " + prefix);
- return null;
- }
-
- // SAX2
- public void endElement (String uri, String localName, String qName)
- throws SAXException
- {
- // we can't create populated entity ref nodes using
- // only public DOM APIs (they've got to be readonly)
- if (currentEntity != null)
- return;
-
- top = top.getParentNode ();
- }
-
- // SAX1 (mandatory reporting if validating)
- public void ignorableWhitespace (char ch [], int start, int length)
- throws SAXException
- {
- if (consumer.isHidingWhitespace ())
- return;
- characters (ch, start, length);
- }
-
- // SAX2 lexical event
- public void startCDATA ()
- throws SAXException
- {
- inCDATA = true;
- // true except for the first fragment of a cdata section
- mergeCDATA = false;
- }
-
- // SAX2 lexical event
- public void endCDATA ()
- throws SAXException
- {
- inCDATA = false;
- }
-
- // SAX2 lexical event
- //
- // this SAX2 callback merges two unrelated things:
- // - Declaration of the root element type ... belongs with
- // the other DTD declaration methods, NOT HERE.
- // - IDs for the optional external subset ... belongs here
- // with other lexical information.
- //
- // ...and it doesn't include the internal DTD subset, desired
- // both to support DOM L2 and to enable "pass through" processing
- //
- public void startDTD (String name, String publicId, String SystemId)
- throws SAXException
- {
- // need to filter out comments and PIs within the DTD
- inDTD = true;
- }
-
- // SAX2 lexical event
- public void endDTD ()
- throws SAXException
- {
- inDTD = false;
- }
-
- // SAX2 lexical event
- public void comment (char ch [], int start, int length)
- throws SAXException
- {
- Node comment;
-
- // we can't create populated entity ref nodes using
- // only public DOM APIs (they've got to be readonly)
- if (consumer.isHidingComments ()
- || inDTD
- || currentEntity != null)
- return;
- comment = document.createComment (new String (ch, start, length));
- top.appendChild (comment);
- }
-
- /**
- * May be overridden by subclasses to return true, indicating
- * that entity reference nodes can be populated and then made
- * read-only.
- */
- public boolean canPopulateEntityRefs ()
- { return false; }
-
- // SAX2 lexical event
- public void startEntity (String name)
- throws SAXException
- {
- // are we ignoring what would be contents of an
- // entity ref, since we can't populate it?
- if (currentEntity != null)
- return;
-
- // Are we hiding all entity boundaries?
- if (consumer.isHidingReferences ())
- return;
-
- // SAX2 shows parameter entities; DOM hides them
- if (name.charAt (0) == '%' || "[dtd]".equals (name))
- return;
-
- // Since we can't create a populated entity ref node in any
- // standard way, we create an unpopulated one.
- EntityReference ref = document.createEntityReference (name);
- top.appendChild (ref);
- top = ref;
-
- // ... allowing subclasses to populate them
- if (!canPopulateEntityRefs ())
- currentEntity = name;
- }
-
- // SAX2 lexical event
- public void endEntity (String name)
- throws SAXException
- {
- if (name.charAt (0) == '%' || "[dtd]".equals (name))
- return;
- if (name.equals (currentEntity))
- currentEntity = null;
- if (!consumer.isHidingReferences ())
- top = top.getParentNode ();
- }
-
-
- // SAX1 DTD event
- public void notationDecl (
- String name,
- String publicId, String SystemId
- ) throws SAXException
- {
- /* IGNORE -- no public DOM API lets us store these
- * into the doctype node
- */
- }
-
- // SAX1 DTD event
- public void unparsedEntityDecl (
- String name,
- String publicId, String SystemId,
- String notationName
- ) throws SAXException
- {
- /* IGNORE -- no public DOM API lets us store these
- * into the doctype node
- */
- }
-
- // SAX2 declaration event
- public void elementDecl (String name, String model)
- throws SAXException
- {
- /* IGNORE -- no content model support in DOM L2 */
- }
-
- // SAX2 declaration event
- public void attributeDecl (
- String eName,
- String aName,
- String type,
- String mode,
- String value
- ) throws SAXException
- {
- /* IGNORE -- no attribute model support in DOM L2 */
- }
-
- // SAX2 declaration event
- public void internalEntityDecl (String name, String value)
- throws SAXException
- {
- /* IGNORE -- no public DOM API lets us store these
- * into the doctype node
- */
- }
-
- // SAX2 declaration event
- public void externalEntityDecl (
- String name,
- String publicId,
- String SystemId
- ) throws SAXException
- {
- /* IGNORE -- no public DOM API lets us store these
- * into the doctype node
- */
- }
-
- //
- // These really should offer the option of nonfatal handling,
- // like other validity errors, though that would cause major
- // chaos in the DOM data structures. DOM is already spec'd
- // to treat many of these as fatal, so this is consistent.
- //
- private void namespaceError (String description)
- throws SAXParseException
- {
- SAXParseException err;
-
- err = new SAXParseException (description, locator);
- throw err;
- }
+ protected DomConsumer consumer;
+
+ private DOMImplementation impl;
+ private Document document;
+ private boolean isL2;
+
+ private Locator locator;
+ private Node top;
+ private boolean inCDATA;
+ private boolean mergeCDATA;
+ private boolean inDTD;
+ private String currentEntity;
+
+ private boolean recreatedAttrs;
+ private AttributesImpl attributes = new AttributesImpl ();
+
+ /**
+ * Subclasses may use SAX2 events to provide additional
+ * behaviors in the resulting DOM.
+ */
+ protected Handler (DomConsumer consumer)
+ throws SAXException
+ {
+ this.consumer = consumer;
+ document = consumer.emptyDocument ();
+ impl = document.getImplementation ();
+ isL2 = impl.hasFeature ("XML", "2.0");
+ }
+
+ private void fatal (String message, Exception x)
+ throws SAXException
+ {
+ SAXParseException e;
+ ErrorHandler errHandler = consumer.getErrorHandler ();
+
+ if (locator == null)
+ e = new SAXParseException (message, null, null, -1, -1, x);
+ else
+ e = new SAXParseException (message, locator, x);
+ if (errHandler != null)
+ errHandler.fatalError (e);
+ throw e;
+ }
+
+ /**
+ * Returns and forgets the document produced. If the handler is
+ * reused, a new document may be created.
+ */
+ Document clearDocument ()
+ {
+ Document retval = document;
+ document = null;
+ locator = null;
+ return retval;
+ }
+
+ /**
+ * Returns the document under construction.
+ */
+ protected Document getDocument ()
+ { return document; }
+
+ /**
+ * Returns the current node being populated. This is usually
+ * an Element or Document, but it might be an EntityReference
+ * node if some implementation-specific code knows how to put
+ * those into the result tree and later mark them as readonly.
+ */
+ protected Node getTop ()
+ { return top; }
+
+
+ // SAX1
+ public void setDocumentLocator (Locator locator)
+ {
+ this.locator = locator;
+ }
+
+ // SAX1
+ public void startDocument ()
+ throws SAXException
+ {
+ if (document == null)
+ try {
+ if (isL2) {
+ // couple to original implementation
+ document = impl.createDocument (null, "foo", null);
+ document.removeChild (document.getFirstChild ());
+ } else {
+ document = consumer.emptyDocument ();
+ }
+ } catch (Exception e) {
+ fatal ("DOM create document", e);
+ }
+ top = document;
+ }
+
+ // SAX1
+ public void endDocument ()
+ throws SAXException
+ {
+ try {
+ if (consumer.getNext () != null && document != null) {
+ DomParser parser = new DomParser (document);
+
+ EventFilter.bind (parser, consumer.getNext ());
+ parser.parse ("ignored");
+ }
+ } finally {
+ top = null;
+ }
+ }
+
+ // SAX1
+ public void processingInstruction (String target, String data)
+ throws SAXException
+ {
+ // we can't create populated entity ref nodes using
+ // only public DOM APIs (they've got to be readonly)
+ if (currentEntity != null)
+ return;
+
+ ProcessingInstruction pi;
+
+ if (isL2
+ // && consumer.isUsingNamespaces ()
+ && target.indexOf (':') != -1)
+ namespaceError (
+ "PI target name is namespace nonconformant: "
+ + target);
+ if (inDTD)
+ return;
+ pi = document.createProcessingInstruction (target, data);
+ top.appendChild (pi);
+ }
+
+ /**
+ * Subclasses may overrride this method to provide a more efficient
+ * way to construct text nodes.
+ * Typically, copying the text into a single character array will
+ * be more efficient than doing that as well as allocating other
+ * needed for a String, including an internal StringBuffer.
+ * Those additional memory and CPU costs can be incurred later,
+ * if ever needed.
+ * Unfortunately the standard DOM factory APIs encourage those costs
+ * to be incurred early.
+ */
+ protected Text createText (
+ boolean isCDATA,
+ char ch [],
+ int start,
+ int length
+ ) {
+ String value = new String (ch, start, length);
+
+ if (isCDATA)
+ return document.createCDATASection (value);
+ else
+ return document.createTextNode (value);
+ }
+
+ // SAX1
+ public void characters (char ch [], int start, int length)
+ throws SAXException
+ {
+ // we can't create populated entity ref nodes using
+ // only public DOM APIs (they've got to be readonly
+ // at creation time)
+ if (currentEntity != null)
+ return;
+
+ Node lastChild = top.getLastChild ();
+
+ // merge consecutive text or CDATA nodes if appropriate.
+ if (lastChild instanceof Text) {
+ if (consumer.isHidingCDATA ()
+ // consecutive Text content ... always merge
+ || (!inCDATA
+ && !(lastChild instanceof CDATASection))
+ // consecutive CDATASection content ... don't
+ // merge between sections, only within them
+ || (inCDATA && mergeCDATA
+ && lastChild instanceof CDATASection)
+ ) {
+ CharacterData last = (CharacterData) lastChild;
+ String value = new String (ch, start, length);
+
+ last.appendData (value);
+ return;
+ }
+ }
+ if (inCDATA && !consumer.isHidingCDATA ()) {
+ top.appendChild (createText (true, ch, start, length));
+ mergeCDATA = true;
+ } else
+ top.appendChild (createText (false, ch, start, length));
+ }
+
+ // SAX2
+ public void skippedEntity (String name)
+ throws SAXException
+ {
+ // this callback is useless except to report errors, since
+ // we can't know if the ref was in content, within an
+ // attribute, within a declaration ... only one of those
+ // cases supports more intelligent action than a panic.
+ fatal ("skipped entity: " + name, null);
+ }
+
+ // SAX2
+ public void startPrefixMapping (String prefix, String uri)
+ throws SAXException
+ {
+ // reconstruct "xmlns" attributes deleted by all
+ // SAX2 parsers without "namespace-prefixes" = true
+ if ("".equals (prefix))
+ attributes.addAttribute ("", "", "xmlns",
+ "CDATA", uri);
+ else
+ attributes.addAttribute ("", "", "xmlns:" + prefix,
+ "CDATA", uri);
+ recreatedAttrs = true;
+ }
+
+ // SAX2
+ public void endPrefixMapping (String prefix)
+ throws SAXException
+ { }
+
+ // SAX2
+ public void startElement (
+ String uri,
+ String localName,
+ String qName,
+ Attributes atts
+ ) throws SAXException
+ {
+ // we can't create populated entity ref nodes using
+ // only public DOM APIs (they've got to be readonly)
+ if (currentEntity != null)
+ return;
+
+ // parser discarded basic information; DOM tree isn't writable
+ // without massaging to assign prefixes to all nodes.
+ // the "NSFilter" class does that massaging.
+ if (qName.length () == 0)
+ qName = localName;
+
+
+ Element element;
+ int length = atts.getLength ();
+
+ if (!isL2) {
+ element = document.createElement (qName);
+
+ // first the explicit attributes ...
+ length = atts.getLength ();
+ for (int i = 0; i < length; i++)
+ element.setAttribute (atts.getQName (i),
+ atts.getValue (i));
+ // ... then any recreated ones (DOM deletes duplicates)
+ if (recreatedAttrs) {
+ recreatedAttrs = false;
+ length = attributes.getLength ();
+ for (int i = 0; i < length; i++)
+ element.setAttribute (attributes.getQName (i),
+ attributes.getValue (i));
+ attributes.clear ();
+ }
+
+ top.appendChild (element);
+ top = element;
+ return;
+ }
+
+ // For an L2 DOM when namespace use is enabled, use
+ // createElementNS/createAttributeNS except when
+ // (a) it's an element in the default namespace, or
+ // (b) it's an attribute with no prefix
+ String namespace;
+
+ if (localName.length () != 0)
+ namespace = (uri.length () == 0) ? null : uri;
+ else
+ namespace = getNamespace (getPrefix (qName), atts);
+
+ if (namespace == null)
+ element = document.createElement (qName);
+ else
+ element = document.createElementNS (namespace, qName);
+
+ populateAttributes (element, atts);
+ if (recreatedAttrs) {
+ recreatedAttrs = false;
+ // ... DOM deletes any duplicates
+ populateAttributes (element, attributes);
+ attributes.clear ();
+ }
+
+ top.appendChild (element);
+ top = element;
+ }
+
+ final static String xmlnsURI = "http://www.w3.org/2000/xmlns/";
+
+ private void populateAttributes (Element element, Attributes attrs)
+ throws SAXParseException
+ {
+ int length = attrs.getLength ();
+
+ for (int i = 0; i < length; i++) {
+ String type = attrs.getType (i);
+ String value = attrs.getValue (i);
+ String name = attrs.getQName (i);
+ String local = attrs.getLocalName (i);
+ String uri = attrs.getURI (i);
+
+ // parser discarded basic information, DOM tree isn't writable
+ if (name.length () == 0)
+ name = local;
+
+ // all attribute types other than these three may not
+ // contain scoped names... enumerated attributes get
+ // reported as NMTOKEN, except for NOTATION values
+ if (!("CDATA".equals (type)
+ || "NMTOKEN".equals (type)
+ || "NMTOKENS".equals (type))) {
+ if (value.indexOf (':') != -1) {
+ namespaceError (
+ "namespace nonconformant attribute value: "
+ + "<" + element.getNodeName ()
+ + " " + name + "='" + value + "' ...>");
+ }
+ }
+
+ // xmlns="" is legal (undoes default NS)
+ // xmlns:foo="" is illegal
+ String prefix = getPrefix (name);
+ String namespace;
+
+ if ("xmlns".equals (prefix)) {
+ if ("".equals (value))
+ namespaceError ("illegal null namespace decl, " + name);
+ namespace = xmlnsURI;
+ } else if ("xmlns".equals (name))
+ namespace = xmlnsURI;
+
+ else if (prefix == null)
+ namespace = null;
+ else if (!"".equals(uri) && uri.length () != 0)
+ namespace = uri;
+ else
+ namespace = getNamespace (prefix, attrs);
+
+ if (namespace == null)
+ element.setAttribute (name, value);
+ else
+ element.setAttributeNS (namespace, name, value);
+ }
+ }
+
+ private String getPrefix (String name)
+ {
+ int temp;
+
+ if ((temp = name.indexOf (':')) > 0)
+ return name.substring (0, temp);
+ return null;
+ }
+
+ // used with SAX1-level parser output
+ private String getNamespace (String prefix, Attributes attrs)
+ throws SAXParseException
+ {
+ String namespace;
+ String decl;
+
+ // defaulting
+ if (prefix == null) {
+ decl = "xmlns";
+ namespace = attrs.getValue (decl);
+ if ("".equals (namespace))
+ return null;
+ else if (namespace != null)
+ return namespace;
+
+ // "xmlns" is like a keyword
+ // ... according to the Namespace REC, but DOM L2 CR2+
+ // and Infoset violate that by assigning a namespace.
+ // that conflict is resolved elsewhere.
+ } else if ("xmlns".equals (prefix))
+ return null;
+
+ // "xml" prefix is fixed
+ else if ("xml".equals (prefix))
+ return "http://www.w3.org/XML/1998/namespace";
+
+ // otherwise, expect a declaration
+ else {
+ decl = "xmlns:" + prefix;
+ namespace = attrs.getValue (decl);
+ }
+
+ // if we found a local declaration, great
+ if (namespace != null)
+ return namespace;
+
+
+ // ELSE ... search up the tree we've been building
+ for (Node n = top;
+ n != null && n.getNodeType () != Node.DOCUMENT_NODE;
+ n = n.getParentNode ()) {
+ if (n.getNodeType () == Node.ENTITY_REFERENCE_NODE)
+ continue;
+ Element e = (Element) n;
+ Attr attr = e.getAttributeNode (decl);
+ if (attr != null)
+ return attr.getNodeValue ();
+ }
+ // see above re "xmlns" as keyword
+ if ("xmlns".equals (decl))
+ return null;
+
+ namespaceError ("Undeclared namespace prefix: " + prefix);
+ return null;
+ }
+
+ // SAX2
+ public void endElement (String uri, String localName, String qName)
+ throws SAXException
+ {
+ // we can't create populated entity ref nodes using
+ // only public DOM APIs (they've got to be readonly)
+ if (currentEntity != null)
+ return;
+
+ top = top.getParentNode ();
+ }
+
+ // SAX1 (mandatory reporting if validating)
+ public void ignorableWhitespace (char ch [], int start, int length)
+ throws SAXException
+ {
+ if (consumer.isHidingWhitespace ())
+ return;
+ characters (ch, start, length);
+ }
+
+ // SAX2 lexical event
+ public void startCDATA ()
+ throws SAXException
+ {
+ inCDATA = true;
+ // true except for the first fragment of a cdata section
+ mergeCDATA = false;
+ }
+
+ // SAX2 lexical event
+ public void endCDATA ()
+ throws SAXException
+ {
+ inCDATA = false;
+ }
+
+ // SAX2 lexical event
+ //
+ // this SAX2 callback merges two unrelated things:
+ // - Declaration of the root element type ... belongs with
+ // the other DTD declaration methods, NOT HERE.
+ // - IDs for the optional external subset ... belongs here
+ // with other lexical information.
+ //
+ // ...and it doesn't include the internal DTD subset, desired
+ // both to support DOM L2 and to enable "pass through" processing
+ //
+ public void startDTD (String name, String publicId, String SystemId)
+ throws SAXException
+ {
+ // need to filter out comments and PIs within the DTD
+ inDTD = true;
+ }
+
+ // SAX2 lexical event
+ public void endDTD ()
+ throws SAXException
+ {
+ inDTD = false;
+ }
+
+ // SAX2 lexical event
+ public void comment (char ch [], int start, int length)
+ throws SAXException
+ {
+ Node comment;
+
+ // we can't create populated entity ref nodes using
+ // only public DOM APIs (they've got to be readonly)
+ if (consumer.isHidingComments ()
+ || inDTD
+ || currentEntity != null)
+ return;
+ comment = document.createComment (new String (ch, start, length));
+ top.appendChild (comment);
+ }
+
+ /**
+ * May be overridden by subclasses to return true, indicating
+ * that entity reference nodes can be populated and then made
+ * read-only.
+ */
+ public boolean canPopulateEntityRefs ()
+ { return false; }
+
+ // SAX2 lexical event
+ public void startEntity (String name)
+ throws SAXException
+ {
+ // are we ignoring what would be contents of an
+ // entity ref, since we can't populate it?
+ if (currentEntity != null)
+ return;
+
+ // Are we hiding all entity boundaries?
+ if (consumer.isHidingReferences ())
+ return;
+
+ // SAX2 shows parameter entities; DOM hides them
+ if (name.charAt (0) == '%' || "[dtd]".equals (name))
+ return;
+
+ // Since we can't create a populated entity ref node in any
+ // standard way, we create an unpopulated one.
+ EntityReference ref = document.createEntityReference (name);
+ top.appendChild (ref);
+ top = ref;
+
+ // ... allowing subclasses to populate them
+ if (!canPopulateEntityRefs ())
+ currentEntity = name;
+ }
+
+ // SAX2 lexical event
+ public void endEntity (String name)
+ throws SAXException
+ {
+ if (name.charAt (0) == '%' || "[dtd]".equals (name))
+ return;
+ if (name.equals (currentEntity))
+ currentEntity = null;
+ if (!consumer.isHidingReferences ())
+ top = top.getParentNode ();
+ }
+
+
+ // SAX1 DTD event
+ public void notationDecl (
+ String name,
+ String publicId, String SystemId
+ ) throws SAXException
+ {
+ /* IGNORE -- no public DOM API lets us store these
+ * into the doctype node
+ */
+ }
+
+ // SAX1 DTD event
+ public void unparsedEntityDecl (
+ String name,
+ String publicId, String SystemId,
+ String notationName
+ ) throws SAXException
+ {
+ /* IGNORE -- no public DOM API lets us store these
+ * into the doctype node
+ */
+ }
+
+ // SAX2 declaration event
+ public void elementDecl (String name, String model)
+ throws SAXException
+ {
+ /* IGNORE -- no content model support in DOM L2 */
+ }
+
+ // SAX2 declaration event
+ public void attributeDecl (
+ String eName,
+ String aName,
+ String type,
+ String mode,
+ String value
+ ) throws SAXException
+ {
+ /* IGNORE -- no attribute model support in DOM L2 */
+ }
+
+ // SAX2 declaration event
+ public void internalEntityDecl (String name, String value)
+ throws SAXException
+ {
+ /* IGNORE -- no public DOM API lets us store these
+ * into the doctype node
+ */
+ }
+
+ // SAX2 declaration event
+ public void externalEntityDecl (
+ String name,
+ String publicId,
+ String SystemId
+ ) throws SAXException
+ {
+ /* IGNORE -- no public DOM API lets us store these
+ * into the doctype node
+ */
+ }
+
+ //
+ // These really should offer the option of nonfatal handling,
+ // like other validity errors, though that would cause major
+ // chaos in the DOM data structures. DOM is already spec'd
+ // to treat many of these as fatal, so this is consistent.
+ //
+ private void namespaceError (String description)
+ throws SAXParseException
+ {
+ SAXParseException err;
+
+ err = new SAXParseException (description, locator);
+ throw err;
+ }
}
}
diff --git a/gnu/xml/pipeline/EventConsumer.java b/gnu/xml/pipeline/EventConsumer.java
index 017bc7f74..a0a8824f7 100644
--- a/gnu/xml/pipeline/EventConsumer.java
+++ b/gnu/xml/pipeline/EventConsumer.java
@@ -1,4 +1,4 @@
-/* EventConsumer.java --
+/* EventConsumer.java --
Copyright (C) 1999,2000,2001 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -75,7 +75,7 @@ public interface EventConsumer
* @return The value of that property, if it is defined.
*
* @exception SAXNotRecognizedException Thrown if the particular
- * pipeline stage does not understand the specified identifier.
+ * pipeline stage does not understand the specified identifier.
*/
public Object getProperty (String id)
throws SAXNotRecognizedException;
diff --git a/gnu/xml/pipeline/EventFilter.java b/gnu/xml/pipeline/EventFilter.java
index af2113f97..b3cc2d654 100644
--- a/gnu/xml/pipeline/EventFilter.java
+++ b/gnu/xml/pipeline/EventFilter.java
@@ -1,4 +1,4 @@
-/* EventFilter.java --
+/* EventFilter.java --
Copyright (C) 1999,2000,2001 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -89,35 +89,35 @@ import org.xml.sax.helpers.XMLFilterImpl;
* {@link org.xml.sax.helpers.XMLFilterImpl XMLFilterImpl} class.
* Key differences include: <ul>
*
- * <li> This fully separates consumer and producer roles: it
- * does not implement the producer side <em>XMLReader</em> or
- * <em>EntityResolver</em> interfaces, so it can only be used
- * in "push" mode (it has no <em>parse()</em> methods).
+ * <li> This fully separates consumer and producer roles: it
+ * does not implement the producer side <em>XMLReader</em> or
+ * <em>EntityResolver</em> interfaces, so it can only be used
+ * in "push" mode (it has no <em>parse()</em> methods).
*
- * <li> "Extension" handlers are fully supported, enabling a
- * richer set of application requirements.
- * And it implements {@link EventConsumer}, which groups related
- * consumer methods together, rather than leaving them separated.
+ * <li> "Extension" handlers are fully supported, enabling a
+ * richer set of application requirements.
+ * And it implements {@link EventConsumer}, which groups related
+ * consumer methods together, rather than leaving them separated.
*
- * <li> The chaining which is visible is "downstream" to the next
- * consumer, not "upstream" to the preceding producer.
- * It supports "fan-in", where
- * a consumer can be fed by several producers. (For "fan-out",
- * see the {@link TeeConsumer} class.)
+ * <li> The chaining which is visible is "downstream" to the next
+ * consumer, not "upstream" to the preceding producer.
+ * It supports "fan-in", where
+ * a consumer can be fed by several producers. (For "fan-out",
+ * see the {@link TeeConsumer} class.)
*
- * <li> Event chaining is set up differently. It is intended to
- * work "upstream" from terminus towards producer, during filter
- * construction, as described above.
- * This is part of an early binding model:
- * events don't need to pass through stages which ignore them.
+ * <li> Event chaining is set up differently. It is intended to
+ * work "upstream" from terminus towards producer, during filter
+ * construction, as described above.
+ * This is part of an early binding model:
+ * events don't need to pass through stages which ignore them.
*
- * <li> ErrorHandler support is separated, on the grounds that
- * pipeline stages need to share the same error handling policy.
- * For the same reason, error handler setup goes "downstream":
- * when error handlers get set, they are passed to subsequent
- * consumers.
+ * <li> ErrorHandler support is separated, on the grounds that
+ * pipeline stages need to share the same error handling policy.
+ * For the same reason, error handler setup goes "downstream":
+ * when error handlers get set, they are passed to subsequent
+ * consumers.
*
- * </ul>
+ * </ul>
*
* <p> The {@link #chainTo chainTo()} convenience routine supports chaining to
* an XMLFilterImpl, in its role as a limited functionality event
@@ -137,34 +137,34 @@ import org.xml.sax.helpers.XMLFilterImpl;
*/
public class EventFilter
implements EventConsumer, ContentHandler, DTDHandler,
- LexicalHandler, DeclHandler
+ LexicalHandler, DeclHandler
{
// SAX handlers
- private ContentHandler docHandler, docNext;
- private DTDHandler dtdHandler, dtdNext;
- private LexicalHandler lexHandler, lexNext;
- private DeclHandler declHandler, declNext;
+ private ContentHandler docHandler, docNext;
+ private DTDHandler dtdHandler, dtdNext;
+ private LexicalHandler lexHandler, lexNext;
+ private DeclHandler declHandler, declNext;
// and ideally, one more for the stuff SAX2 doesn't show
- private Locator locator;
- private EventConsumer next;
- private ErrorHandler errHandler;
+ private Locator locator;
+ private EventConsumer next;
+ private ErrorHandler errHandler;
+
-
/** SAX2 URI prefix for standard feature flags. */
- public static final String FEATURE_URI
- = "http://xml.org/sax/features/";
+ public static final String FEATURE_URI
+ = "http://xml.org/sax/features/";
/** SAX2 URI prefix for standard properties (mostly for handlers). */
- public static final String PROPERTY_URI
- = "http://xml.org/sax/properties/";
+ public static final String PROPERTY_URI
+ = "http://xml.org/sax/properties/";
/** SAX2 property identifier for {@link DeclHandler} events */
- public static final String DECL_HANDLER
- = PROPERTY_URI + "declaration-handler";
+ public static final String DECL_HANDLER
+ = PROPERTY_URI + "declaration-handler";
/** SAX2 property identifier for {@link LexicalHandler} events */
- public static final String LEXICAL_HANDLER
- = PROPERTY_URI + "lexical-handler";
-
+ public static final String LEXICAL_HANDLER
+ = PROPERTY_URI + "lexical-handler";
+
//
// These class objects will be null if the relevant class isn't linked.
// Small configurations (pJava and some kinds of embedded systems) need
@@ -176,11 +176,11 @@ public class EventFilter
// that's associated with "this" class loader. But that wouldn't be true
// for classes in another package.
//
- private static boolean loaded;
- private static Class nsClass;
- private static Class validClass;
- private static Class wfClass;
- private static Class xincClass;
+ private static boolean loaded;
+ private static Class nsClass;
+ private static Class validClass;
+ private static Class wfClass;
+ private static Class xincClass;
static ClassLoader getClassLoader ()
{
@@ -206,25 +206,25 @@ public class EventFilter
static Class loadClass (ClassLoader classLoader, String className)
{
- try {
- if (classLoader == null)
- return Class.forName(className);
- else
- return classLoader.loadClass(className);
- } catch (Exception e) {
- return null;
- }
+ try {
+ if (classLoader == null)
+ return Class.forName(className);
+ else
+ return classLoader.loadClass(className);
+ } catch (Exception e) {
+ return null;
+ }
}
static private void loadClasses ()
{
- ClassLoader loader = getClassLoader ();
+ ClassLoader loader = getClassLoader ();
- nsClass = loadClass (loader, "gnu.xml.pipeline.NSFilter");
- validClass = loadClass (loader, "gnu.xml.pipeline.ValidationConsumer");
- wfClass = loadClass (loader, "gnu.xml.pipeline.WellFormednessFilter");
- xincClass = loadClass (loader, "gnu.xml.pipeline.XIncludeFilter");
- loaded = true;
+ nsClass = loadClass (loader, "gnu.xml.pipeline.NSFilter");
+ validClass = loadClass (loader, "gnu.xml.pipeline.ValidationConsumer");
+ wfClass = loadClass (loader, "gnu.xml.pipeline.WellFormednessFilter");
+ xincClass = loadClass (loader, "gnu.xml.pipeline.XIncludeFilter");
+ loaded = true;
}
@@ -246,146 +246,146 @@ public class EventFilter
* of the XMLReader implementation in use; for example, it permits
* validating output of a {@link gnu.xml.util.DomParser}. <ul>
*
- * <li> {@link NSFilter} will be removed if the producer can be
- * told not to discard namespace data, using the "namespace-prefixes"
- * feature flag.
+ * <li> {@link NSFilter} will be removed if the producer can be
+ * told not to discard namespace data, using the "namespace-prefixes"
+ * feature flag.
*
- * <li> {@link ValidationConsumer} will be removed if the producer
- * can be told to validate, using the "validation" feature flag.
+ * <li> {@link ValidationConsumer} will be removed if the producer
+ * can be told to validate, using the "validation" feature flag.
*
- * <li> {@link WellFormednessFilter} is always removed, on the
- * grounds that no XMLReader is permitted to producee malformed
- * event streams and this would just be processing overhead.
+ * <li> {@link WellFormednessFilter} is always removed, on the
+ * grounds that no XMLReader is permitted to producee malformed
+ * event streams and this would just be processing overhead.
*
- * <li> {@link XIncludeFilter} stops the special handling, except
- * that it's told about the "namespace-prefixes" feature of the
- * event producer so that the event stream is internally consistent.
+ * <li> {@link XIncludeFilter} stops the special handling, except
+ * that it's told about the "namespace-prefixes" feature of the
+ * event producer so that the event stream is internally consistent.
*
- * <li> The first consumer which is not one of those classes stops
- * such special handling. This means that if you want to force
- * one of those filters to be used, you could just precede it with
- * an instance of {@link EventFilter} configured as a pass-through.
- * You might need to do that if you are using an {@link NSFilter}
- * subclass to fix names found in attributes or character data.
+ * <li> The first consumer which is not one of those classes stops
+ * such special handling. This means that if you want to force
+ * one of those filters to be used, you could just precede it with
+ * an instance of {@link EventFilter} configured as a pass-through.
+ * You might need to do that if you are using an {@link NSFilter}
+ * subclass to fix names found in attributes or character data.
*
- * </ul>
+ * </ul>
*
* <p> Other than that, this method works with any kind of event consumer,
* not just event filters. Note that in all cases, the standard handlers
* are assigned; any previous handler assignments for the handler will
* be overridden.
*
- * @param producer will deliver events to the specified consumer
+ * @param producer will deliver events to the specified consumer
* @param consumer pipeline supplying event handlers to be associated
- * with the producer (may not be null)
+ * with the producer (may not be null)
*/
public static void bind (XMLReader producer, EventConsumer consumer)
{
- Class klass = null;
- boolean prefixes;
-
- if (!loaded)
- loadClasses ();
-
- // DOM building, printing, layered validation, and other
- // things don't work well when prefix info is discarded.
- // Include it by default, whenever possible.
- try {
- producer.setFeature (FEATURE_URI + "namespace-prefixes",
- true);
- prefixes = true;
- } catch (SAXException e) {
- prefixes = false;
- }
-
- // NOTE: This loop doesn't use "instanceof", since that
- // would prevent compiling/linking without those classes
- // being present.
- while (consumer != null) {
- klass = consumer.getClass ();
-
- // we might have already changed this problematic SAX2 default.
- if (nsClass != null && nsClass.isAssignableFrom (klass)) {
- if (!prefixes)
- break;
- consumer = ((EventFilter)consumer).getNext ();
-
- // the parser _might_ do DTD validation by default ...
- // if not, maybe we can change this setting.
- } else if (validClass != null
- && validClass.isAssignableFrom (klass)) {
- try {
- producer.setFeature (FEATURE_URI + "validation",
- true);
- consumer = ((ValidationConsumer)consumer).getNext ();
- } catch (SAXException e) {
- break;
- }
-
- // parsers are required not to have such bugs
- } else if (wfClass != null && wfClass.isAssignableFrom (klass)) {
- consumer = ((WellFormednessFilter)consumer).getNext ();
-
- // stop on the first pipeline stage we can't remove
- } else
- break;
-
- if (consumer == null)
- klass = null;
- }
-
- // the actual setting here doesn't matter as much
- // as that producer and consumer agree
- if (xincClass != null && klass != null
- && xincClass.isAssignableFrom (klass))
- ((XIncludeFilter)consumer).setSavingPrefixes (prefixes);
-
- // Some SAX parsers can't handle null handlers -- bleech
- DefaultHandler2 h = new DefaultHandler2 ();
-
- if (consumer != null && consumer.getContentHandler () != null)
- producer.setContentHandler (consumer.getContentHandler ());
- else
- producer.setContentHandler (h);
- if (consumer != null && consumer.getDTDHandler () != null)
- producer.setDTDHandler (consumer.getDTDHandler ());
- else
- producer.setDTDHandler (h);
-
- try {
- Object dh;
-
- if (consumer != null)
- dh = consumer.getProperty (DECL_HANDLER);
- else
- dh = null;
- if (dh == null)
- dh = h;
- producer.setProperty (DECL_HANDLER, dh);
- } catch (Exception e) { /* ignore */ }
- try {
- Object lh;
-
- if (consumer != null)
- lh = consumer.getProperty (LEXICAL_HANDLER);
- else
- lh = null;
- if (lh == null)
- lh = h;
- producer.setProperty (LEXICAL_HANDLER, lh);
- } catch (Exception e) { /* ignore */ }
-
- // this binding goes the other way around
- if (producer.getErrorHandler () == null)
- producer.setErrorHandler (h);
- if (consumer != null)
- consumer.setErrorHandler (producer.getErrorHandler ());
- }
-
+ Class klass = null;
+ boolean prefixes;
+
+ if (!loaded)
+ loadClasses ();
+
+ // DOM building, printing, layered validation, and other
+ // things don't work well when prefix info is discarded.
+ // Include it by default, whenever possible.
+ try {
+ producer.setFeature (FEATURE_URI + "namespace-prefixes",
+ true);
+ prefixes = true;
+ } catch (SAXException e) {
+ prefixes = false;
+ }
+
+ // NOTE: This loop doesn't use "instanceof", since that
+ // would prevent compiling/linking without those classes
+ // being present.
+ while (consumer != null) {
+ klass = consumer.getClass ();
+
+ // we might have already changed this problematic SAX2 default.
+ if (nsClass != null && nsClass.isAssignableFrom (klass)) {
+ if (!prefixes)
+ break;
+ consumer = ((EventFilter)consumer).getNext ();
+
+ // the parser _might_ do DTD validation by default ...
+ // if not, maybe we can change this setting.
+ } else if (validClass != null
+ && validClass.isAssignableFrom (klass)) {
+ try {
+ producer.setFeature (FEATURE_URI + "validation",
+ true);
+ consumer = ((ValidationConsumer)consumer).getNext ();
+ } catch (SAXException e) {
+ break;
+ }
+
+ // parsers are required not to have such bugs
+ } else if (wfClass != null && wfClass.isAssignableFrom (klass)) {
+ consumer = ((WellFormednessFilter)consumer).getNext ();
+
+ // stop on the first pipeline stage we can't remove
+ } else
+ break;
+
+ if (consumer == null)
+ klass = null;
+ }
+
+ // the actual setting here doesn't matter as much
+ // as that producer and consumer agree
+ if (xincClass != null && klass != null
+ && xincClass.isAssignableFrom (klass))
+ ((XIncludeFilter)consumer).setSavingPrefixes (prefixes);
+
+ // Some SAX parsers can't handle null handlers -- bleech
+ DefaultHandler2 h = new DefaultHandler2 ();
+
+ if (consumer != null && consumer.getContentHandler () != null)
+ producer.setContentHandler (consumer.getContentHandler ());
+ else
+ producer.setContentHandler (h);
+ if (consumer != null && consumer.getDTDHandler () != null)
+ producer.setDTDHandler (consumer.getDTDHandler ());
+ else
+ producer.setDTDHandler (h);
+
+ try {
+ Object dh;
+
+ if (consumer != null)
+ dh = consumer.getProperty (DECL_HANDLER);
+ else
+ dh = null;
+ if (dh == null)
+ dh = h;
+ producer.setProperty (DECL_HANDLER, dh);
+ } catch (Exception e) { /* ignore */ }
+ try {
+ Object lh;
+
+ if (consumer != null)
+ lh = consumer.getProperty (LEXICAL_HANDLER);
+ else
+ lh = null;
+ if (lh == null)
+ lh = h;
+ producer.setProperty (LEXICAL_HANDLER, lh);
+ } catch (Exception e) { /* ignore */ }
+
+ // this binding goes the other way around
+ if (producer.getErrorHandler () == null)
+ producer.setErrorHandler (h);
+ if (consumer != null)
+ consumer.setErrorHandler (producer.getErrorHandler ());
+ }
+
/**
* Initializes all handlers to null.
*/
- // constructor used by PipelineFactory
+ // constructor used by PipelineFactory
public EventFilter () { }
@@ -394,30 +394,30 @@ public class EventFilter
* the specified consumer, making it easy to pass events through.
* If the consumer is null, all handlers are initialzed to null.
*/
- // constructor used by PipelineFactory
+ // constructor used by PipelineFactory
public EventFilter (EventConsumer consumer)
{
- if (consumer == null)
- return;
+ if (consumer == null)
+ return;
- next = consumer;
+ next = consumer;
- // We delegate through the "xxNext" handlers, and
- // report the "xxHandler" ones on our input side.
+ // We delegate through the "xxNext" handlers, and
+ // report the "xxHandler" ones on our input side.
- // Normally a subclass would both override handler
- // methods and register itself as the "xxHandler".
+ // Normally a subclass would both override handler
+ // methods and register itself as the "xxHandler".
- docHandler = docNext = consumer.getContentHandler ();
- dtdHandler = dtdNext = consumer.getDTDHandler ();
- try {
- declHandler = declNext = (DeclHandler)
- consumer.getProperty (DECL_HANDLER);
- } catch (SAXException e) { /* leave value null */ }
- try {
- lexHandler = lexNext = (LexicalHandler)
- consumer.getProperty (LEXICAL_HANDLER);
- } catch (SAXException e) { /* leave value null */ }
+ docHandler = docNext = consumer.getContentHandler ();
+ dtdHandler = dtdNext = consumer.getDTDHandler ();
+ try {
+ declHandler = declNext = (DeclHandler)
+ consumer.getProperty (DECL_HANDLER);
+ } catch (SAXException e) { /* leave value null */ }
+ try {
+ lexHandler = lexNext = (LexicalHandler)
+ consumer.getProperty (LEXICAL_HANDLER);
+ } catch (SAXException e) { /* leave value null */ }
}
/**
@@ -442,33 +442,33 @@ public class EventFilter
*
* @param next the next downstream component of the pipeline.
* @exception IllegalStateException if the "next" consumer has
- * already been set through the constructor.
+ * already been set through the constructor.
*/
public void chainTo (XMLFilterImpl next)
{
- if (this.next != null)
- throw new IllegalStateException ();
+ if (this.next != null)
+ throw new IllegalStateException ();
- docNext = next.getContentHandler ();
- if (docHandler == null)
- docHandler = docNext;
- dtdNext = next.getDTDHandler ();
- if (dtdHandler == null)
- dtdHandler = dtdNext;
+ docNext = next.getContentHandler ();
+ if (docHandler == null)
+ docHandler = docNext;
+ dtdNext = next.getDTDHandler ();
+ if (dtdHandler == null)
+ dtdHandler = dtdNext;
- try {
- declNext = (DeclHandler) next.getProperty (DECL_HANDLER);
- if (declHandler == null)
- declHandler = declNext;
- } catch (SAXException e) { /* leave value null */ }
- try {
- lexNext = (LexicalHandler) next.getProperty (LEXICAL_HANDLER);
- if (lexHandler == null)
- lexHandler = lexNext;
- } catch (SAXException e) { /* leave value null */ }
+ try {
+ declNext = (DeclHandler) next.getProperty (DECL_HANDLER);
+ if (declHandler == null)
+ declHandler = declNext;
+ } catch (SAXException e) { /* leave value null */ }
+ try {
+ lexNext = (LexicalHandler) next.getProperty (LEXICAL_HANDLER);
+ if (lexHandler == null)
+ lexHandler = lexNext;
+ } catch (SAXException e) { /* leave value null */ }
- if (errHandler != null)
- next.setErrorHandler (errHandler);
+ if (errHandler != null)
+ next.setErrorHandler (errHandler);
}
/**
@@ -477,9 +477,9 @@ public class EventFilter
*/
final public void setErrorHandler (ErrorHandler handler)
{
- errHandler = handler;
- if (next != null)
- next.setErrorHandler (handler);
+ errHandler = handler;
+ if (next != null)
+ next.setErrorHandler (handler);
}
/**
@@ -488,7 +488,7 @@ public class EventFilter
*/
final public ErrorHandler getErrorHandler ()
{
- return errHandler;
+ return errHandler;
}
@@ -497,7 +497,7 @@ public class EventFilter
* is no such handler.
*/
final public EventConsumer getNext ()
- { return next; }
+ { return next; }
/**
@@ -508,13 +508,13 @@ public class EventFilter
*/
final public void setContentHandler (ContentHandler h)
{
- docHandler = h;
+ docHandler = h;
}
/** Returns the content handler being used. */
final public ContentHandler getContentHandler ()
{
- return docHandler;
+ return docHandler;
}
/**
@@ -524,12 +524,12 @@ public class EventFilter
* probably pointed to the next consumer by the base class constructor.
*/
final public void setDTDHandler (DTDHandler h)
- { dtdHandler = h; }
+ { dtdHandler = h; }
/** Returns the dtd handler being used. */
final public DTDHandler getDTDHandler ()
{
- return dtdHandler;
+ return dtdHandler;
}
/**
@@ -541,36 +541,36 @@ public class EventFilter
final public void setProperty (String id, Object o)
throws SAXNotRecognizedException, SAXNotSupportedException
{
- try {
- Object value = getProperty (id);
-
- if (value == o)
- return;
- if (DECL_HANDLER.equals (id)) {
- declHandler = (DeclHandler) o;
- return;
- }
- if (LEXICAL_HANDLER.equals (id)) {
- lexHandler = (LexicalHandler) o;
- return;
- }
- throw new SAXNotSupportedException (id);
-
- } catch (ClassCastException e) {
- throw new SAXNotSupportedException (id);
- }
+ try {
+ Object value = getProperty (id);
+
+ if (value == o)
+ return;
+ if (DECL_HANDLER.equals (id)) {
+ declHandler = (DeclHandler) o;
+ return;
+ }
+ if (LEXICAL_HANDLER.equals (id)) {
+ lexHandler = (LexicalHandler) o;
+ return;
+ }
+ throw new SAXNotSupportedException (id);
+
+ } catch (ClassCastException e) {
+ throw new SAXNotSupportedException (id);
+ }
}
/** Retrieves a property of unknown intent (usually a handler) */
final public Object getProperty (String id)
throws SAXNotRecognizedException
{
- if (DECL_HANDLER.equals (id))
- return declHandler;
- if (LEXICAL_HANDLER.equals (id))
- return lexHandler;
+ if (DECL_HANDLER.equals (id))
+ return declHandler;
+ if (LEXICAL_HANDLER.equals (id))
+ return lexHandler;
- throw new SAXNotRecognizedException (id);
+ throw new SAXNotRecognizedException (id);
}
/**
@@ -578,7 +578,7 @@ public class EventFilter
* (or a subclass) is handling {@link ContentHandler } events.
*/
public Locator getDocumentLocator ()
- { return locator; }
+ { return locator; }
// CONTENT HANDLER DELEGATIONS
@@ -586,113 +586,113 @@ public class EventFilter
/** <b>SAX2:</b> passes this callback to the next consumer, if any */
public void setDocumentLocator (Locator locator)
{
- this.locator = locator;
- if (docNext != null)
- docNext.setDocumentLocator (locator);
+ this.locator = locator;
+ if (docNext != null)
+ docNext.setDocumentLocator (locator);
}
/** <b>SAX2:</b> passes this callback to the next consumer, if any */
public void startDocument () throws SAXException
{
- if (docNext != null)
- docNext.startDocument ();
+ if (docNext != null)
+ docNext.startDocument ();
}
/** <b>SAX2:</b> passes this callback to the next consumer, if any */
public void skippedEntity (String name) throws SAXException
{
- if (docNext != null)
- docNext.skippedEntity (name);
+ if (docNext != null)
+ docNext.skippedEntity (name);
}
/** <b>SAX2:</b> passes this callback to the next consumer, if any */
public void processingInstruction (String target, String data)
throws SAXException
{
- if (docNext != null)
- docNext.processingInstruction (target, data);
+ if (docNext != null)
+ docNext.processingInstruction (target, data);
}
/** <b>SAX2:</b> passes this callback to the next consumer, if any */
public void characters (char ch [], int start, int length)
throws SAXException
{
- if (docNext != null)
- docNext.characters (ch, start, length);
+ if (docNext != null)
+ docNext.characters (ch, start, length);
}
/** <b>SAX2:</b> passes this callback to the next consumer, if any */
public void ignorableWhitespace (char ch [], int start, int length)
throws SAXException
{
- if (docNext != null)
- docNext.ignorableWhitespace (ch, start, length);
+ if (docNext != null)
+ docNext.ignorableWhitespace (ch, start, length);
}
/** <b>SAX2:</b> passes this callback to the next consumer, if any */
public void startPrefixMapping (String prefix, String uri)
throws SAXException
{
- if (docNext != null)
- docNext.startPrefixMapping (prefix, uri);
+ if (docNext != null)
+ docNext.startPrefixMapping (prefix, uri);
}
/** <b>SAX2:</b> passes this callback to the next consumer, if any */
public void startElement (
- String uri, String localName,
- String qName, Attributes atts
+ String uri, String localName,
+ String qName, Attributes atts
) throws SAXException
{
- if (docNext != null)
- docNext.startElement (uri, localName, qName, atts);
+ if (docNext != null)
+ docNext.startElement (uri, localName, qName, atts);
}
/** <b>SAX2:</b> passes this callback to the next consumer, if any */
public void endElement (String uri, String localName, String qName)
throws SAXException
{
- if (docNext != null)
- docNext.endElement (uri, localName, qName);
+ if (docNext != null)
+ docNext.endElement (uri, localName, qName);
}
/** <b>SAX2:</b> passes this callback to the next consumer, if any */
public void endPrefixMapping (String prefix) throws SAXException
{
- if (docNext != null)
- docNext.endPrefixMapping (prefix);
+ if (docNext != null)
+ docNext.endPrefixMapping (prefix);
}
/** <b>SAX2:</b> passes this callback to the next consumer, if any */
public void endDocument () throws SAXException
{
- if (docNext != null)
- docNext.endDocument ();
- locator = null;
+ if (docNext != null)
+ docNext.endDocument ();
+ locator = null;
}
// DTD HANDLER DELEGATIONS
-
+
/** <b>SAX1:</b> passes this callback to the next consumer, if any */
public void unparsedEntityDecl (
- String name,
- String publicId,
- String systemId,
- String notationName
+ String name,
+ String publicId,
+ String systemId,
+ String notationName
) throws SAXException
{
- if (dtdNext != null)
- dtdNext.unparsedEntityDecl (name, publicId, systemId, notationName);
+ if (dtdNext != null)
+ dtdNext.unparsedEntityDecl (name, publicId, systemId, notationName);
}
-
+
/** <b>SAX1:</b> passes this callback to the next consumer, if any */
public void notationDecl (String name, String publicId, String systemId)
throws SAXException
{
- if (dtdNext != null)
- dtdNext.notationDecl (name, publicId, systemId);
+ if (dtdNext != null)
+ dtdNext.notationDecl (name, publicId, systemId);
}
-
+
// LEXICAL HANDLER DELEGATIONS
@@ -700,40 +700,40 @@ public class EventFilter
public void startDTD (String name, String publicId, String systemId)
throws SAXException
{
- if (lexNext != null)
- lexNext.startDTD (name, publicId, systemId);
+ if (lexNext != null)
+ lexNext.startDTD (name, publicId, systemId);
}
/** <b>SAX2:</b> passes this callback to the next consumer, if any */
public void endDTD ()
throws SAXException
{
- if (lexNext != null)
- lexNext.endDTD ();
+ if (lexNext != null)
+ lexNext.endDTD ();
}
/** <b>SAX2:</b> passes this callback to the next consumer, if any */
public void comment (char ch [], int start, int length)
throws SAXException
{
- if (lexNext != null)
- lexNext.comment (ch, start, length);
+ if (lexNext != null)
+ lexNext.comment (ch, start, length);
}
/** <b>SAX2:</b> passes this callback to the next consumer, if any */
public void startCDATA ()
throws SAXException
{
- if (lexNext != null)
- lexNext.startCDATA ();
+ if (lexNext != null)
+ lexNext.startCDATA ();
}
/** <b>SAX2:</b> passes this callback to the next consumer, if any */
public void endCDATA ()
throws SAXException
{
- if (lexNext != null)
- lexNext.endCDATA ();
+ if (lexNext != null)
+ lexNext.endCDATA ();
}
/**
@@ -742,8 +742,8 @@ public class EventFilter
public void startEntity (String name)
throws SAXException
{
- if (lexNext != null)
- lexNext.startEntity (name);
+ if (lexNext != null)
+ lexNext.startEntity (name);
}
/**
@@ -752,10 +752,10 @@ public class EventFilter
public void endEntity (String name)
throws SAXException
{
- if (lexNext != null)
- lexNext.endEntity (name);
+ if (lexNext != null)
+ lexNext.endEntity (name);
}
-
+
// DECLARATION HANDLER DELEGATIONS
@@ -764,33 +764,33 @@ public class EventFilter
public void elementDecl (String name, String model)
throws SAXException
{
- if (declNext != null)
- declNext.elementDecl (name, model);
+ if (declNext != null)
+ declNext.elementDecl (name, model);
}
/** <b>SAX2:</b> passes this callback to the next consumer, if any */
public void attributeDecl (String eName, String aName,
- String type, String mode, String value)
+ String type, String mode, String value)
throws SAXException
{
- if (declNext != null)
- declNext.attributeDecl (eName, aName, type, mode, value);
+ if (declNext != null)
+ declNext.attributeDecl (eName, aName, type, mode, value);
}
/** <b>SAX2:</b> passes this callback to the next consumer, if any */
public void externalEntityDecl (String name,
- String publicId, String systemId)
+ String publicId, String systemId)
throws SAXException
{
- if (declNext != null)
- declNext.externalEntityDecl (name, publicId, systemId);
+ if (declNext != null)
+ declNext.externalEntityDecl (name, publicId, systemId);
}
/** <b>SAX2:</b> passes this callback to the next consumer, if any */
public void internalEntityDecl (String name, String value)
throws SAXException
{
- if (declNext != null)
- declNext.internalEntityDecl (name, value);
+ if (declNext != null)
+ declNext.internalEntityDecl (name, value);
}
}
diff --git a/gnu/xml/pipeline/LinkFilter.java b/gnu/xml/pipeline/LinkFilter.java
index ddb9fda2e..e11a5eca6 100644
--- a/gnu/xml/pipeline/LinkFilter.java
+++ b/gnu/xml/pipeline/LinkFilter.java
@@ -1,4 +1,4 @@
-/* LinkFilter.java --
+/* LinkFilter.java --
Copyright (C) 1999,2000,2001 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -38,7 +38,7 @@ exception statement from your version. */
package gnu.xml.pipeline;
import java.io.IOException;
-import java.net.URL;
+import java.net.URL;
import java.util.Enumeration;
import java.util.Vector;
@@ -65,21 +65,21 @@ import org.xml.sax.SAXException;
public class LinkFilter extends EventFilter
{
// for storing URIs
- private Vector vector = new Vector ();
+ private Vector vector = new Vector ();
- // struct for "full" link record (tbd)
- // these for troubleshooting original source:
- // original uri
- // uri as resolved (base, relative, etc)
- // URI of originating doc
- // line #
- // original element + attrs (img src, desc, etc)
+ // struct for "full" link record (tbd)
+ // these for troubleshooting original source:
+ // original uri
+ // uri as resolved (base, relative, etc)
+ // URI of originating doc
+ // line #
+ // original element + attrs (img src, desc, etc)
- // XLink model of the link ... for inter-site pairups ?
+ // XLink model of the link ... for inter-site pairups ?
- private String baseURI;
+ private String baseURI;
- private boolean siteRestricted = false;
+ private boolean siteRestricted = false;
//
// XXX leverage blacklist info (like robots.txt)
@@ -93,10 +93,10 @@ public class LinkFilter extends EventFilter
* Constructs a new event filter, which collects links in private data
* structure for later enumeration.
*/
- // constructor used by PipelineFactory
+ // constructor used by PipelineFactory
public LinkFilter ()
{
- super.setContentHandler (this);
+ super.setContentHandler (this);
}
@@ -105,11 +105,11 @@ public class LinkFilter extends EventFilter
* structure for later enumeration and passes all events, unmodified,
* to the next consumer.
*/
- // constructor used by PipelineFactory
+ // constructor used by PipelineFactory
public LinkFilter (EventConsumer next)
{
- super (next);
- super.setContentHandler (this);
+ super (next);
+ super.setContentHandler (this);
}
@@ -121,7 +121,7 @@ public class LinkFilter extends EventFilter
*/
public Enumeration getLinks ()
{
- return vector.elements ();
+ return vector.elements ();
}
/**
@@ -130,7 +130,7 @@ public class LinkFilter extends EventFilter
*/
public void removeAllLinks ()
{
- vector = new Vector ();
+ vector = new Vector ();
}
@@ -138,84 +138,84 @@ public class LinkFilter extends EventFilter
* Collects URIs for (X)HTML content from elements which hold them.
*/
public void startElement (
- String uri,
- String localName,
- String qName,
- Attributes atts
+ String uri,
+ String localName,
+ String qName,
+ Attributes atts
) throws SAXException
{
- String link;
-
- // Recognize XHTML links.
- if ("http://www.w3.org/1999/xhtml".equals (uri)) {
-
- if ("a".equals (localName) || "base".equals (localName)
- || "area".equals (localName))
- link = atts.getValue ("href");
- else if ("iframe".equals (localName) || "frame".equals (localName))
- link = atts.getValue ("src");
- else if ("blockquote".equals (localName) || "q".equals (localName)
- || "ins".equals (localName) || "del".equals (localName))
- link = atts.getValue ("cite");
- else
- link = null;
- link = maybeAddLink (link);
-
- // "base" modifies designated baseURI
- if ("base".equals (localName) && link != null)
- baseURI = link;
-
- if ("iframe".equals (localName) || "img".equals (localName))
- maybeAddLink (atts.getValue ("longdesc"));
- }
-
- super.startElement (uri, localName, qName, atts);
+ String link;
+
+ // Recognize XHTML links.
+ if ("http://www.w3.org/1999/xhtml".equals (uri)) {
+
+ if ("a".equals (localName) || "base".equals (localName)
+ || "area".equals (localName))
+ link = atts.getValue ("href");
+ else if ("iframe".equals (localName) || "frame".equals (localName))
+ link = atts.getValue ("src");
+ else if ("blockquote".equals (localName) || "q".equals (localName)
+ || "ins".equals (localName) || "del".equals (localName))
+ link = atts.getValue ("cite");
+ else
+ link = null;
+ link = maybeAddLink (link);
+
+ // "base" modifies designated baseURI
+ if ("base".equals (localName) && link != null)
+ baseURI = link;
+
+ if ("iframe".equals (localName) || "img".equals (localName))
+ maybeAddLink (atts.getValue ("longdesc"));
+ }
+
+ super.startElement (uri, localName, qName, atts);
}
private String maybeAddLink (String link)
{
- int index;
-
- // ignore empty links and fragments inside docs
- if (link == null)
- return null;
- if ((index = link.indexOf ("#")) >= 0)
- link = link.substring (0, index);
- if (link.equals (""))
- return null;
-
- try {
- // get the real URI
- URL base = new URL ((baseURI != null)
- ? baseURI
- : getDocumentLocator ().getSystemId ());
- URL url = new URL (base, link);
-
- link = url.toString ();
-
- // ignore duplicates
- if (vector.contains (link))
- return link;
-
- // other than what "base" does, stick to original site:
- if (siteRestricted) {
- // don't switch protocols
- if (!base.getProtocol ().equals (url.getProtocol ()))
- return link;
- // don't switch servers
- if (base.getHost () != null
- && !base.getHost ().equals (url.getHost ()))
- return link;
- }
-
- vector.addElement (link);
-
- return link;
-
- } catch (IOException e) {
- // bad URLs we don't want
- }
- return null;
+ int index;
+
+ // ignore empty links and fragments inside docs
+ if (link == null)
+ return null;
+ if ((index = link.indexOf ("#")) >= 0)
+ link = link.substring (0, index);
+ if (link.equals (""))
+ return null;
+
+ try {
+ // get the real URI
+ URL base = new URL ((baseURI != null)
+ ? baseURI
+ : getDocumentLocator ().getSystemId ());
+ URL url = new URL (base, link);
+
+ link = url.toString ();
+
+ // ignore duplicates
+ if (vector.contains (link))
+ return link;
+
+ // other than what "base" does, stick to original site:
+ if (siteRestricted) {
+ // don't switch protocols
+ if (!base.getProtocol ().equals (url.getProtocol ()))
+ return link;
+ // don't switch servers
+ if (base.getHost () != null
+ && !base.getHost ().equals (url.getHost ()))
+ return link;
+ }
+
+ vector.addElement (link);
+
+ return link;
+
+ } catch (IOException e) {
+ // bad URLs we don't want
+ }
+ return null;
}
/**
@@ -224,8 +224,8 @@ public class LinkFilter extends EventFilter
public void startDocument ()
throws SAXException
{
- if (getDocumentLocator () == null)
- throw new SAXException ("no Locator!");
+ if (getDocumentLocator () == null)
+ throw new SAXException ("no Locator!");
}
/**
@@ -236,7 +236,7 @@ public class LinkFilter extends EventFilter
public void endDocument ()
throws SAXException
{
- baseURI = null;
- super.endDocument ();
+ baseURI = null;
+ super.endDocument ();
}
}
diff --git a/gnu/xml/pipeline/NSFilter.java b/gnu/xml/pipeline/NSFilter.java
index db875e1de..0fa4621d3 100644
--- a/gnu/xml/pipeline/NSFilter.java
+++ b/gnu/xml/pipeline/NSFilter.java
@@ -1,4 +1,4 @@
-/* NSFilter.java --
+/* NSFilter.java --
Copyright (C) 1999,2000,2001 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -56,23 +56,23 @@ import org.xml.sax.helpers.NamespaceSupport;
* information using XML. There are various common ways that such data
* gets discarded: <ul>
*
- * <li> By default, SAX2 parsers must discard the "xmlns*"
- * attributes, and may also choose not to report properly prefixed
- * names for elements or attributes. (Some parsers may support
- * changing the <em>namespace-prefixes</em> value from the default
- * to <em>true</em>, effectively eliminating the need to use this
- * filter on their output.)
+ * <li> By default, SAX2 parsers must discard the "xmlns*"
+ * attributes, and may also choose not to report properly prefixed
+ * names for elements or attributes. (Some parsers may support
+ * changing the <em>namespace-prefixes</em> value from the default
+ * to <em>true</em>, effectively eliminating the need to use this
+ * filter on their output.)
*
- * <li> When event streams are generated from a DOM tree, they may
- * have never have had prefixes or declarations for namespaces; or
- * the existing prefixes or declarations may have been invalidated
- * by structural modifications to that DOM tree.
+ * <li> When event streams are generated from a DOM tree, they may
+ * have never have had prefixes or declarations for namespaces; or
+ * the existing prefixes or declarations may have been invalidated
+ * by structural modifications to that DOM tree.
*
- * <li> Other software writing SAX event streams won't necessarily
- * be worrying about prefix management, and so they will need to
- * have a transparent solution for managing them.
+ * <li> Other software writing SAX event streams won't necessarily
+ * be worrying about prefix management, and so they will need to
+ * have a transparent solution for managing them.
*
- * </ul>
+ * </ul>
*
* <p> This filter uses a heuristic to choose the prefix to assign to any
* particular name which wasn't already corectly prefixed. The associated
@@ -91,55 +91,55 @@ import org.xml.sax.helpers.NamespaceSupport;
*/
public class NSFilter extends EventFilter
{
- private NamespaceSupport nsStack = new NamespaceSupport ();
- private Stack elementStack = new Stack ();
+ private NamespaceSupport nsStack = new NamespaceSupport ();
+ private Stack elementStack = new Stack ();
- private boolean pushedContext;
- private String nsTemp [] = new String [3];
- private AttributesImpl attributes = new AttributesImpl ();
- private boolean usedDefault;
+ private boolean pushedContext;
+ private String nsTemp [] = new String [3];
+ private AttributesImpl attributes = new AttributesImpl ();
+ private boolean usedDefault;
// gensymmed prefixes use this root name
- private static final String prefixRoot = "prefix-";
+ private static final String prefixRoot = "prefix-";
+
-
/**
* Passes events through to the specified consumer, after first
* processing them.
*
* @param next the next event consumer to receive events.
*/
- // constructor used by PipelineFactory
+ // constructor used by PipelineFactory
public NSFilter (EventConsumer next)
{
- super (next);
+ super (next);
- setContentHandler (this);
+ setContentHandler (this);
}
private void fatalError (String message)
throws SAXException
{
- SAXParseException e;
- ErrorHandler handler = getErrorHandler ();
- Locator locator = getDocumentLocator ();
-
- if (locator == null)
- e = new SAXParseException (message, null, null, -1, -1);
- else
- e = new SAXParseException (message, locator);
- if (handler != null)
- handler.fatalError (e);
- throw e;
+ SAXParseException e;
+ ErrorHandler handler = getErrorHandler ();
+ Locator locator = getDocumentLocator ();
+
+ if (locator == null)
+ e = new SAXParseException (message, null, null, -1, -1);
+ else
+ e = new SAXParseException (message, locator);
+ if (handler != null)
+ handler.fatalError (e);
+ throw e;
}
public void startDocument () throws SAXException
{
- elementStack.removeAllElements ();
- nsStack.reset ();
- pushedContext = false;
- super.startDocument ();
+ elementStack.removeAllElements ();
+ nsStack.reset ();
+ pushedContext = false;
+ super.startDocument ();
}
/**
@@ -151,176 +151,176 @@ public class NSFilter extends EventFilter
public void startPrefixMapping (String prefix, String uri)
throws SAXException
{
- if (pushedContext == false) {
- nsStack.pushContext ();
- pushedContext = true;
- }
-
- // this check is awkward, but the paranoia prevents big trouble
- for (Enumeration e = nsStack.getDeclaredPrefixes ();
- e.hasMoreElements ();
- /* NOP */ ) {
- String declared = (String) e.nextElement ();
-
- if (!declared.equals (prefix))
- continue;
- if (uri.equals (nsStack.getURI (prefix)))
- return;
- fatalError ("inconsistent binding for prefix '" + prefix
- + "' ... " + uri + " (was " + nsStack.getURI (prefix) + ")");
- }
-
- if (!nsStack.declarePrefix (prefix, uri))
- fatalError ("illegal prefix declared: " + prefix);
+ if (pushedContext == false) {
+ nsStack.pushContext ();
+ pushedContext = true;
+ }
+
+ // this check is awkward, but the paranoia prevents big trouble
+ for (Enumeration e = nsStack.getDeclaredPrefixes ();
+ e.hasMoreElements ();
+ /* NOP */ ) {
+ String declared = (String) e.nextElement ();
+
+ if (!declared.equals (prefix))
+ continue;
+ if (uri.equals (nsStack.getURI (prefix)))
+ return;
+ fatalError ("inconsistent binding for prefix '" + prefix
+ + "' ... " + uri + " (was " + nsStack.getURI (prefix) + ")");
+ }
+
+ if (!nsStack.declarePrefix (prefix, uri))
+ fatalError ("illegal prefix declared: " + prefix);
}
private String fixName (String ns, String l, String name, boolean isAttr)
throws SAXException
{
- if ("".equals (name) || name == null) {
- name = l;
- if ("".equals (name) || name == null)
- fatalError ("empty/null name");
- }
-
- // can we correctly process the name as-is?
- // handles "element scope" attribute names here.
- if (nsStack.processName (name, nsTemp, isAttr) != null
- && nsTemp [0].equals (ns)
- ) {
- return nsTemp [2];
- }
-
- // nope, gotta modify the name or declare a default mapping
- int temp;
-
- // get rid of any current prefix
- if ((temp = name.indexOf (':')) >= 0) {
- name = name.substring (temp + 1);
-
- // ... maybe that's enough (use/prefer default namespace) ...
- if (!isAttr && nsStack.processName (name, nsTemp, false) != null
- && nsTemp [0].equals (ns)
- ) {
- return nsTemp [2];
- }
- }
-
- // must we define and use the default/undefined prefix?
- if ("".equals (ns)) {
- if (isAttr)
- fatalError ("processName bug");
- if (attributes.getIndex ("xmlns") != -1)
- fatalError ("need to undefine default NS, but it's bound: "
- + attributes.getValue ("xmlns"));
-
- nsStack.declarePrefix ("", "");
- attributes.addAttribute ("", "", "xmlns", "CDATA", "");
- return name;
- }
-
- // is there at least one non-null prefix we can use?
- for (Enumeration e = nsStack.getDeclaredPrefixes ();
- e.hasMoreElements ();
- /* NOP */) {
- String prefix = (String) e.nextElement ();
- String uri = nsStack.getURI (prefix);
-
- if (uri == null || !uri.equals (ns))
- continue;
- return prefix + ":" + name;
- }
-
- // no such luck. create a prefix name, declare it, use it.
- for (temp = 0; temp >= 0; temp++) {
- String prefix = prefixRoot + temp;
-
- if (nsStack.getURI (prefix) == null) {
- nsStack.declarePrefix (prefix, ns);
- attributes.addAttribute ("", "", "xmlns:" + prefix,
- "CDATA", ns);
- return prefix + ":" + name;
- }
- }
- fatalError ("too many prefixes genned");
- // NOTREACHED
- return null;
+ if ("".equals (name) || name == null) {
+ name = l;
+ if ("".equals (name) || name == null)
+ fatalError ("empty/null name");
+ }
+
+ // can we correctly process the name as-is?
+ // handles "element scope" attribute names here.
+ if (nsStack.processName (name, nsTemp, isAttr) != null
+ && nsTemp [0].equals (ns)
+ ) {
+ return nsTemp [2];
+ }
+
+ // nope, gotta modify the name or declare a default mapping
+ int temp;
+
+ // get rid of any current prefix
+ if ((temp = name.indexOf (':')) >= 0) {
+ name = name.substring (temp + 1);
+
+ // ... maybe that's enough (use/prefer default namespace) ...
+ if (!isAttr && nsStack.processName (name, nsTemp, false) != null
+ && nsTemp [0].equals (ns)
+ ) {
+ return nsTemp [2];
+ }
+ }
+
+ // must we define and use the default/undefined prefix?
+ if ("".equals (ns)) {
+ if (isAttr)
+ fatalError ("processName bug");
+ if (attributes.getIndex ("xmlns") != -1)
+ fatalError ("need to undefine default NS, but it's bound: "
+ + attributes.getValue ("xmlns"));
+
+ nsStack.declarePrefix ("", "");
+ attributes.addAttribute ("", "", "xmlns", "CDATA", "");
+ return name;
+ }
+
+ // is there at least one non-null prefix we can use?
+ for (Enumeration e = nsStack.getDeclaredPrefixes ();
+ e.hasMoreElements ();
+ /* NOP */) {
+ String prefix = (String) e.nextElement ();
+ String uri = nsStack.getURI (prefix);
+
+ if (uri == null || !uri.equals (ns))
+ continue;
+ return prefix + ":" + name;
+ }
+
+ // no such luck. create a prefix name, declare it, use it.
+ for (temp = 0; temp >= 0; temp++) {
+ String prefix = prefixRoot + temp;
+
+ if (nsStack.getURI (prefix) == null) {
+ nsStack.declarePrefix (prefix, ns);
+ attributes.addAttribute ("", "", "xmlns:" + prefix,
+ "CDATA", ns);
+ return prefix + ":" + name;
+ }
+ }
+ fatalError ("too many prefixes genned");
+ // NOTREACHED
+ return null;
}
public void startElement (
- String uri, String localName,
- String qName, Attributes atts
+ String uri, String localName,
+ String qName, Attributes atts
) throws SAXException
{
- if (!pushedContext)
- nsStack.pushContext ();
- pushedContext = false;
-
- // make sure we have all NS declarations handy before we start
- int length = atts.getLength ();
-
- for (int i = 0; i < length; i++) {
- String aName = atts.getQName (i);
-
- if (!aName.startsWith ("xmlns"))
- continue;
-
- String prefix;
-
- if ("xmlns".equals (aName))
- prefix = "";
- else if (aName.indexOf (':') == 5)
- prefix = aName.substring (6);
- else // "xmlnsfoo" etc.
- continue;
- startPrefixMapping (prefix, atts.getValue (i));
- }
-
- // put namespace decls at the start of our regenned attlist
- attributes.clear ();
- for (Enumeration e = nsStack.getDeclaredPrefixes ();
- e.hasMoreElements ();
- /* NOP */) {
- String prefix = (String) e.nextElement ();
-
- attributes.addAttribute ("", "",
- ("".equals (prefix)
- ? "xmlns"
- : "xmlns:" + prefix),
- "CDATA",
- nsStack.getURI (prefix));
- }
-
- // name fixups: element, then attributes.
- // fixName may declare a new prefix or, for the element,
- // redeclare the default (if element name needs it).
- qName = fixName (uri, localName, qName, false);
-
- for (int i = 0; i < length; i++) {
- String aName = atts.getQName (i);
- String aNS = atts.getURI (i);
- String aLocal = atts.getLocalName (i);
- String aType = atts.getType (i);
- String aValue = atts.getValue (i);
-
- if (aName.startsWith ("xmlns"))
- continue;
- aName = fixName (aNS, aLocal, aName, true);
- attributes.addAttribute (aNS, aLocal, aName, aType, aValue);
- }
-
- elementStack.push (qName);
-
- // pass event along, with cleaned-up names and decls.
- super.startElement (uri, localName, qName, attributes);
+ if (!pushedContext)
+ nsStack.pushContext ();
+ pushedContext = false;
+
+ // make sure we have all NS declarations handy before we start
+ int length = atts.getLength ();
+
+ for (int i = 0; i < length; i++) {
+ String aName = atts.getQName (i);
+
+ if (!aName.startsWith ("xmlns"))
+ continue;
+
+ String prefix;
+
+ if ("xmlns".equals (aName))
+ prefix = "";
+ else if (aName.indexOf (':') == 5)
+ prefix = aName.substring (6);
+ else // "xmlnsfoo" etc.
+ continue;
+ startPrefixMapping (prefix, atts.getValue (i));
+ }
+
+ // put namespace decls at the start of our regenned attlist
+ attributes.clear ();
+ for (Enumeration e = nsStack.getDeclaredPrefixes ();
+ e.hasMoreElements ();
+ /* NOP */) {
+ String prefix = (String) e.nextElement ();
+
+ attributes.addAttribute ("", "",
+ ("".equals (prefix)
+ ? "xmlns"
+ : "xmlns:" + prefix),
+ "CDATA",
+ nsStack.getURI (prefix));
+ }
+
+ // name fixups: element, then attributes.
+ // fixName may declare a new prefix or, for the element,
+ // redeclare the default (if element name needs it).
+ qName = fixName (uri, localName, qName, false);
+
+ for (int i = 0; i < length; i++) {
+ String aName = atts.getQName (i);
+ String aNS = atts.getURI (i);
+ String aLocal = atts.getLocalName (i);
+ String aType = atts.getType (i);
+ String aValue = atts.getValue (i);
+
+ if (aName.startsWith ("xmlns"))
+ continue;
+ aName = fixName (aNS, aLocal, aName, true);
+ attributes.addAttribute (aNS, aLocal, aName, aType, aValue);
+ }
+
+ elementStack.push (qName);
+
+ // pass event along, with cleaned-up names and decls.
+ super.startElement (uri, localName, qName, attributes);
}
public void endElement (String uri, String localName, String qName)
throws SAXException
{
- nsStack.popContext ();
- qName = (String) elementStack.pop ();
- super.endElement (uri, localName, qName);
+ nsStack.popContext ();
+ qName = (String) elementStack.pop ();
+ super.endElement (uri, localName, qName);
}
/**
@@ -330,12 +330,12 @@ public class NSFilter extends EventFilter
*/
public void endPrefixMapping (String prefix)
throws SAXException
- { }
+ { }
public void endDocument () throws SAXException
{
- elementStack.removeAllElements ();
- nsStack.reset ();
- super.endDocument ();
+ elementStack.removeAllElements ();
+ nsStack.reset ();
+ super.endDocument ();
}
}
diff --git a/gnu/xml/pipeline/PipelineFactory.java b/gnu/xml/pipeline/PipelineFactory.java
index f88ab1643..c2adab021 100644
--- a/gnu/xml/pipeline/PipelineFactory.java
+++ b/gnu/xml/pipeline/PipelineFactory.java
@@ -1,4 +1,4 @@
-/* PipelineFactory.java --
+/* PipelineFactory.java --
Copyright (C) 1999,2000,2001 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -69,120 +69,120 @@ import org.xml.sax.ext.*;
* The stage identifiers are either class names, or are one of the following
* short identifiers built into this class. (Most of these identifiers are
* no more than aliases for classes.) The built-in identifiers include:</p>
-
+
<table border="1" cellpadding="3" cellspacing="0">
<tr bgcolor="#ccccff" class="TableHeadingColor">
- <th align="center" width="5%">Stage</th>
- <th align="center" width="9%">Parameter</th>
- <th align="center" width="1%">Terminus</th>
- <th align="center">Description</th>
+ <th align="center" width="5%">Stage</th>
+ <th align="center" width="9%">Parameter</th>
+ <th align="center" width="1%">Terminus</th>
+ <th align="center">Description</th>
</tr>
<tr valign="top" align="center">
- <td><a href="../dom/Consumer.html">dom</a></td>
- <td><em>none</em></td>
- <td> yes </td>
- <td align="left"> Applications code can access a DOM Document built
- from the input event stream. When used as a filter, this buffers
- data up to an <em>endDocument</em> call, and then uses a DOM parser
- to report everything that has been recorded (which can easily be
- less than what was reported to it). </td>
+ <td><a href="../dom/Consumer.html">dom</a></td>
+ <td><em>none</em></td>
+ <td> yes </td>
+ <td align="left"> Applications code can access a DOM Document built
+ from the input event stream. When used as a filter, this buffers
+ data up to an <em>endDocument</em> call, and then uses a DOM parser
+ to report everything that has been recorded (which can easily be
+ less than what was reported to it). </td>
</tr>
<tr valign="top" align="center">
- <td><a href="NSFilter.html">nsfix</a></td>
- <td><em>none</em></td>
- <td>no</td>
- <td align="left">This stage ensures that the XML element and attribute
- names in its output use namespace prefixes and declarations correctly.
- That is, so that they match the "Namespace plus LocalName" naming data
- with which each XML element and attribute is already associated. </td>
+ <td><a href="NSFilter.html">nsfix</a></td>
+ <td><em>none</em></td>
+ <td>no</td>
+ <td align="left">This stage ensures that the XML element and attribute
+ names in its output use namespace prefixes and declarations correctly.
+ That is, so that they match the "Namespace plus LocalName" naming data
+ with which each XML element and attribute is already associated. </td>
</tr>
<tr valign="top" align="center">
- <td><a href="EventFilter.html">null</a></td>
- <td><em>none</em></td>
- <td>yes</td>
- <td align="left">This stage ignores all input event data.</td>
+ <td><a href="EventFilter.html">null</a></td>
+ <td><em>none</em></td>
+ <td>yes</td>
+ <td align="left">This stage ignores all input event data.</td>
</tr>
<tr valign="top" align="center">
- <td><a href="CallFilter.html">server</a></td>
- <td><em>required</em><br> server URL </td>
- <td>no</td>
- <td align="left">Sends its input as XML request to a remote server,
- normally a web application server using the HTTP or HTTPS protocols.
- The output of this stage is the parsed response from that server.</td>
+ <td><a href="CallFilter.html">server</a></td>
+ <td><em>required</em><br> server URL </td>
+ <td>no</td>
+ <td align="left">Sends its input as XML request to a remote server,
+ normally a web application server using the HTTP or HTTPS protocols.
+ The output of this stage is the parsed response from that server.</td>
</tr>
<tr valign="top" align="center">
- <td><a href="TeeConsumer.html">tee</a></td>
- <td><em>required</em><br> first pipeline</td>
- <td>no</td>
- <td align="left">This sends its events down two paths; its parameter
- is a pipeline descriptor for the first path, and the second path
- is the output of this stage.</td>
+ <td><a href="TeeConsumer.html">tee</a></td>
+ <td><em>required</em><br> first pipeline</td>
+ <td>no</td>
+ <td align="left">This sends its events down two paths; its parameter
+ is a pipeline descriptor for the first path, and the second path
+ is the output of this stage.</td>
</tr>
<tr valign="top" align="center">
- <td><a href="ValidationConsumer.html">validate</a></td>
- <td><em>none</em></td>
- <td>yes</td>
- <td align="left">This checks for validity errors, and reports them
- through its error handler. The input must include declaration events
- and some lexical events. </td>
+ <td><a href="ValidationConsumer.html">validate</a></td>
+ <td><em>none</em></td>
+ <td>yes</td>
+ <td align="left">This checks for validity errors, and reports them
+ through its error handler. The input must include declaration events
+ and some lexical events. </td>
</tr>
<tr valign="top" align="center">
- <td><a href="WellFormednessFilter.html">wf</a></td>
- <td><em>none</em></td>
- <td>yes</td>
- <td align="left"> This class provides some basic "well formedness"
- tests on the input event stream, and reports a fatal error if any
- of them fail. One example: start/end calls for elements must match.
- No SAX parser is permitted to produce malformed output, but other
- components can easily do so.</td>
+ <td><a href="WellFormednessFilter.html">wf</a></td>
+ <td><em>none</em></td>
+ <td>yes</td>
+ <td align="left"> This class provides some basic "well formedness"
+ tests on the input event stream, and reports a fatal error if any
+ of them fail. One example: start/end calls for elements must match.
+ No SAX parser is permitted to produce malformed output, but other
+ components can easily do so.</td>
</tr>
<tr valign="top" align="center">
- <td>write</td>
- <td><em>required</em><br> "stdout", "stderr", or filename</td>
- <td>yes</td>
- <td align="left"> Writes its input to the specified output, as pretty
- printed XML text encoded using UTF-8. Input events must be well
- formed and "namespace fixed", else the output won't be XML (or possibly
- namespace) conformant. The symbolic names represent
- <em>System.out</em> and <em>System.err</em> respectively; names must
- correspond to files which don't yet exist.</td>
+ <td>write</td>
+ <td><em>required</em><br> "stdout", "stderr", or filename</td>
+ <td>yes</td>
+ <td align="left"> Writes its input to the specified output, as pretty
+ printed XML text encoded using UTF-8. Input events must be well
+ formed and "namespace fixed", else the output won't be XML (or possibly
+ namespace) conformant. The symbolic names represent
+ <em>System.out</em> and <em>System.err</em> respectively; names must
+ correspond to files which don't yet exist.</td>
</tr>
<tr valign="top" align="center">
- <td>xhtml</td>
- <td><em>required</em><br> "stdout", "stderr", or filename</td>
- <td>yes</td>
- <td align="left"> Like <em>write</em> (above), except that XHTML rules
- are followed. The XHTML 1.0 Transitional document type is declared,
- and only ASCII characters are written (for interoperability). Other
- characters are written as entity or character references; the text is
- pretty printed.</td>
+ <td>xhtml</td>
+ <td><em>required</em><br> "stdout", "stderr", or filename</td>
+ <td>yes</td>
+ <td align="left"> Like <em>write</em> (above), except that XHTML rules
+ are followed. The XHTML 1.0 Transitional document type is declared,
+ and only ASCII characters are written (for interoperability). Other
+ characters are written as entity or character references; the text is
+ pretty printed.</td>
</tr>
<tr valign="top" align="center">
- <td><a href="XIncludeFilter.html">xinclude</a></td>
- <td><em>none</em></td>
- <td>no</td>
- <td align="left">This stage handles XInclude processing.
- This is like entity inclusion, except that the included content
- is declared in-line rather than in the DTD at the beginning of
- a document.
- </td>
+ <td><a href="XIncludeFilter.html">xinclude</a></td>
+ <td><em>none</em></td>
+ <td>no</td>
+ <td align="left">This stage handles XInclude processing.
+ This is like entity inclusion, except that the included content
+ is declared in-line rather than in the DTD at the beginning of
+ a document.
+ </td>
</tr>
<tr valign="top" align="center">
- <td><a href="XsltFilter.html">xslt</a></td>
- <td><em>required</em><br> XSLT stylesheet URI</td>
- <td>no</td>
- <td align="left">This stage handles XSLT transformation
- according to a stylesheet.
- The implementation of the transformation may not actually
- stream data, although if such an XSLT engine is in use
- then that can happen.
- </td>
+ <td><a href="XsltFilter.html">xslt</a></td>
+ <td><em>required</em><br> XSLT stylesheet URI</td>
+ <td>no</td>
+ <td align="left">This stage handles XSLT transformation
+ according to a stylesheet.
+ The implementation of the transformation may not actually
+ stream data, although if such an XSLT engine is in use
+ then that can happen.
+ </td>
</tr>
</table>
-
+
* <p> Note that {@link EventFilter#bind} can automatically eliminate
* some filters by setting SAX2 parser features appropriately. This means
* that you can routinely put filters like "nsfix", "validate", or "wf" at the
@@ -200,7 +200,7 @@ public class PipelineFactory
public static EventConsumer createPipeline (String description)
throws IOException
{
- return createPipeline (description, null);
+ return createPipeline (description, null);
}
/**
@@ -211,25 +211,25 @@ public class PipelineFactory
* segments with easily configured ones.
*/
public static EventConsumer createPipeline (
- String description,
- EventConsumer next
+ String description,
+ EventConsumer next
) throws IOException
{
- // tokens are (for now) what's separated by whitespace;
- // very easy to parse, but IDs never have spaces.
+ // tokens are (for now) what's separated by whitespace;
+ // very easy to parse, but IDs never have spaces.
- StringTokenizer tokenizer;
- String tokens [];
+ StringTokenizer tokenizer;
+ String tokens [];
- tokenizer = new StringTokenizer (description);
- tokens = new String [tokenizer.countTokens ()];
- for (int i = 0; i < tokens.length; i++)
- tokens [i] = tokenizer.nextToken ();
+ tokenizer = new StringTokenizer (description);
+ tokens = new String [tokenizer.countTokens ()];
+ for (int i = 0; i < tokens.length; i++)
+ tokens [i] = tokenizer.nextToken ();
- PipelineFactory factory = new PipelineFactory ();
- Pipeline pipeline = factory.parsePipeline (tokens, next);
+ PipelineFactory factory = new PipelineFactory ();
+ Pipeline pipeline = factory.parsePipeline (tokens, next);
- return pipeline.createPipeline ();
+ return pipeline.createPipeline ();
}
@@ -242,70 +242,70 @@ public class PipelineFactory
* predefined aliases) left and right parenthesis, and the vertical bar.
*/
public static EventConsumer createPipeline (
- String tokens [],
- EventConsumer next
+ String tokens [],
+ EventConsumer next
) throws IOException
{
- PipelineFactory factory = new PipelineFactory ();
- Pipeline pipeline = factory.parsePipeline (tokens, next);
+ PipelineFactory factory = new PipelineFactory ();
+ Pipeline pipeline = factory.parsePipeline (tokens, next);
- return pipeline.createPipeline ();
+ return pipeline.createPipeline ();
}
- private String tokens [];
- private int index;
+ private String tokens [];
+ private int index;
private Pipeline parsePipeline (String toks [], EventConsumer next)
{
- tokens = toks;
- index = 0;
-
- Pipeline retval = parsePipeline (next);
-
- if (index != toks.length)
- throw new ArrayIndexOutOfBoundsException (
- "extra token: " + tokens [index]);
- return retval;
+ tokens = toks;
+ index = 0;
+
+ Pipeline retval = parsePipeline (next);
+
+ if (index != toks.length)
+ throw new ArrayIndexOutOfBoundsException (
+ "extra token: " + tokens [index]);
+ return retval;
}
// pipeline ::= stage | stage '|' pipeline
private Pipeline parsePipeline (EventConsumer next)
{
- Pipeline retval = new Pipeline (parseStage ());
-
- // minimal pipelines: "stage" and "... | id"
- if (index > (tokens.length - 2)
- || !"|".equals (tokens [index])
- ) {
- retval.next = next;
- return retval;
- }
- index++;
- retval.rest = parsePipeline (next);
- return retval;
+ Pipeline retval = new Pipeline (parseStage ());
+
+ // minimal pipelines: "stage" and "... | id"
+ if (index > (tokens.length - 2)
+ || !"|".equals (tokens [index])
+ ) {
+ retval.next = next;
+ return retval;
+ }
+ index++;
+ retval.rest = parsePipeline (next);
+ return retval;
}
// stage ::= id | id '(' pipeline ')'
private Stage parseStage ()
{
- Stage retval = new Stage (tokens [index++]);
-
- // minimal stages: "id" and "id ( id )"
- if (index > (tokens.length - 2)
- || !"(".equals (tokens [index]) /*)*/
- )
- return retval;
-
- index++;
- retval.param = parsePipeline (null);
- if (index >= tokens.length)
- throw new ArrayIndexOutOfBoundsException (
- "missing right paren");
- if (/*(*/ !")".equals (tokens [index++]))
- throw new ArrayIndexOutOfBoundsException (
- "required right paren, not: " + tokens [index - 1]);
- return retval;
+ Stage retval = new Stage (tokens [index++]);
+
+ // minimal stages: "id" and "id ( id )"
+ if (index > (tokens.length - 2)
+ || !"(".equals (tokens [index]) /*)*/
+ )
+ return retval;
+
+ index++;
+ retval.param = parsePipeline (null);
+ if (index >= tokens.length)
+ throw new ArrayIndexOutOfBoundsException (
+ "missing right paren");
+ if (/*(*/ !")".equals (tokens [index++]))
+ throw new ArrayIndexOutOfBoundsException (
+ "required right paren, not: " + tokens [index - 1]);
+ return retval;
}
@@ -313,12 +313,12 @@ public class PipelineFactory
// these classes obey the conventions for constructors, so they're
// only built in to this table of shortnames
//
- // - filter (one or two types of arglist)
- // * last constructor is 'next' element
- // * optional (first) string parameter
+ // - filter (one or two types of arglist)
+ // * last constructor is 'next' element
+ // * optional (first) string parameter
//
- // - terminus (one or types of arglist)
- // * optional (only) string parameter
+ // - terminus (one or types of arglist)
+ // * optional (only) string parameter
//
// terminus stages are transformed into filters if needed, by
// creating a "tee". filter stages aren't turned to terminus
@@ -326,397 +326,397 @@ public class PipelineFactory
// terminus explicitly.
//
private static final String builtinStages [][] = {
- { "dom", "gnu.xml.dom.Consumer" },
- { "nsfix", "gnu.xml.pipeline.NSFilter" },
- { "null", "gnu.xml.pipeline.EventFilter" },
- { "server", "gnu.xml.pipeline.CallFilter" },
- { "tee", "gnu.xml.pipeline.TeeConsumer" },
- { "validate", "gnu.xml.pipeline.ValidationConsumer" },
- { "wf", "gnu.xml.pipeline.WellFormednessFilter" },
- { "xinclude", "gnu.xml.pipeline.XIncludeFilter" },
- { "xslt", "gnu.xml.pipeline.XsltFilter" },
+ { "dom", "gnu.xml.dom.Consumer" },
+ { "nsfix", "gnu.xml.pipeline.NSFilter" },
+ { "null", "gnu.xml.pipeline.EventFilter" },
+ { "server", "gnu.xml.pipeline.CallFilter" },
+ { "tee", "gnu.xml.pipeline.TeeConsumer" },
+ { "validate", "gnu.xml.pipeline.ValidationConsumer" },
+ { "wf", "gnu.xml.pipeline.WellFormednessFilter" },
+ { "xinclude", "gnu.xml.pipeline.XIncludeFilter" },
+ { "xslt", "gnu.xml.pipeline.XsltFilter" },
// XXX want: option for validate, to preload external part of a DTD
- // xhtml, write ... nyet generic-ready
+ // xhtml, write ... nyet generic-ready
};
private static class Stage
{
- String id;
- Pipeline param;
-
- Stage (String name)
- { id = name; }
-
- public String toString ()
- {
- if (param == null)
- return id;
- return id + " ( " + param + " )";
- }
-
- private void fail (String message)
- throws IOException
- {
- throw new IOException ("in '" + id
- + "' stage of pipeline, " + message);
- }
-
- EventConsumer createStage (EventConsumer next)
- throws IOException
- {
- String name = id;
-
- // most builtins are just class aliases
- for (int i = 0; i < builtinStages.length; i++) {
- if (id.equals (builtinStages [i][0])) {
- name = builtinStages [i][1];
- break;
- }
- }
-
- // Save output as XML or XHTML text
- if ("write".equals (name) || "xhtml".equals (name)) {
- String filename;
- boolean isXhtml = "xhtml".equals (name);
- OutputStream out = null;
- TextConsumer consumer;
-
- if (param == null)
- fail ("parameter is required");
-
- filename = param.toString ();
- if ("stdout".equals (filename))
- out = System.out;
- else if ("stderr".equals (filename))
- out = System.err;
- else {
- File f = new File (filename);
+ String id;
+ Pipeline param;
+
+ Stage (String name)
+ { id = name; }
+
+ public String toString ()
+ {
+ if (param == null)
+ return id;
+ return id + " ( " + param + " )";
+ }
+
+ private void fail (String message)
+ throws IOException
+ {
+ throw new IOException ("in '" + id
+ + "' stage of pipeline, " + message);
+ }
+
+ EventConsumer createStage (EventConsumer next)
+ throws IOException
+ {
+ String name = id;
+
+ // most builtins are just class aliases
+ for (int i = 0; i < builtinStages.length; i++) {
+ if (id.equals (builtinStages [i][0])) {
+ name = builtinStages [i][1];
+ break;
+ }
+ }
+
+ // Save output as XML or XHTML text
+ if ("write".equals (name) || "xhtml".equals (name)) {
+ String filename;
+ boolean isXhtml = "xhtml".equals (name);
+ OutputStream out = null;
+ TextConsumer consumer;
+
+ if (param == null)
+ fail ("parameter is required");
+
+ filename = param.toString ();
+ if ("stdout".equals (filename))
+ out = System.out;
+ else if ("stderr".equals (filename))
+ out = System.err;
+ else {
+ File f = new File (filename);
/*
- if (!f.isAbsolute ())
- fail ("require absolute file paths");
+ if (!f.isAbsolute ())
+ fail ("require absolute file paths");
*/
- if (f.exists ())
- fail ("file already exists: " + f.getName ());
+ if (f.exists ())
+ fail ("file already exists: " + f.getName ());
// XXX this races against the existence test
- out = new FileOutputStream (f);
- }
-
- if (!isXhtml)
- consumer = new TextConsumer (out);
- else
- consumer = new TextConsumer (
- new OutputStreamWriter (out, "8859_1"),
- true);
-
- consumer.setPrettyPrinting (true);
- if (next == null)
- return consumer;
- return new TeeConsumer (consumer, next);
-
- } else {
- //
- // Here go all the builtins that are just aliases for
- // classes, and all stage IDs that started out as such
- // class names. The following logic relies on several
- // documented conventions for constructor invocation.
- //
- String msg = null;
-
- try {
- Class klass = Class.forName (name);
- Class argTypes [] = null;
- Constructor constructor = null;
- boolean filter = false;
- Object params [] = null;
- Object obj = null;
-
- // do we need a filter stage?
- if (next != null) {
- // "next" consumer is always passed, with
- // or without the optional string param
- if (param == null) {
- argTypes = new Class [1];
- argTypes [0] = EventConsumer.class;
-
- params = new Object [1];
- params [0] = next;
-
- msg = "no-param filter";
- } else {
- argTypes = new Class [2];
- argTypes [0] = String.class;
- argTypes [1] = EventConsumer.class;
-
- params = new Object [2];
- params [0] = param.toString ();
- params [1] = next;
-
- msg = "one-param filter";
- }
-
-
- try {
- constructor = klass.getConstructor (argTypes);
- } catch (NoSuchMethodException e) {
- // try creating a filter from a
- // terminus and a tee
- filter = true;
- msg += " built from ";
- }
- }
-
- // build from a terminus stage, with or
- // without the optional string param
- if (constructor == null) {
- String tmp;
-
- if (param == null) {
- argTypes = new Class [0];
- params = new Object [0];
-
- tmp = "no-param terminus";
- } else {
- argTypes = new Class [1];
- argTypes [0] = String.class;
-
- params = new Object [1];
- params [0] = param.toString ();
-
- tmp = "one-param terminus";
- }
- if (msg == null)
- msg = tmp;
- else
- msg += tmp;
- constructor = klass.getConstructor (argTypes);
- // NOT creating terminus by dead-ending
- // filters ... users should think about
- // that one, something's likely wrong
- }
-
- obj = constructor.newInstance (params);
-
- // return EventConsumers directly, perhaps after
- // turning them into a filter
- if (obj instanceof EventConsumer) {
- if (filter)
- return new TeeConsumer ((EventConsumer) obj, next);
- return (EventConsumer) obj;
- }
-
- // if it's not a handler, it's an error
- // we can wrap handlers in a filter
- EventFilter retval = new EventFilter ();
- boolean updated = false;
-
- if (obj instanceof ContentHandler) {
- retval.setContentHandler ((ContentHandler) obj);
- updated = true;
- }
- if (obj instanceof DTDHandler) {
- retval.setDTDHandler ((DTDHandler) obj);
- updated = true;
- }
- if (obj instanceof LexicalHandler) {
- retval.setProperty (
- EventFilter.PROPERTY_URI + "lexical-handler",
- obj);
- updated = true;
- }
- if (obj instanceof DeclHandler) {
- retval.setProperty (
- EventFilter.PROPERTY_URI + "declaration-handler",
- obj);
- updated = true;
- }
-
- if (!updated)
- fail ("class is neither Consumer nor Handler");
-
- if (filter)
- return new TeeConsumer (retval, next);
- return retval;
-
- } catch (IOException e) {
- throw e;
-
- } catch (NoSuchMethodException e) {
- fail (name + " constructor missing -- " + msg);
-
- } catch (ClassNotFoundException e) {
- fail (name + " class not found");
-
- } catch (Exception e) {
- // e.printStackTrace ();
- fail ("stage not available: " + e.getMessage ());
- }
- }
- // NOTREACHED
- return null;
- }
+ out = new FileOutputStream (f);
+ }
+
+ if (!isXhtml)
+ consumer = new TextConsumer (out);
+ else
+ consumer = new TextConsumer (
+ new OutputStreamWriter (out, "8859_1"),
+ true);
+
+ consumer.setPrettyPrinting (true);
+ if (next == null)
+ return consumer;
+ return new TeeConsumer (consumer, next);
+
+ } else {
+ //
+ // Here go all the builtins that are just aliases for
+ // classes, and all stage IDs that started out as such
+ // class names. The following logic relies on several
+ // documented conventions for constructor invocation.
+ //
+ String msg = null;
+
+ try {
+ Class klass = Class.forName (name);
+ Class argTypes [] = null;
+ Constructor constructor = null;
+ boolean filter = false;
+ Object params [] = null;
+ Object obj = null;
+
+ // do we need a filter stage?
+ if (next != null) {
+ // "next" consumer is always passed, with
+ // or without the optional string param
+ if (param == null) {
+ argTypes = new Class [1];
+ argTypes [0] = EventConsumer.class;
+
+ params = new Object [1];
+ params [0] = next;
+
+ msg = "no-param filter";
+ } else {
+ argTypes = new Class [2];
+ argTypes [0] = String.class;
+ argTypes [1] = EventConsumer.class;
+
+ params = new Object [2];
+ params [0] = param.toString ();
+ params [1] = next;
+
+ msg = "one-param filter";
+ }
+
+
+ try {
+ constructor = klass.getConstructor (argTypes);
+ } catch (NoSuchMethodException e) {
+ // try creating a filter from a
+ // terminus and a tee
+ filter = true;
+ msg += " built from ";
+ }
+ }
+
+ // build from a terminus stage, with or
+ // without the optional string param
+ if (constructor == null) {
+ String tmp;
+
+ if (param == null) {
+ argTypes = new Class [0];
+ params = new Object [0];
+
+ tmp = "no-param terminus";
+ } else {
+ argTypes = new Class [1];
+ argTypes [0] = String.class;
+
+ params = new Object [1];
+ params [0] = param.toString ();
+
+ tmp = "one-param terminus";
+ }
+ if (msg == null)
+ msg = tmp;
+ else
+ msg += tmp;
+ constructor = klass.getConstructor (argTypes);
+ // NOT creating terminus by dead-ending
+ // filters ... users should think about
+ // that one, something's likely wrong
+ }
+
+ obj = constructor.newInstance (params);
+
+ // return EventConsumers directly, perhaps after
+ // turning them into a filter
+ if (obj instanceof EventConsumer) {
+ if (filter)
+ return new TeeConsumer ((EventConsumer) obj, next);
+ return (EventConsumer) obj;
+ }
+
+ // if it's not a handler, it's an error
+ // we can wrap handlers in a filter
+ EventFilter retval = new EventFilter ();
+ boolean updated = false;
+
+ if (obj instanceof ContentHandler) {
+ retval.setContentHandler ((ContentHandler) obj);
+ updated = true;
+ }
+ if (obj instanceof DTDHandler) {
+ retval.setDTDHandler ((DTDHandler) obj);
+ updated = true;
+ }
+ if (obj instanceof LexicalHandler) {
+ retval.setProperty (
+ EventFilter.PROPERTY_URI + "lexical-handler",
+ obj);
+ updated = true;
+ }
+ if (obj instanceof DeclHandler) {
+ retval.setProperty (
+ EventFilter.PROPERTY_URI + "declaration-handler",
+ obj);
+ updated = true;
+ }
+
+ if (!updated)
+ fail ("class is neither Consumer nor Handler");
+
+ if (filter)
+ return new TeeConsumer (retval, next);
+ return retval;
+
+ } catch (IOException e) {
+ throw e;
+
+ } catch (NoSuchMethodException e) {
+ fail (name + " constructor missing -- " + msg);
+
+ } catch (ClassNotFoundException e) {
+ fail (name + " class not found");
+
+ } catch (Exception e) {
+ // e.printStackTrace ();
+ fail ("stage not available: " + e.getMessage ());
+ }
+ }
+ // NOTREACHED
+ return null;
+ }
}
private static class Pipeline
{
- Stage stage;
-
- // rest may be null
- Pipeline rest;
- EventConsumer next;
-
- Pipeline (Stage s)
- { stage = s; }
-
- public String toString ()
- {
- if (rest == null && next == null)
- return stage.toString ();
- if (rest != null)
- return stage + " | " + rest;
- throw new IllegalArgumentException ("next");
- }
-
- EventConsumer createPipeline ()
- throws IOException
- {
- if (next == null) {
- if (rest == null)
- next = stage.createStage (null);
- else
- next = stage.createStage (rest.createPipeline ());
- }
- return next;
- }
+ Stage stage;
+
+ // rest may be null
+ Pipeline rest;
+ EventConsumer next;
+
+ Pipeline (Stage s)
+ { stage = s; }
+
+ public String toString ()
+ {
+ if (rest == null && next == null)
+ return stage.toString ();
+ if (rest != null)
+ return stage + " | " + rest;
+ throw new IllegalArgumentException ("next");
+ }
+
+ EventConsumer createPipeline ()
+ throws IOException
+ {
+ if (next == null) {
+ if (rest == null)
+ next = stage.createStage (null);
+ else
+ next = stage.createStage (rest.createPipeline ());
+ }
+ return next;
+ }
}
/*
public static void main (String argv [])
{
- try {
- // three basic terminus cases
- createPipeline ("null");
- createPipeline ("validate");
- createPipeline ("write ( stdout )");
-
- // four basic filters
- createPipeline ("nsfix | write ( stderr )");
- createPipeline ("wf | null");
- createPipeline ("null | null");
- createPipeline (
+ try {
+ // three basic terminus cases
+ createPipeline ("null");
+ createPipeline ("validate");
+ createPipeline ("write ( stdout )");
+
+ // four basic filters
+ createPipeline ("nsfix | write ( stderr )");
+ createPipeline ("wf | null");
+ createPipeline ("null | null");
+ createPipeline (
"call ( http://www.example.com/services/xml-1a ) | xhtml ( stdout )");
- // tee junctions
- createPipeline ("tee ( validate ) | write ( stdout )");
- createPipeline ("tee ( nsfix | write ( stdout ) ) | validate");
-
- // longer pipeline
- createPipeline ("nsfix | tee ( validate ) | write ( stdout )");
- createPipeline (
- "null | wf | nsfix | tee ( validate ) | write ( stdout )");
-
- // try some parsing error cases
- try {
- createPipeline ("null ("); // extra token '('
- System.err.println ("** didn't report error");
- } catch (Exception e) {
- System.err.println ("== err: " + e.getMessage ()); }
-
- try {
- createPipeline ("nsfix |"); // extra token '|'
- System.err.println ("** didn't report error");
- } catch (Exception e) {
- System.err.println ("== err: " + e.getMessage ()); }
-
- try {
- createPipeline ("xhtml ( foo"); // missing right paren
- System.err.println ("** didn't report error");
- } catch (Exception e) {
- System.err.println ("== err: " + e.getMessage ()); }
-
- try {
- createPipeline ("xhtml ( foo bar"); // required right paren
- System.err.println ("** didn't report error");
- } catch (Exception e) {
- System.err.println ("== err: " + e.getMessage ()); }
-
- try {
- createPipeline ("tee ( nsfix | validate");// missing right paren
- System.err.println ("** didn't report error");
- } catch (Exception e) {
- System.err.println ("== err: " + e.getMessage ()); }
-
- // try some construction error cases
-
- try {
- createPipeline ("call"); // missing param
- System.err.println ("** didn't report error");
- } catch (Exception e) {
- System.err.println ("== err: " + e.getMessage ()); }
- try {
- createPipeline ("call ( foobar )"); // broken param
- System.err.println ("** didn't report error");
- } catch (Exception e) {
- System.err.println ("== err: " + e.getMessage ()); }
- try {
- createPipeline ("nsfix ( foobar )"); // illegal param
- System.err.println ("** didn't report error");
- } catch (Exception e) {
- System.err.println ("== err: " + e.getMessage ()); }
- try {
- createPipeline ("null ( foobar )"); // illegal param
- System.err.println ("** didn't report error");
- } catch (Exception e) {
- System.err.println ("== err: " + e.getMessage ()); }
- try {
- createPipeline ("wf ( foobar )"); // illegal param
- System.err.println ("** didn't report error");
- } catch (Exception e) {
- System.err.println ("== err: " + e.getMessage ()); }
- try {
- createPipeline ("xhtml ( foobar.html )");
- new File ("foobar.html").delete ();
- // now supported
- } catch (Exception e) {
- System.err.println ("** err: " + e.getMessage ()); }
- try {
- createPipeline ("xhtml"); // missing param
- System.err.println ("** didn't report error");
- } catch (Exception e) {
- System.err.println ("== err: " + e.getMessage ()); }
- try {
- createPipeline ("write ( stdout ) | null"); // nonterminal
- System.err.println ("** didn't report error");
- } catch (Exception e) {
- System.err.println ("== err: " + e.getMessage ()); }
- try {
- createPipeline ("validate | null");
- // now supported
- } catch (Exception e) {
- System.err.println ("** err: " + e.getMessage ()); }
- try {
- createPipeline ("validate ( foo )"); // illegal param
- System.err.println ("** didn't report error");
- } catch (Exception e) {
- System.err.println ("== err: " + e.getMessage ()); }
- try {
- createPipeline ("tee"); // missing param
- System.err.println ("** didn't report error");
- } catch (Exception e) {
- System.err.println ("== err: " + e.getMessage ()); }
- try {
- // only builtins so far
- createPipeline ("com.example.xml.FilterClass");
- System.err.println ("** didn't report error");
- } catch (Exception e) {
- System.err.println ("== err: " + e.getMessage ()); }
-
- } catch (Exception e) {
- e.printStackTrace ();
- }
+ // tee junctions
+ createPipeline ("tee ( validate ) | write ( stdout )");
+ createPipeline ("tee ( nsfix | write ( stdout ) ) | validate");
+
+ // longer pipeline
+ createPipeline ("nsfix | tee ( validate ) | write ( stdout )");
+ createPipeline (
+ "null | wf | nsfix | tee ( validate ) | write ( stdout )");
+
+ // try some parsing error cases
+ try {
+ createPipeline ("null ("); // extra token '('
+ System.err.println ("** didn't report error");
+ } catch (Exception e) {
+ System.err.println ("== err: " + e.getMessage ()); }
+
+ try {
+ createPipeline ("nsfix |"); // extra token '|'
+ System.err.println ("** didn't report error");
+ } catch (Exception e) {
+ System.err.println ("== err: " + e.getMessage ()); }
+
+ try {
+ createPipeline ("xhtml ( foo"); // missing right paren
+ System.err.println ("** didn't report error");
+ } catch (Exception e) {
+ System.err.println ("== err: " + e.getMessage ()); }
+
+ try {
+ createPipeline ("xhtml ( foo bar"); // required right paren
+ System.err.println ("** didn't report error");
+ } catch (Exception e) {
+ System.err.println ("== err: " + e.getMessage ()); }
+
+ try {
+ createPipeline ("tee ( nsfix | validate");// missing right paren
+ System.err.println ("** didn't report error");
+ } catch (Exception e) {
+ System.err.println ("== err: " + e.getMessage ()); }
+
+ // try some construction error cases
+
+ try {
+ createPipeline ("call"); // missing param
+ System.err.println ("** didn't report error");
+ } catch (Exception e) {
+ System.err.println ("== err: " + e.getMessage ()); }
+ try {
+ createPipeline ("call ( foobar )"); // broken param
+ System.err.println ("** didn't report error");
+ } catch (Exception e) {
+ System.err.println ("== err: " + e.getMessage ()); }
+ try {
+ createPipeline ("nsfix ( foobar )"); // illegal param
+ System.err.println ("** didn't report error");
+ } catch (Exception e) {
+ System.err.println ("== err: " + e.getMessage ()); }
+ try {
+ createPipeline ("null ( foobar )"); // illegal param
+ System.err.println ("** didn't report error");
+ } catch (Exception e) {
+ System.err.println ("== err: " + e.getMessage ()); }
+ try {
+ createPipeline ("wf ( foobar )"); // illegal param
+ System.err.println ("** didn't report error");
+ } catch (Exception e) {
+ System.err.println ("== err: " + e.getMessage ()); }
+ try {
+ createPipeline ("xhtml ( foobar.html )");
+ new File ("foobar.html").delete ();
+ // now supported
+ } catch (Exception e) {
+ System.err.println ("** err: " + e.getMessage ()); }
+ try {
+ createPipeline ("xhtml"); // missing param
+ System.err.println ("** didn't report error");
+ } catch (Exception e) {
+ System.err.println ("== err: " + e.getMessage ()); }
+ try {
+ createPipeline ("write ( stdout ) | null"); // nonterminal
+ System.err.println ("** didn't report error");
+ } catch (Exception e) {
+ System.err.println ("== err: " + e.getMessage ()); }
+ try {
+ createPipeline ("validate | null");
+ // now supported
+ } catch (Exception e) {
+ System.err.println ("** err: " + e.getMessage ()); }
+ try {
+ createPipeline ("validate ( foo )"); // illegal param
+ System.err.println ("** didn't report error");
+ } catch (Exception e) {
+ System.err.println ("== err: " + e.getMessage ()); }
+ try {
+ createPipeline ("tee"); // missing param
+ System.err.println ("** didn't report error");
+ } catch (Exception e) {
+ System.err.println ("== err: " + e.getMessage ()); }
+ try {
+ // only builtins so far
+ createPipeline ("com.example.xml.FilterClass");
+ System.err.println ("** didn't report error");
+ } catch (Exception e) {
+ System.err.println ("== err: " + e.getMessage ()); }
+
+ } catch (Exception e) {
+ e.printStackTrace ();
+ }
}
/**/
diff --git a/gnu/xml/pipeline/TeeConsumer.java b/gnu/xml/pipeline/TeeConsumer.java
index 8186de4df..3ac860575 100644
--- a/gnu/xml/pipeline/TeeConsumer.java
+++ b/gnu/xml/pipeline/TeeConsumer.java
@@ -1,4 +1,4 @@
-/* TeeConsumer.java --
+/* TeeConsumer.java --
Copyright (C) 1999,2000,2001 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -68,16 +68,16 @@ import org.xml.sax.ext.LexicalHandler;
* @author David Brownell
*/
final public class TeeConsumer
- implements EventConsumer,
- ContentHandler, DTDHandler,
- LexicalHandler,DeclHandler
+ implements EventConsumer,
+ ContentHandler, DTDHandler,
+ LexicalHandler,DeclHandler
{
- private EventConsumer first, rest;
+ private EventConsumer first, rest;
// cached to minimize time overhead
- private ContentHandler docFirst, docRest;
- private DeclHandler declFirst, declRest;
- private LexicalHandler lexFirst, lexRest;
+ private ContentHandler docFirst, docRest;
+ private DeclHandler declFirst, declRest;
+ private LexicalHandler lexFirst, lexRest;
/**
@@ -91,39 +91,39 @@ final public class TeeConsumer
*/
public TeeConsumer (EventConsumer car, EventConsumer cdr)
{
- if (car == null || cdr == null)
- throw new NullPointerException ();
- first = car;
- rest = cdr;
-
- //
- // Cache the handlers.
- //
- docFirst = first.getContentHandler ();
- docRest = rest.getContentHandler ();
- // DTD handler isn't cached (rarely needed)
-
- try {
- declFirst = null;
- declFirst = (DeclHandler) first.getProperty (
- EventFilter.DECL_HANDLER);
- } catch (SAXException e) {}
- try {
- declRest = null;
- declRest = (DeclHandler) rest.getProperty (
- EventFilter.DECL_HANDLER);
- } catch (SAXException e) {}
-
- try {
- lexFirst = null;
- lexFirst = (LexicalHandler) first.getProperty (
- EventFilter.LEXICAL_HANDLER);
- } catch (SAXException e) {}
- try {
- lexRest = null;
- lexRest = (LexicalHandler) rest.getProperty (
- EventFilter.LEXICAL_HANDLER);
- } catch (SAXException e) {}
+ if (car == null || cdr == null)
+ throw new NullPointerException ();
+ first = car;
+ rest = cdr;
+
+ //
+ // Cache the handlers.
+ //
+ docFirst = first.getContentHandler ();
+ docRest = rest.getContentHandler ();
+ // DTD handler isn't cached (rarely needed)
+
+ try {
+ declFirst = null;
+ declFirst = (DeclHandler) first.getProperty (
+ EventFilter.DECL_HANDLER);
+ } catch (SAXException e) {}
+ try {
+ declRest = null;
+ declRest = (DeclHandler) rest.getProperty (
+ EventFilter.DECL_HANDLER);
+ } catch (SAXException e) {}
+
+ try {
+ lexFirst = null;
+ lexFirst = (LexicalHandler) first.getProperty (
+ EventFilter.LEXICAL_HANDLER);
+ } catch (SAXException e) {}
+ try {
+ lexRest = null;
+ lexRest = (LexicalHandler) rest.getProperty (
+ EventFilter.LEXICAL_HANDLER);
+ } catch (SAXException e) {}
}
/* FIXME
@@ -132,78 +132,78 @@ final public class TeeConsumer
* two-consumer constructor for this class.
*
* @param first Description of the first pipeline to get events,
- * which will be passed to {@link PipelineFactory#createPipeline}
+ * which will be passed to {@link PipelineFactory#createPipeline}
* @param rest The second pipeline to get the events
* /
- // constructor used by PipelineFactory
+ // constructor used by PipelineFactory
public TeeConsumer (String first, EventConsumer rest)
throws IOException
{
- this (PipelineFactory.createPipeline (first), rest);
+ this (PipelineFactory.createPipeline (first), rest);
}
*/
/** Returns the first pipeline to get event calls. */
public EventConsumer getFirst ()
- { return first; }
+ { return first; }
/** Returns the second pipeline to get event calls. */
public EventConsumer getRest ()
- { return rest; }
+ { return rest; }
/** Returns the content handler being used. */
final public ContentHandler getContentHandler ()
{
- if (docRest == null)
- return docFirst;
- if (docFirst == null)
- return docRest;
- return this;
+ if (docRest == null)
+ return docFirst;
+ if (docFirst == null)
+ return docRest;
+ return this;
}
/** Returns the dtd handler being used. */
final public DTDHandler getDTDHandler ()
{
- // not cached (hardly used)
- if (rest.getDTDHandler () == null)
- return first.getDTDHandler ();
- if (first.getDTDHandler () == null)
- return rest.getDTDHandler ();
- return this;
+ // not cached (hardly used)
+ if (rest.getDTDHandler () == null)
+ return first.getDTDHandler ();
+ if (first.getDTDHandler () == null)
+ return rest.getDTDHandler ();
+ return this;
}
/** Returns the declaration or lexical handler being used. */
final public Object getProperty (String id)
throws SAXNotRecognizedException
{
- //
- // in degenerate cases, we have no work to do.
- //
- Object firstProp = null, restProp = null;
-
- try { firstProp = first.getProperty (id); }
- catch (SAXNotRecognizedException e) { /* ignore */ }
- try { restProp = rest.getProperty (id); }
- catch (SAXNotRecognizedException e) { /* ignore */ }
-
- if (restProp == null)
- return firstProp;
- if (firstProp == null)
- return restProp;
-
- //
- // we've got work to do; handle two builtin cases.
- //
- if (EventFilter.DECL_HANDLER.equals (id))
- return this;
- if (EventFilter.LEXICAL_HANDLER.equals (id))
- return this;
-
- //
- // non-degenerate, handled by both consumers, but we don't know
- // how to handle this.
- //
- throw new SAXNotRecognizedException ("can't tee: " + id);
+ //
+ // in degenerate cases, we have no work to do.
+ //
+ Object firstProp = null, restProp = null;
+
+ try { firstProp = first.getProperty (id); }
+ catch (SAXNotRecognizedException e) { /* ignore */ }
+ try { restProp = rest.getProperty (id); }
+ catch (SAXNotRecognizedException e) { /* ignore */ }
+
+ if (restProp == null)
+ return firstProp;
+ if (firstProp == null)
+ return restProp;
+
+ //
+ // we've got work to do; handle two builtin cases.
+ //
+ if (EventFilter.DECL_HANDLER.equals (id))
+ return this;
+ if (EventFilter.LEXICAL_HANDLER.equals (id))
+ return this;
+
+ //
+ // non-degenerate, handled by both consumers, but we don't know
+ // how to handle this.
+ //
+ throw new SAXNotRecognizedException ("can't tee: " + id);
}
/**
@@ -212,8 +212,8 @@ final public class TeeConsumer
*/
public void setErrorHandler (ErrorHandler handler)
{
- first.setErrorHandler (handler);
- rest.setErrorHandler (handler);
+ first.setErrorHandler (handler);
+ rest.setErrorHandler (handler);
}
@@ -222,83 +222,83 @@ final public class TeeConsumer
//
public void setDocumentLocator (Locator locator)
{
- // this call is not made by all parsers
- docFirst.setDocumentLocator (locator);
- docRest.setDocumentLocator (locator);
+ // this call is not made by all parsers
+ docFirst.setDocumentLocator (locator);
+ docRest.setDocumentLocator (locator);
}
public void startDocument ()
throws SAXException
{
- docFirst.startDocument ();
- docRest.startDocument ();
+ docFirst.startDocument ();
+ docRest.startDocument ();
}
public void endDocument ()
throws SAXException
{
- try {
- docFirst.endDocument ();
- } finally {
- docRest.endDocument ();
- }
+ try {
+ docFirst.endDocument ();
+ } finally {
+ docRest.endDocument ();
+ }
}
public void startPrefixMapping (String prefix, String uri)
throws SAXException
{
- docFirst.startPrefixMapping (prefix, uri);
- docRest.startPrefixMapping (prefix, uri);
+ docFirst.startPrefixMapping (prefix, uri);
+ docRest.startPrefixMapping (prefix, uri);
}
public void endPrefixMapping (String prefix)
throws SAXException
{
- docFirst.endPrefixMapping (prefix);
- docRest.endPrefixMapping (prefix);
+ docFirst.endPrefixMapping (prefix);
+ docRest.endPrefixMapping (prefix);
}
public void skippedEntity (String name)
throws SAXException
{
- docFirst.skippedEntity (name);
- docRest.skippedEntity (name);
+ docFirst.skippedEntity (name);
+ docRest.skippedEntity (name);
}
public void startElement (String uri, String localName,
- String qName, Attributes atts)
+ String qName, Attributes atts)
throws SAXException
{
- docFirst.startElement (uri, localName, qName, atts);
- docRest.startElement (uri, localName, qName, atts);
+ docFirst.startElement (uri, localName, qName, atts);
+ docRest.startElement (uri, localName, qName, atts);
}
public void endElement (String uri, String localName, String qName)
throws SAXException
{
- docFirst.endElement (uri, localName, qName);
- docRest.endElement (uri, localName, qName);
+ docFirst.endElement (uri, localName, qName);
+ docRest.endElement (uri, localName, qName);
}
public void processingInstruction (String target, String data)
throws SAXException
{
- docFirst.processingInstruction (target, data);
- docRest.processingInstruction (target, data);
+ docFirst.processingInstruction (target, data);
+ docRest.processingInstruction (target, data);
}
public void characters (char ch [], int start, int length)
throws SAXException
{
- docFirst.characters (ch, start, length);
- docRest.characters (ch, start, length);
+ docFirst.characters (ch, start, length);
+ docRest.characters (ch, start, length);
}
public void ignorableWhitespace (char ch [], int start, int length)
throws SAXException
{
- docFirst.ignorableWhitespace (ch, start, length);
- docRest.ignorableWhitespace (ch, start, length);
+ docFirst.ignorableWhitespace (ch, start, length);
+ docRest.ignorableWhitespace (ch, start, length);
}
@@ -308,23 +308,23 @@ final public class TeeConsumer
public void notationDecl (String name, String publicId, String systemId)
throws SAXException
{
- DTDHandler l1 = first.getDTDHandler ();
- DTDHandler l2 = rest.getDTDHandler ();
+ DTDHandler l1 = first.getDTDHandler ();
+ DTDHandler l2 = rest.getDTDHandler ();
- l1.notationDecl (name, publicId, systemId);
- l2.notationDecl (name, publicId, systemId);
+ l1.notationDecl (name, publicId, systemId);
+ l2.notationDecl (name, publicId, systemId);
}
public void unparsedEntityDecl (String name,
- String publicId, String systemId,
- String notationName
+ String publicId, String systemId,
+ String notationName
) throws SAXException
{
- DTDHandler l1 = first.getDTDHandler ();
- DTDHandler l2 = rest.getDTDHandler ();
+ DTDHandler l1 = first.getDTDHandler ();
+ DTDHandler l2 = rest.getDTDHandler ();
- l1.unparsedEntityDecl (name, publicId, systemId, notationName);
- l2.unparsedEntityDecl (name, publicId, systemId, notationName);
+ l1.unparsedEntityDecl (name, publicId, systemId, notationName);
+ l2.unparsedEntityDecl (name, publicId, systemId, notationName);
}
@@ -332,34 +332,34 @@ final public class TeeConsumer
// DeclHandler
//
public void attributeDecl (String eName, String aName,
- String type,
- String mode, String value)
+ String type,
+ String mode, String value)
throws SAXException
{
- declFirst.attributeDecl (eName, aName, type, mode, value);
- declRest.attributeDecl (eName, aName, type, mode, value);
+ declFirst.attributeDecl (eName, aName, type, mode, value);
+ declRest.attributeDecl (eName, aName, type, mode, value);
}
public void elementDecl (String name, String model)
throws SAXException
{
- declFirst.elementDecl (name, model);
- declRest.elementDecl (name, model);
+ declFirst.elementDecl (name, model);
+ declRest.elementDecl (name, model);
}
public void externalEntityDecl (String name,
- String publicId, String systemId)
+ String publicId, String systemId)
throws SAXException
{
- declFirst.externalEntityDecl (name, publicId, systemId);
- declRest.externalEntityDecl (name, publicId, systemId);
+ declFirst.externalEntityDecl (name, publicId, systemId);
+ declRest.externalEntityDecl (name, publicId, systemId);
}
public void internalEntityDecl (String name, String value)
throws SAXException
{
- declFirst.internalEntityDecl (name, value);
- declRest.internalEntityDecl (name, value);
+ declFirst.internalEntityDecl (name, value);
+ declRest.internalEntityDecl (name, value);
}
@@ -369,49 +369,49 @@ final public class TeeConsumer
public void comment (char ch [], int start, int length)
throws SAXException
{
- lexFirst.comment (ch, start, length);
- lexRest.comment (ch, start, length);
+ lexFirst.comment (ch, start, length);
+ lexRest.comment (ch, start, length);
}
-
+
public void startCDATA ()
throws SAXException
{
- lexFirst.startCDATA ();
- lexRest.startCDATA ();
+ lexFirst.startCDATA ();
+ lexRest.startCDATA ();
}
-
+
public void endCDATA ()
throws SAXException
{
- lexFirst.endCDATA ();
- lexRest.endCDATA ();
+ lexFirst.endCDATA ();
+ lexRest.endCDATA ();
}
-
+
public void startEntity (String name)
throws SAXException
{
- lexFirst.startEntity (name);
- lexRest.startEntity (name);
+ lexFirst.startEntity (name);
+ lexRest.startEntity (name);
}
-
+
public void endEntity (String name)
throws SAXException
{
- lexFirst.endEntity (name);
- lexRest.endEntity (name);
+ lexFirst.endEntity (name);
+ lexRest.endEntity (name);
}
-
+
public void startDTD (String name, String publicId, String systemId)
throws SAXException
{
- lexFirst.startDTD (name, publicId, systemId);
- lexRest.startDTD (name, publicId, systemId);
+ lexFirst.startDTD (name, publicId, systemId);
+ lexRest.startDTD (name, publicId, systemId);
}
-
+
public void endDTD ()
throws SAXException
{
- lexFirst.endDTD ();
- lexRest.endDTD ();
+ lexFirst.endDTD ();
+ lexRest.endDTD ();
}
}
diff --git a/gnu/xml/pipeline/TextConsumer.java b/gnu/xml/pipeline/TextConsumer.java
index 67bd23b00..13dcfa7f6 100644
--- a/gnu/xml/pipeline/TextConsumer.java
+++ b/gnu/xml/pipeline/TextConsumer.java
@@ -1,4 +1,4 @@
-/* TextConsumer.java --
+/* TextConsumer.java --
Copyright (C) 1999,2000,2001 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -72,8 +72,8 @@ public class TextConsumer extends XMLWriter implements EventConsumer
public TextConsumer (Writer w, boolean isXhtml)
throws IOException
{
- super (w, isXhtml ? "US-ASCII" : null);
- setXhtml (isXhtml);
+ super (w, isXhtml ? "US-ASCII" : null);
+ setXhtml (isXhtml);
}
/**
@@ -83,9 +83,9 @@ public class TextConsumer extends XMLWriter implements EventConsumer
public TextConsumer (Writer w)
throws IOException
{
- this (w, false);
+ this (w, false);
}
-
+
/**
* Constructs a consumer that writes its input as XML text,
* encoded in UTF-8. XHTML rules are not followed.
@@ -93,25 +93,25 @@ public class TextConsumer extends XMLWriter implements EventConsumer
public TextConsumer (OutputStream out)
throws IOException
{
- this (new OutputStreamWriter (out, "UTF8"), false);
+ this (new OutputStreamWriter (out, "UTF8"), false);
}
/** <b>EventConsumer</b> Returns the document handler being used. */
public ContentHandler getContentHandler ()
- { return this; }
+ { return this; }
/** <b>EventConsumer</b> Returns the dtd handler being used. */
public DTDHandler getDTDHandler ()
- { return this; }
+ { return this; }
/** <b>XMLReader</b>Retrieves a property (lexical and decl handlers) */
public Object getProperty (String propertyId)
throws SAXNotRecognizedException
{
- if (EventFilter.LEXICAL_HANDLER.equals (propertyId))
- return this;
- if (EventFilter.DECL_HANDLER.equals (propertyId))
- return this;
- throw new SAXNotRecognizedException (propertyId);
+ if (EventFilter.LEXICAL_HANDLER.equals (propertyId))
+ return this;
+ if (EventFilter.DECL_HANDLER.equals (propertyId))
+ return this;
+ throw new SAXNotRecognizedException (propertyId);
}
}
diff --git a/gnu/xml/pipeline/ValidationConsumer.java b/gnu/xml/pipeline/ValidationConsumer.java
index 839176749..0346984d3 100644
--- a/gnu/xml/pipeline/ValidationConsumer.java
+++ b/gnu/xml/pipeline/ValidationConsumer.java
@@ -1,4 +1,4 @@
-/* ValidationConsumer.java --
+/* ValidationConsumer.java --
Copyright (C) 1999,2000,2001 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -62,24 +62,24 @@ import org.xml.sax.helpers.XMLReaderFactory;
* both a filter and a terminus on an event pipeline. It relies on the
* producer of SAX events to: </p> <ol>
*
- * <li> Conform to the specification of a non-validating XML parser that
- * reads all external entities, reported using SAX2 events. </li>
+ * <li> Conform to the specification of a non-validating XML parser that
+ * reads all external entities, reported using SAX2 events. </li>
*
- * <li> Report ignorable whitespace as such (through the ContentHandler
- * interface). This is, strictly speaking, optional for nonvalidating
- * XML processors. </li>
+ * <li> Report ignorable whitespace as such (through the ContentHandler
+ * interface). This is, strictly speaking, optional for nonvalidating
+ * XML processors. </li>
*
- * <li> Make SAX2 DeclHandler callbacks, with default
- * attribute values already normalized (and without "&lt;").</li>
+ * <li> Make SAX2 DeclHandler callbacks, with default
+ * attribute values already normalized (and without "&lt;").</li>
*
- * <li> Make SAX2 LexicalHandler startDTD() and endDTD ()
- * callbacks. </li>
+ * <li> Make SAX2 LexicalHandler startDTD() and endDTD ()
+ * callbacks. </li>
*
- * <li> Act as if the <em>(URI)/namespace-prefixes</em> property were
- * set to true, by providing XML 1.0 names and all <code>xmlns*</code>
- * attributes (rather than omitting either or both). </li>
+ * <li> Act as if the <em>(URI)/namespace-prefixes</em> property were
+ * set to true, by providing XML 1.0 names and all <code>xmlns*</code>
+ * attributes (rather than omitting either or both). </li>
*
- * </ol>
+ * </ol>
*
* <p> At this writing, the major SAX2 parsers (such as &AElig;lfred2,
* Crimson, and Xerces) meet these requirements, and this validation
@@ -128,51 +128,51 @@ import org.xml.sax.helpers.XMLReaderFactory;
* of them) or discarded (popular for the standalone declaration); in short,
* that these are bugs in the XML specification (not all via SGML): </p><ul>
*
- * <li> The <em>Proper Declaration/PE Nesting</em> and
- * <em>Proper Group/PE Nesting</em> VCs can't be tested because they
- * require access to particularly low level lexical level information.
- * In essence, the reason XML isn't a simple thing to parse is that
- * it's not a context free grammar, and these constraints elevate that
- * SGML-derived context sensitivity to the level of a semantic rule.
+ * <li> The <em>Proper Declaration/PE Nesting</em> and
+ * <em>Proper Group/PE Nesting</em> VCs can't be tested because they
+ * require access to particularly low level lexical level information.
+ * In essence, the reason XML isn't a simple thing to parse is that
+ * it's not a context free grammar, and these constraints elevate that
+ * SGML-derived context sensitivity to the level of a semantic rule.
*
- * <li> The <em>Standalone Document Declaration</em> VC can't be
- * tested. This is for two reasons. First, this flag isn't made
- * available through SAX2. Second, it also requires breaking that
- * lexical layering boundary. (If you ever wondered why classes
- * in compiler construction or language design barely mention the
- * existence of context-sensitive grammars, it's because of messy
- * issues like these.)
+ * <li> The <em>Standalone Document Declaration</em> VC can't be
+ * tested. This is for two reasons. First, this flag isn't made
+ * available through SAX2. Second, it also requires breaking that
+ * lexical layering boundary. (If you ever wondered why classes
+ * in compiler construction or language design barely mention the
+ * existence of context-sensitive grammars, it's because of messy
+ * issues like these.)
*
- * <li> The <em>Entity Declared</em> VC can't be tested, because it
- * also requires breaking that lexical layering boundary! There's also
- * another issue: the VC wording (and seemingly intent) is ambiguous.
- * (This is still true in the "Second edition" XML spec.)
- * Since there is a WFC of the same name, everyone's life would be
- * easier if references to undeclared parsed entities were always well
- * formedness errors, regardless of whether they're parameter entities
- * or not. (Note that nonvalidating parsers are not required
- * to report all such well formedness errors if they don't read external
- * parameter entities, although currently most XML parsers read them
- * in an attempt to avoid problems from inconsistent parser behavior.)
+ * <li> The <em>Entity Declared</em> VC can't be tested, because it
+ * also requires breaking that lexical layering boundary! There's also
+ * another issue: the VC wording (and seemingly intent) is ambiguous.
+ * (This is still true in the "Second edition" XML spec.)
+ * Since there is a WFC of the same name, everyone's life would be
+ * easier if references to undeclared parsed entities were always well
+ * formedness errors, regardless of whether they're parameter entities
+ * or not. (Note that nonvalidating parsers are not required
+ * to report all such well formedness errors if they don't read external
+ * parameter entities, although currently most XML parsers read them
+ * in an attempt to avoid problems from inconsistent parser behavior.)
*
- * </ul>
+ * </ul>
*
* <p> The second category of limitations on this validation represent
* constraints associated with information that is not guaranteed to be
* available (or in one case, <em>is guaranteed not to be available</em>,
* through the SAX2 API: </p><ul>
*
- * <li> The <em>Unique Element Type Declaration</em> VC may not be
- * reportable, if the underlying parser happens not to expose
- * multiple declarations. (&AElig;lfred2 reports these validity
- * errors directly.)</li>
+ * <li> The <em>Unique Element Type Declaration</em> VC may not be
+ * reportable, if the underlying parser happens not to expose
+ * multiple declarations. (&AElig;lfred2 reports these validity
+ * errors directly.)</li>
*
- * <li> Similarly, the <em>Unique Notation Name</em> VC, added in the
- * 14-January-2000 XML spec errata to restrict typing models used by
- * elements, may not be reportable. (&AElig;lfred reports these
- * validity errors directly.) </li>
+ * <li> Similarly, the <em>Unique Notation Name</em> VC, added in the
+ * 14-January-2000 XML spec errata to restrict typing models used by
+ * elements, may not be reportable. (&AElig;lfred reports these
+ * validity errors directly.) </li>
*
- * </ul>
+ * </ul>
*
* <p> A third category relates to ease of implementation. (Think of this
* as "bugs".) The most notable issue here is character handling. Rather
@@ -199,15 +199,15 @@ public final class ValidationConsumer extends EventFilter
{
// report error if we happen to notice a non-deterministic choice?
// we won't report buggy content models; just buggy instances
- private static final boolean warnNonDeterministic = false;
+ private static final boolean warnNonDeterministic = false;
// for tracking active content models
- private String rootName;
- private Stack contentStack = new Stack ();
+ private String rootName;
+ private Stack contentStack = new Stack ();
// flags for "saved DTD" processing
- private boolean disableDeclarations;
- private boolean disableReset;
+ private boolean disableDeclarations;
+ private boolean disableReset;
//
// most VCs get tested when we see element start tags. the per-element
@@ -217,25 +217,25 @@ public final class ValidationConsumer extends EventFilter
//
// key = element name; value = ElementInfo
- private Hashtable elements = new Hashtable ();
+ private Hashtable elements = new Hashtable ();
// some VCs relate to ID/IDREF/IDREFS attributes
// key = id; value = boolean true (defd) or false (refd)
- private Hashtable ids = new Hashtable ();
+ private Hashtable ids = new Hashtable ();
// we just record declared notation and unparsed entity names.
// the implementation here is simple/slow; these features
// are seldom used, one hopes they'll wither away soon
- private Vector notations = new Vector (5, 5);
- private Vector nDeferred = new Vector (5, 5);
- private Vector unparsed = new Vector (5, 5);
- private Vector uDeferred = new Vector (5, 5);
-
- // note: DocBk 3.1.7 XML defines over 2 dozen notations,
- // used when defining unparsed entities for graphics
- // (and maybe in other places)
+ private Vector notations = new Vector (5, 5);
+ private Vector nDeferred = new Vector (5, 5);
+ private Vector unparsed = new Vector (5, 5);
+ private Vector uDeferred = new Vector (5, 5);
+
+ // note: DocBk 3.1.7 XML defines over 2 dozen notations,
+ // used when defining unparsed entities for graphics
+ // (and maybe in other places)
+
-
/**
* Creates a pipeline terminus which consumes all events passed to
@@ -244,11 +244,11 @@ public final class ValidationConsumer extends EventFilter
*
* @see #setErrorHandler
*/
- // constructor used by PipelineFactory
- // ... and want one taking system ID of an external subset
+ // constructor used by PipelineFactory
+ // ... and want one taking system ID of an external subset
public ValidationConsumer ()
{
- this (null);
+ this (null);
}
/**
@@ -257,25 +257,25 @@ public final class ValidationConsumer extends EventFilter
*
* @see #setErrorHandler
*/
- // constructor used by PipelineFactory
- // ... and want one taking system ID of an external subset
- // (which won't send declaration events)
+ // constructor used by PipelineFactory
+ // ... and want one taking system ID of an external subset
+ // (which won't send declaration events)
public ValidationConsumer (EventConsumer next)
{
- super (next);
-
- setContentHandler (this);
- setDTDHandler (this);
- try { setProperty (DECL_HANDLER, this); }
- catch (Exception e) { /* "can't happen" */ }
- try { setProperty (LEXICAL_HANDLER, this); }
- catch (Exception e) { /* "can't happen" */ }
+ super (next);
+
+ setContentHandler (this);
+ setDTDHandler (this);
+ try { setProperty (DECL_HANDLER, this); }
+ catch (Exception e) { /* "can't happen" */ }
+ try { setProperty (LEXICAL_HANDLER, this); }
+ catch (Exception e) { /* "can't happen" */ }
}
-
- private static final String fakeRootName
- = ":Nobody:in:their_Right.Mind_would:use:this-name:1x:";
-
+
+ private static final String fakeRootName
+ = ":Nobody:in:their_Right.Mind_would:use:this-name:1x:";
+
/**
* Creates a validation consumer which is preloaded with the DTD provided.
* It does this by constructing a document with that DTD, then parsing
@@ -287,182 +287,182 @@ public final class ValidationConsumer extends EventFilter
* in a document being parsed.
*
* @param rootName The name of the required root element; if this is
- * null, any root element name will be accepted.
+ * null, any root element name will be accepted.
* @param publicId If non-null and there is a non-null systemId, this
- * identifier provides an alternate access identifier for the DTD's
- * external subset.
+ * identifier provides an alternate access identifier for the DTD's
+ * external subset.
* @param systemId If non-null, this is a URI (normally URL) that
- * may be used to access the DTD's external subset.
+ * may be used to access the DTD's external subset.
* @param internalSubset If non-null, holds literal markup declarations
- * comprising the DTD's internal subset.
+ * comprising the DTD's internal subset.
* @param resolver If non-null, this will be provided to the parser for
- * use when resolving parameter entities (including any external subset).
+ * use when resolving parameter entities (including any external subset).
* @param resolver If non-null, this will be provided to the parser for
- * use when resolving parameter entities (including any external subset).
+ * use when resolving parameter entities (including any external subset).
* @param minimalElement If non-null, a minimal valid document.
*
* @exception SAXNotSupportedException If the default SAX parser does
- * not support the standard lexical or declaration handlers.
+ * not support the standard lexical or declaration handlers.
* @exception SAXParseException If the specified DTD has either
- * well-formedness or validity errors
+ * well-formedness or validity errors
* @exception IOException If the specified DTD can't be read for
- * some reason
+ * some reason
*/
public ValidationConsumer (
- String rootName,
- String publicId,
- String systemId,
- String internalSubset,
- EntityResolver resolver,
- String minimalDocument
+ String rootName,
+ String publicId,
+ String systemId,
+ String internalSubset,
+ EntityResolver resolver,
+ String minimalDocument
) throws SAXException, IOException
{
- this (null);
-
- disableReset = true;
- if (rootName == null)
- rootName = fakeRootName;
-
- //
- // Synthesize document with that DTD; is it possible to do
- // better for the declaration of the root element?
- //
- // NOTE: can't use SAX2 to write internal subsets.
- //
- StringWriter writer = new StringWriter ();
-
- writer.write ("<!DOCTYPE ");
- writer.write (rootName);
- if (systemId != null) {
- writer.write ("\n ");
- if (publicId != null) {
- writer.write ("PUBLIC '");
- writer.write (publicId);
- writer.write ("'\n\t'");
- } else
- writer.write ("SYSTEM '");
- writer.write (systemId);
- writer.write ("'");
- }
- writer.write (" [ ");
- if (rootName == fakeRootName) {
- writer.write ("\n<!ELEMENT ");
- writer.write (rootName);
- writer.write (" EMPTY>");
- }
- if (internalSubset != null)
- writer.write (internalSubset);
- writer.write ("\n ]>");
-
- if (minimalDocument != null) {
- writer.write ("\n");
- writer.write (minimalDocument);
- writer.write ("\n");
- } else {
- writer.write (" <");
- writer.write (rootName);
- writer.write ("/>\n");
- }
- minimalDocument = writer.toString ();
-
- //
- // OK, load it
- //
- XMLReader producer;
-
- producer = XMLReaderFactory.createXMLReader ();
- bind (producer, this);
-
- if (resolver != null)
- producer.setEntityResolver (resolver);
-
- InputSource in;
-
- in = new InputSource (new StringReader (minimalDocument));
- producer.parse (in);
-
- disableDeclarations = true;
- if (rootName == fakeRootName)
- this.rootName = null;
+ this (null);
+
+ disableReset = true;
+ if (rootName == null)
+ rootName = fakeRootName;
+
+ //
+ // Synthesize document with that DTD; is it possible to do
+ // better for the declaration of the root element?
+ //
+ // NOTE: can't use SAX2 to write internal subsets.
+ //
+ StringWriter writer = new StringWriter ();
+
+ writer.write ("<!DOCTYPE ");
+ writer.write (rootName);
+ if (systemId != null) {
+ writer.write ("\n ");
+ if (publicId != null) {
+ writer.write ("PUBLIC '");
+ writer.write (publicId);
+ writer.write ("'\n\t'");
+ } else
+ writer.write ("SYSTEM '");
+ writer.write (systemId);
+ writer.write ("'");
+ }
+ writer.write (" [ ");
+ if (rootName == fakeRootName) {
+ writer.write ("\n<!ELEMENT ");
+ writer.write (rootName);
+ writer.write (" EMPTY>");
+ }
+ if (internalSubset != null)
+ writer.write (internalSubset);
+ writer.write ("\n ]>");
+
+ if (minimalDocument != null) {
+ writer.write ("\n");
+ writer.write (minimalDocument);
+ writer.write ("\n");
+ } else {
+ writer.write (" <");
+ writer.write (rootName);
+ writer.write ("/>\n");
+ }
+ minimalDocument = writer.toString ();
+
+ //
+ // OK, load it
+ //
+ XMLReader producer;
+
+ producer = XMLReaderFactory.createXMLReader ();
+ bind (producer, this);
+
+ if (resolver != null)
+ producer.setEntityResolver (resolver);
+
+ InputSource in;
+
+ in = new InputSource (new StringReader (minimalDocument));
+ producer.parse (in);
+
+ disableDeclarations = true;
+ if (rootName == fakeRootName)
+ this.rootName = null;
}
private void resetState ()
{
- if (!disableReset) {
- rootName = null;
- contentStack.removeAllElements ();
- elements.clear ();
- ids.clear ();
-
- notations.removeAllElements ();
- nDeferred.removeAllElements ();
- unparsed.removeAllElements ();
- uDeferred.removeAllElements ();
- }
+ if (!disableReset) {
+ rootName = null;
+ contentStack.removeAllElements ();
+ elements.clear ();
+ ids.clear ();
+
+ notations.removeAllElements ();
+ nDeferred.removeAllElements ();
+ unparsed.removeAllElements ();
+ uDeferred.removeAllElements ();
+ }
}
private void warning (String description)
throws SAXException
{
- ErrorHandler errHandler = getErrorHandler ();
- Locator locator = getDocumentLocator ();
- SAXParseException err;
-
- if (errHandler == null)
- return;
-
- if (locator == null)
- err = new SAXParseException (description, null, null, -1, -1);
- else
- err = new SAXParseException (description, locator);
- errHandler.warning (err);
+ ErrorHandler errHandler = getErrorHandler ();
+ Locator locator = getDocumentLocator ();
+ SAXParseException err;
+
+ if (errHandler == null)
+ return;
+
+ if (locator == null)
+ err = new SAXParseException (description, null, null, -1, -1);
+ else
+ err = new SAXParseException (description, locator);
+ errHandler.warning (err);
}
// package private (for ChildrenRecognizer)
private void error (String description)
throws SAXException
{
- ErrorHandler errHandler = getErrorHandler ();
- Locator locator = getDocumentLocator ();
- SAXParseException err;
-
- if (locator == null)
- err = new SAXParseException (description, null, null, -1, -1);
- else
- err = new SAXParseException (description, locator);
- if (errHandler != null)
- errHandler.error (err);
- else // else we always treat it as fatal!
- throw err;
+ ErrorHandler errHandler = getErrorHandler ();
+ Locator locator = getDocumentLocator ();
+ SAXParseException err;
+
+ if (locator == null)
+ err = new SAXParseException (description, null, null, -1, -1);
+ else
+ err = new SAXParseException (description, locator);
+ if (errHandler != null)
+ errHandler.error (err);
+ else // else we always treat it as fatal!
+ throw err;
}
private void fatalError (String description)
throws SAXException
{
- ErrorHandler errHandler = getErrorHandler ();
- Locator locator = getDocumentLocator ();
- SAXParseException err;
-
- if (locator != null)
- err = new SAXParseException (description, locator);
- else
- err = new SAXParseException (description, null, null, -1, -1);
- if (errHandler != null)
- errHandler.fatalError (err);
- // we always treat this as fatal, regardless of the handler
- throw err;
+ ErrorHandler errHandler = getErrorHandler ();
+ Locator locator = getDocumentLocator ();
+ SAXParseException err;
+
+ if (locator != null)
+ err = new SAXParseException (description, locator);
+ else
+ err = new SAXParseException (description, null, null, -1, -1);
+ if (errHandler != null)
+ errHandler.fatalError (err);
+ // we always treat this as fatal, regardless of the handler
+ throw err;
}
private static boolean isExtender (char c)
{
- // [88] Extender ::= ...
- return c == 0x00b7 || c == 0x02d0 || c == 0x02d1 || c == 0x0387
- || c == 0x0640 || c == 0x0e46 || c == 0x0ec6 || c == 0x3005
- || (c >= 0x3031 && c <= 0x3035)
- || (c >= 0x309d && c <= 0x309e)
- || (c >= 0x30fc && c <= 0x30fe);
+ // [88] Extender ::= ...
+ return c == 0x00b7 || c == 0x02d0 || c == 0x02d1 || c == 0x0387
+ || c == 0x0640 || c == 0x0e46 || c == 0x0ec6 || c == 0x3005
+ || (c >= 0x3031 && c <= 0x3035)
+ || (c >= 0x309d && c <= 0x309e)
+ || (c >= 0x30fc && c <= 0x30fe);
}
@@ -470,86 +470,86 @@ public final class ValidationConsumer extends EventFilter
private boolean isName (String name, String context, String id)
throws SAXException
{
- char buf [] = name.toCharArray ();
- boolean pass = true;
-
- if (!Character.isUnicodeIdentifierStart (buf [0])
- && ":_".indexOf (buf [0]) == -1)
- pass = false;
- else {
- int max = buf.length;
- for (int i = 1; pass && i < max; i++) {
- char c = buf [i];
- if (!Character.isUnicodeIdentifierPart (c)
- && ":-_.".indexOf (c) == -1
- && !isExtender (c))
- pass = false;
- }
- }
-
- if (!pass)
- error ("In " + context + " for " + id
- + ", '" + name + "' is not a name");
- return pass; // true == OK
+ char buf [] = name.toCharArray ();
+ boolean pass = true;
+
+ if (!Character.isUnicodeIdentifierStart (buf [0])
+ && ":_".indexOf (buf [0]) == -1)
+ pass = false;
+ else {
+ int max = buf.length;
+ for (int i = 1; pass && i < max; i++) {
+ char c = buf [i];
+ if (!Character.isUnicodeIdentifierPart (c)
+ && ":-_.".indexOf (c) == -1
+ && !isExtender (c))
+ pass = false;
+ }
+ }
+
+ if (!pass)
+ error ("In " + context + " for " + id
+ + ", '" + name + "' is not a name");
+ return pass; // true == OK
}
// use augmented Unicode rules, not full XML rules
private boolean isNmtoken (String nmtoken, String context, String id)
throws SAXException
{
- char buf [] = nmtoken.toCharArray ();
- boolean pass = true;
- int max = buf.length;
-
- // XXX make this share code with isName
-
- for (int i = 0; pass && i < max; i++) {
- char c = buf [i];
- if (!Character.isUnicodeIdentifierPart (c)
- && ":-_.".indexOf (c) == -1
- && !isExtender (c))
- pass = false;
- }
-
- if (!pass)
- error ("In " + context + " for " + id
- + ", '" + nmtoken + "' is not a name token");
- return pass; // true == OK
+ char buf [] = nmtoken.toCharArray ();
+ boolean pass = true;
+ int max = buf.length;
+
+ // XXX make this share code with isName
+
+ for (int i = 0; pass && i < max; i++) {
+ char c = buf [i];
+ if (!Character.isUnicodeIdentifierPart (c)
+ && ":-_.".indexOf (c) == -1
+ && !isExtender (c))
+ pass = false;
+ }
+
+ if (!pass)
+ error ("In " + context + " for " + id
+ + ", '" + nmtoken + "' is not a name token");
+ return pass; // true == OK
}
private void checkEnumeration (String value, String type, String name)
throws SAXException
{
- if (!hasMatch (value, type))
- // VC: Enumeration
- error ("Value '" + value
- + "' for attribute '" + name
- + "' is not permitted: " + type);
+ if (!hasMatch (value, type))
+ // VC: Enumeration
+ error ("Value '" + value
+ + "' for attribute '" + name
+ + "' is not permitted: " + type);
}
// used to test enumerated attributes and mixed content models
// package private
static boolean hasMatch (String value, String orList)
{
- int len = value.length ();
- int max = orList.length () - len;
-
- for (int start = 0;
- (start = orList.indexOf (value, start)) != -1;
- start++) {
- char c;
-
- if (start > max)
- break;
- c = orList.charAt (start - 1);
- if (c != '|' && c != '('/*)*/)
- continue;
- c = orList.charAt (start + len);
- if (c != '|' && /*(*/ c != ')')
- continue;
- return true;
- }
- return false;
+ int len = value.length ();
+ int max = orList.length () - len;
+
+ for (int start = 0;
+ (start = orList.indexOf (value, start)) != -1;
+ start++) {
+ char c;
+
+ if (start > max)
+ break;
+ c = orList.charAt (start - 1);
+ if (c != '|' && c != '('/*)*/)
+ continue;
+ c = orList.charAt (start + len);
+ if (c != '|' && /*(*/ c != ')')
+ continue;
+ return true;
+ }
+ return false;
}
/**
@@ -561,11 +561,11 @@ public final class ValidationConsumer extends EventFilter
public void startDTD (String name, String publicId, String systemId)
throws SAXException
{
- if (disableDeclarations)
- return;
+ if (disableDeclarations)
+ return;
- rootName = name;
- super.startDTD (name, publicId, systemId);
+ rootName = name;
+ super.startDTD (name, publicId, systemId);
}
/**
@@ -577,37 +577,37 @@ public final class ValidationConsumer extends EventFilter
public void endDTD ()
throws SAXException
{
- if (disableDeclarations)
- return;
-
- // this is a convenient hook for end-of-dtd checks, but we
- // could also trigger it in the first startElement call.
- // locator info is more appropriate here though.
-
- // VC: Notation Declared (NDATA can refer to them before decls,
- // as can NOTATION attribute enumerations and defaults)
- int length = nDeferred.size ();
- for (int i = 0; i < length; i++) {
- String notation = (String) nDeferred.elementAt (i);
- if (!notations.contains (notation)) {
- error ("A declaration referred to notation '" + notation
- + "' which was never declared");
- }
- }
- nDeferred.removeAllElements ();
-
- // VC: Entity Name (attribute values can refer to them
- // before they're declared); VC Attribute Default Legal
- length = uDeferred.size ();
- for (int i = 0; i < length; i++) {
- String entity = (String) uDeferred.elementAt (i);
- if (!unparsed.contains (entity)) {
- error ("An attribute default referred to entity '" + entity
- + "' which was never declared");
- }
- }
- uDeferred.removeAllElements ();
- super.endDTD ();
+ if (disableDeclarations)
+ return;
+
+ // this is a convenient hook for end-of-dtd checks, but we
+ // could also trigger it in the first startElement call.
+ // locator info is more appropriate here though.
+
+ // VC: Notation Declared (NDATA can refer to them before decls,
+ // as can NOTATION attribute enumerations and defaults)
+ int length = nDeferred.size ();
+ for (int i = 0; i < length; i++) {
+ String notation = (String) nDeferred.elementAt (i);
+ if (!notations.contains (notation)) {
+ error ("A declaration referred to notation '" + notation
+ + "' which was never declared");
+ }
+ }
+ nDeferred.removeAllElements ();
+
+ // VC: Entity Name (attribute values can refer to them
+ // before they're declared); VC Attribute Default Legal
+ length = uDeferred.size ();
+ for (int i = 0; i < length; i++) {
+ String entity = (String) uDeferred.elementAt (i);
+ if (!unparsed.contains (entity)) {
+ error ("An attribute default referred to entity '" + entity
+ + "' which was never declared");
+ }
+ }
+ uDeferred.removeAllElements ();
+ super.endDTD ();
}
@@ -615,10 +615,10 @@ public final class ValidationConsumer extends EventFilter
// all attributes except enumerations ...
// "(this|or|that|...)" and "NOTATION (this|or|that|...)"
static final String types [] = {
- "CDATA",
- "ID", "IDREF", "IDREFS",
- "NMTOKEN", "NMTOKENS",
- "ENTITY", "ENTITIES"
+ "CDATA",
+ "ID", "IDREF", "IDREFS",
+ "NMTOKEN", "NMTOKENS",
+ "ENTITY", "ENTITIES"
};
@@ -630,172 +630,172 @@ public final class ValidationConsumer extends EventFilter
* preloaded with a particular DTD.
*/
public void attributeDecl (
- String eName,
- String aName,
- String type,
- String mode,
- String value
+ String eName,
+ String aName,
+ String type,
+ String mode,
+ String value
) throws SAXException
{
- if (disableDeclarations)
- return;
-
- ElementInfo info = (ElementInfo) elements.get (eName);
- AttributeInfo ainfo = new AttributeInfo ();
- boolean checkOne = false;
- boolean interned = false;
-
- // cheap interning of type names and #FIXED, #REQUIRED
- // for faster startElement (we can use "==")
- for (int i = 0; i < types.length; i++) {
- if (types [i].equals (type)) {
- type = types [i];
- interned = true;
- break;
- }
- }
- if ("#FIXED".equals (mode))
- mode = "#FIXED";
- else if ("#REQUIRED".equals (mode))
- mode = "#REQUIRED";
-
- ainfo.type = type;
- ainfo.mode = mode;
- ainfo.value = value;
-
- // we might not have seen the content model yet
- if (info == null) {
- info = new ElementInfo (eName);
- elements.put (eName, info);
- }
- if ("ID" == type) {
- checkOne = true;
- if (!("#REQUIRED" == mode || "#IMPLIED".equals (mode))) {
- // VC: ID Attribute Default
- error ("ID attribute '" + aName
- + "' must be #IMPLIED or #REQUIRED");
- }
-
- } else if (!interned && type.startsWith ("NOTATION ")) {
- checkOne = true;
-
- // VC: Notation Attributes (notations must be declared)
- StringTokenizer tokens = new StringTokenizer (
- type.substring (10, type.lastIndexOf (')')),
- "|");
- while (tokens.hasMoreTokens ()) {
- String token = tokens.nextToken ();
- if (!notations.contains (token))
- nDeferred.addElement (token);
- }
- }
- if (checkOne) {
- for (Enumeration e = info.attributes.keys ();
- e.hasMoreElements ();
- /* NOP */) {
- String name;
- AttributeInfo ainfo2;
-
- name = (String) e.nextElement ();
- ainfo2 = (AttributeInfo) info.attributes.get (name);
- if (type == ainfo2.type || !interned /* NOTATION */) {
- // VC: One ID per Element Type
- // VC: One Notation per Element TYpe
- error ("Element '" + eName
- + "' already has an attribute of type "
- + (interned ? "NOTATION" : type)
- + " ('" + name
- + "') so '" + aName
- + "' is a validity error");
- }
- }
- }
-
- // VC: Attribute Default Legal
- if (value != null) {
-
- if ("CDATA" == type) {
- // event source rejected '<'
-
- } else if ("NMTOKEN" == type) {
- // VC: Name Token (is a nmtoken)
- isNmtoken (value, "attribute default", aName);
-
- } else if ("NMTOKENS" == type) {
- // VC: Name Token (is a nmtoken; at least one value)
- StringTokenizer tokens = new StringTokenizer (value);
- if (!tokens.hasMoreTokens ())
- error ("Default for attribute '" + aName
- + "' must have at least one name token.");
- else do {
- String token = tokens.nextToken ();
- isNmtoken (token, "attribute default", aName);
- } while (tokens.hasMoreTokens ());
-
- } else if ("IDREF" == type || "ENTITY" == type) {
- // VC: Entity Name (is a name)
- // VC: IDREF (is a name) (is declared)
- isName (value, "attribute default", aName);
- if ("ENTITY" == type && !unparsed.contains (value))
- uDeferred.addElement (value);
-
- } else if ("IDREFS" == type || "ENTITIES" == type) {
- // VC: Entity Name (is a name; at least one value)
- // VC: IDREF (is a name; at least one value)
- StringTokenizer names = new StringTokenizer (value);
- if (!names.hasMoreTokens ())
- error ("Default for attribute '" + aName
- + "' must have at least one name.");
- else do {
- String name = names.nextToken ();
- isName (name, "attribute default", aName);
- if ("ENTITIES" == type && !unparsed.contains (name))
- uDeferred.addElement (value);
- } while (names.hasMoreTokens ());
-
- } else if (type.charAt (0) == '(' /*)*/ ) {
- // VC: Enumeration (must match)
- checkEnumeration (value, type, aName);
-
- } else if (!interned && checkOne) { /* NOTATION */
- // VC: Notation attributes (must be names)
- isName (value, "attribute default", aName);
-
- // VC: Notation attributes (must be declared)
- if (!notations.contains (value))
- nDeferred.addElement (value);
-
- // VC: Enumeration (must match)
- checkEnumeration (value, type, aName);
-
- } else if ("ID" != type)
- throw new RuntimeException ("illegal attribute type: " + type);
- }
-
- if (info.attributes.get (aName) == null)
- info.attributes.put (aName, ainfo);
- /*
- else
- warning ("Element '" + eName
- + "' already has an attribute named '" + aName + "'");
- */
-
- if ("xml:space".equals (aName)) {
- if (!("(default|preserve)".equals (type)
- || "(preserve|default)".equals (type)
- // these next two are arguable; XHTML's DTD doesn't
- // deserve errors. After all, it's not like any
- // illegal _value_ could pass ...
- || "(preserve)".equals (type)
- || "(default)".equals (type)
- ))
- error (
- "xml:space attribute type must be like '(default|preserve)'"
- + " not '" + type + "'"
- );
-
- }
- super.attributeDecl (eName, aName, type, mode, value);
+ if (disableDeclarations)
+ return;
+
+ ElementInfo info = (ElementInfo) elements.get (eName);
+ AttributeInfo ainfo = new AttributeInfo ();
+ boolean checkOne = false;
+ boolean interned = false;
+
+ // cheap interning of type names and #FIXED, #REQUIRED
+ // for faster startElement (we can use "==")
+ for (int i = 0; i < types.length; i++) {
+ if (types [i].equals (type)) {
+ type = types [i];
+ interned = true;
+ break;
+ }
+ }
+ if ("#FIXED".equals (mode))
+ mode = "#FIXED";
+ else if ("#REQUIRED".equals (mode))
+ mode = "#REQUIRED";
+
+ ainfo.type = type;
+ ainfo.mode = mode;
+ ainfo.value = value;
+
+ // we might not have seen the content model yet
+ if (info == null) {
+ info = new ElementInfo (eName);
+ elements.put (eName, info);
+ }
+ if ("ID" == type) {
+ checkOne = true;
+ if (!("#REQUIRED" == mode || "#IMPLIED".equals (mode))) {
+ // VC: ID Attribute Default
+ error ("ID attribute '" + aName
+ + "' must be #IMPLIED or #REQUIRED");
+ }
+
+ } else if (!interned && type.startsWith ("NOTATION ")) {
+ checkOne = true;
+
+ // VC: Notation Attributes (notations must be declared)
+ StringTokenizer tokens = new StringTokenizer (
+ type.substring (10, type.lastIndexOf (')')),
+ "|");
+ while (tokens.hasMoreTokens ()) {
+ String token = tokens.nextToken ();
+ if (!notations.contains (token))
+ nDeferred.addElement (token);
+ }
+ }
+ if (checkOne) {
+ for (Enumeration e = info.attributes.keys ();
+ e.hasMoreElements ();
+ /* NOP */) {
+ String name;
+ AttributeInfo ainfo2;
+
+ name = (String) e.nextElement ();
+ ainfo2 = (AttributeInfo) info.attributes.get (name);
+ if (type == ainfo2.type || !interned /* NOTATION */) {
+ // VC: One ID per Element Type
+ // VC: One Notation per Element TYpe
+ error ("Element '" + eName
+ + "' already has an attribute of type "
+ + (interned ? "NOTATION" : type)
+ + " ('" + name
+ + "') so '" + aName
+ + "' is a validity error");
+ }
+ }
+ }
+
+ // VC: Attribute Default Legal
+ if (value != null) {
+
+ if ("CDATA" == type) {
+ // event source rejected '<'
+
+ } else if ("NMTOKEN" == type) {
+ // VC: Name Token (is a nmtoken)
+ isNmtoken (value, "attribute default", aName);
+
+ } else if ("NMTOKENS" == type) {
+ // VC: Name Token (is a nmtoken; at least one value)
+ StringTokenizer tokens = new StringTokenizer (value);
+ if (!tokens.hasMoreTokens ())
+ error ("Default for attribute '" + aName
+ + "' must have at least one name token.");
+ else do {
+ String token = tokens.nextToken ();
+ isNmtoken (token, "attribute default", aName);
+ } while (tokens.hasMoreTokens ());
+
+ } else if ("IDREF" == type || "ENTITY" == type) {
+ // VC: Entity Name (is a name)
+ // VC: IDREF (is a name) (is declared)
+ isName (value, "attribute default", aName);
+ if ("ENTITY" == type && !unparsed.contains (value))
+ uDeferred.addElement (value);
+
+ } else if ("IDREFS" == type || "ENTITIES" == type) {
+ // VC: Entity Name (is a name; at least one value)
+ // VC: IDREF (is a name; at least one value)
+ StringTokenizer names = new StringTokenizer (value);
+ if (!names.hasMoreTokens ())
+ error ("Default for attribute '" + aName
+ + "' must have at least one name.");
+ else do {
+ String name = names.nextToken ();
+ isName (name, "attribute default", aName);
+ if ("ENTITIES" == type && !unparsed.contains (name))
+ uDeferred.addElement (value);
+ } while (names.hasMoreTokens ());
+
+ } else if (type.charAt (0) == '(' /*)*/ ) {
+ // VC: Enumeration (must match)
+ checkEnumeration (value, type, aName);
+
+ } else if (!interned && checkOne) { /* NOTATION */
+ // VC: Notation attributes (must be names)
+ isName (value, "attribute default", aName);
+
+ // VC: Notation attributes (must be declared)
+ if (!notations.contains (value))
+ nDeferred.addElement (value);
+
+ // VC: Enumeration (must match)
+ checkEnumeration (value, type, aName);
+
+ } else if ("ID" != type)
+ throw new RuntimeException ("illegal attribute type: " + type);
+ }
+
+ if (info.attributes.get (aName) == null)
+ info.attributes.put (aName, ainfo);
+ /*
+ else
+ warning ("Element '" + eName
+ + "' already has an attribute named '" + aName + "'");
+ */
+
+ if ("xml:space".equals (aName)) {
+ if (!("(default|preserve)".equals (type)
+ || "(preserve|default)".equals (type)
+ // these next two are arguable; XHTML's DTD doesn't
+ // deserve errors. After all, it's not like any
+ // illegal _value_ could pass ...
+ || "(preserve)".equals (type)
+ || "(default)".equals (type)
+ ))
+ error (
+ "xml:space attribute type must be like '(default|preserve)'"
+ + " not '" + type + "'"
+ );
+
+ }
+ super.attributeDecl (eName, aName, type, mode, value);
}
/**
@@ -807,29 +807,29 @@ public final class ValidationConsumer extends EventFilter
public void elementDecl (String name, String model)
throws SAXException
{
- if (disableDeclarations)
- return;
-
- ElementInfo info = (ElementInfo) elements.get (name);
-
- // we might have seen an attribute decl already
- if (info == null) {
- info = new ElementInfo (name);
- elements.put (name, info);
- }
- if (info.model != null) {
- // NOTE: not all parsers can report such duplicates.
- // VC: Unique Element Type Declaration
- error ("Element type '" + name
- + "' was already declared.");
- } else {
- info.model = model;
-
- // VC: No Duplicate Types (in mixed content models)
- if (model.charAt (1) == '#') // (#PCDATA...
- info.getRecognizer (this);
- }
- super.elementDecl (name, model);
+ if (disableDeclarations)
+ return;
+
+ ElementInfo info = (ElementInfo) elements.get (name);
+
+ // we might have seen an attribute decl already
+ if (info == null) {
+ info = new ElementInfo (name);
+ elements.put (name, info);
+ }
+ if (info.model != null) {
+ // NOTE: not all parsers can report such duplicates.
+ // VC: Unique Element Type Declaration
+ error ("Element type '" + name
+ + "' was already declared.");
+ } else {
+ info.model = model;
+
+ // VC: No Duplicate Types (in mixed content models)
+ if (model.charAt (1) == '#') // (#PCDATA...
+ info.getRecognizer (this);
+ }
+ super.elementDecl (name, model);
}
/**
@@ -839,8 +839,8 @@ public final class ValidationConsumer extends EventFilter
public void internalEntityDecl (String name, String value)
throws SAXException
{
- if (!disableDeclarations)
- super.internalEntityDecl (name, value);
+ if (!disableDeclarations)
+ super.internalEntityDecl (name, value);
}
/**
@@ -848,11 +848,11 @@ public final class ValidationConsumer extends EventFilter
* one was preloaded with a particular DTD
*/
public void externalEntityDecl (String name,
- String publicId, String systemId)
+ String publicId, String systemId)
throws SAXException
{
- if (!disableDeclarations)
- super.externalEntityDecl (name, publicId, systemId);
+ if (!disableDeclarations)
+ super.externalEntityDecl (name, publicId, systemId);
}
@@ -865,11 +865,11 @@ public final class ValidationConsumer extends EventFilter
public void notationDecl (String name, String publicId, String systemId)
throws SAXException
{
- if (disableDeclarations)
- return;
+ if (disableDeclarations)
+ return;
- notations.addElement (name);
- super.notationDecl (name, publicId, systemId);
+ notations.addElement (name);
+ super.notationDecl (name, publicId, systemId);
}
/**
@@ -879,22 +879,22 @@ public final class ValidationConsumer extends EventFilter
* unless this one was preloaded with a particular DTD.
*/
public void unparsedEntityDecl (
- String name,
- String publicId,
- String systemId,
- String notationName
+ String name,
+ String publicId,
+ String systemId,
+ String notationName
) throws SAXException
{
- if (disableDeclarations)
- return;
+ if (disableDeclarations)
+ return;
- unparsed.addElement (name);
- if (!notations.contains (notationName))
- nDeferred.addElement (notationName);
- super.unparsedEntityDecl (name, publicId, systemId, notationName);
+ unparsed.addElement (name);
+ if (!notations.contains (notationName))
+ nDeferred.addElement (notationName);
+ super.unparsedEntityDecl (name, publicId, systemId, notationName);
}
-
-
+
+
/**
* <b>ContentHandler</b> Ensures that state from any previous parse
* has been deleted.
@@ -903,14 +903,14 @@ public final class ValidationConsumer extends EventFilter
public void startDocument ()
throws SAXException
{
- resetState ();
- super.startDocument ();
+ resetState ();
+ super.startDocument ();
}
private static boolean isAsciiLetter (char c)
{
- return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z');
+ return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z');
}
@@ -921,7 +921,7 @@ public final class ValidationConsumer extends EventFilter
public void skippedEntity (String name)
throws SAXException
{
- fatalError ("may not skip entities");
+ fatalError ("may not skip entities");
}
/*
@@ -930,14 +930,14 @@ public final class ValidationConsumer extends EventFilter
private String expandDefaultRefs (String s)
throws SAXException
{
- if (s.indexOf ('&') < 0)
- return s;
-
+ if (s.indexOf ('&') < 0)
+ return s;
+
// FIXME: handle &#nn; &#xnn; &name;
- String message = "Can't expand refs in attribute default: " + s;
- warning (message);
+ String message = "Can't expand refs in attribute default: " + s;
+ warning (message);
- return s;
+ return s;
}
/**
@@ -946,248 +946,248 @@ public final class ValidationConsumer extends EventFilter
* Passed to the next consumer.
*/
public void startElement (
- String uri,
- String localName,
- String qName,
- Attributes atts
+ String uri,
+ String localName,
+ String qName,
+ Attributes atts
) throws SAXException
{
- //
- // First check content model for the enclosing scope.
- //
- if (contentStack.isEmpty ()) {
- // VC: Root Element Type
- if (!qName.equals (rootName)) {
- if (rootName == null)
- warning ("This document has no DTD, can't be valid");
- else
- error ("Root element type '" + qName
- + "' was declared to be '" + rootName + "'");
- }
- } else {
- Recognizer state = (Recognizer) contentStack.peek ();
-
- if (state != null) {
- Recognizer newstate = state.acceptElement (qName);
-
- if (newstate == null)
- error ("Element type '" + qName
- + "' in element '" + state.type.name
- + "' violates content model " + state.type.model
- );
- if (newstate != state) {
- contentStack.pop ();
- contentStack.push (newstate);
- }
- }
- }
-
- //
- // Then check that this element was declared, and push the
- // object used to validate its content model onto our stack.
- //
- // This is where the recognizer gets created, if needed; if
- // it's a "children" (elements) content model, an NDFA is
- // created. (One recognizer is used per content type, no
- // matter how complex that recognizer is.)
- //
- ElementInfo info;
-
- info = (ElementInfo) elements.get (qName);
- if (info == null || info.model == null) {
- // VC: Element Valid (base clause)
- error ("Element type '" + qName + "' was not declared");
- contentStack.push (null);
-
- // for less diagnostic noise, fake a declaration.
- elementDecl (qName, "ANY");
- } else
- contentStack.push (info.getRecognizer (this));
-
- //
- // Then check each attribute present
- //
- int len;
- String aname;
- AttributeInfo ainfo;
-
- if (atts != null)
- len = atts.getLength ();
- else
- len = 0;
-
- for (int i = 0; i < len; i++) {
- aname = atts.getQName (i);
-
- if (info == null
- || (ainfo = (AttributeInfo) info.attributes.get (aname))
- == null) {
- // VC: Attribute Value Type
- error ("Attribute '" + aname
- + "' was not declared for element type " + qName);
- continue;
- }
-
- String value = atts.getValue (i);
-
- // note that "==" for type names and "#FIXED" is correct
- // (and fast) since we've interned those literals.
-
- if ("#FIXED" == ainfo.mode) {
- String expanded = expandDefaultRefs (ainfo.value);
-
- // VC: Fixed Attribute Default
- if (!value.equals (expanded)) {
- error ("Attribute '" + aname
- + "' must match " + expanded
- );
- continue;
- }
- }
-
- if ("CDATA" == ainfo.type)
- continue;
-
- //
- // For all other attribute types, there are various
- // rules to follow.
- //
-
- if ("ID" == ainfo.type) {
- // VC: ID (must be a name)
- if (isName (value, "ID attribute", aname)) {
- if (Boolean.TRUE == ids.get (value))
- // VC: ID (appears once)
- error ("ID attribute " + aname
- + " uses an ID value '" + value
- + "' which was already declared.");
- else
- // any forward refs are no longer problems
- ids.put (value, Boolean.TRUE);
- }
- continue;
- }
-
- if ("IDREF" == ainfo.type) {
- // VC: IDREF (value must be a name)
- if (isName (value, "IDREF attribute", aname)) {
- // VC: IDREF (must match some ID attribute)
- if (ids.get (value) == null)
- // new -- assume it's a forward ref
- ids.put (value, Boolean.FALSE);
- }
- continue;
- }
-
- if ("IDREFS" == ainfo.type) {
- StringTokenizer tokens = new StringTokenizer (value, " ");
-
- if (!tokens.hasMoreTokens ()) {
- // VC: IDREF (one or more values)
- error ("IDREFS attribute " + aname
- + " must have at least one ID ref");
- } else do {
- String id = tokens.nextToken ();
-
- // VC: IDREF (value must be a name)
- if (isName (id, "IDREFS attribute", aname)) {
- // VC: IDREF (must match some ID attribute)
- if (ids.get (id) == null)
- // new -- assume it's a forward ref
- ids.put (id, Boolean.FALSE);
- }
- } while (tokens.hasMoreTokens ());
- continue;
- }
-
- if ("NMTOKEN" == ainfo.type) {
- // VC: Name Token (is a name token)
- isNmtoken (value, "NMTOKEN attribute", aname);
- continue;
- }
-
- if ("NMTOKENS" == ainfo.type) {
- StringTokenizer tokens = new StringTokenizer (value, " ");
-
- if (!tokens.hasMoreTokens ()) {
- // VC: Name Token (one or more values)
- error ("NMTOKENS attribute " + aname
- + " must have at least one name token");
- } else do {
- String token = tokens.nextToken ();
-
- // VC: Name Token (is a name token)
- isNmtoken (token, "NMTOKENS attribute", aname);
- } while (tokens.hasMoreTokens ());
- continue;
- }
-
- if ("ENTITY" == ainfo.type) {
- if (!unparsed.contains (value))
- // VC: Entity Name
- error ("Value of attribute '" + aname
- + "' refers to unparsed entity '" + value
- + "' which was not declared.");
- continue;
- }
-
- if ("ENTITIES" == ainfo.type) {
- StringTokenizer tokens = new StringTokenizer (value, " ");
-
- if (!tokens.hasMoreTokens ()) {
- // VC: Entity Name (one or more values)
- error ("ENTITIES attribute " + aname
- + " must have at least one name token");
- } else do {
- String entity = tokens.nextToken ();
-
- if (!unparsed.contains (entity))
- // VC: Entity Name
- error ("Value of attribute '" + aname
- + "' refers to unparsed entity '" + entity
- + "' which was not declared.");
- } while (tokens.hasMoreTokens ());
- continue;
- }
-
- //
- // check for enumerations last; more expensive
- //
- if (ainfo.type.charAt (0) == '(' /*)*/
- || ainfo.type.startsWith ("NOTATION ")
- ) {
- // VC: Enumeration (value must be defined)
- checkEnumeration (value, ainfo.type, aname);
- continue;
- }
- }
-
- //
- // Last, check that all #REQUIRED attributes were provided
- //
- if (info != null) {
- Hashtable table = info.attributes;
-
- if (table.size () != 0) {
- Enumeration e = table.keys ();
-
- // XXX table.keys uses the heap, bleech -- slows things
-
- while (e.hasMoreElements ()) {
- aname = (String) e.nextElement ();
- ainfo = (AttributeInfo) table.get (aname);
-
- // "#REQUIRED" mode was interned in attributeDecl
- if ("#REQUIRED" == ainfo.mode
- && atts.getValue (aname) == null) {
- // VC: Required Attribute
- error ("Attribute '" + aname + "' must be specified "
- + "for element type " + qName);
- }
- }
- }
- }
- super.startElement (uri, localName, qName, atts);
+ //
+ // First check content model for the enclosing scope.
+ //
+ if (contentStack.isEmpty ()) {
+ // VC: Root Element Type
+ if (!qName.equals (rootName)) {
+ if (rootName == null)
+ warning ("This document has no DTD, can't be valid");
+ else
+ error ("Root element type '" + qName
+ + "' was declared to be '" + rootName + "'");
+ }
+ } else {
+ Recognizer state = (Recognizer) contentStack.peek ();
+
+ if (state != null) {
+ Recognizer newstate = state.acceptElement (qName);
+
+ if (newstate == null)
+ error ("Element type '" + qName
+ + "' in element '" + state.type.name
+ + "' violates content model " + state.type.model
+ );
+ if (newstate != state) {
+ contentStack.pop ();
+ contentStack.push (newstate);
+ }
+ }
+ }
+
+ //
+ // Then check that this element was declared, and push the
+ // object used to validate its content model onto our stack.
+ //
+ // This is where the recognizer gets created, if needed; if
+ // it's a "children" (elements) content model, an NDFA is
+ // created. (One recognizer is used per content type, no
+ // matter how complex that recognizer is.)
+ //
+ ElementInfo info;
+
+ info = (ElementInfo) elements.get (qName);
+ if (info == null || info.model == null) {
+ // VC: Element Valid (base clause)
+ error ("Element type '" + qName + "' was not declared");
+ contentStack.push (null);
+
+ // for less diagnostic noise, fake a declaration.
+ elementDecl (qName, "ANY");
+ } else
+ contentStack.push (info.getRecognizer (this));
+
+ //
+ // Then check each attribute present
+ //
+ int len;
+ String aname;
+ AttributeInfo ainfo;
+
+ if (atts != null)
+ len = atts.getLength ();
+ else
+ len = 0;
+
+ for (int i = 0; i < len; i++) {
+ aname = atts.getQName (i);
+
+ if (info == null
+ || (ainfo = (AttributeInfo) info.attributes.get (aname))
+ == null) {
+ // VC: Attribute Value Type
+ error ("Attribute '" + aname
+ + "' was not declared for element type " + qName);
+ continue;
+ }
+
+ String value = atts.getValue (i);
+
+ // note that "==" for type names and "#FIXED" is correct
+ // (and fast) since we've interned those literals.
+
+ if ("#FIXED" == ainfo.mode) {
+ String expanded = expandDefaultRefs (ainfo.value);
+
+ // VC: Fixed Attribute Default
+ if (!value.equals (expanded)) {
+ error ("Attribute '" + aname
+ + "' must match " + expanded
+ );
+ continue;
+ }
+ }
+
+ if ("CDATA" == ainfo.type)
+ continue;
+
+ //
+ // For all other attribute types, there are various
+ // rules to follow.
+ //
+
+ if ("ID" == ainfo.type) {
+ // VC: ID (must be a name)
+ if (isName (value, "ID attribute", aname)) {
+ if (Boolean.TRUE == ids.get (value))
+ // VC: ID (appears once)
+ error ("ID attribute " + aname
+ + " uses an ID value '" + value
+ + "' which was already declared.");
+ else
+ // any forward refs are no longer problems
+ ids.put (value, Boolean.TRUE);
+ }
+ continue;
+ }
+
+ if ("IDREF" == ainfo.type) {
+ // VC: IDREF (value must be a name)
+ if (isName (value, "IDREF attribute", aname)) {
+ // VC: IDREF (must match some ID attribute)
+ if (ids.get (value) == null)
+ // new -- assume it's a forward ref
+ ids.put (value, Boolean.FALSE);
+ }
+ continue;
+ }
+
+ if ("IDREFS" == ainfo.type) {
+ StringTokenizer tokens = new StringTokenizer (value, " ");
+
+ if (!tokens.hasMoreTokens ()) {
+ // VC: IDREF (one or more values)
+ error ("IDREFS attribute " + aname
+ + " must have at least one ID ref");
+ } else do {
+ String id = tokens.nextToken ();
+
+ // VC: IDREF (value must be a name)
+ if (isName (id, "IDREFS attribute", aname)) {
+ // VC: IDREF (must match some ID attribute)
+ if (ids.get (id) == null)
+ // new -- assume it's a forward ref
+ ids.put (id, Boolean.FALSE);
+ }
+ } while (tokens.hasMoreTokens ());
+ continue;
+ }
+
+ if ("NMTOKEN" == ainfo.type) {
+ // VC: Name Token (is a name token)
+ isNmtoken (value, "NMTOKEN attribute", aname);
+ continue;
+ }
+
+ if ("NMTOKENS" == ainfo.type) {
+ StringTokenizer tokens = new StringTokenizer (value, " ");
+
+ if (!tokens.hasMoreTokens ()) {
+ // VC: Name Token (one or more values)
+ error ("NMTOKENS attribute " + aname
+ + " must have at least one name token");
+ } else do {
+ String token = tokens.nextToken ();
+
+ // VC: Name Token (is a name token)
+ isNmtoken (token, "NMTOKENS attribute", aname);
+ } while (tokens.hasMoreTokens ());
+ continue;
+ }
+
+ if ("ENTITY" == ainfo.type) {
+ if (!unparsed.contains (value))
+ // VC: Entity Name
+ error ("Value of attribute '" + aname
+ + "' refers to unparsed entity '" + value
+ + "' which was not declared.");
+ continue;
+ }
+
+ if ("ENTITIES" == ainfo.type) {
+ StringTokenizer tokens = new StringTokenizer (value, " ");
+
+ if (!tokens.hasMoreTokens ()) {
+ // VC: Entity Name (one or more values)
+ error ("ENTITIES attribute " + aname
+ + " must have at least one name token");
+ } else do {
+ String entity = tokens.nextToken ();
+
+ if (!unparsed.contains (entity))
+ // VC: Entity Name
+ error ("Value of attribute '" + aname
+ + "' refers to unparsed entity '" + entity
+ + "' which was not declared.");
+ } while (tokens.hasMoreTokens ());
+ continue;
+ }
+
+ //
+ // check for enumerations last; more expensive
+ //
+ if (ainfo.type.charAt (0) == '(' /*)*/
+ || ainfo.type.startsWith ("NOTATION ")
+ ) {
+ // VC: Enumeration (value must be defined)
+ checkEnumeration (value, ainfo.type, aname);
+ continue;
+ }
+ }
+
+ //
+ // Last, check that all #REQUIRED attributes were provided
+ //
+ if (info != null) {
+ Hashtable table = info.attributes;
+
+ if (table.size () != 0) {
+ Enumeration e = table.keys ();
+
+ // XXX table.keys uses the heap, bleech -- slows things
+
+ while (e.hasMoreElements ()) {
+ aname = (String) e.nextElement ();
+ ainfo = (AttributeInfo) table.get (aname);
+
+ // "#REQUIRED" mode was interned in attributeDecl
+ if ("#REQUIRED" == ainfo.mode
+ && atts.getValue (aname) == null) {
+ // VC: Required Attribute
+ error ("Attribute '" + aname + "' must be specified "
+ + "for element type " + qName);
+ }
+ }
+ }
+ }
+ super.startElement (uri, localName, qName, atts);
}
/**
@@ -1198,25 +1198,25 @@ public final class ValidationConsumer extends EventFilter
public void characters (char ch [], int start, int length)
throws SAXException
{
- Recognizer state;
-
- if (contentStack.empty ())
- state = null;
- else
- state = (Recognizer) contentStack.peek ();
-
- // NOTE: if this ever supports with SAX parsers that don't
- // report ignorable whitespace as such (only XP?), this class
- // needs to morph it into ignorableWhitespace() as needed ...
-
- if (state != null && !state.acceptCharacters ())
- // VC: Element Valid (clauses three, four -- see recognizer)
- error ("Character content not allowed in element "
- + state.type.name);
-
- super.characters (ch, start, length);
+ Recognizer state;
+
+ if (contentStack.empty ())
+ state = null;
+ else
+ state = (Recognizer) contentStack.peek ();
+
+ // NOTE: if this ever supports with SAX parsers that don't
+ // report ignorable whitespace as such (only XP?), this class
+ // needs to morph it into ignorableWhitespace() as needed ...
+
+ if (state != null && !state.acceptCharacters ())
+ // VC: Element Valid (clauses three, four -- see recognizer)
+ error ("Character content not allowed in element "
+ + state.type.name);
+
+ super.characters (ch, start, length);
}
-
+
/**
* <b>ContentHandler</b> Reports a validity error if the element's content
@@ -1227,95 +1227,95 @@ public final class ValidationConsumer extends EventFilter
public void endElement (String uri, String localName, String qName)
throws SAXException
{
- try {
- Recognizer state = (Recognizer) contentStack.pop ();
-
- if (state != null && !state.completed ())
- // VC: Element valid (clauses two, three, four; see Recognizer)
- error ("Premature end for element '"
- + state.type.name
- + "', content model "
- + state.type.model);
-
- // could insist on match of start element, but that's
- // something the input stream must to guarantee.
-
- } catch (EmptyStackException e) {
- fatalError ("endElement without startElement: " + qName
- + ((uri == null)
- ? ""
- : ( " { '" + uri + "', " + localName + " }")));
- }
- super.endElement (uri, localName, qName);
+ try {
+ Recognizer state = (Recognizer) contentStack.pop ();
+
+ if (state != null && !state.completed ())
+ // VC: Element valid (clauses two, three, four; see Recognizer)
+ error ("Premature end for element '"
+ + state.type.name
+ + "', content model "
+ + state.type.model);
+
+ // could insist on match of start element, but that's
+ // something the input stream must to guarantee.
+
+ } catch (EmptyStackException e) {
+ fatalError ("endElement without startElement: " + qName
+ + ((uri == null)
+ ? ""
+ : ( " { '" + uri + "', " + localName + " }")));
+ }
+ super.endElement (uri, localName, qName);
}
/**
* <b>ContentHandler</b> Checks whether all ID values that were
- * referenced have been declared, and releases all resources.
+ * referenced have been declared, and releases all resources.
* Passed to the next consumer.
- *
+ *
* @see #setDocumentLocator
*/
public void endDocument ()
throws SAXException
{
- for (Enumeration idNames = ids.keys ();
- idNames.hasMoreElements ();
- /* NOP */) {
- String id = (String) idNames.nextElement ();
-
- if (Boolean.FALSE == ids.get (id)) {
- // VC: IDREF (must match ID)
- error ("Undeclared ID value '" + id
- + "' was referred to by an IDREF/IDREFS attribute");
- }
- }
-
- resetState ();
- super.endDocument ();
+ for (Enumeration idNames = ids.keys ();
+ idNames.hasMoreElements ();
+ /* NOP */) {
+ String id = (String) idNames.nextElement ();
+
+ if (Boolean.FALSE == ids.get (id)) {
+ // VC: IDREF (must match ID)
+ error ("Undeclared ID value '" + id
+ + "' was referred to by an IDREF/IDREFS attribute");
+ }
+ }
+
+ resetState ();
+ super.endDocument ();
}
/** Holds per-element declarations */
static private final class ElementInfo
{
- String name;
- String model;
-
- // key = attribute name; value = AttributeInfo
- Hashtable attributes = new Hashtable (11);
-
- ElementInfo (String n) { name = n; }
-
- private Recognizer recognizer;
-
- // for validating content models: one per type, shared,
- // and constructed only on demand ... so unused elements do
- // not need to consume resources.
- Recognizer getRecognizer (ValidationConsumer consumer)
- throws SAXException
- {
- if (recognizer == null) {
- if ("ANY".equals (model))
- recognizer = ANY;
- else if ("EMPTY".equals (model))
- recognizer = new EmptyRecognizer (this);
- else if ('#' == model.charAt (1))
- // n.b. this constructor does a validity check
- recognizer = new MixedRecognizer (this, consumer);
- else
- recognizer = new ChildrenRecognizer (this, consumer);
- }
- return recognizer;
- }
+ String name;
+ String model;
+
+ // key = attribute name; value = AttributeInfo
+ Hashtable attributes = new Hashtable (11);
+
+ ElementInfo (String n) { name = n; }
+
+ private Recognizer recognizer;
+
+ // for validating content models: one per type, shared,
+ // and constructed only on demand ... so unused elements do
+ // not need to consume resources.
+ Recognizer getRecognizer (ValidationConsumer consumer)
+ throws SAXException
+ {
+ if (recognizer == null) {
+ if ("ANY".equals (model))
+ recognizer = ANY;
+ else if ("EMPTY".equals (model))
+ recognizer = new EmptyRecognizer (this);
+ else if ('#' == model.charAt (1))
+ // n.b. this constructor does a validity check
+ recognizer = new MixedRecognizer (this, consumer);
+ else
+ recognizer = new ChildrenRecognizer (this, consumer);
+ }
+ return recognizer;
+ }
}
/** Holds per-attribute declarations */
static private final class AttributeInfo
{
- String type;
- String mode; // #REQUIRED, etc (or null)
- String value; // or null
+ String type;
+ String mode; // #REQUIRED, etc (or null)
+ String value; // or null
}
@@ -1323,120 +1323,120 @@ public final class ValidationConsumer extends EventFilter
// Content model validation
//
- static private final Recognizer ANY = new Recognizer (null);
+ static private final Recognizer ANY = new Recognizer (null);
// Base class defines the calls used to validate content,
// and supports the "ANY" content model
static private class Recognizer
{
- final ElementInfo type;
-
- Recognizer (ElementInfo t) { type = t; }
-
- // return true iff character data is legal here
- boolean acceptCharacters ()
- throws SAXException
- // VC: Element Valid (third and fourth clauses)
- { return true; }
-
- // null return = failure
- // otherwise, next state (like an FSM)
- // prerequisite: tested that name was declared
- Recognizer acceptElement (String name)
- throws SAXException
- // VC: Element Valid (fourth clause)
- { return this; }
-
- // return true iff model is completed, can finish
- boolean completed ()
- throws SAXException
- // VC: Element Valid (fourth clause)
- { return true; }
-
- public String toString ()
- // n.b. "children" is the interesting case!
- { return (type == null) ? "ANY" : type.model; }
+ final ElementInfo type;
+
+ Recognizer (ElementInfo t) { type = t; }
+
+ // return true iff character data is legal here
+ boolean acceptCharacters ()
+ throws SAXException
+ // VC: Element Valid (third and fourth clauses)
+ { return true; }
+
+ // null return = failure
+ // otherwise, next state (like an FSM)
+ // prerequisite: tested that name was declared
+ Recognizer acceptElement (String name)
+ throws SAXException
+ // VC: Element Valid (fourth clause)
+ { return this; }
+
+ // return true iff model is completed, can finish
+ boolean completed ()
+ throws SAXException
+ // VC: Element Valid (fourth clause)
+ { return true; }
+
+ public String toString ()
+ // n.b. "children" is the interesting case!
+ { return (type == null) ? "ANY" : type.model; }
}
// "EMPTY" content model -- no characters or elements
private static final class EmptyRecognizer extends Recognizer
{
- public EmptyRecognizer (ElementInfo type)
- { super (type); }
+ public EmptyRecognizer (ElementInfo type)
+ { super (type); }
- // VC: Element Valid (first clause)
- boolean acceptCharacters ()
- { return false; }
+ // VC: Element Valid (first clause)
+ boolean acceptCharacters ()
+ { return false; }
- // VC: Element Valid (first clause)
- Recognizer acceptElement (String name)
- { return null; }
+ // VC: Element Valid (first clause)
+ Recognizer acceptElement (String name)
+ { return null; }
}
// "Mixed" content model -- ANY, but restricts elements
private static final class MixedRecognizer extends Recognizer
{
- private String permitted [];
-
- // N.B. constructor tests for duplicated element names (VC)
- public MixedRecognizer (ElementInfo t, ValidationConsumer v)
- throws SAXException
- {
- super (t);
-
- // (#PCDATA...)* or (#PCDATA) ==> ... or empty
- // with the "..." being "|elname|..."
- StringTokenizer tokens = new StringTokenizer (
- t.model.substring (8, t.model.lastIndexOf (')')),
- "|");
- Vector vec = new Vector ();
-
- while (tokens.hasMoreTokens ()) {
- String token = tokens.nextToken ();
-
- if (vec.contains (token))
- v.error ("element " + token
- + " is repeated in mixed content model: "
- + t.model);
- else
- vec.addElement (token.intern ());
- }
- permitted = new String [vec.size ()];
- for (int i = 0; i < permitted.length; i++)
- permitted [i] = (String) vec.elementAt (i);
-
- // in one large machine-derived DTD sample, most of about
- // 250 mixed content models were empty, and 25 had ten or
- // more entries. 2 had over a hundred elements. Linear
- // search isn't obviously wrong.
- }
-
- // VC: Element Valid (third clause)
- Recognizer acceptElement (String name)
- {
- int length = permitted.length;
-
- // first pass -- optimistic w.r.t. event source interning
- // (and document validity)
- for (int i = 0; i < length; i++)
- if (permitted [i] == name)
- return this;
- // second pass -- pessimistic w.r.t. event source interning
- for (int i = 0; i < length; i++)
- if (permitted [i].equals (name))
- return this;
- return null;
- }
+ private String permitted [];
+
+ // N.B. constructor tests for duplicated element names (VC)
+ public MixedRecognizer (ElementInfo t, ValidationConsumer v)
+ throws SAXException
+ {
+ super (t);
+
+ // (#PCDATA...)* or (#PCDATA) ==> ... or empty
+ // with the "..." being "|elname|..."
+ StringTokenizer tokens = new StringTokenizer (
+ t.model.substring (8, t.model.lastIndexOf (')')),
+ "|");
+ Vector vec = new Vector ();
+
+ while (tokens.hasMoreTokens ()) {
+ String token = tokens.nextToken ();
+
+ if (vec.contains (token))
+ v.error ("element " + token
+ + " is repeated in mixed content model: "
+ + t.model);
+ else
+ vec.addElement (token.intern ());
+ }
+ permitted = new String [vec.size ()];
+ for (int i = 0; i < permitted.length; i++)
+ permitted [i] = (String) vec.elementAt (i);
+
+ // in one large machine-derived DTD sample, most of about
+ // 250 mixed content models were empty, and 25 had ten or
+ // more entries. 2 had over a hundred elements. Linear
+ // search isn't obviously wrong.
+ }
+
+ // VC: Element Valid (third clause)
+ Recognizer acceptElement (String name)
+ {
+ int length = permitted.length;
+
+ // first pass -- optimistic w.r.t. event source interning
+ // (and document validity)
+ for (int i = 0; i < length; i++)
+ if (permitted [i] == name)
+ return this;
+ // second pass -- pessimistic w.r.t. event source interning
+ for (int i = 0; i < length; i++)
+ if (permitted [i].equals (name))
+ return this;
+ return null;
+ }
}
// recognizer loop flags, see later
- private static final int F_LOOPHEAD = 0x01;
- private static final int F_LOOPNEXT = 0x02;
+ private static final int F_LOOPHEAD = 0x01;
+ private static final int F_LOOPNEXT = 0x02;
// for debugging -- used to label/count nodes in toString()
- private static int nodeCount;
+ private static int nodeCount;
/**
* "Children" content model -- these are nodes in NDFA state graphs.
@@ -1463,466 +1463,466 @@ public final class ValidationConsumer extends EventFilter
* graph to have one exit node (or more EMPTY nodes).
*/
private static final class ChildrenRecognizer extends Recognizer
- implements Cloneable
+ implements Cloneable
{
- // for reporting non-deterministic content models
- // ... a waste of space if we're not reporting those!
- // ... along with the 'model' member (in base class)
- private ValidationConsumer consumer;
-
- // for CHOICE nodes -- each component is an arc that
- // accepts a different NAME (or is EMPTY indicating
- // NDFA termination).
- private Recognizer components [];
-
- // for NAME/SEQUENCE nodes -- accepts that NAME and
- // then goes to the next node (CHOICE, NAME, EMPTY).
- private String name;
- private Recognizer next;
-
- // loops always point back to a CHOICE node. we mark such choice
- // nodes (F_LOOPHEAD) for diagnostics and faster deep cloning.
- // We also mark nodes before back pointers (F_LOOPNEXT), to ensure
- // termination when we patch sequences and loops.
- private int flags;
-
-
- // prevent a needless indirection between 'this' and 'node'
- private void copyIn (ChildrenRecognizer node)
- {
- // model & consumer are already set
- components = node.components;
- name = node.name;
- next = node.next;
- flags = node.flags;
- }
-
- // used to construct top level "children" content models,
- public ChildrenRecognizer (ElementInfo type, ValidationConsumer vc)
- {
- this (vc, type);
- populate (type.model.toCharArray (), 0);
- patchNext (new EmptyRecognizer (type), null);
- }
-
- // used internally; populating is separate
- private ChildrenRecognizer (ValidationConsumer vc, ElementInfo type)
- {
- super (type);
- consumer = vc;
- }
-
-
- //
- // When rewriting some graph nodes we need deep clones in one case;
- // mostly shallow clones (what the JVM handles for us) are fine.
- //
- private ChildrenRecognizer shallowClone ()
- {
- try {
- return (ChildrenRecognizer) clone ();
- } catch (CloneNotSupportedException e) {
- throw new Error ("clone");
- }
- }
-
- private ChildrenRecognizer deepClone ()
- {
- return deepClone (new Hashtable (37));
- }
-
- private ChildrenRecognizer deepClone (Hashtable table)
- {
- ChildrenRecognizer retval;
-
- if ((flags & F_LOOPHEAD) != 0) {
- retval = (ChildrenRecognizer) table.get (this);
- if (retval != null)
- return this;
-
- retval = shallowClone ();
- table.put (this, retval);
- } else
- retval = shallowClone ();
-
- if (next != null) {
- if (next instanceof ChildrenRecognizer)
- retval.next = ((ChildrenRecognizer)next)
- .deepClone (table);
- else if (!(next instanceof EmptyRecognizer))
- throw new RuntimeException ("deepClone");
- }
-
- if (components != null) {
- retval.components = new Recognizer [components.length];
- for (int i = 0; i < components.length; i++) {
- Recognizer temp = components [i];
-
- if (temp == null)
- retval.components [i] = null;
- else if (temp instanceof ChildrenRecognizer)
- retval.components [i] = ((ChildrenRecognizer)temp)
- .deepClone (table);
- else if (!(temp instanceof EmptyRecognizer))
- throw new RuntimeException ("deepClone");
- }
- }
-
- return retval;
- }
-
- // connect subgraphs, first to next (sequencing)
- private void patchNext (Recognizer theNext, Hashtable table)
- {
- // backpointers must not be repatched or followed
- if ((flags & F_LOOPNEXT) != 0)
- return;
-
- // XXX this table "shouldn't" be needed, right?
- // but some choice nodes looped if it isn't there.
- if (table != null && table.get (this) != null)
- return;
- if (table == null)
- table = new Hashtable ();
-
- // NAME/SEQUENCE
- if (name != null) {
- if (next == null)
- next = theNext;
- else if (next instanceof ChildrenRecognizer) {
- ((ChildrenRecognizer)next).patchNext (theNext, table);
- } else if (!(next instanceof EmptyRecognizer))
- throw new RuntimeException ("patchNext");
- return;
- }
-
- // CHOICE
- for (int i = 0; i < components.length; i++) {
- if (components [i] == null)
- components [i] = theNext;
- else if (components [i] instanceof ChildrenRecognizer) {
- ((ChildrenRecognizer)components [i])
- .patchNext (theNext, table);
- } else if (!(components [i] instanceof EmptyRecognizer))
- throw new RuntimeException ("patchNext");
- }
-
- if (table != null && (flags & F_LOOPHEAD) != 0)
- table.put (this, this);
- }
-
- /**
- * Parses a 'children' spec (or recursively 'cp') and makes this
- * become a regular graph node.
- *
- * @return index after this particle
- */
- private int populate (char parseBuf [], int startPos)
- {
- int nextPos = startPos + 1;
- char c;
-
- if (nextPos < 0 || nextPos >= parseBuf.length)
- throw new IndexOutOfBoundsException ();
-
- // Grammar of the string is from the XML spec, but
- // with whitespace removed by the SAX parser.
-
- // children ::= (choice | seq) ('?' | '*' | '+')?
- // cp ::= (Name | choice | seq) ('?' | '*' | '+')?
- // choice ::= '(' cp ('|' choice)* ')'
- // seq ::= '(' cp (',' choice)* ')'
-
- // interior nodes only
- // cp ::= name ...
- if (parseBuf [startPos] != '('/*)*/) {
- boolean done = false;
- do {
- switch (c = parseBuf [nextPos]) {
- case '?': case '*': case '+':
- case '|': case ',':
- case /*(*/ ')':
- done = true;
- continue;
- default:
- nextPos++;
- continue;
- }
- } while (!done);
- name = new String (parseBuf, startPos, nextPos - startPos);
-
- // interior OR toplevel nodes
- // cp ::= choice ..
- // cp ::= seq ..
- } else {
- // collect everything as a separate list, and merge it
- // into "this" later if we can (SEQUENCE or singleton)
- ChildrenRecognizer first;
-
- first = new ChildrenRecognizer (consumer, type);
- nextPos = first.populate (parseBuf, nextPos);
- c = parseBuf [nextPos++];
-
- if (c == ',' || c == '|') {
- ChildrenRecognizer current = first;
- char separator = c;
- Vector v = null;
-
- if (separator == '|') {
- v = new Vector ();
- v.addElement (first);
- }
-
- do {
- ChildrenRecognizer link;
-
- link = new ChildrenRecognizer (consumer, type);
- nextPos = link.populate (parseBuf, nextPos);
-
- if (separator == ',') {
- current.patchNext (link, null);
- current = link;
- } else
- v.addElement (link);
-
- c = parseBuf [nextPos++];
- } while (c == separator);
-
- // choice ... collect everything into one array.
- if (separator == '|') {
- // assert v.size() > 1
- components = new Recognizer [v.size ()];
- for (int i = 0; i < components.length; i++) {
- components [i] = (Recognizer)
- v.elementAt (i);
- }
- // assert flags == 0
-
- // sequence ... merge into "this" to be smaller.
- } else
- copyIn (first);
-
- // treat singletons like one-node sequences.
- } else
- copyIn (first);
-
- if (c != /*(*/ ')')
- throw new RuntimeException ("corrupt content model");
- }
-
- //
- // Arity is optional, and the root of all fun. We keep the
- // FSM state graph simple by only having NAME/SEQUENCE and
- // CHOICE nodes (or EMPTY to terminate a model), easily
- // evaluated. So we rewrite each node that has arity, using
- // those primitives. We create loops here, if needed.
- //
- if (nextPos < parseBuf.length) {
- c = parseBuf [nextPos];
- if (c == '?' || c == '*' || c == '+') {
- nextPos++;
-
- // Rewrite 'zero-or-one' "?" arity to a CHOICE:
- // - SEQUENCE (clone, what's next)
- // - or, what's next
- // Size cost: N --> N + 1
- if (c == '?') {
- Recognizer once = shallowClone ();
-
- components = new Recognizer [2];
- components [0] = once;
- // components [1] initted to null
- name = null;
- next = null;
- flags = 0;
-
-
- // Rewrite 'zero-or-more' "*" arity to a CHOICE.
- // - LOOP (clone, back to this CHOICE)
- // - or, what's next
- // Size cost: N --> N + 1
- } else if (c == '*') {
- ChildrenRecognizer loop = shallowClone ();
-
- loop.patchNext (this, null);
- loop.flags |= F_LOOPNEXT;
- flags = F_LOOPHEAD;
-
- components = new Recognizer [2];
- components [0] = loop;
- // components [1] initted to null
- name = null;
- next = null;
-
-
- // Rewrite 'one-or-more' "+" arity to a SEQUENCE.
- // Basically (a)+ --> ((a),(a)*).
- // - this
- // - CHOICE
- // * LOOP (clone, back to the CHOICE)
- // * or, whatever's next
- // Size cost: N --> 2N + 1
- } else if (c == '+') {
- ChildrenRecognizer loop = deepClone ();
- ChildrenRecognizer choice;
-
- choice = new ChildrenRecognizer (consumer, type);
- loop.patchNext (choice, null);
- loop.flags |= F_LOOPNEXT;
- choice.flags = F_LOOPHEAD;
-
- choice.components = new Recognizer [2];
- choice.components [0] = loop;
- // choice.components [1] initted to null
- // choice.name, choice.next initted to null
-
- patchNext (choice, null);
- }
- }
- }
-
- return nextPos;
- }
-
- // VC: Element Valid (second clause)
- boolean acceptCharacters ()
- { return false; }
-
- // VC: Element Valid (second clause)
- Recognizer acceptElement (String type)
- throws SAXException
- {
- // NAME/SEQUENCE
- if (name != null) {
- if (name.equals (type))
- return next;
- return null;
- }
-
- // CHOICE ... optionally reporting nondeterminism we
- // run across. we won't check out every transition
- // for nondeterminism; only the ones we follow.
- Recognizer retval = null;
-
- for (int i = 0; i < components.length; i++) {
- Recognizer temp = components [i].acceptElement (type);
-
- if (temp == null)
- continue;
- else if (!warnNonDeterministic)
- return temp;
- else if (retval == null)
- retval = temp;
- else if (retval != temp)
- consumer.error ("Content model " + this.type.model
- + " is non-deterministic for " + type);
- }
- return retval;
- }
-
- // VC: Element Valid (second clause)
- boolean completed ()
- throws SAXException
- {
- // expecting a specific element
- if (name != null)
- return false;
-
- // choice, some sequences
- for (int i = 0; i < components.length; i++) {
- if (components [i].completed ())
- return true;
- }
-
- return false;
- }
+ // for reporting non-deterministic content models
+ // ... a waste of space if we're not reporting those!
+ // ... along with the 'model' member (in base class)
+ private ValidationConsumer consumer;
+
+ // for CHOICE nodes -- each component is an arc that
+ // accepts a different NAME (or is EMPTY indicating
+ // NDFA termination).
+ private Recognizer components [];
+
+ // for NAME/SEQUENCE nodes -- accepts that NAME and
+ // then goes to the next node (CHOICE, NAME, EMPTY).
+ private String name;
+ private Recognizer next;
+
+ // loops always point back to a CHOICE node. we mark such choice
+ // nodes (F_LOOPHEAD) for diagnostics and faster deep cloning.
+ // We also mark nodes before back pointers (F_LOOPNEXT), to ensure
+ // termination when we patch sequences and loops.
+ private int flags;
+
+
+ // prevent a needless indirection between 'this' and 'node'
+ private void copyIn (ChildrenRecognizer node)
+ {
+ // model & consumer are already set
+ components = node.components;
+ name = node.name;
+ next = node.next;
+ flags = node.flags;
+ }
+
+ // used to construct top level "children" content models,
+ public ChildrenRecognizer (ElementInfo type, ValidationConsumer vc)
+ {
+ this (vc, type);
+ populate (type.model.toCharArray (), 0);
+ patchNext (new EmptyRecognizer (type), null);
+ }
+
+ // used internally; populating is separate
+ private ChildrenRecognizer (ValidationConsumer vc, ElementInfo type)
+ {
+ super (type);
+ consumer = vc;
+ }
+
+
+ //
+ // When rewriting some graph nodes we need deep clones in one case;
+ // mostly shallow clones (what the JVM handles for us) are fine.
+ //
+ private ChildrenRecognizer shallowClone ()
+ {
+ try {
+ return (ChildrenRecognizer) clone ();
+ } catch (CloneNotSupportedException e) {
+ throw new Error ("clone");
+ }
+ }
+
+ private ChildrenRecognizer deepClone ()
+ {
+ return deepClone (new Hashtable (37));
+ }
+
+ private ChildrenRecognizer deepClone (Hashtable table)
+ {
+ ChildrenRecognizer retval;
+
+ if ((flags & F_LOOPHEAD) != 0) {
+ retval = (ChildrenRecognizer) table.get (this);
+ if (retval != null)
+ return this;
+
+ retval = shallowClone ();
+ table.put (this, retval);
+ } else
+ retval = shallowClone ();
+
+ if (next != null) {
+ if (next instanceof ChildrenRecognizer)
+ retval.next = ((ChildrenRecognizer)next)
+ .deepClone (table);
+ else if (!(next instanceof EmptyRecognizer))
+ throw new RuntimeException ("deepClone");
+ }
+
+ if (components != null) {
+ retval.components = new Recognizer [components.length];
+ for (int i = 0; i < components.length; i++) {
+ Recognizer temp = components [i];
+
+ if (temp == null)
+ retval.components [i] = null;
+ else if (temp instanceof ChildrenRecognizer)
+ retval.components [i] = ((ChildrenRecognizer)temp)
+ .deepClone (table);
+ else if (!(temp instanceof EmptyRecognizer))
+ throw new RuntimeException ("deepClone");
+ }
+ }
+
+ return retval;
+ }
+
+ // connect subgraphs, first to next (sequencing)
+ private void patchNext (Recognizer theNext, Hashtable table)
+ {
+ // backpointers must not be repatched or followed
+ if ((flags & F_LOOPNEXT) != 0)
+ return;
+
+ // XXX this table "shouldn't" be needed, right?
+ // but some choice nodes looped if it isn't there.
+ if (table != null && table.get (this) != null)
+ return;
+ if (table == null)
+ table = new Hashtable ();
+
+ // NAME/SEQUENCE
+ if (name != null) {
+ if (next == null)
+ next = theNext;
+ else if (next instanceof ChildrenRecognizer) {
+ ((ChildrenRecognizer)next).patchNext (theNext, table);
+ } else if (!(next instanceof EmptyRecognizer))
+ throw new RuntimeException ("patchNext");
+ return;
+ }
+
+ // CHOICE
+ for (int i = 0; i < components.length; i++) {
+ if (components [i] == null)
+ components [i] = theNext;
+ else if (components [i] instanceof ChildrenRecognizer) {
+ ((ChildrenRecognizer)components [i])
+ .patchNext (theNext, table);
+ } else if (!(components [i] instanceof EmptyRecognizer))
+ throw new RuntimeException ("patchNext");
+ }
+
+ if (table != null && (flags & F_LOOPHEAD) != 0)
+ table.put (this, this);
+ }
+
+ /**
+ * Parses a 'children' spec (or recursively 'cp') and makes this
+ * become a regular graph node.
+ *
+ * @return index after this particle
+ */
+ private int populate (char parseBuf [], int startPos)
+ {
+ int nextPos = startPos + 1;
+ char c;
+
+ if (nextPos < 0 || nextPos >= parseBuf.length)
+ throw new IndexOutOfBoundsException ();
+
+ // Grammar of the string is from the XML spec, but
+ // with whitespace removed by the SAX parser.
+
+ // children ::= (choice | seq) ('?' | '*' | '+')?
+ // cp ::= (Name | choice | seq) ('?' | '*' | '+')?
+ // choice ::= '(' cp ('|' choice)* ')'
+ // seq ::= '(' cp (',' choice)* ')'
+
+ // interior nodes only
+ // cp ::= name ...
+ if (parseBuf [startPos] != '('/*)*/) {
+ boolean done = false;
+ do {
+ switch (c = parseBuf [nextPos]) {
+ case '?': case '*': case '+':
+ case '|': case ',':
+ case /*(*/ ')':
+ done = true;
+ continue;
+ default:
+ nextPos++;
+ continue;
+ }
+ } while (!done);
+ name = new String (parseBuf, startPos, nextPos - startPos);
+
+ // interior OR toplevel nodes
+ // cp ::= choice ..
+ // cp ::= seq ..
+ } else {
+ // collect everything as a separate list, and merge it
+ // into "this" later if we can (SEQUENCE or singleton)
+ ChildrenRecognizer first;
+
+ first = new ChildrenRecognizer (consumer, type);
+ nextPos = first.populate (parseBuf, nextPos);
+ c = parseBuf [nextPos++];
+
+ if (c == ',' || c == '|') {
+ ChildrenRecognizer current = first;
+ char separator = c;
+ Vector v = null;
+
+ if (separator == '|') {
+ v = new Vector ();
+ v.addElement (first);
+ }
+
+ do {
+ ChildrenRecognizer link;
+
+ link = new ChildrenRecognizer (consumer, type);
+ nextPos = link.populate (parseBuf, nextPos);
+
+ if (separator == ',') {
+ current.patchNext (link, null);
+ current = link;
+ } else
+ v.addElement (link);
+
+ c = parseBuf [nextPos++];
+ } while (c == separator);
+
+ // choice ... collect everything into one array.
+ if (separator == '|') {
+ // assert v.size() > 1
+ components = new Recognizer [v.size ()];
+ for (int i = 0; i < components.length; i++) {
+ components [i] = (Recognizer)
+ v.elementAt (i);
+ }
+ // assert flags == 0
+
+ // sequence ... merge into "this" to be smaller.
+ } else
+ copyIn (first);
+
+ // treat singletons like one-node sequences.
+ } else
+ copyIn (first);
+
+ if (c != /*(*/ ')')
+ throw new RuntimeException ("corrupt content model");
+ }
+
+ //
+ // Arity is optional, and the root of all fun. We keep the
+ // FSM state graph simple by only having NAME/SEQUENCE and
+ // CHOICE nodes (or EMPTY to terminate a model), easily
+ // evaluated. So we rewrite each node that has arity, using
+ // those primitives. We create loops here, if needed.
+ //
+ if (nextPos < parseBuf.length) {
+ c = parseBuf [nextPos];
+ if (c == '?' || c == '*' || c == '+') {
+ nextPos++;
+
+ // Rewrite 'zero-or-one' "?" arity to a CHOICE:
+ // - SEQUENCE (clone, what's next)
+ // - or, what's next
+ // Size cost: N --> N + 1
+ if (c == '?') {
+ Recognizer once = shallowClone ();
+
+ components = new Recognizer [2];
+ components [0] = once;
+ // components [1] initted to null
+ name = null;
+ next = null;
+ flags = 0;
+
+
+ // Rewrite 'zero-or-more' "*" arity to a CHOICE.
+ // - LOOP (clone, back to this CHOICE)
+ // - or, what's next
+ // Size cost: N --> N + 1
+ } else if (c == '*') {
+ ChildrenRecognizer loop = shallowClone ();
+
+ loop.patchNext (this, null);
+ loop.flags |= F_LOOPNEXT;
+ flags = F_LOOPHEAD;
+
+ components = new Recognizer [2];
+ components [0] = loop;
+ // components [1] initted to null
+ name = null;
+ next = null;
+
+
+ // Rewrite 'one-or-more' "+" arity to a SEQUENCE.
+ // Basically (a)+ --> ((a),(a)*).
+ // - this
+ // - CHOICE
+ // * LOOP (clone, back to the CHOICE)
+ // * or, whatever's next
+ // Size cost: N --> 2N + 1
+ } else if (c == '+') {
+ ChildrenRecognizer loop = deepClone ();
+ ChildrenRecognizer choice;
+
+ choice = new ChildrenRecognizer (consumer, type);
+ loop.patchNext (choice, null);
+ loop.flags |= F_LOOPNEXT;
+ choice.flags = F_LOOPHEAD;
+
+ choice.components = new Recognizer [2];
+ choice.components [0] = loop;
+ // choice.components [1] initted to null
+ // choice.name, choice.next initted to null
+
+ patchNext (choice, null);
+ }
+ }
+ }
+
+ return nextPos;
+ }
+
+ // VC: Element Valid (second clause)
+ boolean acceptCharacters ()
+ { return false; }
+
+ // VC: Element Valid (second clause)
+ Recognizer acceptElement (String type)
+ throws SAXException
+ {
+ // NAME/SEQUENCE
+ if (name != null) {
+ if (name.equals (type))
+ return next;
+ return null;
+ }
+
+ // CHOICE ... optionally reporting nondeterminism we
+ // run across. we won't check out every transition
+ // for nondeterminism; only the ones we follow.
+ Recognizer retval = null;
+
+ for (int i = 0; i < components.length; i++) {
+ Recognizer temp = components [i].acceptElement (type);
+
+ if (temp == null)
+ continue;
+ else if (!warnNonDeterministic)
+ return temp;
+ else if (retval == null)
+ retval = temp;
+ else if (retval != temp)
+ consumer.error ("Content model " + this.type.model
+ + " is non-deterministic for " + type);
+ }
+ return retval;
+ }
+
+ // VC: Element Valid (second clause)
+ boolean completed ()
+ throws SAXException
+ {
+ // expecting a specific element
+ if (name != null)
+ return false;
+
+ // choice, some sequences
+ for (int i = 0; i < components.length; i++) {
+ if (components [i].completed ())
+ return true;
+ }
+
+ return false;
+ }
/** /
- // FOR DEBUGGING ... flattens the graph for printing.
-
- public String toString ()
- {
- StringBuffer buf = new StringBuffer ();
-
- // only one set of loop labels can be generated
- // at a time...
- synchronized (ANY) {
- nodeCount = 0;
-
- toString (buf, new Hashtable ());
- return buf.toString ();
- }
- }
-
- private void toString (StringBuffer buf, Hashtable table)
- {
- // When we visit a node, label and count it.
- // Nodes are never visited/counted more than once.
- // For small models labels waste space, but if arity
- // mappings were used the savings are substantial.
- // (Plus, the output can be more readily understood.)
- String temp = (String) table.get (this);
-
- if (temp != null) {
- buf.append ('{');
- buf.append (temp);
- buf.append ('}');
- return;
- } else {
- StringBuffer scratch = new StringBuffer (15);
-
- if ((flags & F_LOOPHEAD) != 0)
- scratch.append ("loop");
- else
- scratch.append ("node");
- scratch.append ('-');
- scratch.append (++nodeCount);
- temp = scratch.toString ();
-
- table.put (this, temp);
- buf.append ('[');
- buf.append (temp);
- buf.append (']');
- buf.append (':');
- }
-
- // NAME/SEQUENCE
- if (name != null) {
- // n.b. some output encodings turn some name chars into '?'
- // e.g. with Japanese names and ASCII output
- buf.append (name);
- if (components != null) // bug!
- buf.append ('$');
- if (next == null)
- buf.append (",*");
- else if (next instanceof EmptyRecognizer) // patch-to-next
- buf.append (",{}");
- else if (next instanceof ChildrenRecognizer) {
- buf.append (',');
- ((ChildrenRecognizer)next).toString (buf, table);
- } else // bug!
- buf.append (",+");
- return;
- }
-
- // CHOICE
- buf.append ("<");
- for (int i = 0; i < components.length; i++) {
- if (i != 0)
- buf.append ("|");
- if (components [i] instanceof EmptyRecognizer) {
- buf.append ("{}");
- } else if (components [i] == null) { // patch-to-next
- buf.append ('*');
- } else {
- ChildrenRecognizer r;
-
- r = (ChildrenRecognizer) components [i];
- r.toString (buf, table);
- }
- }
- buf.append (">");
- }
+ // FOR DEBUGGING ... flattens the graph for printing.
+
+ public String toString ()
+ {
+ StringBuffer buf = new StringBuffer ();
+
+ // only one set of loop labels can be generated
+ // at a time...
+ synchronized (ANY) {
+ nodeCount = 0;
+
+ toString (buf, new Hashtable ());
+ return buf.toString ();
+ }
+ }
+
+ private void toString (StringBuffer buf, Hashtable table)
+ {
+ // When we visit a node, label and count it.
+ // Nodes are never visited/counted more than once.
+ // For small models labels waste space, but if arity
+ // mappings were used the savings are substantial.
+ // (Plus, the output can be more readily understood.)
+ String temp = (String) table.get (this);
+
+ if (temp != null) {
+ buf.append ('{');
+ buf.append (temp);
+ buf.append ('}');
+ return;
+ } else {
+ StringBuffer scratch = new StringBuffer (15);
+
+ if ((flags & F_LOOPHEAD) != 0)
+ scratch.append ("loop");
+ else
+ scratch.append ("node");
+ scratch.append ('-');
+ scratch.append (++nodeCount);
+ temp = scratch.toString ();
+
+ table.put (this, temp);
+ buf.append ('[');
+ buf.append (temp);
+ buf.append (']');
+ buf.append (':');
+ }
+
+ // NAME/SEQUENCE
+ if (name != null) {
+ // n.b. some output encodings turn some name chars into '?'
+ // e.g. with Japanese names and ASCII output
+ buf.append (name);
+ if (components != null) // bug!
+ buf.append ('$');
+ if (next == null)
+ buf.append (",*");
+ else if (next instanceof EmptyRecognizer) // patch-to-next
+ buf.append (",{}");
+ else if (next instanceof ChildrenRecognizer) {
+ buf.append (',');
+ ((ChildrenRecognizer)next).toString (buf, table);
+ } else // bug!
+ buf.append (",+");
+ return;
+ }
+
+ // CHOICE
+ buf.append ("<");
+ for (int i = 0; i < components.length; i++) {
+ if (i != 0)
+ buf.append ("|");
+ if (components [i] instanceof EmptyRecognizer) {
+ buf.append ("{}");
+ } else if (components [i] == null) { // patch-to-next
+ buf.append ('*');
+ } else {
+ ChildrenRecognizer r;
+
+ r = (ChildrenRecognizer) components [i];
+ r.toString (buf, table);
+ }
+ }
+ buf.append (">");
+ }
/**/
}
}
diff --git a/gnu/xml/pipeline/WellFormednessFilter.java b/gnu/xml/pipeline/WellFormednessFilter.java
index ef4301652..7a3db6593 100644
--- a/gnu/xml/pipeline/WellFormednessFilter.java
+++ b/gnu/xml/pipeline/WellFormednessFilter.java
@@ -1,4 +1,4 @@
-/* WellFormednessFilter.java --
+/* WellFormednessFilter.java --
Copyright (C) 1999,2000,2001 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -50,27 +50,27 @@ import org.xml.sax.SAXParseException;
* This filter reports fatal exceptions in the case of event streams that
* are not well formed. The rules currently tested include: <ul>
*
- * <li>setDocumentLocator ... may be called only before startDocument
+ * <li>setDocumentLocator ... may be called only before startDocument
*
- * <li>startDocument/endDocument ... must be paired, and all other
- * calls (except setDocumentLocator) must be nested within these.
+ * <li>startDocument/endDocument ... must be paired, and all other
+ * calls (except setDocumentLocator) must be nested within these.
*
- * <li>startElement/endElement ... must be correctly paired, and
- * may never appear within CDATA sections.
+ * <li>startElement/endElement ... must be correctly paired, and
+ * may never appear within CDATA sections.
*
- * <li>comment ... can't contain "--"
+ * <li>comment ... can't contain "--"
*
- * <li>character data ... can't contain "]]&gt;"
+ * <li>character data ... can't contain "]]&gt;"
*
- * <li>whitespace ... can't contain CR
+ * <li>whitespace ... can't contain CR
*
- * <li>whitespace and character data must be within an element
+ * <li>whitespace and character data must be within an element
*
- * <li>processing instruction ... can't contain "?&gt;" or CR
+ * <li>processing instruction ... can't contain "?&gt;" or CR
*
- * <li>startCDATA/endCDATA ... must be correctly paired.
+ * <li>startCDATA/endCDATA ... must be correctly paired.
*
- * </ul>
+ * </ul>
*
* <p> Other checks for event stream correctness may be provided in
* the future. For example, insisting that
@@ -84,35 +84,35 @@ import org.xml.sax.SAXParseException;
*/
public final class WellFormednessFilter extends EventFilter
{
- private boolean startedDoc;
- private Stack elementStack = new Stack ();
- private boolean startedCDATA;
- private String dtdState = "before";
+ private boolean startedDoc;
+ private Stack elementStack = new Stack ();
+ private boolean startedCDATA;
+ private String dtdState = "before";
+
-
/**
* Swallows all events after performing well formedness checks.
*/
- // constructor used by PipelineFactory
+ // constructor used by PipelineFactory
public WellFormednessFilter ()
- { this (null); }
+ { this (null); }
/**
* Passes events through to the specified consumer, after first
* processing them.
*/
- // constructor used by PipelineFactory
+ // constructor used by PipelineFactory
public WellFormednessFilter (EventConsumer consumer)
{
- super (consumer);
-
- setContentHandler (this);
- setDTDHandler (this);
-
- try {
- setProperty (LEXICAL_HANDLER, this);
- } catch (SAXException e) { /* can't happen */ }
+ super (consumer);
+
+ setContentHandler (this);
+ setDTDHandler (this);
+
+ try {
+ setProperty (LEXICAL_HANDLER, this);
+ } catch (SAXException e) { /* can't happen */ }
}
/**
@@ -122,123 +122,123 @@ public final class WellFormednessFilter extends EventFilter
*/
public void reset ()
{
- startedDoc = false;
- startedCDATA = false;
- elementStack.removeAllElements ();
+ startedDoc = false;
+ startedCDATA = false;
+ elementStack.removeAllElements ();
}
private SAXParseException getException (String message)
{
- SAXParseException e;
- Locator locator = getDocumentLocator ();
+ SAXParseException e;
+ Locator locator = getDocumentLocator ();
- if (locator == null)
- return new SAXParseException (message, null, null, -1, -1);
- else
- return new SAXParseException (message, locator);
+ if (locator == null)
+ return new SAXParseException (message, null, null, -1, -1);
+ else
+ return new SAXParseException (message, locator);
}
private void fatalError (String message)
throws SAXException
{
- SAXParseException e = getException (message);
- ErrorHandler handler = getErrorHandler ();
+ SAXParseException e = getException (message);
+ ErrorHandler handler = getErrorHandler ();
- if (handler != null)
- handler.fatalError (e);
- throw e;
+ if (handler != null)
+ handler.fatalError (e);
+ throw e;
}
/**
* Throws an exception when called after startDocument.
*
* @param locator the locator, to be used in error reporting or relative
- * URI resolution.
+ * URI resolution.
*
* @exception IllegalStateException when called after the document
- * has already been started
+ * has already been started
*/
public void setDocumentLocator (Locator locator)
{
- if (startedDoc)
- throw new IllegalStateException (
- "setDocumentLocator called after startDocument");
- super.setDocumentLocator (locator);
+ if (startedDoc)
+ throw new IllegalStateException (
+ "setDocumentLocator called after startDocument");
+ super.setDocumentLocator (locator);
}
public void startDocument () throws SAXException
{
- if (startedDoc)
- fatalError ("startDocument called more than once");
- startedDoc = true;
- startedCDATA = false;
- elementStack.removeAllElements ();
- super.startDocument ();
+ if (startedDoc)
+ fatalError ("startDocument called more than once");
+ startedDoc = true;
+ startedCDATA = false;
+ elementStack.removeAllElements ();
+ super.startDocument ();
}
public void startElement (
- String uri, String localName,
- String qName, Attributes atts
+ String uri, String localName,
+ String qName, Attributes atts
) throws SAXException
{
- if (!startedDoc)
- fatalError ("callback outside of document?");
- if ("inside".equals (dtdState))
- fatalError ("element inside DTD?");
- else
- dtdState = "after";
- if (startedCDATA)
- fatalError ("element inside CDATA section");
- if (qName == null || "".equals (qName))
- fatalError ("startElement name missing");
- elementStack.push (qName);
- super.startElement (uri, localName, qName, atts);
+ if (!startedDoc)
+ fatalError ("callback outside of document?");
+ if ("inside".equals (dtdState))
+ fatalError ("element inside DTD?");
+ else
+ dtdState = "after";
+ if (startedCDATA)
+ fatalError ("element inside CDATA section");
+ if (qName == null || "".equals (qName))
+ fatalError ("startElement name missing");
+ elementStack.push (qName);
+ super.startElement (uri, localName, qName, atts);
}
public void endElement (String uri, String localName, String qName)
throws SAXException
{
- if (!startedDoc)
- fatalError ("callback outside of document?");
- if (startedCDATA)
- fatalError ("element inside CDATA section");
- if (qName == null || "".equals (qName))
- fatalError ("endElement name missing");
-
- try {
- String top = (String) elementStack.pop ();
-
- if (!qName.equals (top))
- fatalError ("<" + top + " ...>...</" + qName + ">");
- // XXX could record/test namespace info
- } catch (EmptyStackException e) {
- fatalError ("endElement without startElement: </" + qName + ">");
- }
- super.endElement (uri, localName, qName);
+ if (!startedDoc)
+ fatalError ("callback outside of document?");
+ if (startedCDATA)
+ fatalError ("element inside CDATA section");
+ if (qName == null || "".equals (qName))
+ fatalError ("endElement name missing");
+
+ try {
+ String top = (String) elementStack.pop ();
+
+ if (!qName.equals (top))
+ fatalError ("<" + top + " ...>...</" + qName + ">");
+ // XXX could record/test namespace info
+ } catch (EmptyStackException e) {
+ fatalError ("endElement without startElement: </" + qName + ">");
+ }
+ super.endElement (uri, localName, qName);
}
public void endDocument () throws SAXException
{
- if (!startedDoc)
- fatalError ("callback outside of document?");
- dtdState = "before";
- startedDoc = false;
- super.endDocument ();
+ if (!startedDoc)
+ fatalError ("callback outside of document?");
+ dtdState = "before";
+ startedDoc = false;
+ super.endDocument ();
}
public void startDTD (String root, String publicId, String systemId)
throws SAXException
{
- if (!startedDoc)
- fatalError ("callback outside of document?");
+ if (!startedDoc)
+ fatalError ("callback outside of document?");
if ("before" != dtdState)
- fatalError ("two DTDs?");
- if (!elementStack.empty ())
- fatalError ("DTD must precede root element");
- dtdState = "inside";
- super.startDTD (root, publicId, systemId);
+ fatalError ("two DTDs?");
+ if (!elementStack.empty ())
+ fatalError ("DTD must precede root element");
+ dtdState = "inside";
+ super.startDTD (root, publicId, systemId);
}
public void notationDecl (String name, String publicId, String systemId)
@@ -247,19 +247,19 @@ public final class WellFormednessFilter extends EventFilter
// FIXME: not all parsers will report startDTD() ...
// we'd rather insist we're "inside".
if ("after" == dtdState)
- fatalError ("not inside DTD");
- super.notationDecl (name, publicId, systemId);
+ fatalError ("not inside DTD");
+ super.notationDecl (name, publicId, systemId);
}
public void unparsedEntityDecl (String name,
- String publicId, String systemId, String notationName)
+ String publicId, String systemId, String notationName)
throws SAXException
{
// FIXME: not all parsers will report startDTD() ...
// we'd rather insist we're "inside".
if ("after" == dtdState)
- fatalError ("not inside DTD");
- super.unparsedEntityDecl (name, publicId, systemId, notationName);
+ fatalError ("not inside DTD");
+ super.unparsedEntityDecl (name, publicId, systemId, notationName);
}
// FIXME: add the four DeclHandler calls too
@@ -267,97 +267,97 @@ public final class WellFormednessFilter extends EventFilter
public void endDTD ()
throws SAXException
{
- if (!startedDoc)
- fatalError ("callback outside of document?");
- if ("inside" != dtdState)
- fatalError ("DTD ends without start?");
- dtdState = "after";
- super.endDTD ();
+ if (!startedDoc)
+ fatalError ("callback outside of document?");
+ if ("inside" != dtdState)
+ fatalError ("DTD ends without start?");
+ dtdState = "after";
+ super.endDTD ();
}
public void characters (char ch [], int start, int length)
throws SAXException
{
- int here = start, end = start + length;
- if (elementStack.empty ())
- fatalError ("characters must be in an element");
- while (here < end) {
- if (ch [here++] != ']')
- continue;
- if (here == end) // potential problem ...
- continue;
- if (ch [here++] != ']')
- continue;
- if (here == end) // potential problem ...
- continue;
- if (ch [here++] == '>')
- fatalError ("character data can't contain \"]]>\"");
- }
- super.characters (ch, start, length);
+ int here = start, end = start + length;
+ if (elementStack.empty ())
+ fatalError ("characters must be in an element");
+ while (here < end) {
+ if (ch [here++] != ']')
+ continue;
+ if (here == end) // potential problem ...
+ continue;
+ if (ch [here++] != ']')
+ continue;
+ if (here == end) // potential problem ...
+ continue;
+ if (ch [here++] == '>')
+ fatalError ("character data can't contain \"]]>\"");
+ }
+ super.characters (ch, start, length);
}
public void ignorableWhitespace (char ch [], int start, int length)
throws SAXException
{
- int here = start, end = start + length;
- if (elementStack.empty ())
- fatalError ("characters must be in an element");
- while (here < end) {
- if (ch [here++] == '\r')
- fatalError ("whitespace can't contain CR");
- }
- super.ignorableWhitespace (ch, start, length);
+ int here = start, end = start + length;
+ if (elementStack.empty ())
+ fatalError ("characters must be in an element");
+ while (here < end) {
+ if (ch [here++] == '\r')
+ fatalError ("whitespace can't contain CR");
+ }
+ super.ignorableWhitespace (ch, start, length);
}
public void processingInstruction (String target, String data)
throws SAXException
{
- if (data.indexOf ('\r') > 0)
- fatalError ("PIs can't contain CR");
- if (data.indexOf ("?>") > 0)
- fatalError ("PIs can't contain \"?>\"");
+ if (data.indexOf ('\r') > 0)
+ fatalError ("PIs can't contain CR");
+ if (data.indexOf ("?>") > 0)
+ fatalError ("PIs can't contain \"?>\"");
}
public void comment (char ch [], int start, int length)
throws SAXException
{
- if (!startedDoc)
- fatalError ("callback outside of document?");
- if (startedCDATA)
- fatalError ("comments can't nest in CDATA");
- int here = start, end = start + length;
- while (here < end) {
- if (ch [here] == '\r')
- fatalError ("comments can't contain CR");
- if (ch [here++] != '-')
- continue;
- if (here == end)
- fatalError ("comments can't end with \"--->\"");
- if (ch [here++] == '-')
- fatalError ("comments can't contain \"--\"");
- }
- super.comment (ch, start, length);
+ if (!startedDoc)
+ fatalError ("callback outside of document?");
+ if (startedCDATA)
+ fatalError ("comments can't nest in CDATA");
+ int here = start, end = start + length;
+ while (here < end) {
+ if (ch [here] == '\r')
+ fatalError ("comments can't contain CR");
+ if (ch [here++] != '-')
+ continue;
+ if (here == end)
+ fatalError ("comments can't end with \"--->\"");
+ if (ch [here++] == '-')
+ fatalError ("comments can't contain \"--\"");
+ }
+ super.comment (ch, start, length);
}
public void startCDATA ()
throws SAXException
{
- if (!startedDoc)
- fatalError ("callback outside of document?");
- if (startedCDATA)
- fatalError ("CDATA starts can't nest");
- startedCDATA = true;
- super.startCDATA ();
+ if (!startedDoc)
+ fatalError ("callback outside of document?");
+ if (startedCDATA)
+ fatalError ("CDATA starts can't nest");
+ startedCDATA = true;
+ super.startCDATA ();
}
public void endCDATA ()
throws SAXException
{
- if (!startedDoc)
- fatalError ("callback outside of document?");
- if (!startedCDATA)
- fatalError ("CDATA end without start?");
- startedCDATA = false;
- super.endCDATA ();
+ if (!startedDoc)
+ fatalError ("callback outside of document?");
+ if (!startedCDATA)
+ fatalError ("CDATA end without start?");
+ startedCDATA = false;
+ super.endCDATA ();
}
}
diff --git a/gnu/xml/pipeline/XIncludeFilter.java b/gnu/xml/pipeline/XIncludeFilter.java
index 02607a4e0..a1445fa0c 100644
--- a/gnu/xml/pipeline/XIncludeFilter.java
+++ b/gnu/xml/pipeline/XIncludeFilter.java
@@ -1,4 +1,4 @@
-/* XIncludeFilter.java --
+/* XIncludeFilter.java --
Copyright (C) 2001,2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -40,8 +40,8 @@ package gnu.xml.pipeline;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
-import java.net.URL;
-import java.net.URLConnection;
+import java.net.URL;
+import java.net.URLConnection;
import java.util.Hashtable;
import java.util.Stack;
import java.util.Vector;
@@ -77,7 +77,7 @@ import gnu.xml.util.Resolver;
* currently supported.
*
* <li> DTDs are not supported in included files, since the SAX DTD events
- * must have completely preceded any included file.
+ * must have completely preceded any included file.
* The CR explicitly allows the DTD related portions of the infoset to
* grow as an effect of including XML documents.
*
@@ -101,33 +101,33 @@ import gnu.xml.util.Resolver;
*/
public class XIncludeFilter extends EventFilter implements Locator
{
- private Hashtable extEntities = new Hashtable (5, 5);
- private int ignoreCount;
- private Stack uris = new Stack ();
- private Locator locator;
- private Vector inclusions = new Vector (5, 5);
- private boolean savingPrefixes;
+ private Hashtable extEntities = new Hashtable (5, 5);
+ private int ignoreCount;
+ private Stack uris = new Stack ();
+ private Locator locator;
+ private Vector inclusions = new Vector (5, 5);
+ private boolean savingPrefixes;
/**
*/
public XIncludeFilter (EventConsumer next)
throws SAXException
{
- super (next);
- setContentHandler (this);
- // DTDHandler callbacks pass straight through
- setProperty (DECL_HANDLER, this);
- setProperty (LEXICAL_HANDLER, this);
+ super (next);
+ setContentHandler (this);
+ // DTDHandler callbacks pass straight through
+ setProperty (DECL_HANDLER, this);
+ setProperty (LEXICAL_HANDLER, this);
}
private void fatal (SAXParseException e) throws SAXException
{
- ErrorHandler eh;
-
- eh = getErrorHandler ();
- if (eh != null)
- eh.fatalError (e);
- throw e;
+ ErrorHandler eh;
+
+ eh = getErrorHandler ();
+ if (eh != null)
+ eh.fatalError (e);
+ throw e;
}
/**
@@ -135,29 +135,29 @@ public class XIncludeFilter extends EventFilter implements Locator
*/
public void setDocumentLocator (Locator locator)
{
- this.locator = locator;
- super.setDocumentLocator (this);
+ this.locator = locator;
+ super.setDocumentLocator (this);
}
/** Used for proxy locator; do not call directly. */
public String getSystemId ()
- { return (locator == null) ? null : locator.getSystemId (); }
+ { return (locator == null) ? null : locator.getSystemId (); }
/** Used for proxy locator; do not call directly. */
public String getPublicId ()
- { return (locator == null) ? null : locator.getPublicId (); }
+ { return (locator == null) ? null : locator.getPublicId (); }
/** Used for proxy locator; do not call directly. */
public int getLineNumber ()
- { return (locator == null) ? -1 : locator.getLineNumber (); }
+ { return (locator == null) ? -1 : locator.getLineNumber (); }
/** Used for proxy locator; do not call directly. */
public int getColumnNumber ()
- { return (locator == null) ? -1 : locator.getColumnNumber (); }
+ { return (locator == null) ? -1 : locator.getColumnNumber (); }
/**
* Assigns the flag controlling the setting of the SAX2
* <em>namespace-prefixes</em> flag.
*/
public void setSavingPrefixes (boolean flag)
- { savingPrefixes = flag; }
+ { savingPrefixes = flag; }
/**
* Returns the flag controlling the setting of the SAX2
@@ -166,49 +166,49 @@ public class XIncludeFilter extends EventFilter implements Locator
* information that can be useful.
*/
public boolean isSavingPrefixes ()
- { return savingPrefixes; }
+ { return savingPrefixes; }
//
// Two mechanisms are interacting here.
- //
- // - XML Base implies a stack of base URIs, updated both by
- // "real entity" boundaries and element boundaries.
//
- // - Active "Real Entities" (for document and general entities,
- // and by xincluded files) are tracked to prevent circular
- // inclusions.
+ // - XML Base implies a stack of base URIs, updated both by
+ // "real entity" boundaries and element boundaries.
+ //
+ // - Active "Real Entities" (for document and general entities,
+ // and by xincluded files) are tracked to prevent circular
+ // inclusions.
//
private String addMarker (String uri)
throws SAXException
{
- if (locator != null && locator.getSystemId () != null)
- uri = locator.getSystemId ();
-
- // guard against InputSource objects without system IDs
- if (uri == null)
- fatal (new SAXParseException ("Entity URI is unknown", locator));
-
- try {
- URL url = new URL (uri);
-
- uri = url.toString ();
- if (inclusions.contains (uri))
- fatal (new SAXParseException (
- "XInclude, circular inclusion", locator));
- inclusions.addElement (uri);
- uris.push (url);
- } catch (IOException e) {
- // guard against illegal relative URIs (Xerces)
- fatal (new SAXParseException ("parser bug: relative URI",
- locator, e));
- }
- return uri;
+ if (locator != null && locator.getSystemId () != null)
+ uri = locator.getSystemId ();
+
+ // guard against InputSource objects without system IDs
+ if (uri == null)
+ fatal (new SAXParseException ("Entity URI is unknown", locator));
+
+ try {
+ URL url = new URL (uri);
+
+ uri = url.toString ();
+ if (inclusions.contains (uri))
+ fatal (new SAXParseException (
+ "XInclude, circular inclusion", locator));
+ inclusions.addElement (uri);
+ uris.push (url);
+ } catch (IOException e) {
+ // guard against illegal relative URIs (Xerces)
+ fatal (new SAXParseException ("parser bug: relative URI",
+ locator, e));
+ }
+ return uri;
}
private void pop (String uri)
{
- inclusions.removeElement (uri);
- uris.pop ();
+ inclusions.removeElement (uri);
+ uris.pop ();
}
//
@@ -216,66 +216,66 @@ public class XIncludeFilter extends EventFilter implements Locator
//
public void startDocument () throws SAXException
{
- ignoreCount = 0;
- addMarker (null);
- super.startDocument ();
+ ignoreCount = 0;
+ addMarker (null);
+ super.startDocument ();
}
public void endDocument () throws SAXException
{
- inclusions.setSize (0);
- extEntities.clear ();
- uris.setSize (0);
- super.endDocument ();
+ inclusions.setSize (0);
+ extEntities.clear ();
+ uris.setSize (0);
+ super.endDocument ();
}
//
// External general entity boundaries get both treatments.
//
public void externalEntityDecl (String name,
- String publicId, String systemId)
+ String publicId, String systemId)
throws SAXException
{
- if (name.charAt (0) == '%')
- return;
- try {
- URL url = new URL (locator.getSystemId ());
- systemId = new URL (url, systemId).toString ();
- } catch (IOException e) {
- // what could we do?
- }
- extEntities.put (name, systemId);
+ if (name.charAt (0) == '%')
+ return;
+ try {
+ URL url = new URL (locator.getSystemId ());
+ systemId = new URL (url, systemId).toString ();
+ } catch (IOException e) {
+ // what could we do?
+ }
+ extEntities.put (name, systemId);
}
public void startEntity (String name)
throws SAXException
{
- if (ignoreCount != 0) {
- ignoreCount++;
- return;
- }
-
- String uri = (String) extEntities.get (name);
- if (uri != null)
- addMarker (uri);
- super.startEntity (name);
+ if (ignoreCount != 0) {
+ ignoreCount++;
+ return;
+ }
+
+ String uri = (String) extEntities.get (name);
+ if (uri != null)
+ addMarker (uri);
+ super.startEntity (name);
}
public void endEntity (String name)
throws SAXException
{
- if (ignoreCount != 0) {
- if (--ignoreCount != 0)
- return;
- }
+ if (ignoreCount != 0) {
+ if (--ignoreCount != 0)
+ return;
+ }
- String uri = (String) extEntities.get (name);
+ String uri = (String) extEntities.get (name);
- if (uri != null)
- pop (uri);
- super.endEntity (name);
+ if (uri != null)
+ pop (uri);
+ super.endEntity (name);
}
-
+
//
// element boundaries only affect the base URI stack,
// unless they're XInclude elements.
@@ -284,103 +284,103 @@ public class XIncludeFilter extends EventFilter implements Locator
startElement (String uri, String localName, String qName, Attributes atts)
throws SAXException
{
- if (ignoreCount != 0) {
- ignoreCount++;
- return;
- }
-
- URL baseURI = (URL) uris.peek ();
- String base;
-
- base = atts.getValue ("http://www.w3.org/XML/1998/namespace", "base");
- if (base == null)
- uris.push (baseURI);
- else {
- URL url;
-
- if (base.indexOf ('#') != -1)
- fatal (new SAXParseException (
- "xml:base with fragment: " + base,
- locator));
-
- try {
- baseURI = new URL (baseURI, base);
- uris.push (baseURI);
- } catch (Exception e) {
- fatal (new SAXParseException (
- "xml:base with illegal uri: " + base,
- locator, e));
- }
- }
-
- if (!"http://www.w3.org/2001/XInclude".equals (uri)) {
- super.startElement (uri, localName, qName, atts);
- return;
- }
-
- if ("include".equals (localName)) {
- String href = atts.getValue ("href");
- String parse = atts.getValue ("parse");
- String encoding = atts.getValue ("encoding");
- URL url = (URL) uris.peek ();
- SAXParseException x = null;
-
- if (href == null)
- fatal (new SAXParseException (
- "XInclude missing href",
- locator));
- if (href.indexOf ('#') != -1)
- fatal (new SAXParseException (
- "XInclude with fragment: " + href,
- locator));
-
- if (parse == null || "xml".equals (parse))
- x = xinclude (url, href);
- else if ("text".equals (parse))
- x = readText (url, href, encoding);
- else
- fatal (new SAXParseException (
- "unknown XInclude parsing mode: " + parse,
- locator));
- if (x == null) {
- // strip out all child content
- ignoreCount++;
- return;
- }
-
- // FIXME the 17-Sept-2002 CR of XInclude says we "must"
- // use xi:fallback elements to handle resource errors,
- // if they exist.
- fatal (x);
-
- } else if ("fallback".equals (localName)) {
- fatal (new SAXParseException (
- "illegal top level XInclude 'fallback' element",
- locator));
- } else {
- ErrorHandler eh = getErrorHandler ();
-
- // CR doesn't say this is an error
- if (eh != null)
- eh.warning (new SAXParseException (
- "unrecognized toplevel XInclude element: " + localName,
- locator));
- super.startElement (uri, localName, qName, atts);
- }
+ if (ignoreCount != 0) {
+ ignoreCount++;
+ return;
+ }
+
+ URL baseURI = (URL) uris.peek ();
+ String base;
+
+ base = atts.getValue ("http://www.w3.org/XML/1998/namespace", "base");
+ if (base == null)
+ uris.push (baseURI);
+ else {
+ URL url;
+
+ if (base.indexOf ('#') != -1)
+ fatal (new SAXParseException (
+ "xml:base with fragment: " + base,
+ locator));
+
+ try {
+ baseURI = new URL (baseURI, base);
+ uris.push (baseURI);
+ } catch (Exception e) {
+ fatal (new SAXParseException (
+ "xml:base with illegal uri: " + base,
+ locator, e));
+ }
+ }
+
+ if (!"http://www.w3.org/2001/XInclude".equals (uri)) {
+ super.startElement (uri, localName, qName, atts);
+ return;
+ }
+
+ if ("include".equals (localName)) {
+ String href = atts.getValue ("href");
+ String parse = atts.getValue ("parse");
+ String encoding = atts.getValue ("encoding");
+ URL url = (URL) uris.peek ();
+ SAXParseException x = null;
+
+ if (href == null)
+ fatal (new SAXParseException (
+ "XInclude missing href",
+ locator));
+ if (href.indexOf ('#') != -1)
+ fatal (new SAXParseException (
+ "XInclude with fragment: " + href,
+ locator));
+
+ if (parse == null || "xml".equals (parse))
+ x = xinclude (url, href);
+ else if ("text".equals (parse))
+ x = readText (url, href, encoding);
+ else
+ fatal (new SAXParseException (
+ "unknown XInclude parsing mode: " + parse,
+ locator));
+ if (x == null) {
+ // strip out all child content
+ ignoreCount++;
+ return;
+ }
+
+ // FIXME the 17-Sept-2002 CR of XInclude says we "must"
+ // use xi:fallback elements to handle resource errors,
+ // if they exist.
+ fatal (x);
+
+ } else if ("fallback".equals (localName)) {
+ fatal (new SAXParseException (
+ "illegal top level XInclude 'fallback' element",
+ locator));
+ } else {
+ ErrorHandler eh = getErrorHandler ();
+
+ // CR doesn't say this is an error
+ if (eh != null)
+ eh.warning (new SAXParseException (
+ "unrecognized toplevel XInclude element: " + localName,
+ locator));
+ super.startElement (uri, localName, qName, atts);
+ }
}
public void endElement (String uri, String localName, String qName)
throws SAXException
{
- if (ignoreCount != 0) {
- if (--ignoreCount != 0)
- return;
- }
-
- uris.pop ();
- if (!("http://www.w3.org/2001/XInclude".equals (uri)
- && "include".equals (localName)))
- super.endElement (uri, localName, qName);
+ if (ignoreCount != 0) {
+ if (--ignoreCount != 0)
+ return;
+ }
+
+ uris.pop ();
+ if (!("http://www.w3.org/2001/XInclude".equals (uri)
+ && "include".equals (localName)))
+ super.endElement (uri, localName, qName);
}
//
@@ -389,66 +389,66 @@ public class XIncludeFilter extends EventFilter implements Locator
public void characters (char ch [], int start, int length)
throws SAXException
{
- if (ignoreCount == 0)
- super.characters (ch, start, length);
+ if (ignoreCount == 0)
+ super.characters (ch, start, length);
}
public void processingInstruction (String target, String value)
throws SAXException
{
- if (ignoreCount == 0)
- super.processingInstruction (target, value);
+ if (ignoreCount == 0)
+ super.processingInstruction (target, value);
}
public void ignorableWhitespace (char ch [], int start, int length)
throws SAXException
{
- if (ignoreCount == 0)
- super.ignorableWhitespace (ch, start, length);
+ if (ignoreCount == 0)
+ super.ignorableWhitespace (ch, start, length);
}
public void comment (char ch [], int start, int length)
throws SAXException
{
- if (ignoreCount == 0)
- super.comment (ch, start, length);
+ if (ignoreCount == 0)
+ super.comment (ch, start, length);
}
public void startCDATA () throws SAXException
{
- if (ignoreCount == 0)
- super.startCDATA ();
+ if (ignoreCount == 0)
+ super.startCDATA ();
}
public void endCDATA () throws SAXException
{
- if (ignoreCount == 0)
- super.endCDATA ();
+ if (ignoreCount == 0)
+ super.endCDATA ();
}
public void startPrefixMapping (String prefix, String uri)
throws SAXException
{
- if (ignoreCount == 0)
- super.startPrefixMapping (prefix, uri);
+ if (ignoreCount == 0)
+ super.startPrefixMapping (prefix, uri);
}
public void endPrefixMapping (String prefix) throws SAXException
{
- if (ignoreCount == 0)
- super.endPrefixMapping (prefix);
+ if (ignoreCount == 0)
+ super.endPrefixMapping (prefix);
}
public void skippedEntity (String name) throws SAXException
{
- if (ignoreCount == 0)
- super.skippedEntity (name);
+ if (ignoreCount == 0)
+ super.skippedEntity (name);
}
// JDK 1.1 seems to need it to be done this way, sigh
void setLocator (Locator l) { locator = l; }
Locator getLocator () { return locator; }
-
+
//
// for XIncluded entities, manage the current locator and
@@ -456,45 +456,45 @@ public class XIncludeFilter extends EventFilter implements Locator
//
private class Scrubber extends EventFilter
{
- Scrubber (EventFilter f)
- throws SAXException
- {
- // delegation passes to next in chain
- super (f);
-
- // process all content events
- super.setContentHandler (this);
- super.setProperty (LEXICAL_HANDLER, this);
-
- // drop all DTD events
- super.setDTDHandler (null);
- super.setProperty (DECL_HANDLER, null);
- }
-
- // maintain proxy locator
- // only one startDocument()/endDocument() pair per event stream
- public void setDocumentLocator (Locator l)
- { setLocator (l); }
- public void startDocument ()
- { }
- public void endDocument ()
- { }
-
- private void reject (String message) throws SAXException
- { fatal (new SAXParseException (message, getLocator ())); }
-
- // only the DTD from the "base document" gets reported
- public void startDTD (String root, String publicId, String systemId)
- throws SAXException
- { reject ("XIncluded DTD: " + systemId); }
- public void endDTD ()
- throws SAXException
- { reject ("XIncluded DTD"); }
- // ... so this should never happen
- public void skippedEntity (String name) throws SAXException
- { reject ("XInclude skipped entity: " + name); }
-
- // since we rejected DTDs, only builtin entities can be reported
+ Scrubber (EventFilter f)
+ throws SAXException
+ {
+ // delegation passes to next in chain
+ super (f);
+
+ // process all content events
+ super.setContentHandler (this);
+ super.setProperty (LEXICAL_HANDLER, this);
+
+ // drop all DTD events
+ super.setDTDHandler (null);
+ super.setProperty (DECL_HANDLER, null);
+ }
+
+ // maintain proxy locator
+ // only one startDocument()/endDocument() pair per event stream
+ public void setDocumentLocator (Locator l)
+ { setLocator (l); }
+ public void startDocument ()
+ { }
+ public void endDocument ()
+ { }
+
+ private void reject (String message) throws SAXException
+ { fatal (new SAXParseException (message, getLocator ())); }
+
+ // only the DTD from the "base document" gets reported
+ public void startDTD (String root, String publicId, String systemId)
+ throws SAXException
+ { reject ("XIncluded DTD: " + systemId); }
+ public void endDTD ()
+ throws SAXException
+ { reject ("XIncluded DTD"); }
+ // ... so this should never happen
+ public void skippedEntity (String name) throws SAXException
+ { reject ("XInclude skipped entity: " + name); }
+
+ // since we rejected DTDs, only builtin entities can be reported
}
// <xi:include parse='xml' ...>
@@ -502,40 +502,40 @@ public class XIncludeFilter extends EventFilter implements Locator
private SAXParseException xinclude (URL url, String href)
throws SAXException
{
- XMLReader helper;
- Scrubber scrubber;
- Locator savedLocator = locator;
-
- // start with a parser acting just like our input
- // modulo DTD-ish stuff (validation flag, entity resolver)
- helper = XMLReaderFactory.createXMLReader ();
- helper.setErrorHandler (getErrorHandler ());
- helper.setFeature (FEATURE_URI + "namespace-prefixes", true);
-
- // Set up the proxy locator and event filter.
- scrubber = new Scrubber (this);
- locator = null;
- bind (helper, scrubber);
-
- // Merge the included document, except its DTD
- try {
- url = new URL (url, href);
- href = url.toString ();
-
- if (inclusions.contains (href))
- fatal (new SAXParseException (
- "XInclude, circular inclusion", locator));
-
- inclusions.addElement (href);
- uris.push (url);
- helper.parse (new InputSource (href));
- return null;
- } catch (java.io.IOException e) {
- return new SAXParseException (href, locator, e);
- } finally {
- pop (href);
- locator = savedLocator;
- }
+ XMLReader helper;
+ Scrubber scrubber;
+ Locator savedLocator = locator;
+
+ // start with a parser acting just like our input
+ // modulo DTD-ish stuff (validation flag, entity resolver)
+ helper = XMLReaderFactory.createXMLReader ();
+ helper.setErrorHandler (getErrorHandler ());
+ helper.setFeature (FEATURE_URI + "namespace-prefixes", true);
+
+ // Set up the proxy locator and event filter.
+ scrubber = new Scrubber (this);
+ locator = null;
+ bind (helper, scrubber);
+
+ // Merge the included document, except its DTD
+ try {
+ url = new URL (url, href);
+ href = url.toString ();
+
+ if (inclusions.contains (href))
+ fatal (new SAXParseException (
+ "XInclude, circular inclusion", locator));
+
+ inclusions.addElement (href);
+ uris.push (url);
+ helper.parse (new InputSource (href));
+ return null;
+ } catch (java.io.IOException e) {
+ return new SAXParseException (href, locator, e);
+ } finally {
+ pop (href);
+ locator = savedLocator;
+ }
}
// <xi:include parse='text' ...>
@@ -543,37 +543,37 @@ public class XIncludeFilter extends EventFilter implements Locator
private SAXParseException readText (URL url, String href, String encoding)
throws SAXException
{
- InputStream in = null;
-
- try {
- URLConnection conn;
- InputStreamReader reader;
- char buf [] = new char [4096];
- int count;
-
- url = new URL (url, href);
- conn = url.openConnection ();
- in = conn.getInputStream ();
- if (encoding == null)
- encoding = Resolver.getEncoding (conn.getContentType ());
- if (encoding == null) {
- ErrorHandler eh = getErrorHandler ();
- if (eh != null)
- eh.warning (new SAXParseException (
- "guessing text encoding for URL: " + url,
- locator));
- reader = new InputStreamReader (in);
- } else
- reader = new InputStreamReader (in, encoding);
-
- while ((count = reader.read (buf, 0, buf.length)) != -1)
- super.characters (buf, 0, count);
- in.close ();
- return null;
- } catch (IOException e) {
- return new SAXParseException (
- "can't XInclude text",
- locator, e);
- }
+ InputStream in = null;
+
+ try {
+ URLConnection conn;
+ InputStreamReader reader;
+ char buf [] = new char [4096];
+ int count;
+
+ url = new URL (url, href);
+ conn = url.openConnection ();
+ in = conn.getInputStream ();
+ if (encoding == null)
+ encoding = Resolver.getEncoding (conn.getContentType ());
+ if (encoding == null) {
+ ErrorHandler eh = getErrorHandler ();
+ if (eh != null)
+ eh.warning (new SAXParseException (
+ "guessing text encoding for URL: " + url,
+ locator));
+ reader = new InputStreamReader (in);
+ } else
+ reader = new InputStreamReader (in, encoding);
+
+ while ((count = reader.read (buf, 0, buf.length)) != -1)
+ super.characters (buf, 0, count);
+ in.close ();
+ return null;
+ } catch (IOException e) {
+ return new SAXParseException (
+ "can't XInclude text",
+ locator, e);
+ }
}
}
diff --git a/gnu/xml/pipeline/XsltFilter.java b/gnu/xml/pipeline/XsltFilter.java
index 0a1872c5a..86b6190c5 100644
--- a/gnu/xml/pipeline/XsltFilter.java
+++ b/gnu/xml/pipeline/XsltFilter.java
@@ -1,4 +1,4 @@
-/* XsltFilter.java --
+/* XsltFilter.java --
Copyright (C) 2001 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -49,8 +49,8 @@ import org.xml.sax.ext.LexicalHandler;
/**
- * Packages an XSLT transform as a pipeline component.
- * Note that all DTD events (callbacks to DeclHandler and DTDHandler
+ * Packages an XSLT transform as a pipeline component.
+ * Note that all DTD events (callbacks to DeclHandler and DTDHandler
* interfaces) are discarded, although XSLT transforms may be set up to
* use the LexicalHandler to write DTDs with only an external subset.
* Not every XSLT engine will necessarily be usable with this filter,
@@ -72,59 +72,59 @@ final public class XsltFilter extends EventFilter
* or ErrorHandler support.
*
* @param stylesheet URI for the stylesheet specifying the
- * XSLT transform
+ * XSLT transform
* @param next provides the ContentHandler and LexicalHandler
- * to receive XSLT output.
+ * to receive XSLT output.
* @exception SAXException if the stylesheet can't be parsed
* @exception IOException if there are difficulties
- * bootstrapping the XSLT engine, such as it not supporting
- * SAX well enough to use this way.
+ * bootstrapping the XSLT engine, such as it not supporting
+ * SAX well enough to use this way.
*/
public XsltFilter (String stylesheet, EventConsumer next)
throws SAXException, IOException
{
- // First, get a transformer with the stylesheet preloaded
- TransformerFactory tf = null;
- TransformerHandler th;
-
- try {
- SAXTransformerFactory stf;
-
- tf = TransformerFactory.newInstance ();
- if (!tf.getFeature (SAXTransformerFactory.FEATURE) // sax inputs
- || !tf.getFeature (SAXResult.FEATURE) // sax outputs
- || !tf.getFeature (StreamSource.FEATURE) // stylesheet
- )
- throw new IOException ("XSLT factory ("
- + tf.getClass ().getName ()
- + ") does not support SAX");
- stf = (SAXTransformerFactory) tf;
- th = stf.newTransformerHandler (new StreamSource (stylesheet));
- } catch (TransformerConfigurationException e) {
- throw new IOException ("XSLT factory ("
- + (tf == null
- ? "none available"
- : tf.getClass ().getName ())
- + ") configuration error, "
- + e.getMessage ()
- );
- }
-
- // Hook its outputs up to the pipeline ...
- SAXResult out = new SAXResult ();
-
- out.setHandler (next.getContentHandler ());
- try {
- LexicalHandler lh;
- lh = (LexicalHandler) next.getProperty (LEXICAL_HANDLER);
- out.setLexicalHandler (lh);
- } catch (Exception e) {
- // ignore
- }
- th.setResult (out);
-
- // ... and make sure its inputs look like ours.
- setContentHandler (th);
- setProperty (LEXICAL_HANDLER, th);
+ // First, get a transformer with the stylesheet preloaded
+ TransformerFactory tf = null;
+ TransformerHandler th;
+
+ try {
+ SAXTransformerFactory stf;
+
+ tf = TransformerFactory.newInstance ();
+ if (!tf.getFeature (SAXTransformerFactory.FEATURE) // sax inputs
+ || !tf.getFeature (SAXResult.FEATURE) // sax outputs
+ || !tf.getFeature (StreamSource.FEATURE) // stylesheet
+ )
+ throw new IOException ("XSLT factory ("
+ + tf.getClass ().getName ()
+ + ") does not support SAX");
+ stf = (SAXTransformerFactory) tf;
+ th = stf.newTransformerHandler (new StreamSource (stylesheet));
+ } catch (TransformerConfigurationException e) {
+ throw new IOException ("XSLT factory ("
+ + (tf == null
+ ? "none available"
+ : tf.getClass ().getName ())
+ + ") configuration error, "
+ + e.getMessage ()
+ );
+ }
+
+ // Hook its outputs up to the pipeline ...
+ SAXResult out = new SAXResult ();
+
+ out.setHandler (next.getContentHandler ());
+ try {
+ LexicalHandler lh;
+ lh = (LexicalHandler) next.getProperty (LEXICAL_HANDLER);
+ out.setLexicalHandler (lh);
+ } catch (Exception e) {
+ // ignore
+ }
+ th.setResult (out);
+
+ // ... and make sure its inputs look like ours.
+ setContentHandler (th);
+ setProperty (LEXICAL_HANDLER, th);
}
}
diff --git a/gnu/xml/stream/AttributeImpl.java b/gnu/xml/stream/AttributeImpl.java
index f74aebd35..58a0dbe21 100644
--- a/gnu/xml/stream/AttributeImpl.java
+++ b/gnu/xml/stream/AttributeImpl.java
@@ -1,4 +1,4 @@
-/* AttributeImpl.java --
+/* AttributeImpl.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -94,7 +94,7 @@ public class AttributeImpl
{
return specified;
}
-
+
public void writeAsEncodedUnicode(Writer writer)
throws XMLStreamException
{
@@ -119,6 +119,5 @@ public class AttributeImpl
throw e2;
}
}
-
-}
+}
diff --git a/gnu/xml/stream/BufferedReader.java b/gnu/xml/stream/BufferedReader.java
index f8287e823..dc69fb34b 100644
--- a/gnu/xml/stream/BufferedReader.java
+++ b/gnu/xml/stream/BufferedReader.java
@@ -1,4 +1,4 @@
-/* BufferedReader.java --
+/* BufferedReader.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -59,7 +59,7 @@ class BufferedReader
{
this(in, DEFAULT_BUFFER_SIZE);
}
-
+
BufferedReader(Reader in, int bufferSize)
{
if (bufferSize < 1)
@@ -110,19 +110,19 @@ class BufferedReader
{
if (off < 0 || len < 0 || b.length - off < len)
throw new IndexOutOfBoundsException();
-
+
if (len == 0)
return 0;
-
+
if (pos >= count && !refill())
return -1;
-
+
int ret = Math.min(count - pos, len);
System.arraycopy(buf, pos, b, off, ret);
pos += ret;
off += ret;
len -= ret;
-
+
while (len > 0 && refill())
{
int remain = Math.min(count - pos, len);
@@ -132,7 +132,7 @@ class BufferedReader
len -= remain;
ret += remain;
}
-
+
return ret;
}
@@ -177,7 +177,7 @@ class BufferedReader
{
char[] newbuf = buf;
if (markpos < bufferSize)
- {
+ {
newbuf = new char[count - markpos + bufferSize];
}
System.arraycopy(buf, markpos, newbuf, 0, markcount);
diff --git a/gnu/xml/stream/CRLFReader.java b/gnu/xml/stream/CRLFReader.java
index dad02b94a..7f3cf4d74 100644
--- a/gnu/xml/stream/CRLFReader.java
+++ b/gnu/xml/stream/CRLFReader.java
@@ -1,4 +1,4 @@
-/* CRLFReader.java --
+/* CRLFReader.java --
Copyright (C) 2005,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -115,7 +115,7 @@ class CRLFReader
}
else
l = in.read(b, off, len); // CR(s) but no LF
- }
+ }
}
return l;
}
@@ -178,4 +178,3 @@ class CRLFReader
}
}
-
diff --git a/gnu/xml/stream/CharactersImpl.java b/gnu/xml/stream/CharactersImpl.java
index 6df06582b..2107a5a6d 100644
--- a/gnu/xml/stream/CharactersImpl.java
+++ b/gnu/xml/stream/CharactersImpl.java
@@ -1,4 +1,4 @@
-/* CharactersImpl.java --
+/* CharactersImpl.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -88,12 +88,12 @@ public class CharactersImpl
{
return cdata;
}
-
+
public boolean isIgnorableWhiteSpace()
{
return ignorableWhitespace;
}
-
+
public void writeAsEncodedUnicode(Writer writer)
throws XMLStreamException
{
@@ -105,7 +105,7 @@ public class CharactersImpl
writer.write(data);
writer.write("]]>");
}
- else
+ else
writer.write(encode(data, false));
}
catch (IOException e)
@@ -115,6 +115,5 @@ public class CharactersImpl
throw e2;
}
}
-
-}
+}
diff --git a/gnu/xml/stream/CommentImpl.java b/gnu/xml/stream/CommentImpl.java
index 5863fb05a..118ac7a57 100644
--- a/gnu/xml/stream/CommentImpl.java
+++ b/gnu/xml/stream/CommentImpl.java
@@ -1,4 +1,4 @@
-/* CommentImpl.java --
+/* CommentImpl.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -70,7 +70,7 @@ public class CommentImpl
{
return text;
}
-
+
public void writeAsEncodedUnicode(Writer writer)
throws XMLStreamException
{
@@ -87,6 +87,5 @@ public class CommentImpl
throw e2;
}
}
-
-}
+}
diff --git a/gnu/xml/stream/DTDImpl.java b/gnu/xml/stream/DTDImpl.java
index 8e008aaed..cf049d362 100644
--- a/gnu/xml/stream/DTDImpl.java
+++ b/gnu/xml/stream/DTDImpl.java
@@ -1,4 +1,4 @@
-/* DTDImpl.java --
+/* DTDImpl.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -93,7 +93,7 @@ public class DTDImpl
{
return entities;
}
-
+
public void writeAsEncodedUnicode(Writer writer)
throws XMLStreamException
{
@@ -110,6 +110,5 @@ public class DTDImpl
throw e2;
}
}
-
-}
+}
diff --git a/gnu/xml/stream/EndDocumentImpl.java b/gnu/xml/stream/EndDocumentImpl.java
index 0e3ed9630..13877c5c9 100644
--- a/gnu/xml/stream/EndDocumentImpl.java
+++ b/gnu/xml/stream/EndDocumentImpl.java
@@ -1,4 +1,4 @@
-/* EndDocumentImpl.java --
+/* EndDocumentImpl.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -61,11 +61,10 @@ public class EndDocumentImpl
{
return END_DOCUMENT;
}
-
+
public void writeAsEncodedUnicode(Writer writer)
throws XMLStreamException
{
}
-
-}
+}
diff --git a/gnu/xml/stream/EndElementImpl.java b/gnu/xml/stream/EndElementImpl.java
index 7b5382ec5..71f6aa0bc 100644
--- a/gnu/xml/stream/EndElementImpl.java
+++ b/gnu/xml/stream/EndElementImpl.java
@@ -1,4 +1,4 @@
-/* EndElementImpl.java --
+/* EndElementImpl.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -80,7 +80,7 @@ public class EndElementImpl
{
return namespaces.iterator();
}
-
+
public void writeAsEncodedUnicode(Writer writer)
throws XMLStreamException
{
@@ -103,6 +103,5 @@ public class EndElementImpl
throw e2;
}
}
-
-}
+}
diff --git a/gnu/xml/stream/EntityDeclarationImpl.java b/gnu/xml/stream/EntityDeclarationImpl.java
index 41ec2fb9b..b6e33e8d2 100644
--- a/gnu/xml/stream/EntityDeclarationImpl.java
+++ b/gnu/xml/stream/EntityDeclarationImpl.java
@@ -1,4 +1,4 @@
-/* EntityDeclarationImpl.java --
+/* EntityDeclarationImpl.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -159,6 +159,5 @@ public class EntityDeclarationImpl
throw e2;
}
}
-
-}
+}
diff --git a/gnu/xml/stream/EntityReferenceImpl.java b/gnu/xml/stream/EntityReferenceImpl.java
index 38e1f00b1..6f8a11c80 100644
--- a/gnu/xml/stream/EntityReferenceImpl.java
+++ b/gnu/xml/stream/EntityReferenceImpl.java
@@ -1,4 +1,4 @@
-/* EntityReferenceImpl.java --
+/* EntityReferenceImpl.java --
Copyright (C) 2005,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -99,4 +99,3 @@ public class EntityReferenceImpl
}
}
-
diff --git a/gnu/xml/stream/FilteredEventReader.java b/gnu/xml/stream/FilteredEventReader.java
index fd6fe8b07..1ddb469df 100644
--- a/gnu/xml/stream/FilteredEventReader.java
+++ b/gnu/xml/stream/FilteredEventReader.java
@@ -1,4 +1,4 @@
-/* FilteredEventReader.java --
+/* FilteredEventReader.java --
Copyright (C) 2005,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -72,7 +72,7 @@ class FilteredEventReader
while (!filter.accept(ret));
return ret;
}
-
+
public Object next()
{
try
@@ -86,7 +86,7 @@ class FilteredEventReader
throw e2;
}
}
-
+
public XMLEvent peek()
throws XMLStreamException
{
@@ -98,7 +98,7 @@ class FilteredEventReader
while (!filter.accept(ret));
return ret;
}
-
+
public XMLEvent nextTag()
throws XMLStreamException
{
@@ -110,6 +110,5 @@ class FilteredEventReader
while (!filter.accept(ret));
return ret;
}
-
-}
+}
diff --git a/gnu/xml/stream/FilteredStreamReader.java b/gnu/xml/stream/FilteredStreamReader.java
index 90ebb330d..62d96488e 100644
--- a/gnu/xml/stream/FilteredStreamReader.java
+++ b/gnu/xml/stream/FilteredStreamReader.java
@@ -1,4 +1,4 @@
-/* FilteredStreamReader.java --
+/* FilteredStreamReader.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -74,7 +74,7 @@ class FilteredStreamReader
while (!filter.accept(reader));
return ret;
}
-
+
public int nextTag()
throws XMLStreamException
{
@@ -86,6 +86,5 @@ class FilteredStreamReader
while (!filter.accept(reader));
return ret;
}
-
-}
+}
diff --git a/gnu/xml/stream/NamespaceImpl.java b/gnu/xml/stream/NamespaceImpl.java
index 1a595ee83..241f980b6 100644
--- a/gnu/xml/stream/NamespaceImpl.java
+++ b/gnu/xml/stream/NamespaceImpl.java
@@ -1,4 +1,4 @@
-/* NamespaceImpl.java --
+/* NamespaceImpl.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -109,7 +109,7 @@ public class NamespaceImpl
{
return (prefix == null || "".equals(prefix));
}
-
+
public void writeAsEncodedUnicode(Writer writer)
throws XMLStreamException
{
@@ -133,6 +133,5 @@ public class NamespaceImpl
throw e2;
}
}
-
-}
+}
diff --git a/gnu/xml/stream/NotationDeclarationImpl.java b/gnu/xml/stream/NotationDeclarationImpl.java
index 2d08599f5..a338237ee 100644
--- a/gnu/xml/stream/NotationDeclarationImpl.java
+++ b/gnu/xml/stream/NotationDeclarationImpl.java
@@ -1,4 +1,4 @@
-/* NotationDeclarationImpl.java --
+/* NotationDeclarationImpl.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -86,7 +86,7 @@ public class NotationDeclarationImpl
{
return systemId;
}
-
+
public void writeAsEncodedUnicode(Writer writer)
throws XMLStreamException
{
@@ -121,6 +121,5 @@ public class NotationDeclarationImpl
throw e2;
}
}
-
-}
+}
diff --git a/gnu/xml/stream/ProcessingInstructionImpl.java b/gnu/xml/stream/ProcessingInstructionImpl.java
index 6a5028956..4ce0badc8 100644
--- a/gnu/xml/stream/ProcessingInstructionImpl.java
+++ b/gnu/xml/stream/ProcessingInstructionImpl.java
@@ -1,4 +1,4 @@
-/* ProcessingInstructionImpl.java --
+/* ProcessingInstructionImpl.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -78,7 +78,7 @@ public class ProcessingInstructionImpl
{
return data;
}
-
+
public void writeAsEncodedUnicode(Writer writer)
throws XMLStreamException
{
@@ -100,6 +100,5 @@ public class ProcessingInstructionImpl
throw e2;
}
}
-
-}
+}
diff --git a/gnu/xml/stream/SAXParser.java b/gnu/xml/stream/SAXParser.java
index ab1f86e49..b71d98ed3 100644
--- a/gnu/xml/stream/SAXParser.java
+++ b/gnu/xml/stream/SAXParser.java
@@ -1,4 +1,4 @@
-/* SAXParser.java --
+/* SAXParser.java --
Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -131,13 +131,13 @@ public class SAXParser
}
// -- SAXParser --
-
+
public Parser getParser()
throws SAXException
{
return null;
}
-
+
public XMLReader getXMLReader()
throws SAXException
{
@@ -365,11 +365,11 @@ public class SAXParser
}
reader = parser;
baseURI = systemId;
-
+
if (xIncludeAware)
reader = new XIncludeFilter(parser, systemId, namespaceAware,
validating, true);
-
+
if (contentHandler != null)
contentHandler.setDocumentLocator(this);
boolean startDocumentDone = false;
@@ -864,7 +864,7 @@ public class SAXParser
}
// -- Locator2 --
-
+
public int getColumnNumber()
{
Location l = reader.getLocation();
@@ -888,7 +888,7 @@ public class SAXParser
Location l = reader.getLocation();
return l.getSystemId();
}
-
+
public String getEncoding()
{
return encoding;
@@ -900,7 +900,7 @@ public class SAXParser
}
// -- XMLResolver --
-
+
public Object resolveEntity(String publicId, String systemId,
String baseURI, String namespace)
throws XMLStreamException
@@ -1037,5 +1037,5 @@ public class SAXParser
pos++;
}
}
-
+
}
diff --git a/gnu/xml/stream/SAXParserFactory.java b/gnu/xml/stream/SAXParserFactory.java
index a2ccea1e6..ebaeb3cb2 100644
--- a/gnu/xml/stream/SAXParserFactory.java
+++ b/gnu/xml/stream/SAXParserFactory.java
@@ -1,4 +1,4 @@
-/* SAXParserFactory.java --
+/* SAXParserFactory.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -92,13 +92,13 @@ public class SAXParserFactory
features.put(name, value ? Boolean.TRUE : Boolean.FALSE);
}
- public boolean getFeature(String name)
- throws ParserConfigurationException, SAXNotRecognizedException, SAXNotSupportedException
+ public boolean getFeature(String name)
+ throws ParserConfigurationException, SAXNotRecognizedException, SAXNotSupportedException
{
if (!FEATURE_NAMES.contains(name))
throw new SAXNotSupportedException(name);
Boolean value = (Boolean) features.get(name);
return (value == null) ? false : value.booleanValue();
}
-
+
}
diff --git a/gnu/xml/stream/StartDocumentImpl.java b/gnu/xml/stream/StartDocumentImpl.java
index dc4251dd9..d2e590cfc 100644
--- a/gnu/xml/stream/StartDocumentImpl.java
+++ b/gnu/xml/stream/StartDocumentImpl.java
@@ -1,4 +1,4 @@
-/* StartDocumentImpl.java --
+/* StartDocumentImpl.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -109,7 +109,7 @@ public class StartDocumentImpl
{
return xmlVersion;
}
-
+
public void writeAsEncodedUnicode(Writer writer)
throws XMLStreamException
{
@@ -139,6 +139,5 @@ public class StartDocumentImpl
throw e2;
}
}
-
-}
+}
diff --git a/gnu/xml/stream/StartElementImpl.java b/gnu/xml/stream/StartElementImpl.java
index 48f886560..66e68d560 100644
--- a/gnu/xml/stream/StartElementImpl.java
+++ b/gnu/xml/stream/StartElementImpl.java
@@ -1,4 +1,4 @@
-/* StartElementImpl.java --
+/* StartElementImpl.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -115,7 +115,7 @@ public class StartElementImpl
{
return namespaceContext.getNamespaceURI(prefix);
}
-
+
public void writeAsEncodedUnicode(Writer writer)
throws XMLStreamException
{
@@ -148,6 +148,5 @@ public class StartElementImpl
throw e2;
}
}
-
-}
+}
diff --git a/gnu/xml/stream/UnicodeReader.java b/gnu/xml/stream/UnicodeReader.java
index 9350cb2e0..aa2a95422 100644
--- a/gnu/xml/stream/UnicodeReader.java
+++ b/gnu/xml/stream/UnicodeReader.java
@@ -1,4 +1,4 @@
-/* UnicodeReader.java --
+/* UnicodeReader.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -201,5 +201,5 @@ public class UnicodeReader
}
return buf;
}
-
+
}
diff --git a/gnu/xml/stream/XIncludeFilter.java b/gnu/xml/stream/XIncludeFilter.java
index aed9d9a0f..6d955c492 100644
--- a/gnu/xml/stream/XIncludeFilter.java
+++ b/gnu/xml/stream/XIncludeFilter.java
@@ -1,4 +1,4 @@
-/* XIncludeFilter.java --
+/* XIncludeFilter.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -107,7 +107,7 @@ class XIncludeFilter
HashSet seen = new HashSet();
boolean backtracking;
boolean lookahead;
-
+
Reader includedText;
char[] buf;
int len = -1;
@@ -677,7 +677,7 @@ class XIncludeFilter
String base = (String) getParent().getProperty("gnu.xml.stream.baseURI");
return (base == null) ? systemId : base;
}
-
+
boolean includeResource(String href, String parse, String xpointer,
String encoding, String accept,
String acceptLanguage)
@@ -700,7 +700,7 @@ class XIncludeFilter
walker = null;
current = null;
backtracking = false;
-
+
URLConnection connection = getURLConnection(href, accept,
acceptLanguage);
InputStream in = connection.getInputStream();
@@ -927,5 +927,5 @@ class XIncludeFilter
}
return null;
}
-
+
}
diff --git a/gnu/xml/stream/XMLEventAllocatorImpl.java b/gnu/xml/stream/XMLEventAllocatorImpl.java
index dd2b18c94..a1824bfc5 100644
--- a/gnu/xml/stream/XMLEventAllocatorImpl.java
+++ b/gnu/xml/stream/XMLEventAllocatorImpl.java
@@ -1,4 +1,4 @@
-/* XMLEventAllocatorImpl.java --
+/* XMLEventAllocatorImpl.java --
Copyright (C) 2005,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -188,7 +188,7 @@ public class XMLEventAllocatorImpl
{
return new XMLEventAllocatorImpl();
}
-
+
protected boolean isWhitespace(String text)
{
int len = text.length();
@@ -200,6 +200,5 @@ public class XMLEventAllocatorImpl
}
return true;
}
-
-}
+}
diff --git a/gnu/xml/stream/XMLEventFactoryImpl.java b/gnu/xml/stream/XMLEventFactoryImpl.java
index 5ca1aab7c..12f7f2c79 100644
--- a/gnu/xml/stream/XMLEventFactoryImpl.java
+++ b/gnu/xml/stream/XMLEventFactoryImpl.java
@@ -1,4 +1,4 @@
-/* XMLEventFactoryImpl.java --
+/* XMLEventFactoryImpl.java --
Copyright (C) 2005,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -81,7 +81,7 @@ public class XMLEventFactoryImpl
new QName(namespaceURI, localName, prefix),
value, "CDATA", true);
}
-
+
public Attribute createAttribute(String localName, String value)
{
return new AttributeImpl(location,
@@ -117,7 +117,7 @@ public class XMLEventFactoryImpl
createLinkedList(namespaces),
null);
}
-
+
public StartElement createStartElement(String prefix,
String namespaceUri,
String localName)
@@ -155,7 +155,7 @@ public class XMLEventFactoryImpl
createLinkedList(namespaces),
context);
}
-
+
public EndElement createEndElement(QName name,
Iterator namespaces)
{
@@ -171,7 +171,7 @@ public class XMLEventFactoryImpl
new QName(namespaceUri, localName, prefix),
Collections.EMPTY_LIST);
}
-
+
public EndElement createEndElement(String prefix,
String namespaceUri,
String localName,
@@ -215,7 +215,7 @@ public class XMLEventFactoryImpl
return new StartDocumentImpl(location, null, encoding, version,
standalone, true, true);
}
-
+
public StartDocument createStartDocument(String encoding,
String version)
{
@@ -265,6 +265,5 @@ public class XMLEventFactoryImpl
ret.add(i.next());
return ret;
}
-
-}
+}
diff --git a/gnu/xml/stream/XMLEventImpl.java b/gnu/xml/stream/XMLEventImpl.java
index 8d73b1774..2e650bf74 100644
--- a/gnu/xml/stream/XMLEventImpl.java
+++ b/gnu/xml/stream/XMLEventImpl.java
@@ -1,4 +1,4 @@
-/* XMLEventImpl.java --
+/* XMLEventImpl.java --
Copyright (C) 2005,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -136,7 +136,7 @@ public abstract class XMLEventImpl
{
return null;
}
-
+
public abstract void writeAsEncodedUnicode(Writer writer)
throws XMLStreamException;
@@ -192,8 +192,7 @@ public abstract class XMLEventImpl
buf.append(c);
}
}
- return (buf == null) ? text : buf.toString();
+ return (buf == null) ? text : buf.toString();
}
}
-
diff --git a/gnu/xml/stream/XMLEventReaderImpl.java b/gnu/xml/stream/XMLEventReaderImpl.java
index bb64b1e3f..bab6d9378 100644
--- a/gnu/xml/stream/XMLEventReaderImpl.java
+++ b/gnu/xml/stream/XMLEventReaderImpl.java
@@ -1,4 +1,4 @@
-/* XMLEventReaderImpl.java --
+/* XMLEventReaderImpl.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -102,7 +102,7 @@ public class XMLEventReaderImpl
return false;
}
}
-
+
public XMLEvent peek()
throws XMLStreamException
{
@@ -155,4 +155,3 @@ public class XMLEventReaderImpl
}
}
-
diff --git a/gnu/xml/stream/XMLEventWriterImpl.java b/gnu/xml/stream/XMLEventWriterImpl.java
index 72b7adce2..33b1dce31 100644
--- a/gnu/xml/stream/XMLEventWriterImpl.java
+++ b/gnu/xml/stream/XMLEventWriterImpl.java
@@ -1,4 +1,4 @@
-/* XMLEventWriterImpl.java --
+/* XMLEventWriterImpl.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -62,7 +62,7 @@ import javax.xml.stream.events.XMLEvent;
public class XMLEventWriterImpl
implements XMLEventWriter
{
-
+
protected final XMLStreamWriter writer;
protected XMLEventWriterImpl(XMLStreamWriter writer)
@@ -181,11 +181,10 @@ public class XMLEventWriterImpl
{
writer.setNamespaceContext(context);
}
-
+
public NamespaceContext getNamespaceContext()
{
return writer.getNamespaceContext();
}
-
-}
+}
diff --git a/gnu/xml/stream/XMLInputFactoryImpl.java b/gnu/xml/stream/XMLInputFactoryImpl.java
index 5f72e361e..87aa32107 100644
--- a/gnu/xml/stream/XMLInputFactoryImpl.java
+++ b/gnu/xml/stream/XMLInputFactoryImpl.java
@@ -1,4 +1,4 @@
-/* XMLInputFactoryImpl.java --
+/* XMLInputFactoryImpl.java --
Copyright (C) 2005,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -91,7 +91,7 @@ public class XMLInputFactoryImpl
{
return createXMLStreamReader(null, reader);
}
-
+
public XMLStreamReader createXMLStreamReader(Source source)
throws XMLStreamException
{
@@ -114,13 +114,13 @@ public class XMLInputFactoryImpl
replacingEntityReferences);
return ret;
}
-
+
public XMLStreamReader createXMLStreamReader(InputStream in)
throws XMLStreamException
{
return createXMLStreamReader(null, in);
}
-
+
public XMLStreamReader createXMLStreamReader(InputStream in, String encoding)
throws XMLStreamException
{
@@ -175,34 +175,34 @@ public class XMLInputFactoryImpl
XMLStreamReader sr = createXMLStreamReader(reader);
return new XMLEventReaderImpl(sr, allocator, null);
}
-
+
public XMLEventReader createXMLEventReader(String systemId, Reader reader)
throws XMLStreamException
{
XMLStreamReader sr = createXMLStreamReader(systemId, reader);
return new XMLEventReaderImpl(sr, allocator, null);
}
-
+
public XMLEventReader createXMLEventReader(XMLStreamReader reader)
throws XMLStreamException
{
return new XMLEventReaderImpl(reader, allocator, null);
}
-
+
public XMLEventReader createXMLEventReader(Source source)
throws XMLStreamException
{
XMLStreamReader sr = createXMLStreamReader(source);
return new XMLEventReaderImpl(sr, allocator, null);
}
-
+
public XMLEventReader createXMLEventReader(InputStream in)
throws XMLStreamException
{
XMLStreamReader sr = createXMLStreamReader(in);
return new XMLEventReaderImpl(sr, allocator, null);
}
-
+
public XMLEventReader createXMLEventReader(InputStream in, String encoding)
throws XMLStreamException
{
@@ -216,7 +216,7 @@ public class XMLInputFactoryImpl
XMLStreamReader sr = createXMLStreamReader(systemId, in);
return new XMLEventReaderImpl(sr, allocator, null);
}
-
+
public XMLStreamReader createFilteredReader(XMLStreamReader reader,
StreamFilter filter)
throws XMLStreamException
@@ -240,7 +240,7 @@ public class XMLInputFactoryImpl
{
this.resolver = resolver;
}
-
+
public XMLReporter getXMLReporter()
{
return reporter;
@@ -327,7 +327,7 @@ public class XMLInputFactoryImpl
name.equals("gnu.xml.stream.baseAware") ||
name.equals("gnu.xml.stream.xIncludeAware");
}
-
+
public void setEventAllocator(XMLEventAllocator allocator)
{
this.allocator = allocator;
@@ -393,6 +393,5 @@ public class XMLInputFactoryImpl
}
return in;
}
-
-}
+}
diff --git a/gnu/xml/stream/XMLOutputFactoryImpl.java b/gnu/xml/stream/XMLOutputFactoryImpl.java
index c8c651fb1..d849e8ba5 100644
--- a/gnu/xml/stream/XMLOutputFactoryImpl.java
+++ b/gnu/xml/stream/XMLOutputFactoryImpl.java
@@ -1,4 +1,4 @@
-/* XMLOutputFactoryImpl.java --
+/* XMLOutputFactoryImpl.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -149,7 +149,7 @@ public class XMLOutputFactoryImpl
}
throw new UnsupportedOperationException();
}
-
+
public void setProperty(String name, Object value)
throws IllegalArgumentException
{
@@ -183,6 +183,5 @@ public class XMLOutputFactoryImpl
{
prefixDefaulting = value;
}
-
-}
+}
diff --git a/gnu/xml/stream/XMLParser.java b/gnu/xml/stream/XMLParser.java
index 6072a9c73..71e876569 100644
--- a/gnu/xml/stream/XMLParser.java
+++ b/gnu/xml/stream/XMLParser.java
@@ -1,4 +1,4 @@
-/* XMLParser.java --
+/* XMLParser.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -113,7 +113,7 @@ import gnu.classpath.debug.TeeReader;
* @see http://www.w3.org/TR/REC-xml-names
* @see http://www.w3.org/TR/xml-names11
* @see http://www.w3.org/TR/xmlbase/
- *
+ *
* @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
*/
public class XMLParser
@@ -168,7 +168,7 @@ public class XMLParser
* Stack of end-entity events to be reported.
*/
private LinkedList endEntityStack = new LinkedList();
-
+
/**
* Current parser state within the main state machine.
*/
@@ -224,7 +224,7 @@ public class XMLParser
* Temporary Unicode character buffer used during character data reads.
*/
private int[] tmpBuf = new int[1024];
-
+
/**
* The element content model for the current element.
*/
@@ -682,7 +682,7 @@ public class XMLParser
String elementName = buf.toString();
return doctype.isAttributeDeclared(elementName, qn);
}
-
+
public String getCharacterEncodingScheme()
{
return xmlEncoding;
@@ -1022,7 +1022,7 @@ public class XMLParser
{
return (event != XMLStreamConstants.END_DOCUMENT && event != -1);
}
-
+
public int next()
throws XMLStreamException
{
@@ -1253,7 +1253,7 @@ public class XMLParser
{
return input.read(b, off, len);
}
-
+
/**
* Parsed character read.
*/
@@ -1415,7 +1415,7 @@ public class XMLParser
"U+" + Integer.toHexString(c));
}
else if (!isChar(c))
- error("illegal XML character",
+ error("illegal XML character",
"U+" + Integer.toHexString(c));
buf.append(Character.toChars(c));
}
@@ -1635,7 +1635,7 @@ public class XMLParser
// We can't use java.net.URL here to do the parsing, as it searches for
// a protocol handler. A protocol handler may not be registered for the
// URL scheme here. Do it manually.
- //
+ //
// Set aside scheme and host portion of base URL
String basePrefix = null;
ci = base.indexOf(':');
@@ -1780,7 +1780,7 @@ public class XMLParser
throws IOException, XMLStreamException
{
final int flags = LIT_DISABLE_CREF | LIT_DISABLE_PE | LIT_DISABLE_EREF;
-
+
requireWhitespace();
require("version");
readEq();
@@ -1791,9 +1791,9 @@ public class XMLParser
input.xml11 = true;
else
throw new XMLStreamException("illegal XML version: " + xmlVersion);
-
+
boolean white = tryWhitespace();
-
+
if (tryRead("encoding"))
{
if (!white)
@@ -1802,7 +1802,7 @@ public class XMLParser
xmlEncoding = readLiteral(flags, false);
white = tryWhitespace();
}
-
+
if (tryRead("standalone"))
{
if (!white)
@@ -1837,7 +1837,7 @@ public class XMLParser
ExternalIds ids = readExternalIds(false, true);
doctype =
this.new Doctype(rootName, ids.publicId, ids.systemId);
-
+
// Parse internal subset first
skipWhitespace();
if (tryRead('['))
@@ -2075,7 +2075,7 @@ public class XMLParser
{
int separator;
ElementContentModel model = new ElementContentModel();
-
+
// Parse first content particle
skipWhitespace();
model.addContentParticle(readContentParticle(acc));
@@ -2375,7 +2375,7 @@ public class XMLParser
int flags = LIT_ATTRIBUTE;
String value = null, defaultType = null;
boolean saved = expandPE;
-
+
if (!"CDATA".equals(type))
flags |= LIT_NORMALIZE;
@@ -2599,7 +2599,7 @@ public class XMLParser
int c;
int flags = LIT_DISABLE_CREF | LIT_DISABLE_PE | LIT_DISABLE_EREF;
ExternalIds ids = new ExternalIds();
-
+
if (tryRead("PUBLIC"))
{
requireWhitespace();
@@ -3300,7 +3300,7 @@ public class XMLParser
*/
private void readEq()
throws IOException, XMLStreamException
- {
+ {
skipWhitespace();
require('=');
skipWhitespace();
@@ -3569,7 +3569,7 @@ public class XMLParser
{
return readNmtoken(isName, nmtokenBuf);
}
-
+
/**
* Parses an NMTOKEN or Name production using the specified buffer.
* @param isName if a Name, otherwise an NMTOKEN
@@ -4123,7 +4123,7 @@ public class XMLParser
(c >= 0x10000 && c < 0x110000) ||
c == 0xa || c == 0x9 || c == 0xd;
}
-
+
/**
* Interns the specified text or not, depending on the value of
* stringInterning.
@@ -4141,7 +4141,7 @@ public class XMLParser
{
error(message, null);
}
-
+
/**
* Report a parsing error.
*/
@@ -4403,7 +4403,7 @@ public class XMLParser
{
event = reader.next();
Location loc = reader.getLocation();
- System.out.print(loc.getLineNumber() + ":" +
+ System.out.print(loc.getLineNumber() + ":" +
loc.getColumnNumber() + " ");
switch (event)
{
@@ -4579,7 +4579,7 @@ public class XMLParser
String uri = getNamespaceURI(prefix);
if (uri == null && (auri == null ||
(input.xml11 && "".equals(auri))))
- return true;
+ return true;
if (uri != null)
{
if ("".equals(uri) && input.xml11 && "".equals(auri))
@@ -4615,7 +4615,7 @@ public class XMLParser
buf.append(']');
return buf.toString();
}
-
+
}
/**
@@ -4661,7 +4661,7 @@ public class XMLParser
/**
* Map of anonymous keys to comments.
- */
+ */
private final LinkedHashMap comments = new LinkedHashMap();
/**
@@ -4753,7 +4753,7 @@ public class XMLParser
if (inExternalSubset)
externalEntities.add(name);
}
-
+
/**
* Adds an entity declaration.
* @param name the entity name
@@ -4916,7 +4916,7 @@ public class XMLParser
{
return entries.iterator();
}
-
+
}
/**
@@ -4950,7 +4950,7 @@ public class XMLParser
static final int ANY = 1;
static final int ELEMENT = 2;
static final int MIXED = 3;
-
+
int min;
int max;
final int type;
@@ -4963,7 +4963,7 @@ public class XMLParser
min = 1;
max = 1;
}
-
+
}
/**
@@ -4972,14 +4972,14 @@ public class XMLParser
class EmptyContentModel
extends ContentModel
{
-
+
EmptyContentModel()
{
super(ContentModel.EMPTY);
min = 0;
max = 0;
}
-
+
}
/**
@@ -4988,14 +4988,14 @@ public class XMLParser
class AnyContentModel
extends ContentModel
{
-
+
AnyContentModel()
{
super(ContentModel.ANY);
min = 0;
max = -1;
}
-
+
}
/**
@@ -5008,7 +5008,7 @@ public class XMLParser
LinkedList contentParticles;
boolean or;
String regex; // regular expression cache
-
+
ElementContentModel()
{
super(ContentModel.ELEMENT);
@@ -5019,7 +5019,7 @@ public class XMLParser
{
contentParticles.add(cp);
}
-
+
}
class ContentParticle
@@ -5028,7 +5028,7 @@ public class XMLParser
int min = 1;
int max = 1;
Object content; // Name (String) or ElementContentModel
-
+
}
/**
@@ -5039,7 +5039,7 @@ public class XMLParser
{
private HashSet names;
-
+
MixedContentModel()
{
super(ContentModel.MIXED);
@@ -5055,7 +5055,7 @@ public class XMLParser
{
return names.contains(name);
}
-
+
}
/**
@@ -5063,7 +5063,7 @@ public class XMLParser
*/
class AttributeDecl
{
-
+
/**
* The attribute type (CDATA, ID, etc).
*/
@@ -5105,7 +5105,7 @@ public class XMLParser
this.values = values;
this.external = external;
}
-
+
}
/**
@@ -5114,14 +5114,14 @@ public class XMLParser
static class Input
implements Location
{
-
+
int line = 1, markLine;
int column, markColumn;
int offset, markOffset;
final String publicId, systemId, name;
final boolean report; // report start- and end-entity
final boolean normalize; // normalize CR, etc to LF
-
+
InputStream in;
Reader reader;
UnicodeReader unicodeReader;
@@ -5161,12 +5161,12 @@ public class XMLParser
}
// -- Location --
-
+
public int getCharacterOffset()
{
return offset;
}
-
+
public int getColumnNumber()
{
return column;
@@ -5295,7 +5295,7 @@ public class XMLParser
}
// Detection of input encoding
-
+
private static final int[] SIGNATURE_UCS_4_1234 =
new int[] { 0x00, 0x00, 0x00, 0x3c };
private static final int[] SIGNATURE_UCS_4_4321 =
@@ -5316,7 +5316,7 @@ public class XMLParser
new int[] { 0x3c, 0x3f, 0x78, 0x6d };
private static final int[] SIGNATURE_UTF_8_BOM =
new int[] { 0xef, 0xbb, 0xbf };
-
+
/**
* Detect the input encoding.
*/
@@ -5351,7 +5351,7 @@ public class XMLParser
else if (equals(SIGNATURE_UCS_4_2143, signature) ||
equals(SIGNATURE_UCS_4_3412, signature))
throw new UnsupportedEncodingException("unsupported UCS-4 byte ordering");
-
+
// 2-byte encodings
else if (equals(SIGNATURE_UCS_2_12, signature))
{
@@ -5401,7 +5401,7 @@ public class XMLParser
}
return true;
}
-
+
void setInputEncoding(String encoding)
throws IOException
{
@@ -5432,4 +5432,3 @@ public class XMLParser
}
}
-
diff --git a/gnu/xml/stream/XMLStreamWriterImpl.java b/gnu/xml/stream/XMLStreamWriterImpl.java
index 1549420c9..83b8f7239 100644
--- a/gnu/xml/stream/XMLStreamWriterImpl.java
+++ b/gnu/xml/stream/XMLStreamWriterImpl.java
@@ -1,4 +1,4 @@
-/* XMLStreamWriterImpl.java --
+/* XMLStreamWriterImpl.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -84,7 +84,7 @@ public class XMLStreamWriterImpl
* in scope.
*/
protected NamespaceContext namespaceContext;
-
+
/**
* The stack of elements in scope.
* Used to close the remaining elements.
@@ -100,7 +100,7 @@ public class XMLStreamWriterImpl
* Whether we are in an empty element.
*/
private boolean emptyElement;
-
+
private NamespaceSupport namespaces;
private int count = 0;
@@ -153,10 +153,10 @@ public class XMLStreamWriterImpl
endStartElement();
namespaces.pushContext();
-
+
writer.write('<');
writer.write(localName);
-
+
elements.addLast(new String[] { null, localName });
inStartElement = true;
}
@@ -180,7 +180,7 @@ public class XMLStreamWriterImpl
endStartElement();
namespaces.pushContext();
-
+
String prefix = getPrefix(namespaceURI);
boolean isDeclared = (prefix != null);
if (!isDeclared)
@@ -203,7 +203,7 @@ public class XMLStreamWriterImpl
{
writeNamespaceImpl(prefix, namespaceURI);
}
-
+
elements.addLast(new String[] { prefix, localName });
}
catch (IOException e)
@@ -249,7 +249,7 @@ public class XMLStreamWriterImpl
endStartElement();
namespaces.pushContext();
-
+
String currentPrefix = getPrefix(namespaceURI);
boolean isCurrent = prefix.equals(currentPrefix);
writer.write('<');
@@ -263,7 +263,7 @@ public class XMLStreamWriterImpl
{
writeNamespaceImpl(prefix, namespaceURI);
}
-
+
elements.addLast(new String[] { prefix, localName });
inStartElement = true;
}
@@ -451,7 +451,7 @@ public class XMLStreamWriterImpl
throw new IllegalArgumentException("illegal Name: " + localName);
if (!isChars(value))
throw new IllegalArgumentException("illegal character: " + value);
-
+
String prefix = getPrefix(namespaceURI);
if (prefix == null)
{
@@ -522,7 +522,7 @@ public class XMLStreamWriterImpl
prefix = XMLConstants.DEFAULT_NS_PREFIX;
setPrefix(prefix, namespaceURI);
-
+
writer.write(' ');
writer.write("xmlns");
if (!XMLConstants.DEFAULT_NS_PREFIX.equals(prefix))
@@ -566,7 +566,7 @@ public class XMLStreamWriterImpl
throw new IllegalArgumentException("illegal comment: " + data);
endStartElement();
-
+
writer.write("<!--");
if (hasXML11RestrictedChars)
{
@@ -651,7 +651,7 @@ public class XMLStreamWriterImpl
throw new IllegalArgumentException("illegal XML character: " + data);
if (data.indexOf("]]") != -1)
throw new IllegalArgumentException("illegal CDATA section: " + data);
-
+
endStartElement();
writer.write("<![CDATA[");
@@ -1012,7 +1012,5 @@ public class XMLStreamWriterImpl
}
return true;
}
-
-}
-
+}
diff --git a/gnu/xml/transform/AbstractNumberNode.java b/gnu/xml/transform/AbstractNumberNode.java
index fb953e4f6..6e478bdc4 100644
--- a/gnu/xml/transform/AbstractNumberNode.java
+++ b/gnu/xml/transform/AbstractNumberNode.java
@@ -1,4 +1,4 @@
-/* AbstractNumberNode.java --
+/* AbstractNumberNode.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -102,7 +102,7 @@ abstract class AbstractNumberNode
// xsl:number doesn't process children
if (next != null)
{
- next.apply(stylesheet, mode,
+ next.apply(stylesheet, mode,
context, pos, len,
parent, nextSibling);
}
@@ -148,7 +148,7 @@ abstract class AbstractNumberNode
for (int i = 0; i < len; i++)
{
String token = (i < 0) ? "." : (String) tokens.get(i);
- boolean alpha = (i < 0) ? true :
+ boolean alpha = (i < 0) ? true :
((Boolean) types.get(i)).booleanValue();
if (!alpha)
{
@@ -304,7 +304,7 @@ abstract class AbstractNumberNode
}
return upper ? buf.toString().toUpperCase() : buf.toString();
}
-
+
abstract int[] compute(Stylesheet stylesheet, Node context, int pos, int len)
throws TransformerException;
diff --git a/gnu/xml/transform/ApplyImportsNode.java b/gnu/xml/transform/ApplyImportsNode.java
index 4b06eea10..298c49da4 100644
--- a/gnu/xml/transform/ApplyImportsNode.java
+++ b/gnu/xml/transform/ApplyImportsNode.java
@@ -1,4 +1,4 @@
-/* ApplyImportsNode.java --
+/* ApplyImportsNode.java --
Copyright (C) 2004,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -59,7 +59,7 @@ final class ApplyImportsNode
ret.next = next.clone(stylesheet);
return ret;
}
-
+
void doApply(Stylesheet stylesheet, QName mode,
Node context, int pos, int len,
Node parent, Node nextSibling)
@@ -80,4 +80,3 @@ final class ApplyImportsNode
}
}
-
diff --git a/gnu/xml/transform/ApplyTemplatesNode.java b/gnu/xml/transform/ApplyTemplatesNode.java
index 0daaa7aec..6aa36954a 100644
--- a/gnu/xml/transform/ApplyTemplatesNode.java
+++ b/gnu/xml/transform/ApplyTemplatesNode.java
@@ -1,4 +1,4 @@
-/* ApplyTemplatesNode.java --
+/* ApplyTemplatesNode.java --
Copyright (C) 2004,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -191,7 +191,7 @@ final class ApplyTemplatesNode
}
return super.references(var);
}
-
+
public String toString()
{
CPStringBuilder buf = new CPStringBuilder("apply-templates");
@@ -215,5 +215,5 @@ final class ApplyTemplatesNode
buf.append(']');
return buf.toString();
}
-
+
}
diff --git a/gnu/xml/transform/AttributeNode.java b/gnu/xml/transform/AttributeNode.java
index bbc4e0805..4c71f6a92 100644
--- a/gnu/xml/transform/AttributeNode.java
+++ b/gnu/xml/transform/AttributeNode.java
@@ -1,4 +1,4 @@
-/* AttributeNode.java --
+/* AttributeNode.java --
Copyright (C) 2004,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -61,7 +61,7 @@ final class AttributeNode
final TemplateNode name;
final TemplateNode namespace;
final Node source;
-
+
AttributeNode(TemplateNode name,
TemplateNode namespace, Node source)
{
@@ -98,10 +98,10 @@ final class AttributeNode
fragment, null);
// Use XPath string-value of fragment
String nameValue = Expr.stringValue(fragment);
-
+
String namespaceValue = null;
if (namespace != null)
- {
+ {
// Create a document fragment to hold the namespace
fragment = doc.createDocumentFragment();
// Apply namespace to the fragment
@@ -113,7 +113,7 @@ final class AttributeNode
if (namespaceValue.length() == 0)
namespaceValue = null;
}
-
+
String prefix = getPrefix(nameValue);
if (namespaceValue == null)
{
@@ -230,7 +230,7 @@ final class AttributeNode
return true;
return super.references(var);
}
-
+
public String toString()
{
CPStringBuilder buf = new CPStringBuilder("attribute");
@@ -240,5 +240,5 @@ final class AttributeNode
buf.append(']');
return buf.toString();
}
-
+
}
diff --git a/gnu/xml/transform/AttributeSet.java b/gnu/xml/transform/AttributeSet.java
index 3ece9c83f..ced50f11c 100644
--- a/gnu/xml/transform/AttributeSet.java
+++ b/gnu/xml/transform/AttributeSet.java
@@ -1,4 +1,4 @@
-/* AttributeSet.java --
+/* AttributeSet.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -62,6 +62,5 @@ final class AttributeSet
children.clone(stylesheet),
name, uas);
}
-
-}
+}
diff --git a/gnu/xml/transform/Bindings.java b/gnu/xml/transform/Bindings.java
index ab790523f..37d45880c 100644
--- a/gnu/xml/transform/Bindings.java
+++ b/gnu/xml/transform/Bindings.java
@@ -1,4 +1,4 @@
-/* Bindings.java --
+/* Bindings.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -202,7 +202,7 @@ public class Bindings
if (ret == null)
{
for (Iterator<Map<QName,Object>> i = variables.iterator();
- i.hasNext() && ret == null; )
+ i.hasNext() && ret == null; )
{
Map<QName,Object> vctx = i.next();
ret = vctx.get(name);
@@ -212,7 +212,7 @@ public class Bindings
if (ret == null)
{
for (Iterator<Map<QName,Object>> i = parameters.iterator();
- i.hasNext() && ret == null; )
+ i.hasNext() && ret == null; )
{
Map<QName,Object> pctx = i.next();
ret = pctx.get(name);
@@ -260,7 +260,7 @@ public class Bindings
{
return get(qName, null, 1, 1);
}
-
+
public String toString()
{
CPStringBuilder buf = new CPStringBuilder();
@@ -311,7 +311,7 @@ public class Bindings
buf.append(entry.getValue());
seen.add(key);
}
- }
+ }
}
buf.append('}');
next = false;
@@ -337,7 +337,7 @@ public class Bindings
buf.append(entry.getValue());
seen.add(key);
}
- }
+ }
}
buf.append(']');
return buf.toString();
diff --git a/gnu/xml/transform/CallTemplateNode.java b/gnu/xml/transform/CallTemplateNode.java
index fe0eea74e..cc08d93e3 100644
--- a/gnu/xml/transform/CallTemplateNode.java
+++ b/gnu/xml/transform/CallTemplateNode.java
@@ -1,4 +1,4 @@
-/* CallTemplateNode.java --
+/* CallTemplateNode.java --
Copyright (C) 2004,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -132,17 +132,17 @@ final class CallTemplateNode
context, pos, len,
parent, nextSibling);
}
-
+
public boolean references(QName var)
{
for (Iterator i = withParams.iterator(); i.hasNext(); )
{
- if (((WithParam) i.next()).references(var))
- return true;
+ if (((WithParam) i.next()).references(var))
+ return true;
}
return super.references(var);
}
-
+
public String toString()
{
CPStringBuilder buf = new CPStringBuilder("call-template");
@@ -152,5 +152,5 @@ final class CallTemplateNode
buf.append(']');
return buf.toString();
}
-
+
}
diff --git a/gnu/xml/transform/ChooseNode.java b/gnu/xml/transform/ChooseNode.java
index fe2dc0c2f..262cde144 100644
--- a/gnu/xml/transform/ChooseNode.java
+++ b/gnu/xml/transform/ChooseNode.java
@@ -1,4 +1,4 @@
-/* ChooseNode.java --
+/* ChooseNode.java --
Copyright (C) 2004,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -76,7 +76,7 @@ final class ChooseNode
context, pos, len,
parent, nextSibling);
}
-
+
public String toString()
{
CPStringBuilder buf = new CPStringBuilder("choose");
@@ -84,5 +84,5 @@ final class ChooseNode
buf.append(']');
return buf.toString();
}
-
+
}
diff --git a/gnu/xml/transform/CommentNode.java b/gnu/xml/transform/CommentNode.java
index 8131fb286..1c14e5fa8 100644
--- a/gnu/xml/transform/CommentNode.java
+++ b/gnu/xml/transform/CommentNode.java
@@ -1,4 +1,4 @@
-/* CommentNode.java --
+/* CommentNode.java --
Copyright (C) 2004,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -94,10 +94,10 @@ final class CommentNode
context, pos, len,
parent, nextSibling);
}
-
+
public String toString()
{
return "comment";
}
-
+
}
diff --git a/gnu/xml/transform/CopyNode.java b/gnu/xml/transform/CopyNode.java
index bae628d96..9cc2fdecd 100644
--- a/gnu/xml/transform/CopyNode.java
+++ b/gnu/xml/transform/CopyNode.java
@@ -1,4 +1,4 @@
-/* CopyNode.java --
+/* CopyNode.java --
Copyright (C) 2004,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -127,7 +127,7 @@ final class CopyNode
context, pos, len,
parent, nextSibling);
}
-
+
void addAttributeSet(Stylesheet stylesheet, QName mode,
Node context, int pos, int len,
Node parent, Node nextSibling, String attributeSet)
diff --git a/gnu/xml/transform/CopyOfNode.java b/gnu/xml/transform/CopyOfNode.java
index 4ce84329f..2b06fed4d 100644
--- a/gnu/xml/transform/CopyOfNode.java
+++ b/gnu/xml/transform/CopyOfNode.java
@@ -1,4 +1,4 @@
-/* CopyOfNode.java --
+/* CopyOfNode.java --
Copyright (C) 2004,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -153,14 +153,14 @@ final class CopyOfNode
context, pos, len,
parent, nextSibling);
}
-
+
public boolean references(QName var)
{
if (select != null && select.references(var))
return true;
return super.references(var);
}
-
+
public String toString()
{
CPStringBuilder buf = new CPStringBuilder("copy-of");
@@ -170,5 +170,5 @@ final class CopyOfNode
buf.append(']');
return buf.toString();
}
-
+
}
diff --git a/gnu/xml/transform/CurrentFunction.java b/gnu/xml/transform/CurrentFunction.java
index 0395396bc..96899679a 100644
--- a/gnu/xml/transform/CurrentFunction.java
+++ b/gnu/xml/transform/CurrentFunction.java
@@ -1,4 +1,4 @@
-/* CurrentFunction.java --
+/* CurrentFunction.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -101,4 +101,3 @@ final class CurrentFunction
}
}
-
diff --git a/gnu/xml/transform/DOMSourceLocator.java b/gnu/xml/transform/DOMSourceLocator.java
index 9bc8fb1b6..fbf31de55 100644
--- a/gnu/xml/transform/DOMSourceLocator.java
+++ b/gnu/xml/transform/DOMSourceLocator.java
@@ -1,4 +1,4 @@
-/* DOMSourceLocator.java --
+/* DOMSourceLocator.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -80,5 +80,5 @@ class DOMSourceLocator
{
return -1;
}
-
+
}
diff --git a/gnu/xml/transform/DocumentFunction.java b/gnu/xml/transform/DocumentFunction.java
index 29f3d4a45..d0aee25b3 100644
--- a/gnu/xml/transform/DocumentFunction.java
+++ b/gnu/xml/transform/DocumentFunction.java
@@ -1,4 +1,4 @@
-/* DocumentFunction.java --
+/* DocumentFunction.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -86,7 +86,7 @@ final class DocumentFunction
{
this.args = args;
}
-
+
public Object evaluate(Node context, int pos, int len)
{
int arity = args.size();
@@ -165,7 +165,7 @@ final class DocumentFunction
{
if ("".equals(uri) || uri == null)
uri = this.base.getBaseURI();
-
+
// Get fragment
Expr fragment = null;
int hi = uri.indexOf('#');
@@ -240,5 +240,5 @@ final class DocumentFunction
}
return false;
}
-
+
}
diff --git a/gnu/xml/transform/ElementAvailableFunction.java b/gnu/xml/transform/ElementAvailableFunction.java
index aa1598169..6a9d256be 100644
--- a/gnu/xml/transform/ElementAvailableFunction.java
+++ b/gnu/xml/transform/ElementAvailableFunction.java
@@ -1,4 +1,4 @@
-/* ElementAvailableFunction.java --
+/* ElementAvailableFunction.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -148,7 +148,7 @@ class ElementAvailableFunction
// TODO extension elements
return Boolean.FALSE;
}
-
+
public Expr clone(Object context)
{
NamespaceContext n = nsctx;
@@ -179,4 +179,3 @@ class ElementAvailableFunction
}
}
-
diff --git a/gnu/xml/transform/ElementNode.java b/gnu/xml/transform/ElementNode.java
index c5a4dd20d..78a2007b7 100644
--- a/gnu/xml/transform/ElementNode.java
+++ b/gnu/xml/transform/ElementNode.java
@@ -1,4 +1,4 @@
-/* ElementNode.java --
+/* ElementNode.java --
Copyright (C) 2004,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -68,7 +68,7 @@ final class ElementNode
final String uas;
final Node source;
final Collection elementExcludeResultPrefixes;
-
+
ElementNode(TemplateNode name,
TemplateNode namespace, String uas, Node source)
{
@@ -134,7 +134,7 @@ final class ElementNode
namespaceValue = null;
}
else
- {
+ {
String prefix = getPrefix(nameValue);
if (XMLConstants.XMLNS_ATTRIBUTE.equals(prefix))
{
@@ -169,7 +169,7 @@ final class ElementNode
}
}
}
-
+
// Create element
Element element = (namespaceValue != null) ?
doc.createElementNS(namespaceValue, nameValue) :
@@ -237,7 +237,7 @@ final class ElementNode
return true;
return super.references(var);
}
-
+
public String toString()
{
CPStringBuilder buf = new CPStringBuilder("element");
@@ -257,5 +257,5 @@ final class ElementNode
buf.append(']');
return buf.toString();
}
-
+
}
diff --git a/gnu/xml/transform/ErrorListenerErrorHandler.java b/gnu/xml/transform/ErrorListenerErrorHandler.java
index d79bb1546..8a28795c4 100644
--- a/gnu/xml/transform/ErrorListenerErrorHandler.java
+++ b/gnu/xml/transform/ErrorListenerErrorHandler.java
@@ -1,4 +1,4 @@
-/* ErrorListenerErrorHandler.java --
+/* ErrorListenerErrorHandler.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -71,7 +71,7 @@ class ErrorListenerErrorHandler
throw new SAXException(e2);
}
}
-
+
public void error(SAXParseException e)
throws SAXException
{
@@ -84,7 +84,7 @@ class ErrorListenerErrorHandler
throw new SAXException(e2);
}
}
-
+
public void fatalError(SAXParseException e)
throws SAXException
{
@@ -97,5 +97,5 @@ class ErrorListenerErrorHandler
throw new SAXException(e2);
}
}
-
+
}
diff --git a/gnu/xml/transform/ForEachNode.java b/gnu/xml/transform/ForEachNode.java
index 8908114cc..1613f768b 100644
--- a/gnu/xml/transform/ForEachNode.java
+++ b/gnu/xml/transform/ForEachNode.java
@@ -1,4 +1,4 @@
-/* ForEachNode.java --
+/* ForEachNode.java --
Copyright (C) 2004,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -97,25 +97,25 @@ final class ForEachNode
//System.err.println(toString() + ": " + context+" -> "+ret);
if (ret instanceof Collection)
{
- /* Suppression is safe, as we know context produces Collection<Node> */
- @SuppressWarnings("unchecked")
- Collection<Node> ns = (Collection<Node>) ret;
+ /* Suppression is safe, as we know context produces Collection<Node> */
+ @SuppressWarnings("unchecked")
+ Collection<Node> ns = (Collection<Node>) ret;
List<Node> list = new ArrayList<Node>(ns);
- if (!sortKeys.isEmpty())
- {
- for (SortKey sortKey : sortKeys)
- {
- sortKey.init(stylesheet, mode, context, pos, len, parent,
- nextSibling);
- }
- Collections.sort(list, new XSLComparator(sortKeys));
- }
- else
+ if (!sortKeys.isEmpty())
+ {
+ for (SortKey sortKey : sortKeys)
+ {
+ sortKey.init(stylesheet, mode, context, pos, len, parent,
+ nextSibling);
+ }
+ Collections.sort(list, new XSLComparator(sortKeys));
+ }
+ else
Collections.sort(list, documentOrderComparator);
// Perform children for each node
int l = list.size();
int p = 1;
- for (Node node : list)
+ for (Node node : list)
{
stylesheet.current = node;
children.apply(stylesheet, mode,
@@ -139,8 +139,8 @@ final class ForEachNode
return true;
for (Iterator<SortKey> i = sortKeys.iterator(); i.hasNext(); )
{
- if (i.next().references(var))
- return true;
+ if (i.next().references(var))
+ return true;
}
return super.references(var);
}
@@ -155,5 +155,5 @@ final class ForEachNode
buf.append(']');
return buf.toString();
}
-
+
}
diff --git a/gnu/xml/transform/FormatNumberFunction.java b/gnu/xml/transform/FormatNumberFunction.java
index 34717b39c..82872be77 100644
--- a/gnu/xml/transform/FormatNumberFunction.java
+++ b/gnu/xml/transform/FormatNumberFunction.java
@@ -1,4 +1,4 @@
-/* FormatNumberFunction.java --
+/* FormatNumberFunction.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -143,4 +143,3 @@ final class FormatNumberFunction
}
}
-
diff --git a/gnu/xml/transform/FunctionAvailableFunction.java b/gnu/xml/transform/FunctionAvailableFunction.java
index ab86401d0..1ac50327e 100644
--- a/gnu/xml/transform/FunctionAvailableFunction.java
+++ b/gnu/xml/transform/FunctionAvailableFunction.java
@@ -1,4 +1,4 @@
-/* FunctionAvailableFunction.java --
+/* FunctionAvailableFunction.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -159,7 +159,7 @@ class FunctionAvailableFunction
// TODO extension functions
return Boolean.FALSE;
}
-
+
public Expr clone(Object context)
{
NamespaceContext n = nsctx;
@@ -190,4 +190,3 @@ class FunctionAvailableFunction
}
}
-
diff --git a/gnu/xml/transform/GenerateIdFunction.java b/gnu/xml/transform/GenerateIdFunction.java
index f0d3e6dd9..efc583cc8 100644
--- a/gnu/xml/transform/GenerateIdFunction.java
+++ b/gnu/xml/transform/GenerateIdFunction.java
@@ -1,4 +1,4 @@
-/* GenerateIdFunction.java --
+/* GenerateIdFunction.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -137,4 +137,3 @@ final class GenerateIdFunction
}
}
-
diff --git a/gnu/xml/transform/IfNode.java b/gnu/xml/transform/IfNode.java
index eeb294138..f31fed555 100644
--- a/gnu/xml/transform/IfNode.java
+++ b/gnu/xml/transform/IfNode.java
@@ -1,4 +1,4 @@
-/* IfNode.java --
+/* IfNode.java --
Copyright (C) 2004,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -91,14 +91,14 @@ final class IfNode
context, pos, len,
parent, nextSibling);
}
-
+
public boolean references(QName var)
{
if (test != null && test.references(var))
return true;
return super.references(var);
}
-
+
public String toString()
{
CPStringBuilder buf = new CPStringBuilder("if");
@@ -108,5 +108,5 @@ final class IfNode
buf.append(']');
return buf.toString();
}
-
+
}
diff --git a/gnu/xml/transform/Key.java b/gnu/xml/transform/Key.java
index 72bd90aed..18d83394f 100644
--- a/gnu/xml/transform/Key.java
+++ b/gnu/xml/transform/Key.java
@@ -1,4 +1,4 @@
-/* Key.java --
+/* Key.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -66,6 +66,5 @@ class Key
(Pattern) match.clone(stylesheet),
use.clone(stylesheet));
}
-
-}
+}
diff --git a/gnu/xml/transform/KeyFunction.java b/gnu/xml/transform/KeyFunction.java
index a705dc6b0..b962626c9 100644
--- a/gnu/xml/transform/KeyFunction.java
+++ b/gnu/xml/transform/KeyFunction.java
@@ -1,4 +1,4 @@
-/* KeyFunction.java --
+/* KeyFunction.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -104,7 +104,7 @@ final class KeyFunction
// Expand qualified name
String uri = keyName.getNamespaceURI();
String prefix = keyName.getPrefix();
- if ((uri == null || uri.length() == 0) &&
+ if ((uri == null || uri.length() == 0) &&
(prefix != null && prefix.length() > 0))
{
uri = stylesheet.getNamespaceURI(prefix);
@@ -158,7 +158,7 @@ final class KeyFunction
addKeyNodes(ctx, keySet, value, acc);
}
}
-
+
final void addKeyNodeIfMatch(Node node, Collection keySet,
String value, Collection acc)
{
@@ -225,4 +225,3 @@ final class KeyFunction
}
}
-
diff --git a/gnu/xml/transform/LiteralNode.java b/gnu/xml/transform/LiteralNode.java
index d4e283a65..3405b3364 100644
--- a/gnu/xml/transform/LiteralNode.java
+++ b/gnu/xml/transform/LiteralNode.java
@@ -1,4 +1,4 @@
-/* LiteralNode.java --
+/* LiteralNode.java --
Copyright (C) 2004,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -198,5 +198,5 @@ final class LiteralNode
{
return source.toString();
}
-
+
}
diff --git a/gnu/xml/transform/MessageNode.java b/gnu/xml/transform/MessageNode.java
index a7eeeeef6..3e4899aeb 100644
--- a/gnu/xml/transform/MessageNode.java
+++ b/gnu/xml/transform/MessageNode.java
@@ -1,4 +1,4 @@
-/* MessageNode.java --
+/* MessageNode.java --
Copyright (C) 2004,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -106,5 +106,5 @@ final class MessageNode
}
return buf.toString();
}
-
+
}
diff --git a/gnu/xml/transform/NamespaceProxy.java b/gnu/xml/transform/NamespaceProxy.java
index b3c233cd7..695fbeb52 100644
--- a/gnu/xml/transform/NamespaceProxy.java
+++ b/gnu/xml/transform/NamespaceProxy.java
@@ -1,4 +1,4 @@
-/* NamespaceProxy.java --
+/* NamespaceProxy.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -57,7 +57,7 @@ class NamespaceProxy
{
this.node = node;
}
-
+
public String getNamespaceURI(String prefix)
{
return (node == null) ? null : node.lookupNamespaceURI(prefix);
diff --git a/gnu/xml/transform/NodeNumberNode.java b/gnu/xml/transform/NodeNumberNode.java
index 0427686de..6663db371 100644
--- a/gnu/xml/transform/NodeNumberNode.java
+++ b/gnu/xml/transform/NodeNumberNode.java
@@ -1,4 +1,4 @@
-/* NodeNumberNode.java --
+/* NodeNumberNode.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -265,5 +265,5 @@ final class NodeNumberNode
while (node != null);
return index;
}
-
+
}
diff --git a/gnu/xml/transform/NumberNode.java b/gnu/xml/transform/NumberNode.java
index b19a7b5e9..cec594b99 100644
--- a/gnu/xml/transform/NumberNode.java
+++ b/gnu/xml/transform/NumberNode.java
@@ -1,4 +1,4 @@
-/* NumberNode.java --
+/* NumberNode.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -84,5 +84,5 @@ final class NumberNode
new Double(Expr._number(context, ret));
return new int[] { d.intValue() };
}
-
+
}
diff --git a/gnu/xml/transform/OtherwiseNode.java b/gnu/xml/transform/OtherwiseNode.java
index 9d8168ce4..09057840d 100644
--- a/gnu/xml/transform/OtherwiseNode.java
+++ b/gnu/xml/transform/OtherwiseNode.java
@@ -1,4 +1,4 @@
-/* OtherwiseNode.java --
+/* OtherwiseNode.java --
Copyright (C) 2004,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -74,10 +74,10 @@ final class OtherwiseNode
context, pos, len,
parent, nextSibling);
}
-
+
public String toString()
{
return "otherwise";
}
-
+
}
diff --git a/gnu/xml/transform/ParameterNode.java b/gnu/xml/transform/ParameterNode.java
index 431fbd3b1..4f3dc7569 100644
--- a/gnu/xml/transform/ParameterNode.java
+++ b/gnu/xml/transform/ParameterNode.java
@@ -1,4 +1,4 @@
-/* ParameterNode.java --
+/* ParameterNode.java --
Copyright (C) 2004,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -73,8 +73,8 @@ final class ParameterNode
ParameterNode clone(Stylesheet stylesheet)
{
ParameterNode ret = new ParameterNode(name,
- select == null ? null : select.clone(stylesheet),
- type);
+ select == null ? null : select.clone(stylesheet),
+ type);
if (children != null)
ret.children = children.clone(stylesheet);
if (next != null)
@@ -106,7 +106,7 @@ final class ParameterNode
// pop the variable context
stylesheet.bindings.pop(type);
}
-
+
Object getValue(Stylesheet stylesheet, QName mode,
Node context, int pos, int len)
throws TransformerException
@@ -124,7 +124,7 @@ final class ParameterNode
else
return null;
}
-
+
public boolean references(QName var)
{
if (select != null && select.references(var))
@@ -144,7 +144,7 @@ final class ParameterNode
return -1;
return 0;
}
-
+
public String toString()
{
CPStringBuilder buf = new CPStringBuilder();
@@ -170,4 +170,3 @@ final class ParameterNode
}
}
-
diff --git a/gnu/xml/transform/ProcessingInstructionNode.java b/gnu/xml/transform/ProcessingInstructionNode.java
index 655f51f01..1e723a8d4 100644
--- a/gnu/xml/transform/ProcessingInstructionNode.java
+++ b/gnu/xml/transform/ProcessingInstructionNode.java
@@ -1,4 +1,4 @@
-/* ProcessingInstructionNode.java --
+/* ProcessingInstructionNode.java --
Copyright (C) 2004,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -104,7 +104,7 @@ final class ProcessingInstructionNode
context, pos, len,
parent, nextSibling);
}
-
+
public String toString()
{
CPStringBuilder buf = new CPStringBuilder("processing-instruction");
@@ -114,5 +114,5 @@ final class ProcessingInstructionNode
buf.append(']');
return buf.toString();
}
-
+
}
diff --git a/gnu/xml/transform/SAXSerializer.java b/gnu/xml/transform/SAXSerializer.java
index 9650e3e05..2bd1f97ab 100644
--- a/gnu/xml/transform/SAXSerializer.java
+++ b/gnu/xml/transform/SAXSerializer.java
@@ -1,4 +1,4 @@
-/* SAXSerializer.java --
+/* SAXSerializer.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/gnu/xml/transform/SAXTemplatesHandler.java b/gnu/xml/transform/SAXTemplatesHandler.java
index 2c5a4686f..24464c067 100644
--- a/gnu/xml/transform/SAXTemplatesHandler.java
+++ b/gnu/xml/transform/SAXTemplatesHandler.java
@@ -1,4 +1,4 @@
-/* SAXTemplatesHandler.java --
+/* SAXTemplatesHandler.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/gnu/xml/transform/SAXTransformerHandler.java b/gnu/xml/transform/SAXTransformerHandler.java
index 83cc3754b..890e15100 100644
--- a/gnu/xml/transform/SAXTransformerHandler.java
+++ b/gnu/xml/transform/SAXTransformerHandler.java
@@ -1,4 +1,4 @@
-/* SAXTransformerHandler.java --
+/* SAXTransformerHandler.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -107,5 +107,5 @@ class SAXTransformerHandler
throw e2;
}
}
-
+
}
diff --git a/gnu/xml/transform/SortKey.java b/gnu/xml/transform/SortKey.java
index 72934a5b7..dd57df986 100644
--- a/gnu/xml/transform/SortKey.java
+++ b/gnu/xml/transform/SortKey.java
@@ -1,4 +1,4 @@
-/* SortKey.java --
+/* SortKey.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -95,7 +95,7 @@ final class SortKey
* @param caseOrder the treatment of case when the data type is a string. This
* may be "upper-first", "lower-first" or {@code null} if
* unspecified.
- */
+ */
SortKey(Expr select, TemplateNode lang, TemplateNode dataType,
TemplateNode order, TemplateNode caseOrder)
{
@@ -215,10 +215,10 @@ final class SortKey
SortKey clone(Stylesheet stylesheet)
{
return new SortKey(select.clone(stylesheet),
- langTemplate == null ? null : cloneAttributeValueTemplate(langTemplate, stylesheet),
- dataTypeTemplate == null ? null : cloneAttributeValueTemplate(dataTypeTemplate, stylesheet),
- orderTemplate == null ? null : cloneAttributeValueTemplate(orderTemplate, stylesheet),
- caseOrderTemplate == null ? null : cloneAttributeValueTemplate(caseOrderTemplate, stylesheet));
+ langTemplate == null ? null : cloneAttributeValueTemplate(langTemplate, stylesheet),
+ dataTypeTemplate == null ? null : cloneAttributeValueTemplate(dataTypeTemplate, stylesheet),
+ orderTemplate == null ? null : cloneAttributeValueTemplate(orderTemplate, stylesheet),
+ caseOrderTemplate == null ? null : cloneAttributeValueTemplate(caseOrderTemplate, stylesheet));
}
/**
diff --git a/gnu/xml/transform/StreamSerializer.java b/gnu/xml/transform/StreamSerializer.java
index 289967218..a5705f891 100644
--- a/gnu/xml/transform/StreamSerializer.java
+++ b/gnu/xml/transform/StreamSerializer.java
@@ -1,4 +1,4 @@
-/* StreamSerializer.java --
+/* StreamSerializer.java --
Copyright (C) 2004,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -67,7 +67,7 @@ import org.w3c.dom.Node;
*/
public class StreamSerializer
{
-
+
static final int SPACE = 0x20;
static final int BANG = 0x21; // !
static final int APOS = 0x27; // '
@@ -83,7 +83,7 @@ public class StreamSerializer
static
{
HashSet set;
-
+
set = new HashSet();
set.add("nohref");
HTML_BOOLEAN_ATTRIBUTES.put("area", set);
@@ -95,11 +95,11 @@ public class StreamSerializer
set = new HashSet();
set.add("declare");
HTML_BOOLEAN_ATTRIBUTES.put("object", set);
-
+
set = new HashSet();
set.add("noshade");
HTML_BOOLEAN_ATTRIBUTES.put("hr", set);
-
+
set = new HashSet();
set.add("compact");
HTML_BOOLEAN_ATTRIBUTES.put("dl", set);
@@ -107,46 +107,46 @@ public class StreamSerializer
HTML_BOOLEAN_ATTRIBUTES.put("ul", set);
HTML_BOOLEAN_ATTRIBUTES.put("dir", set);
HTML_BOOLEAN_ATTRIBUTES.put("menu", set);
-
+
set = new HashSet();
set.add("checked");
set.add("disabled");
set.add("readonly");
set.add("ismap");
HTML_BOOLEAN_ATTRIBUTES.put("input", set);
-
+
set = new HashSet();
set.add("multiple");
set.add("disabled");
HTML_BOOLEAN_ATTRIBUTES.put("select", set);
-
+
set = new HashSet();
set.add("disabled");
HTML_BOOLEAN_ATTRIBUTES.put("optgroup", set);
-
+
set = new HashSet();
set.add("selected");
set.add("disabled");
HTML_BOOLEAN_ATTRIBUTES.put("option", set);
-
+
set = new HashSet();
set.add("disabled");
set.add("readonly");
HTML_BOOLEAN_ATTRIBUTES.put("textarea", set);
-
+
set = new HashSet();
set.add("disabled");
HTML_BOOLEAN_ATTRIBUTES.put("button", set);
-
+
set = new HashSet();
set.add("nowrap");
HTML_BOOLEAN_ATTRIBUTES.put("th", set);
HTML_BOOLEAN_ATTRIBUTES.put("td", set);
-
+
set = new HashSet();
set.add("noresize");
HTML_BOOLEAN_ATTRIBUTES.put("frame", set);
-
+
set = new HashSet();
set.add("defer");
HTML_BOOLEAN_ATTRIBUTES.put("script", set);
@@ -168,7 +168,7 @@ public class StreamSerializer
protected boolean discardDefaultContent;
protected boolean xmlDeclaration = true;
-
+
// has a META element with the encoding been added?
private boolean htmlEncoded;
@@ -204,7 +204,7 @@ public class StreamSerializer
{
serialize(node, out, false);
}
-
+
void serialize(Node node, final OutputStream out,
boolean convertToCdata)
throws IOException
diff --git a/gnu/xml/transform/StrippingInstruction.java b/gnu/xml/transform/StrippingInstruction.java
index c6391b9c5..27e9fc8ca 100644
--- a/gnu/xml/transform/StrippingInstruction.java
+++ b/gnu/xml/transform/StrippingInstruction.java
@@ -1,4 +1,4 @@
-/* StrippingInstruction.java --
+/* StrippingInstruction.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -49,7 +49,7 @@ class StrippingInstruction
final NameTest element;
final int precedence;
-
+
StrippingInstruction(NameTest element, int precedence)
{
this.element = element;
@@ -69,5 +69,5 @@ class StrippingInstruction
else
return 0.0f;
}
-
+
}
diff --git a/gnu/xml/transform/Stylesheet.java b/gnu/xml/transform/Stylesheet.java
index 30bd95349..786b258f5 100644
--- a/gnu/xml/transform/Stylesheet.java
+++ b/gnu/xml/transform/Stylesheet.java
@@ -1,4 +1,4 @@
-/* Stylesheet.java --
+/* Stylesheet.java --
Copyright (C) 2004,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -91,7 +91,7 @@ class Stylesheet
static final String XSL_NS = "http://www.w3.org/1999/XSL/Transform";
private static final NameTest STYLESHEET_PRESERVE_TEXT =
new NameTest(new QName(XSL_NS, "text"), false, false);
-
+
static final int OUTPUT_XML = 0;
static final int OUTPUT_HTML = 1;
static final int OUTPUT_TEXT = 2;
@@ -147,7 +147,7 @@ class Stylesheet
* Decimal formats.
*/
Map<String,DecimalFormat> decimalFormats;
-
+
/**
* Namespace aliases.
*/
@@ -256,16 +256,16 @@ class Stylesheet
builtInTextTemplate =
new ValueOfNode(new Selector(Selector.SELF, tests),
false);
-
+
parse(doc.getDocumentElement(), true);
current = doc; // Alow namespace resolution during processing
-
+
debug = ("yes".equals(System.getProperty("xsl.debug")));
if (debug)
{
System.err.println("Stylesheet: " + doc.getDocumentURI());
- for (Template t : templates)
+ for (Template t : templates)
{
t.list(System.err);
System.err.println("--------------------");
@@ -280,7 +280,7 @@ class Stylesheet
stylesheet = stylesheet.parent;
return stylesheet;
}
-
+
void initDefaultDecimalFormat()
{
DecimalFormat defaultDecimalFormat = new DecimalFormat();
@@ -298,7 +298,7 @@ class Stylesheet
defaultDecimalFormat.setDecimalFormatSymbols(symbols);
decimalFormats.put(null, defaultDecimalFormat);
}
-
+
// -- Cloneable --
public Object clone()
@@ -309,33 +309,33 @@ class Stylesheet
clone.bindings = (Bindings) bindings.clone();
LinkedList<Template> templates2 = new LinkedList<Template>();
- for (Template t : templates)
+ for (Template t : templates)
{
templates2.add(t.clone(clone));
}
clone.templates = templates2;
LinkedList<AttributeSet> attributeSets2 = new LinkedList<AttributeSet>();
- for (AttributeSet as : attributeSets)
+ for (AttributeSet as : attributeSets)
{
attributeSets2.add(as.clone(clone));
}
clone.attributeSets = attributeSets2;
LinkedList<ParameterNode> variables2 = new LinkedList<ParameterNode>();
- for (ParameterNode var : variables)
+ for (ParameterNode var : variables)
{
variables2.add(var.clone(clone));
}
clone.variables = variables2;
LinkedList<Key> keys2 = new LinkedList<Key>();
- for (Key k : keys)
+ for (Key k : keys)
{
keys2.add(k.clone(clone));
}
clone.keys = keys2;
-
+
return clone;
}
catch (CloneNotSupportedException e)
@@ -395,9 +395,9 @@ class Stylesheet
}
return new QName(uri, localName, prefix);
}
-
+
// -- Template selection --
-
+
TemplateNode getTemplate(QName mode, Node context, boolean applyImports)
throws TransformerException
{
@@ -632,7 +632,7 @@ class Stylesheet
Node attr = attrs.getNamedItem(name);
return (attr == null) ? def : attr.getNodeValue();
}
-
+
/**
* namespace-alias
*/
@@ -777,7 +777,7 @@ class Stylesheet
while (st.hasMoreTokens())
{
NameTest element = parseNameTest(st.nextToken());
- stripSpace.add(new StrippingInstruction(element,
+ stripSpace.add(new StrippingInstruction(element,
precedence));
}
}
@@ -923,7 +923,7 @@ class Stylesheet
tokens.add(value.substring(off));
types.add(Boolean.FALSE);
}
-
+
// Construct template node tree
TemplateNode ret = null;
Document doc = source.getOwnerDocument();
@@ -983,7 +983,7 @@ class Stylesheet
{
// Conflict resolution
StrippingInstruction ssi = null, psi = null;
- for (StrippingInstruction si : stripSpace)
+ for (StrippingInstruction si : stripSpace)
{
if (si.element.matches(ctx, 1, 1))
{
@@ -998,7 +998,7 @@ class Stylesheet
ssi = si;
}
}
- for (StrippingInstruction si : preserveSpace)
+ for (StrippingInstruction si : preserveSpace)
{
if (si.element.matches(ctx, 1, 1))
{
@@ -1090,7 +1090,7 @@ class Stylesheet
}
return null;
}
-
+
// -- Parsing --
/**
@@ -1126,7 +1126,7 @@ class Stylesheet
List<WithParam> withParams = parseWithParams(children);
return new CallTemplateNode(name, withParams);
}
-
+
/**
* value-of
*/
@@ -1140,7 +1140,7 @@ class Stylesheet
Expr select = (Expr) xpath.compile(s);
return new ValueOfNode(select, d);
}
-
+
/**
* for-each
*/
@@ -1156,7 +1156,7 @@ class Stylesheet
ret.children = parse(children);
return ret;
}
-
+
/**
* if
*/
@@ -1171,7 +1171,7 @@ class Stylesheet
ret.children = parse(children);
return ret;
}
-
+
/**
* when
*/
@@ -1186,7 +1186,7 @@ class Stylesheet
ret.children = parse(children);
return ret;
}
-
+
/**
* element
*/
@@ -1223,7 +1223,7 @@ class Stylesheet
ret.children = parse(children);
return ret;
}
-
+
/**
* text
*/
@@ -1238,7 +1238,7 @@ class Stylesheet
ret.children = parse(children);
return ret;
}
-
+
/**
* copy
*/
@@ -1252,7 +1252,7 @@ class Stylesheet
ret.children = parse(children);
return ret;
}
-
+
/**
* processing-instruction
*/
@@ -1266,7 +1266,7 @@ class Stylesheet
ret.children = parse(children);
return ret;
}
-
+
/**
* number
*/
@@ -1340,7 +1340,7 @@ class Stylesheet
ret.children = parse(children);
return ret;
}
-
+
/**
* copy-of
*/
@@ -1355,7 +1355,7 @@ class Stylesheet
ret.children = parse(children);
return ret;
}
-
+
/**
* message
*/
@@ -1370,7 +1370,7 @@ class Stylesheet
ret.children = parse(children);
return ret;
}
-
+
/**
* Parse template-level elements.
*/
@@ -1461,7 +1461,7 @@ class Stylesheet
NamedNodeMap attrs = node.getAttributes();
Node children = node.getFirstChild();
TemplateNode content = parse(children);
- QName paramName =
+ QName paramName =
getQName(getRequiredAttribute(attrs, "name", node));
String select = getAttribute(attrs, "select");
ParameterNode ret;
@@ -1770,4 +1770,3 @@ class Stylesheet
}
}
-
diff --git a/gnu/xml/transform/SystemPropertyFunction.java b/gnu/xml/transform/SystemPropertyFunction.java
index 038df0169..f314227e6 100644
--- a/gnu/xml/transform/SystemPropertyFunction.java
+++ b/gnu/xml/transform/SystemPropertyFunction.java
@@ -1,4 +1,4 @@
-/* SystemPropertyFunction.java --
+/* SystemPropertyFunction.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -138,4 +138,3 @@ final class SystemPropertyFunction
}
}
-
diff --git a/gnu/xml/transform/Template.java b/gnu/xml/transform/Template.java
index 7ddef0ae5..09d1a997c 100644
--- a/gnu/xml/transform/Template.java
+++ b/gnu/xml/transform/Template.java
@@ -1,4 +1,4 @@
-/* Template.java --
+/* Template.java --
Copyright (C) 2004,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -70,7 +70,7 @@ class Template
final QName mode;
final boolean isAnyNode; // is the match simply "node()"?
- Template(Stylesheet stylesheet,
+ Template(Stylesheet stylesheet,
QName name, Pattern match, TemplateNode node,
int precedence, String priorityAttr, QName mode)
{
@@ -80,7 +80,7 @@ class Template
this.node = node;
this.precedence = precedence;
this.mode = mode;
-
+
double p = DEFAULT_PRIORITY;
boolean a = false;
if (priorityAttr != null)
@@ -126,8 +126,8 @@ class Template
this.priority = p;
this.isAnyNode = a;
}
-
- private Template(Stylesheet stylesheet,
+
+ private Template(Stylesheet stylesheet,
QName name, Pattern match, TemplateNode node,
int precedence, double priority, QName mode, boolean isAnyNode)
{
@@ -155,7 +155,7 @@ class Template
mode,
isAnyNode);
}
-
+
public int compareTo(Object other)
{
if (other instanceof Template)
@@ -249,7 +249,7 @@ class Template
buf.append(node);
buf.append(']');
return buf.toString();
-
+
//return (name != null) ? name.toString() : match.toString();
}
diff --git a/gnu/xml/transform/TemplateNode.java b/gnu/xml/transform/TemplateNode.java
index ad80c59f9..d4c223e01 100644
--- a/gnu/xml/transform/TemplateNode.java
+++ b/gnu/xml/transform/TemplateNode.java
@@ -1,4 +1,4 @@
-/* TemplateNode.java --
+/* TemplateNode.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/gnu/xml/transform/TemplatesImpl.java b/gnu/xml/transform/TemplatesImpl.java
index e5395f6fb..fc741bc81 100644
--- a/gnu/xml/transform/TemplatesImpl.java
+++ b/gnu/xml/transform/TemplatesImpl.java
@@ -1,4 +1,4 @@
-/* TemplatesImpl.java --
+/* TemplatesImpl.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/gnu/xml/transform/TextNode.java b/gnu/xml/transform/TextNode.java
index 93d1d5417..8263ef5bc 100644
--- a/gnu/xml/transform/TextNode.java
+++ b/gnu/xml/transform/TextNode.java
@@ -1,4 +1,4 @@
-/* TextNode.java --
+/* TextNode.java --
Copyright (C) 2004,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -117,5 +117,5 @@ final class TextNode
}
return buf.toString();
}
-
+
}
diff --git a/gnu/xml/transform/TransformerFactoryImpl.java b/gnu/xml/transform/TransformerFactoryImpl.java
index 1e8fea3e3..972e8a282 100644
--- a/gnu/xml/transform/TransformerFactoryImpl.java
+++ b/gnu/xml/transform/TransformerFactoryImpl.java
@@ -1,4 +1,4 @@
-/* TransformerFactoryImpl.java --
+/* TransformerFactoryImpl.java --
Copyright (C) 2004,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -148,7 +148,7 @@ public class TransformerFactoryImpl
}
return new Stylesheet(this, parent, doc, systemId, precedence);
}
-
+
public Source getAssociatedStylesheet(Source source,
String media,
String title,
@@ -365,14 +365,14 @@ public class TransformerFactoryImpl
Transformer transformer = newTransformer();
return new SAXTransformerHandler(this, transformer);
}
-
+
public TransformerHandler newTransformerHandler(Source source)
throws TransformerConfigurationException
{
Transformer transformer = newTransformer(source);
return new SAXTransformerHandler(this, transformer);
}
-
+
public TransformerHandler newTransformerHandler(Templates templates)
throws TransformerConfigurationException
{
@@ -391,7 +391,7 @@ public class TransformerFactoryImpl
{
throw new UnsupportedOperationException();
}
-
+
// -- SAXTransformerFactory end --
/**
@@ -434,5 +434,5 @@ public class TransformerFactoryImpl
out.close();
}
}
-
+
}
diff --git a/gnu/xml/transform/TransformerImpl.java b/gnu/xml/transform/TransformerImpl.java
index a975c691f..eb6a5dea1 100644
--- a/gnu/xml/transform/TransformerImpl.java
+++ b/gnu/xml/transform/TransformerImpl.java
@@ -1,4 +1,4 @@
-/* TransformerImpl.java --
+/* TransformerImpl.java --
Copyright (C) 2004,2005,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -231,9 +231,9 @@ class TransformerImpl
String publicId = outputProperties.getProperty(OutputKeys.DOCTYPE_PUBLIC);
String systemId = outputProperties.getProperty(OutputKeys.DOCTYPE_SYSTEM);
String version = outputProperties.getProperty(OutputKeys.VERSION);
- boolean omitXmlDeclaration =
+ boolean omitXmlDeclaration =
"yes".equals(outputProperties.getProperty(OutputKeys.OMIT_XML_DECLARATION));
- boolean standalone =
+ boolean standalone =
"yes".equals(outputProperties.getProperty(OutputKeys.STANDALONE));
String mediaType = outputProperties.getProperty(OutputKeys.MEDIA_TYPE);
String cdataSectionElements =
diff --git a/gnu/xml/transform/TransformerOutputProperties.java b/gnu/xml/transform/TransformerOutputProperties.java
index 9ac5cdc04..ddaa260c4 100644
--- a/gnu/xml/transform/TransformerOutputProperties.java
+++ b/gnu/xml/transform/TransformerOutputProperties.java
@@ -1,4 +1,4 @@
-/* TransformerOutputProperties.java --
+/* TransformerOutputProperties.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -54,7 +54,7 @@ import javax.xml.transform.OutputKeys;
class TransformerOutputProperties
extends Properties
{
-
+
final Properties defaultProperties;
final Stylesheet stylesheet;
boolean dirty;
@@ -170,7 +170,7 @@ class TransformerOutputProperties
"yes".equals(getProperty(OutputKeys.STANDALONE));
stylesheet.outputPublicId = getProperty(OutputKeys.DOCTYPE_PUBLIC);
stylesheet.outputSystemId = getProperty(OutputKeys.DOCTYPE_SYSTEM);
- StringTokenizer st =
+ StringTokenizer st =
new StringTokenizer(getProperty(OutputKeys.CDATA_SECTION_ELEMENTS));
Collection acc = new LinkedHashSet();
while (st.hasMoreTokens())
@@ -184,4 +184,3 @@ class TransformerOutputProperties
}
}
-
diff --git a/gnu/xml/transform/URIResolverEntityResolver.java b/gnu/xml/transform/URIResolverEntityResolver.java
index 762416fde..49193a473 100644
--- a/gnu/xml/transform/URIResolverEntityResolver.java
+++ b/gnu/xml/transform/URIResolverEntityResolver.java
@@ -1,4 +1,4 @@
-/* URIResolverEntityResolver.java --
+/* URIResolverEntityResolver.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -79,5 +79,5 @@ class URIResolverEntityResolver
throw new SAXException(e);
}
}
-
+
}
diff --git a/gnu/xml/transform/UnparsedEntityUriFunction.java b/gnu/xml/transform/UnparsedEntityUriFunction.java
index 7ba0eae21..5eae78cb2 100644
--- a/gnu/xml/transform/UnparsedEntityUriFunction.java
+++ b/gnu/xml/transform/UnparsedEntityUriFunction.java
@@ -1,4 +1,4 @@
-/* UnparsedEntityUriFunction.java --
+/* UnparsedEntityUriFunction.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -130,4 +130,3 @@ final class UnparsedEntityUriFunction
}
}
-
diff --git a/gnu/xml/transform/ValueOfNode.java b/gnu/xml/transform/ValueOfNode.java
index 156affa77..0d9a656e7 100644
--- a/gnu/xml/transform/ValueOfNode.java
+++ b/gnu/xml/transform/ValueOfNode.java
@@ -1,4 +1,4 @@
-/* ValueOfNode.java --
+/* ValueOfNode.java --
Copyright (C) 2004,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -76,7 +76,7 @@ final class ValueOfNode
ret.next = next.clone(stylesheet);
return ret;
}
-
+
@Override
void doApply(Stylesheet stylesheet, QName mode,
Node context, int pos, int len,
@@ -125,7 +125,7 @@ final class ValueOfNode
return true;
return super.references(var);
}
-
+
public String toString()
{
CPStringBuilder buf = new CPStringBuilder("value-of");
@@ -137,5 +137,5 @@ final class ValueOfNode
buf.append(']');
return buf.toString();
}
-
+
}
diff --git a/gnu/xml/transform/WhenNode.java b/gnu/xml/transform/WhenNode.java
index fc9d5b187..abfe796fd 100644
--- a/gnu/xml/transform/WhenNode.java
+++ b/gnu/xml/transform/WhenNode.java
@@ -1,4 +1,4 @@
-/* WhenNode.java --
+/* WhenNode.java --
Copyright (C) 2004,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -94,14 +94,14 @@ final class WhenNode
parent, nextSibling);
}
}
-
+
public boolean references(QName var)
{
if (test != null && test.references(var))
return true;
return super.references(var);
}
-
+
public String toString()
{
CPStringBuilder buf = new CPStringBuilder("when");
@@ -111,5 +111,5 @@ final class WhenNode
buf.append(']');
return buf.toString();
}
-
+
}
diff --git a/gnu/xml/transform/WithParam.java b/gnu/xml/transform/WithParam.java
index bcfe1e9b7..2e726fb82 100644
--- a/gnu/xml/transform/WithParam.java
+++ b/gnu/xml/transform/WithParam.java
@@ -1,4 +1,4 @@
-/* WithParam.java --
+/* WithParam.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/gnu/xml/transform/XSLComparator.java b/gnu/xml/transform/XSLComparator.java
index 88243693d..1fd0b20e6 100644
--- a/gnu/xml/transform/XSLComparator.java
+++ b/gnu/xml/transform/XSLComparator.java
@@ -1,4 +1,4 @@
-/* XSLComparator.java --
+/* XSLComparator.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -65,54 +65,54 @@ class XSLComparator
{
for (SortKey sortKey : sortKeys)
{
- String k1 = sortKey.key(n1);
- String k2 = sortKey.key(n2);
- if ("text".equals(sortKey.dataType))
- {
- Locale locale = (sortKey.lang == null) ? Locale.getDefault() :
- new Locale(sortKey.lang);
- Collator collator = Collator.getInstance(locale);
- int d = collator.compare(k1, k2);
- if (d != 0)
- {
- switch (sortKey.caseOrder)
- {
- case SortKey.UPPER_FIRST:
- // TODO
- break;
- case SortKey.LOWER_FIRST:
- // TODO
- break;
- }
- if (sortKey.descending)
- {
- d = -d;
- }
- return d;
- }
- }
- else if ("number".equals(sortKey.dataType))
- {
- double kn1 = Expr._number(n1, k1);
- double kn2 = Expr._number(n2, k2);
- int d;
- if (Double.isNaN(kn1) || Double.isInfinite(kn2))
- {
- d = -1;
- }
- else if (Double.isNaN(kn2) || Double.isInfinite(kn1))
- {
- d = 1;
- }
- else
- {
- // conversion to int may give 0 for small numbers
- d = (kn1 > kn2) ? 1 : (kn1 < kn2) ? -1 : 0;
- }
- return (sortKey.descending) ? -d : d;
- }
+ String k1 = sortKey.key(n1);
+ String k2 = sortKey.key(n2);
+ if ("text".equals(sortKey.dataType))
+ {
+ Locale locale = (sortKey.lang == null) ? Locale.getDefault() :
+ new Locale(sortKey.lang);
+ Collator collator = Collator.getInstance(locale);
+ int d = collator.compare(k1, k2);
+ if (d != 0)
+ {
+ switch (sortKey.caseOrder)
+ {
+ case SortKey.UPPER_FIRST:
+ // TODO
+ break;
+ case SortKey.LOWER_FIRST:
+ // TODO
+ break;
+ }
+ if (sortKey.descending)
+ {
+ d = -d;
+ }
+ return d;
+ }
+ }
+ else if ("number".equals(sortKey.dataType))
+ {
+ double kn1 = Expr._number(n1, k1);
+ double kn2 = Expr._number(n2, k2);
+ int d;
+ if (Double.isNaN(kn1) || Double.isInfinite(kn2))
+ {
+ d = -1;
+ }
+ else if (Double.isNaN(kn2) || Double.isInfinite(kn1))
+ {
+ d = 1;
+ }
+ else
+ {
+ // conversion to int may give 0 for small numbers
+ d = (kn1 > kn2) ? 1 : (kn1 < kn2) ? -1 : 0;
+ }
+ return (sortKey.descending) ? -d : d;
+ }
}
return 0;
}
-
+
}
diff --git a/gnu/xml/transform/XSLURIResolver.java b/gnu/xml/transform/XSLURIResolver.java
index c1379211a..cf596c1e6 100644
--- a/gnu/xml/transform/XSLURIResolver.java
+++ b/gnu/xml/transform/XSLURIResolver.java
@@ -1,4 +1,4 @@
-/* XSLURIResolver.java --
+/* XSLURIResolver.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -168,7 +168,7 @@ class XSLURIResolver
}
conn.connect();
lastModified = conn.getLastModified();
- if (node != null &&
+ if (node != null &&
lastModified > 0L &&
lastModified <= lastLastModified)
{
@@ -266,7 +266,7 @@ class XSLURIResolver
return (file == null) ? null : file.toURL();
}
}
-
+
DocumentBuilder getDocumentBuilder()
throws TransformerException
{
@@ -317,6 +317,5 @@ class XSLURIResolver
((DomDocument) doc).setDocumentURI(systemId);
return new DOMSource(doc, systemId);
}
-
-}
+}
diff --git a/gnu/xml/util/DoParse.java b/gnu/xml/util/DoParse.java
index a8f509691..02c80d3a2 100644
--- a/gnu/xml/util/DoParse.java
+++ b/gnu/xml/util/DoParse.java
@@ -1,4 +1,4 @@
-/* DoParse.java --
+/* DoParse.java --
Copyright (C) 1999,2000,2001 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -101,11 +101,11 @@ final public class DoParse
private DoParse () { /* no instances allowed */ }
// first reported nonrecoverable error
- private static SAXParseException fatal;
+ private static SAXParseException fatal;
// error categories
- private static int errorCount;
- private static int fatalCount;
+ private static int errorCount;
+ private static int fatalCount;
/**
* Command line invoker for this class; pass a filename or URL
@@ -121,182 +121,182 @@ final public class DoParse
public static void main (String argv [])
throws IOException
{
- int exitStatus = 1;
-
- if (argv.length != 2) {
- System.err.println ("Usage: DoParse [filename|URL] pipeline-spec");
- System.err.println ("Example pipeline specs:");
- System.err.println (" 'nsfix | validate'");
- System.err.println (
- " ... restore namespace syntax, validate");
- System.err.println (" 'nsfix | write ( stdout )'");
- System.err.println (
- " ... restore namespace syntax, write to stdout as XML"
- );
- System.exit (1);
- }
-
- try {
- //
- // Get input source for specified document (or try ;-)
- //
- argv [0] = Resolver.getURL (argv [0]);
- InputSource input = new InputSource (argv [0]);
-
- //
- // Get the producer, using the system default parser (which
- // can be overridden for this particular invocation).
- //
- // And the pipeline, using commandline options.
- //
- XMLReader producer;
- EventConsumer consumer;
-
- producer = XMLReaderFactory.createXMLReader ();
-
- //
- // XXX pipeline factory now has a pre-tokenized input
- // method, use it ... that way at least some params
- // can be written using quotes (have spaces, ...)
- //
- consumer = PipelineFactory.createPipeline (argv [1]);
-
- //
- // XXX want commandline option for tweaking error handler.
- // Want to be able to present warnings.
- //
- producer.setErrorHandler (new MyErrorHandler ());
-
- // XXX need facility enabling resolving to local DTDs
-
- //
- // Parse. The pipeline may get optimized a bit, so we
- // can't always fail cleanly for validation without taking
- // a look at the filter stages.
- //
- EventFilter.bind (producer, consumer);
- producer.parse (input);
-
- try {
- if (producer.getFeature (
- "http://org.xml/sax/features/validation"))
- exitStatus = ((errorCount + fatalCount) > 0) ? 1 : 0;
- else if (fatalCount == 0)
- exitStatus = 0;
- } catch (SAXException e) {
- if (hasValidator (consumer))
- exitStatus = ((errorCount + fatalCount) > 0) ? 1 : 0;
- else if (fatalCount == 0)
- exitStatus = 0;
- }
-
- } catch (java.net.MalformedURLException e) {
- System.err.println ("** Malformed URL: " + e.getMessage ());
- System.err.println ("Is '" + argv [0] + "' a non-existent file?");
- e.printStackTrace ();
- // e.g. FNF
-
- } catch (SAXParseException e) {
- if (e != fatal) {
- System.err.print (printParseException ("Parsing Aborted", e));
- e.printStackTrace ();
- if (e.getException () != null) {
- System.err.println ("++ Wrapped exception:");
- e.getException ().printStackTrace ();
- }
- }
-
- } catch (SAXException e) {
- Exception x = e;
- if (e.getException () != null)
- x = e.getException ();
- x.printStackTrace ();
-
- } catch (Throwable t) {
- t.printStackTrace ();
- }
-
- System.exit (exitStatus);
+ int exitStatus = 1;
+
+ if (argv.length != 2) {
+ System.err.println ("Usage: DoParse [filename|URL] pipeline-spec");
+ System.err.println ("Example pipeline specs:");
+ System.err.println (" 'nsfix | validate'");
+ System.err.println (
+ " ... restore namespace syntax, validate");
+ System.err.println (" 'nsfix | write ( stdout )'");
+ System.err.println (
+ " ... restore namespace syntax, write to stdout as XML"
+ );
+ System.exit (1);
+ }
+
+ try {
+ //
+ // Get input source for specified document (or try ;-)
+ //
+ argv [0] = Resolver.getURL (argv [0]);
+ InputSource input = new InputSource (argv [0]);
+
+ //
+ // Get the producer, using the system default parser (which
+ // can be overridden for this particular invocation).
+ //
+ // And the pipeline, using commandline options.
+ //
+ XMLReader producer;
+ EventConsumer consumer;
+
+ producer = XMLReaderFactory.createXMLReader ();
+
+ //
+ // XXX pipeline factory now has a pre-tokenized input
+ // method, use it ... that way at least some params
+ // can be written using quotes (have spaces, ...)
+ //
+ consumer = PipelineFactory.createPipeline (argv [1]);
+
+ //
+ // XXX want commandline option for tweaking error handler.
+ // Want to be able to present warnings.
+ //
+ producer.setErrorHandler (new MyErrorHandler ());
+
+ // XXX need facility enabling resolving to local DTDs
+
+ //
+ // Parse. The pipeline may get optimized a bit, so we
+ // can't always fail cleanly for validation without taking
+ // a look at the filter stages.
+ //
+ EventFilter.bind (producer, consumer);
+ producer.parse (input);
+
+ try {
+ if (producer.getFeature (
+ "http://org.xml/sax/features/validation"))
+ exitStatus = ((errorCount + fatalCount) > 0) ? 1 : 0;
+ else if (fatalCount == 0)
+ exitStatus = 0;
+ } catch (SAXException e) {
+ if (hasValidator (consumer))
+ exitStatus = ((errorCount + fatalCount) > 0) ? 1 : 0;
+ else if (fatalCount == 0)
+ exitStatus = 0;
+ }
+
+ } catch (java.net.MalformedURLException e) {
+ System.err.println ("** Malformed URL: " + e.getMessage ());
+ System.err.println ("Is '" + argv [0] + "' a non-existent file?");
+ e.printStackTrace ();
+ // e.g. FNF
+
+ } catch (SAXParseException e) {
+ if (e != fatal) {
+ System.err.print (printParseException ("Parsing Aborted", e));
+ e.printStackTrace ();
+ if (e.getException () != null) {
+ System.err.println ("++ Wrapped exception:");
+ e.getException ().printStackTrace ();
+ }
+ }
+
+ } catch (SAXException e) {
+ Exception x = e;
+ if (e.getException () != null)
+ x = e.getException ();
+ x.printStackTrace ();
+
+ } catch (Throwable t) {
+ t.printStackTrace ();
+ }
+
+ System.exit (exitStatus);
}
// returns true if saw a validator (before end or unrecognized node)
// false otherwise
private static boolean hasValidator (EventConsumer e)
{
- if (e == null)
- return false;
- if (e instanceof ValidationConsumer)
- return true;
- if (e instanceof TeeConsumer) {
- TeeConsumer t = (TeeConsumer) e;
- return hasValidator (t.getFirst ())
- || hasValidator (t.getRest ());
- }
- if (e instanceof WellFormednessFilter
- || e instanceof NSFilter
- )
- return hasValidator (((EventFilter)e).getNext ());
-
- // else ... gee, we can't know. Assume not.
-
- return false;
+ if (e == null)
+ return false;
+ if (e instanceof ValidationConsumer)
+ return true;
+ if (e instanceof TeeConsumer) {
+ TeeConsumer t = (TeeConsumer) e;
+ return hasValidator (t.getFirst ())
+ || hasValidator (t.getRest ());
+ }
+ if (e instanceof WellFormednessFilter
+ || e instanceof NSFilter
+ )
+ return hasValidator (((EventFilter)e).getNext ());
+
+ // else ... gee, we can't know. Assume not.
+
+ return false;
}
static class MyErrorHandler implements ErrorHandler
{
- // dump validation errors, but continue
- public void error (SAXParseException e)
- throws SAXParseException
- {
- errorCount++;
- System.err.print (printParseException ("Error", e));
- }
-
- public void warning (SAXParseException e)
- throws SAXParseException
- {
- // System.err.print (printParseException ("Warning", e));
- }
-
- // try to continue fatal errors, in case a parser reports more
- public void fatalError (SAXParseException e)
- throws SAXParseException
- {
- fatalCount++;
- if (fatal == null)
- fatal = e;
- System.err.print (printParseException ("Nonrecoverable Error", e));
- }
+ // dump validation errors, but continue
+ public void error (SAXParseException e)
+ throws SAXParseException
+ {
+ errorCount++;
+ System.err.print (printParseException ("Error", e));
+ }
+
+ public void warning (SAXParseException e)
+ throws SAXParseException
+ {
+ // System.err.print (printParseException ("Warning", e));
+ }
+
+ // try to continue fatal errors, in case a parser reports more
+ public void fatalError (SAXParseException e)
+ throws SAXParseException
+ {
+ fatalCount++;
+ if (fatal == null)
+ fatal = e;
+ System.err.print (printParseException ("Nonrecoverable Error", e));
+ }
}
static private String printParseException (
- String label,
- SAXParseException e
+ String label,
+ SAXParseException e
) {
- CPStringBuilder buf = new CPStringBuilder ();
- int temp;
-
- buf.append ("** ");
- buf.append (label);
- buf.append (": ");
- buf.append (e.getMessage ());
- buf.append ('\n');
- if (e.getSystemId () != null) {
- buf.append (" URI: ");
- buf.append (e.getSystemId ());
- buf.append ('\n');
- }
- if ((temp = e.getLineNumber ()) != -1) {
- buf.append (" line: ");
- buf.append (temp);
- buf.append ('\n');
- }
- if ((temp = e.getColumnNumber ()) != -1) {
- buf.append (" char: ");
- buf.append (temp);
- buf.append ('\n');
- }
-
- return buf.toString ();
+ CPStringBuilder buf = new CPStringBuilder ();
+ int temp;
+
+ buf.append ("** ");
+ buf.append (label);
+ buf.append (": ");
+ buf.append (e.getMessage ());
+ buf.append ('\n');
+ if (e.getSystemId () != null) {
+ buf.append (" URI: ");
+ buf.append (e.getSystemId ());
+ buf.append ('\n');
+ }
+ if ((temp = e.getLineNumber ()) != -1) {
+ buf.append (" line: ");
+ buf.append (temp);
+ buf.append ('\n');
+ }
+ if ((temp = e.getColumnNumber ()) != -1) {
+ buf.append (" char: ");
+ buf.append (temp);
+ buf.append ('\n');
+ }
+
+ return buf.toString ();
}
}
diff --git a/gnu/xml/util/DomParser.java b/gnu/xml/util/DomParser.java
index b28b6103b..66e3f1d87 100644
--- a/gnu/xml/util/DomParser.java
+++ b/gnu/xml/util/DomParser.java
@@ -1,4 +1,4 @@
-/* DomParser.java --
+/* DomParser.java --
Copyright (C) 1999,2000,2001 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -60,50 +60,50 @@ import org.w3c.dom.*;
*
* <table border="1" width='100%' cellpadding='3' cellspacing='0'>
* <tr bgcolor='#ccccff'>
- * <th><font size='+1'>Name</font></th>
- * <th><font size='+1'>Notes</font></th></tr>
+ * <th><font size='+1'>Name</font></th>
+ * <th><font size='+1'>Notes</font></th></tr>
*
* <tr><td colspan=2><center><em>Features ... URL prefix is
* <b>http://xml.org/sax/features/</b></em></center></td></tr>
*
* <tr><td>(URL)/external-general-entities</td>
- * <td>false (does no parsing)</td></tr>
+ * <td>false (does no parsing)</td></tr>
* <tr><td>(URL)/external-parameter-entities</td>
- * <td>false (does no parsing)</td></tr>
+ * <td>false (does no parsing)</td></tr>
* <tr><td>(URL)/namespaces</td>
- * <td>Value is fixed at <em>true</em></td></tr>
+ * <td>Value is fixed at <em>true</em></td></tr>
* <tr><td>(URL)/namespace-prefixes</td>
- * <td>Value is settable, defaulting to <em>false</em>
- * (<code>xmlns</code> attributes hidden, and names aren't prefixed)
- * </td></tr>
+ * <td>Value is settable, defaulting to <em>false</em>
+ * (<code>xmlns</code> attributes hidden, and names aren't prefixed)
+ * </td></tr>
* <tr><td>(URL)/string-interning</td>
- * <td>Value is fixed at <em>false</em> (DOM provides no
- * guarantees as to interning)</td></tr>
+ * <td>Value is fixed at <em>false</em> (DOM provides no
+ * guarantees as to interning)</td></tr>
* <tr><td>(URL)/validation</td>
- * <td>false (does no parsing)</td></tr>
+ * <td>false (does no parsing)</td></tr>
* <tr><td>(URL)/lexical-handler/parameter-entities</td>
- * <td>false (DOM doesn't do parameter entities)</td></tr>
+ * <td>false (DOM doesn't do parameter entities)</td></tr>
*
* <tr><td colspan=2><center><em>Properties ... URL prefix is
* <b>http://xml.org/sax/properties/</b></em></center></td></tr>
*
*
* <tr><td>(URL)/dom-node</td>
- * <td>This property may be set before parsing to hold a DOM
- * <em>Document</em> node; any arguments given to <em>parse</em>
- * methods are ignored. When retrieved
- * during a parse, this value contains the "current" DOM node.
- * </td></tr>
+ * <td>This property may be set before parsing to hold a DOM
+ * <em>Document</em> node; any arguments given to <em>parse</em>
+ * methods are ignored. When retrieved
+ * during a parse, this value contains the "current" DOM node.
+ * </td></tr>
* <tr><td>(URL)/declaration-handler</td>
- * <td>A declaration handler may be provided. Declaration of external
- * general entities is exposed, but not parameter entities; none of the
- * entity names reported here will begin with "%". </td></tr>
+ * <td>A declaration handler may be provided. Declaration of external
+ * general entities is exposed, but not parameter entities; none of the
+ * entity names reported here will begin with "%". </td></tr>
* <tr><td>(URL)/lexical-handler</td>
- * <td>A lexical handler may be provided. While the start and end of
- * any external subset are reported, expansion of other parameter
- * entities (e.g. inside attribute list declarations) is not exposed.
- * Expansion of general entities within attributes is also not exposed
- * (see below).</td></tr>
+ * <td>A lexical handler may be provided. While the start and end of
+ * any external subset are reported, expansion of other parameter
+ * entities (e.g. inside attribute list declarations) is not exposed.
+ * Expansion of general entities within attributes is also not exposed
+ * (see below).</td></tr>
* </table>
*
* <P> The consequences of modifying a DOM document tree as it is being walked
@@ -114,34 +114,34 @@ import org.w3c.dom.*;
final public class DomParser implements XMLReader
{
// Stuff used internally to route events correctly
- private DefaultHandler2 defaultHandler = new DefaultHandler2 ();
+ private DefaultHandler2 defaultHandler = new DefaultHandler2 ();
// per-parse SAX stuff
- private ContentHandler contentHandler = defaultHandler;
- private DTDHandler dtdHandler = defaultHandler;
- private DeclHandler declHandler = defaultHandler;
- private LexicalHandler lexicalHandler = defaultHandler;
+ private ContentHandler contentHandler = defaultHandler;
+ private DTDHandler dtdHandler = defaultHandler;
+ private DeclHandler declHandler = defaultHandler;
+ private LexicalHandler lexicalHandler = defaultHandler;
// shared context
- private ErrorHandler errHandler = defaultHandler;
- private EntityResolver resolver = defaultHandler;
- private Locale locale = Locale.getDefault ();
+ private ErrorHandler errHandler = defaultHandler;
+ private EntityResolver resolver = defaultHandler;
+ private Locale locale = Locale.getDefault ();
// parser state
- private Node start;
- private Node current;
- private boolean isL2;
- private boolean showNamespaces = true;
- private boolean showXML1_0 = false;
- private NamespaceSupport prefixStack = new NamespaceSupport ();
- private boolean isDocument;
+ private Node start;
+ private Node current;
+ private boolean isL2;
+ private boolean showNamespaces = true;
+ private boolean showXML1_0 = false;
+ private NamespaceSupport prefixStack = new NamespaceSupport ();
+ private boolean isDocument;
/**
* Constructs an unitialized <b>SAX2</b> parser.
*/
public DomParser () {
- }
+ }
/**
* Constructs an <b>SAX2</b> parser initialized to traverse the specified
@@ -149,8 +149,8 @@ final public class DomParser implements XMLReader
* endDocument() calls bracket the calls exposing children.
*/
public DomParser (Node node) {
- setStart (node);
- }
+ setStart (node);
+ }
// stuff that most components in an application should be sharing:
@@ -162,7 +162,7 @@ final public class DomParser implements XMLReader
*/
public EntityResolver getEntityResolver ()
{
- return resolver;
+ return resolver;
}
/**
@@ -171,9 +171,9 @@ final public class DomParser implements XMLReader
*/
public void setEntityResolver (EntityResolver resolver)
{
- if (resolver == null)
- resolver = defaultHandler;
- this.resolver = resolver;
+ if (resolver == null)
+ resolver = defaultHandler;
+ this.resolver = resolver;
}
/**
@@ -181,17 +181,17 @@ final public class DomParser implements XMLReader
* diagnostics it provides.
*
* @exception SAXException as defined in the specification for
- * <em>org.xml.sax.Parser.setLocale()</em>
+ * <em>org.xml.sax.Parser.setLocale()</em>
*/
public void setLocale (Locale locale)
throws SAXException
{
- if (locale == null)
- locale = Locale.getDefault ();
- this.locale = locale;
+ if (locale == null)
+ locale = Locale.getDefault ();
+ this.locale = locale;
}
-
+
// different modules will tend to handle error handling the same,
// but it may not be the same through the whole app
@@ -201,7 +201,7 @@ final public class DomParser implements XMLReader
*/
public ErrorHandler getErrorHandler ()
{
- return errHandler;
+ return errHandler;
}
/**
@@ -210,9 +210,9 @@ final public class DomParser implements XMLReader
*/
public void setErrorHandler (ErrorHandler handler)
{
- if (handler == null)
- handler = defaultHandler;
- errHandler = handler;
+ if (handler == null)
+ handler = defaultHandler;
+ errHandler = handler;
}
@@ -224,7 +224,7 @@ final public class DomParser implements XMLReader
*/
public ContentHandler getContentHandler ()
{
- return contentHandler;
+ return contentHandler;
}
/**
@@ -233,9 +233,9 @@ final public class DomParser implements XMLReader
*/
public void setContentHandler (ContentHandler handler)
{
- if (handler == null)
- handler = defaultHandler;
- contentHandler = handler;
+ if (handler == null)
+ handler = defaultHandler;
+ contentHandler = handler;
}
/**
@@ -244,7 +244,7 @@ final public class DomParser implements XMLReader
*/
public DTDHandler getDTDHandler ()
{
- return dtdHandler;
+ return dtdHandler;
}
/**
@@ -253,9 +253,9 @@ final public class DomParser implements XMLReader
*/
public void setDTDHandler (DTDHandler handler)
{
- if (handler == null)
- handler = defaultHandler;
- dtdHandler = handler;
+ if (handler == null)
+ handler = defaultHandler;
+ dtdHandler = handler;
}
@@ -266,11 +266,11 @@ final public class DomParser implements XMLReader
*
* @param uri ignored (pass an empty string)
* @exception SAXException as defined in the specification for
- * <em>org.xml.sax.Parser.parse()</em>
+ * <em>org.xml.sax.Parser.parse()</em>
*/
public void parse (String uri) throws SAXException
{
- parse ();
+ parse ();
}
/**
@@ -280,38 +280,38 @@ final public class DomParser implements XMLReader
*
* @param input ignored
* @exception SAXException as defined in the specification for
- * <em>org.xml.sax.Parser.parse()</em>
+ * <em>org.xml.sax.Parser.parse()</em>
*/
public void parse (InputSource input) throws SAXException
{
- parse ();
+ parse ();
}
private void parse () throws SAXException
{
- try {
- walk ();
- } finally {
- if (isDocument)
- contentHandler.endDocument ();
- current = null;
- prefixStack.reset ();
- }
+ try {
+ walk ();
+ } finally {
+ if (isDocument)
+ contentHandler.endDocument ();
+ current = null;
+ prefixStack.reset ();
+ }
}
private boolean getIsL2 (Node node)
{
- DOMImplementation impl;
- Document doc;
-
- if (node instanceof Document)
- doc = (Document) node;
- else
- doc = node.getOwnerDocument ();
- if (doc == null)
- throw new RuntimeException ("? unowned node - L2 DTD ?");
- impl = doc.getImplementation ();
- return impl.hasFeature ("XML", "2.0");
+ DOMImplementation impl;
+ Document doc;
+
+ if (node instanceof Document)
+ doc = (Document) node;
+ else
+ doc = node.getOwnerDocument ();
+ if (doc == null)
+ throw new RuntimeException ("? unowned node - L2 DTD ?");
+ impl = doc.getImplementation ();
+ return impl.hasFeature ("XML", "2.0");
}
@@ -324,26 +324,26 @@ final public class DomParser implements XMLReader
public boolean getFeature (String name)
throws SAXNotRecognizedException, SAXNotSupportedException
{
- // basically, none are relevant -- they relate more to
- // parsing than to walking a "parse tree".
-
- // FIXME: DOM feature to expose interning?
-
- if ((FEATURES + "validation").equals (name)
- || (FEATURES + "external-general-entities")
- .equals (name)
- || (FEATURES + "external-parameter-entities")
- .equals (name)
- || (FEATURES + "string-interning").equals (name)
- )
- return false;
-
- if ((FEATURES + "namespaces").equals (name))
- return showNamespaces;
- if ((FEATURES + "namespace-prefixes").equals (name))
- return showXML1_0;
-
- throw new SAXNotRecognizedException (name);
+ // basically, none are relevant -- they relate more to
+ // parsing than to walking a "parse tree".
+
+ // FIXME: DOM feature to expose interning?
+
+ if ((FEATURES + "validation").equals (name)
+ || (FEATURES + "external-general-entities")
+ .equals (name)
+ || (FEATURES + "external-parameter-entities")
+ .equals (name)
+ || (FEATURES + "string-interning").equals (name)
+ )
+ return false;
+
+ if ((FEATURES + "namespaces").equals (name))
+ return showNamespaces;
+ if ((FEATURES + "namespace-prefixes").equals (name))
+ return showXML1_0;
+
+ throw new SAXNotRecognizedException (name);
}
/**
@@ -354,16 +354,16 @@ final public class DomParser implements XMLReader
public Object getProperty (String name)
throws SAXNotRecognizedException, SAXNotSupportedException
{
- if ((HANDLERS + "declaration-handler").equals (name))
- return declHandler == defaultHandler ? null : declHandler;
- if ((HANDLERS + "lexical-handler").equals (name))
- return lexicalHandler == defaultHandler ? null : lexicalHandler;
+ if ((HANDLERS + "declaration-handler").equals (name))
+ return declHandler == defaultHandler ? null : declHandler;
+ if ((HANDLERS + "lexical-handler").equals (name))
+ return lexicalHandler == defaultHandler ? null : lexicalHandler;
- if ((HANDLERS + "dom-node").equals (name))
- return current;
+ if ((HANDLERS + "dom-node").equals (name))
+ return current;
- // unknown properties
- throw new SAXNotRecognizedException (name);
+ // unknown properties
+ throw new SAXNotRecognizedException (name);
}
/**
@@ -373,30 +373,30 @@ final public class DomParser implements XMLReader
public void setFeature (String name, boolean state)
throws SAXNotRecognizedException, SAXNotSupportedException
{
- if (current != null)
- throw new IllegalStateException ("feature change midparse");
-
- boolean value = getFeature (name);
-
- if (value == state)
- return;
-
- if ((FEATURES + "namespaces").equals (name)) {
- if (!showXML1_0 && state == false)
- throw new SAXNotSupportedException ("Illegal namespace "
- + "processing configuration");
- showNamespaces = state;
- return;
- }
- if ((FEATURES + "namespace-prefixes").equals (name)) {
- if (!showNamespaces && state == false)
- throw new SAXNotSupportedException ("Illegal namespace "
- + "processing configuration");
- showXML1_0 = state;
- return;
- }
-
- throw new SAXNotSupportedException (name);
+ if (current != null)
+ throw new IllegalStateException ("feature change midparse");
+
+ boolean value = getFeature (name);
+
+ if (value == state)
+ return;
+
+ if ((FEATURES + "namespaces").equals (name)) {
+ if (!showXML1_0 && state == false)
+ throw new SAXNotSupportedException ("Illegal namespace "
+ + "processing configuration");
+ showNamespaces = state;
+ return;
+ }
+ if ((FEATURES + "namespace-prefixes").equals (name)) {
+ if (!showNamespaces && state == false)
+ throw new SAXNotSupportedException ("Illegal namespace "
+ + "processing configuration");
+ showXML1_0 = state;
+ return;
+ }
+
+ throw new SAXNotSupportedException (name);
}
/**
@@ -410,42 +410,42 @@ final public class DomParser implements XMLReader
public void setProperty (String name, Object state)
throws SAXNotRecognizedException, SAXNotSupportedException
{
- if ((HANDLERS + "declaration-handler").equals (name)) {
- if (!(state instanceof DeclHandler || state == null))
- throw new SAXNotSupportedException (name);
- declHandler = (DeclHandler) state;
- return;
- }
-
- if ((HANDLERS + "lexical-handler").equals (name)) {
- if (!(state instanceof LexicalHandler || state == null))
- throw new SAXNotSupportedException (name);
- lexicalHandler = (LexicalHandler) state;
- return;
- }
-
- if ((HANDLERS + "dom-node").equals (name)) {
- if (state == null || state instanceof Node) {
- if (current != null)
- throw new SAXNotSupportedException (
- "property is readonly during parse: " + name);
- setStart ((Node) state);
- return;
- }
- throw new SAXNotSupportedException ("not a DOM Node");
- }
-
- // unknown properties
- throw new SAXNotRecognizedException (name);
+ if ((HANDLERS + "declaration-handler").equals (name)) {
+ if (!(state instanceof DeclHandler || state == null))
+ throw new SAXNotSupportedException (name);
+ declHandler = (DeclHandler) state;
+ return;
+ }
+
+ if ((HANDLERS + "lexical-handler").equals (name)) {
+ if (!(state instanceof LexicalHandler || state == null))
+ throw new SAXNotSupportedException (name);
+ lexicalHandler = (LexicalHandler) state;
+ return;
+ }
+
+ if ((HANDLERS + "dom-node").equals (name)) {
+ if (state == null || state instanceof Node) {
+ if (current != null)
+ throw new SAXNotSupportedException (
+ "property is readonly during parse: " + name);
+ setStart ((Node) state);
+ return;
+ }
+ throw new SAXNotSupportedException ("not a DOM Node");
+ }
+
+ // unknown properties
+ throw new SAXNotRecognizedException (name);
}
private void setStart (Node property)
{
- start = property;
- if (start != null) {
- isL2 = getIsL2 (start);
- isDocument = (start instanceof Document);
- }
+ start = property;
+ if (start != null) {
+ isL2 = getIsL2 (start);
+ isDocument = (start instanceof Document);
+ }
}
//
@@ -454,351 +454,351 @@ final public class DomParser implements XMLReader
private void walk ()
throws SAXException
{
- int type;
- NamedNodeMap nodes;
- int length;
- AttributesImpl attrs = new AttributesImpl ();
- char chars [];
- String ns, local;
-
- synchronized (this) {
- if (current != null)
- throw new IllegalStateException ("already walking tree");
-
- // JVM guarantees assignments are atomic; so no other
- // thread could get this far till this walk's done.
- current = start;
- }
-
- for (;;) {
- type = current.getNodeType ();
-
- //
- // First, visit the current node, including any "start" calls
- //
- switch (type) {
-
- case Node.DOCUMENT_NODE:
- contentHandler.startDocument ();
- break;
-
- case Node.ELEMENT_NODE:
- nodes = current.getAttributes ();
- length = nodes.getLength ();
- prefixStack.pushContext ();
- for (int i = 0; i < length; i++) {
- Attr attr = (Attr) nodes.item (i);
- String name = attr.getNodeName ();
-
- if (showNamespaces && name.startsWith ("xmlns")) {
- String prefix;
- String uri;
-
- // NOTE: DOM L2 (CR2+ and REC) violate the
- // Namespaces REC, treat "xmlns" like a strange
- // attribute instead of a magic token
- if ("xmlns".equals (name))
- prefix = "";
- else
- prefix = name.substring (6);
- uri = attr.getNodeValue ();
-
- prefixStack.declarePrefix (prefix, uri);
- contentHandler.startPrefixMapping (prefix, uri);
-
- if (!showXML1_0)
- continue;
- }
-
- //
- // NOTE: DOM doesn't record the attribute type info
- // which SAX exposes; so this always reports CDATA.
- //
- // NOTE: SAX doesn't expose the isSpecified info which
- // DOM exposes; that's discarded here. Similarly with
- // the information DOM hides inside itself about what
- // the default values for an attribute are.
- //
- if (showNamespaces) {
- if (isL2) {
- if ((ns = attr.getNamespaceURI ()) == null)
- ns = "";
- // Note: SAX2 and DOM handle "local" names
- // differently
- if ((local = attr.getLocalName ()) == null)
- local = name;
- } else {
+ int type;
+ NamedNodeMap nodes;
+ int length;
+ AttributesImpl attrs = new AttributesImpl ();
+ char chars [];
+ String ns, local;
+
+ synchronized (this) {
+ if (current != null)
+ throw new IllegalStateException ("already walking tree");
+
+ // JVM guarantees assignments are atomic; so no other
+ // thread could get this far till this walk's done.
+ current = start;
+ }
+
+ for (;;) {
+ type = current.getNodeType ();
+
+ //
+ // First, visit the current node, including any "start" calls
+ //
+ switch (type) {
+
+ case Node.DOCUMENT_NODE:
+ contentHandler.startDocument ();
+ break;
+
+ case Node.ELEMENT_NODE:
+ nodes = current.getAttributes ();
+ length = nodes.getLength ();
+ prefixStack.pushContext ();
+ for (int i = 0; i < length; i++) {
+ Attr attr = (Attr) nodes.item (i);
+ String name = attr.getNodeName ();
+
+ if (showNamespaces && name.startsWith ("xmlns")) {
+ String prefix;
+ String uri;
+
+ // NOTE: DOM L2 (CR2+ and REC) violate the
+ // Namespaces REC, treat "xmlns" like a strange
+ // attribute instead of a magic token
+ if ("xmlns".equals (name))
+ prefix = "";
+ else
+ prefix = name.substring (6);
+ uri = attr.getNodeValue ();
+
+ prefixStack.declarePrefix (prefix, uri);
+ contentHandler.startPrefixMapping (prefix, uri);
+
+ if (!showXML1_0)
+ continue;
+ }
+
+ //
+ // NOTE: DOM doesn't record the attribute type info
+ // which SAX exposes; so this always reports CDATA.
+ //
+ // NOTE: SAX doesn't expose the isSpecified info which
+ // DOM exposes; that's discarded here. Similarly with
+ // the information DOM hides inside itself about what
+ // the default values for an attribute are.
+ //
+ if (showNamespaces) {
+ if (isL2) {
+ if ((ns = attr.getNamespaceURI ()) == null)
+ ns = "";
+ // Note: SAX2 and DOM handle "local" names
+ // differently
+ if ((local = attr.getLocalName ()) == null)
+ local = name;
+ } else {
// XXX
- throw new RuntimeException (
- "NYI, ns lookup when parsing L1 DOM");
- }
- } else
- ns = local = "";
- attrs.addAttribute (ns, local, name,
- "CDATA", attr.getNodeValue ());
- }
- if (showNamespaces) {
- if (isL2) {
- if ((ns = current.getNamespaceURI ()) == null)
- ns = "";
- // Note: SAX2 and DOM handle "local" names differently
- if ((local = current.getLocalName ()) == null)
- local = current.getNodeName ();
- } else {
+ throw new RuntimeException (
+ "NYI, ns lookup when parsing L1 DOM");
+ }
+ } else
+ ns = local = "";
+ attrs.addAttribute (ns, local, name,
+ "CDATA", attr.getNodeValue ());
+ }
+ if (showNamespaces) {
+ if (isL2) {
+ if ((ns = current.getNamespaceURI ()) == null)
+ ns = "";
+ // Note: SAX2 and DOM handle "local" names differently
+ if ((local = current.getLocalName ()) == null)
+ local = current.getNodeName ();
+ } else {
// XXX
- throw new RuntimeException (
- "NYI, ns lookup when parsing L1 DOM");
- }
- } else
- ns = local = "";
- contentHandler.startElement (ns, local,
- current.getNodeName (), attrs);
- if (length != 0)
- attrs.clear ();
- break;
-
- case Node.CDATA_SECTION_NODE:
- lexicalHandler.startCDATA ();
- chars = current.getNodeValue ().toCharArray ();
- contentHandler.characters (chars, 0, chars.length);
- lexicalHandler.endCDATA ();
- break;
-
- case Node.COMMENT_NODE:
- chars = current.getNodeValue ().toCharArray ();
- lexicalHandler.comment (chars, 0, chars.length);
- break;
-
- case Node.DOCUMENT_TYPE_NODE:
- {
- DocumentType doctype = (DocumentType) current;
-
- //
- // Only DOM L2 supports recreating even some DTDs in full.
- //
- if (isL2) {
- lexicalHandler.startDTD (doctype.getName (),
- doctype.getPublicId (),
- doctype.getSystemId ());
- } else
- lexicalHandler.startDTD (doctype.getName (),
- null, null);
-
- //
- // The only sure way to recreate is to provide both the
- // internal and external subsets. Otherwise, only part
- // of the job can be done ... because from the DTD, DOM
- // discards both the critical data, like the attribute and
- // element declarations, as well as the PIs and comments
- // that are used to hold their documentation.
- //
- // Even the entity and notation declarations that it can
- // expose can't be recorded without proprietary extensions.
- //
- // We construct a comment to tell what we know about how
- // (in)complete this particular really DTD is.
- //
- {
- String message;
- char buf [];
-
- //
- // Though DOM L2 lets the whole doctype be recreated,
- // SAX2 can't represent it (input or output).
- // So this will be the typical case.
- //
- if (isL2 && doctype.getInternalSubset () != null)
- message =
- " Full DTD known; can't be shown using SAX2. ";
-
- //
- // Otherwise, we'll concoct a partial DTD. If there's
- // any more data here at all, it was provided using a
- // (proprietary) extension to DOM.
- //
- else
- message =
- " This DTD was was recreated using incomplete DOM L2 records. ";
-
- buf = message.toCharArray ();
- lexicalHandler.comment (buf, 0, buf.length);
- }
-
- // report notations first
- nodes = doctype.getNotations ();
- length = nodes.getLength ();
- for (int i = 0; i < length; i++) {
- Notation notation = (Notation) nodes.item (i);
- dtdHandler.notationDecl (
- notation.getNodeName (),
- notation.getPublicId (),
- notation.getSystemId ());
- }
-
- // then parsed and unparsed external general entities
- nodes = doctype.getEntities ();
- length = nodes.getLength ();
- for (int i = 0; i < length; i++) {
- Entity entity = (Entity) nodes.item (i);
- String notation = entity.getNotationName ();
-
- if (notation != null)
- dtdHandler.unparsedEntityDecl (
- entity.getNodeName (),
- entity.getPublicId (),
- entity.getSystemId (),
- notation);
- else if (entity.getSystemId () != null)
- declHandler.externalEntityDecl (
- entity.getNodeName (),
- entity.getPublicId (),
- entity.getSystemId ());
-
- //
- // NOTE: DOM doesn't clearly provide internal
- // entity support; but in case someone tries to
- // fudge such support, we defend ourselves above.
- //
- // NOTE: DOM doesn't expose parameter entities
- // (thank you thank you thank you thank you)
- //
- }
-
- //
- // NOTE: DOM (levels 1 and 2) doesn't expose real
- // typing information (element or attribute decls),
- // as exposed by SAX2 declaration handlers.
- //
- lexicalHandler.endDTD ();
- }
- break;
-
- case Node.ENTITY_REFERENCE_NODE:
- // this isn't done except (a) in content, and
- // (b) not within a start tag (att value)
- lexicalHandler.startEntity (current.getNodeName ());
- break;
-
- case Node.PROCESSING_INSTRUCTION_NODE:
- contentHandler.processingInstruction (
- current.getNodeName (), current.getNodeValue ());
- break;
-
- case Node.TEXT_NODE:
- chars = current.getNodeValue ().toCharArray ();
- contentHandler.characters (chars, 0, chars.length);
- break;
-
- default:
- // e.g. fragments, entities, notations, attributes
- throw new SAXException ("Illegal DOM Node type in Document: "
- + current.getNodeType ());
- }
-
- //
- // Then, pick the next node to visit. If the next node isn't
- // a child, an "end" call may be needed before moving on.
- // If there's no next node, we're done.
- //
- Node next;
-
- switch (type) {
- case Node.DOCUMENT_NODE:
- case Node.ELEMENT_NODE:
- case Node.ENTITY_REFERENCE_NODE:
- //
- // For elements that can have children, visit those
- // children before any siblings (i.e. depth first)
- // and after visiting this node (i.e. preorder)
- //
- next = current.getFirstChild ();
- if (next != null) {
- current = next;
- break;
- }
- //
- // Else treat this like other childless nodes, but
- // handle this node's "end" immediately.
- //
- callEnd (current);
-
- // FALLTHROUGH
-
- case Node.CDATA_SECTION_NODE:
- case Node.COMMENT_NODE:
- case Node.DOCUMENT_TYPE_NODE:
- case Node.ENTITY_NODE:
- case Node.PROCESSING_INSTRUCTION_NODE:
- case Node.TEXT_NODE:
- //
- // Use next sibling, if there is one.
- // Else, climb up a level (calling "end")
- // until we find an ancestral sibling
- // or until we we climb off the top (FINISH)
- //
- for (;;) {
- if ((next = current.getNextSibling ()) != null)
- break;
- current = current.getParentNode ();
- if (current == null || current == start)
- return;
- callEnd (current);
- }
- current = next;
- break;
-
- default:
- throw new SAXException (
- "Illegal DOM Node type found: " + current.getNodeType ());
- }
- }
+ throw new RuntimeException (
+ "NYI, ns lookup when parsing L1 DOM");
+ }
+ } else
+ ns = local = "";
+ contentHandler.startElement (ns, local,
+ current.getNodeName (), attrs);
+ if (length != 0)
+ attrs.clear ();
+ break;
+
+ case Node.CDATA_SECTION_NODE:
+ lexicalHandler.startCDATA ();
+ chars = current.getNodeValue ().toCharArray ();
+ contentHandler.characters (chars, 0, chars.length);
+ lexicalHandler.endCDATA ();
+ break;
+
+ case Node.COMMENT_NODE:
+ chars = current.getNodeValue ().toCharArray ();
+ lexicalHandler.comment (chars, 0, chars.length);
+ break;
+
+ case Node.DOCUMENT_TYPE_NODE:
+ {
+ DocumentType doctype = (DocumentType) current;
+
+ //
+ // Only DOM L2 supports recreating even some DTDs in full.
+ //
+ if (isL2) {
+ lexicalHandler.startDTD (doctype.getName (),
+ doctype.getPublicId (),
+ doctype.getSystemId ());
+ } else
+ lexicalHandler.startDTD (doctype.getName (),
+ null, null);
+
+ //
+ // The only sure way to recreate is to provide both the
+ // internal and external subsets. Otherwise, only part
+ // of the job can be done ... because from the DTD, DOM
+ // discards both the critical data, like the attribute and
+ // element declarations, as well as the PIs and comments
+ // that are used to hold their documentation.
+ //
+ // Even the entity and notation declarations that it can
+ // expose can't be recorded without proprietary extensions.
+ //
+ // We construct a comment to tell what we know about how
+ // (in)complete this particular really DTD is.
+ //
+ {
+ String message;
+ char buf [];
+
+ //
+ // Though DOM L2 lets the whole doctype be recreated,
+ // SAX2 can't represent it (input or output).
+ // So this will be the typical case.
+ //
+ if (isL2 && doctype.getInternalSubset () != null)
+ message =
+ " Full DTD known; can't be shown using SAX2. ";
+
+ //
+ // Otherwise, we'll concoct a partial DTD. If there's
+ // any more data here at all, it was provided using a
+ // (proprietary) extension to DOM.
+ //
+ else
+ message =
+ " This DTD was was recreated using incomplete DOM L2 records. ";
+
+ buf = message.toCharArray ();
+ lexicalHandler.comment (buf, 0, buf.length);
+ }
+
+ // report notations first
+ nodes = doctype.getNotations ();
+ length = nodes.getLength ();
+ for (int i = 0; i < length; i++) {
+ Notation notation = (Notation) nodes.item (i);
+ dtdHandler.notationDecl (
+ notation.getNodeName (),
+ notation.getPublicId (),
+ notation.getSystemId ());
+ }
+
+ // then parsed and unparsed external general entities
+ nodes = doctype.getEntities ();
+ length = nodes.getLength ();
+ for (int i = 0; i < length; i++) {
+ Entity entity = (Entity) nodes.item (i);
+ String notation = entity.getNotationName ();
+
+ if (notation != null)
+ dtdHandler.unparsedEntityDecl (
+ entity.getNodeName (),
+ entity.getPublicId (),
+ entity.getSystemId (),
+ notation);
+ else if (entity.getSystemId () != null)
+ declHandler.externalEntityDecl (
+ entity.getNodeName (),
+ entity.getPublicId (),
+ entity.getSystemId ());
+
+ //
+ // NOTE: DOM doesn't clearly provide internal
+ // entity support; but in case someone tries to
+ // fudge such support, we defend ourselves above.
+ //
+ // NOTE: DOM doesn't expose parameter entities
+ // (thank you thank you thank you thank you)
+ //
+ }
+
+ //
+ // NOTE: DOM (levels 1 and 2) doesn't expose real
+ // typing information (element or attribute decls),
+ // as exposed by SAX2 declaration handlers.
+ //
+ lexicalHandler.endDTD ();
+ }
+ break;
+
+ case Node.ENTITY_REFERENCE_NODE:
+ // this isn't done except (a) in content, and
+ // (b) not within a start tag (att value)
+ lexicalHandler.startEntity (current.getNodeName ());
+ break;
+
+ case Node.PROCESSING_INSTRUCTION_NODE:
+ contentHandler.processingInstruction (
+ current.getNodeName (), current.getNodeValue ());
+ break;
+
+ case Node.TEXT_NODE:
+ chars = current.getNodeValue ().toCharArray ();
+ contentHandler.characters (chars, 0, chars.length);
+ break;
+
+ default:
+ // e.g. fragments, entities, notations, attributes
+ throw new SAXException ("Illegal DOM Node type in Document: "
+ + current.getNodeType ());
+ }
+
+ //
+ // Then, pick the next node to visit. If the next node isn't
+ // a child, an "end" call may be needed before moving on.
+ // If there's no next node, we're done.
+ //
+ Node next;
+
+ switch (type) {
+ case Node.DOCUMENT_NODE:
+ case Node.ELEMENT_NODE:
+ case Node.ENTITY_REFERENCE_NODE:
+ //
+ // For elements that can have children, visit those
+ // children before any siblings (i.e. depth first)
+ // and after visiting this node (i.e. preorder)
+ //
+ next = current.getFirstChild ();
+ if (next != null) {
+ current = next;
+ break;
+ }
+ //
+ // Else treat this like other childless nodes, but
+ // handle this node's "end" immediately.
+ //
+ callEnd (current);
+
+ // FALLTHROUGH
+
+ case Node.CDATA_SECTION_NODE:
+ case Node.COMMENT_NODE:
+ case Node.DOCUMENT_TYPE_NODE:
+ case Node.ENTITY_NODE:
+ case Node.PROCESSING_INSTRUCTION_NODE:
+ case Node.TEXT_NODE:
+ //
+ // Use next sibling, if there is one.
+ // Else, climb up a level (calling "end")
+ // until we find an ancestral sibling
+ // or until we we climb off the top (FINISH)
+ //
+ for (;;) {
+ if ((next = current.getNextSibling ()) != null)
+ break;
+ current = current.getParentNode ();
+ if (current == null || current == start)
+ return;
+ callEnd (current);
+ }
+ current = next;
+ break;
+
+ default:
+ throw new SAXException (
+ "Illegal DOM Node type found: " + current.getNodeType ());
+ }
+ }
}
private void callEnd (Node node) throws SAXException
{
- switch (node.getNodeType ()) {
- // only these three container types may ever be found
- // directly inside a Document.
- case Node.DOCUMENT_NODE:
- // for SAX conformance, endDocument must always
- // be called ... it's done in a "finally" clause)
- return;
-
- case Node.ELEMENT_NODE:
- if (showNamespaces) {
- if (isL2)
- contentHandler.endElement (
- node.getNamespaceURI (),
- node.getLocalName (),
- node.getNodeName ());
- else
+ switch (node.getNodeType ()) {
+ // only these three container types may ever be found
+ // directly inside a Document.
+ case Node.DOCUMENT_NODE:
+ // for SAX conformance, endDocument must always
+ // be called ... it's done in a "finally" clause)
+ return;
+
+ case Node.ELEMENT_NODE:
+ if (showNamespaces) {
+ if (isL2)
+ contentHandler.endElement (
+ node.getNamespaceURI (),
+ node.getLocalName (),
+ node.getNodeName ());
+ else
// XXX
- throw new RuntimeException (
- "NYI, ns lookup when parsing L1 DOM");
- for (Enumeration e = prefixStack.getDeclaredPrefixes ();
- e.hasMoreElements ();
- ) {
- contentHandler.endPrefixMapping ((String) e.nextElement ());
- }
- } else
- contentHandler.endElement ("", "", node.getNodeName ());
- prefixStack.popContext ();
- return;
-
- case Node.ENTITY_REFERENCE_NODE:
- // see above -- in content, outside start tags.
- lexicalHandler.endEntity (node.getNodeName ());
- return;
-
- // these can be given at the top level
- case Node.DOCUMENT_FRAGMENT_NODE:
- case Node.ATTRIBUTE_NODE:
- return;
-
- default:
- throw new SAXException (
- "Illegal DOM container type found: "
- + current.getNodeType ());
- }
+ throw new RuntimeException (
+ "NYI, ns lookup when parsing L1 DOM");
+ for (Enumeration e = prefixStack.getDeclaredPrefixes ();
+ e.hasMoreElements ();
+ ) {
+ contentHandler.endPrefixMapping ((String) e.nextElement ());
+ }
+ } else
+ contentHandler.endElement ("", "", node.getNodeName ());
+ prefixStack.popContext ();
+ return;
+
+ case Node.ENTITY_REFERENCE_NODE:
+ // see above -- in content, outside start tags.
+ lexicalHandler.endEntity (node.getNodeName ());
+ return;
+
+ // these can be given at the top level
+ case Node.DOCUMENT_FRAGMENT_NODE:
+ case Node.ATTRIBUTE_NODE:
+ return;
+
+ default:
+ throw new SAXException (
+ "Illegal DOM container type found: "
+ + current.getNodeType ());
+ }
}
}
diff --git a/gnu/xml/util/Resolver.java b/gnu/xml/util/Resolver.java
index 02c4693ae..b16f9617f 100644
--- a/gnu/xml/util/Resolver.java
+++ b/gnu/xml/util/Resolver.java
@@ -1,4 +1,4 @@
-/* Resolver.java --
+/* Resolver.java --
Copyright (C) 1999,2000,2001 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -60,46 +60,46 @@ public class Resolver implements EntityResolver, Cloneable
* so that it uses the mappings in a specified directory.
*
* @param mappings Array of string pairs, where the first member
- * of each pair is a PUBLIC identifier and the second is the
- * name of a file, relative to the specified directory.
+ * of each pair is a PUBLIC identifier and the second is the
+ * name of a file, relative to the specified directory.
* @param directory File holding the specified files.
*/
public static void addDirectoryMapping (
- Dictionary table,
- String mappings [][],
- File directory
+ Dictionary table,
+ String mappings [][],
+ File directory
) throws IOException
{
- for (int i = 0; i < mappings.length; i++) {
- File file = new File (directory, mappings [i][1]);
- String temp;
+ for (int i = 0; i < mappings.length; i++) {
+ File file = new File (directory, mappings [i][1]);
+ String temp;
- if (!file.exists ()) // ?? log a warning ??
- continue;
+ if (!file.exists ()) // ?? log a warning ??
+ continue;
- temp = fileToURL (file);
- table.put (mappings [i][0], temp);
- }
+ temp = fileToURL (file);
+ table.put (mappings [i][0], temp);
+ }
}
- // FIXME: these *URL routines don't quite belong here, except
- // that they're all in the same spirit of making it easy to
- // use local filesystem URIs with XML parsers.
+ // FIXME: these *URL routines don't quite belong here, except
+ // that they're all in the same spirit of making it easy to
+ // use local filesystem URIs with XML parsers.
/**
* Provides the URL for a named file, without relying on the JDK 1.2
* {@link java.io.File#toURL File.toURL}() utility method.
*
* @param filename the file name to convert. Relative file names
- * are resolved the way the JVM resolves them (current to the
- * process-global current working directory).
+ * are resolved the way the JVM resolves them (current to the
+ * process-global current working directory).
*
* @exception IOException if the file does not exist
*/
public static String fileNameToURL (String filename)
throws IOException
{
- return fileToURL (new File (filename));
+ return fileToURL (new File (filename));
}
/**
@@ -107,40 +107,40 @@ public class Resolver implements EntityResolver, Cloneable
* {@link java.io.File#toURL File.toURL}() utility method.
*
* @param f the file to convert. Relative file names
- * are resolved the way the JVM resolves them (current to the
- * process-global current working directory).
+ * are resolved the way the JVM resolves them (current to the
+ * process-global current working directory).
*
* @exception IOException if the file does not exist
*/
public static String fileToURL (File f)
throws IOException
{
- String temp;
-
- // NOTE: the javax.xml.parsers.DocumentBuilder and
- // javax.xml.transform.stream.StreamSource versions
- // of this don't have this test. Some JVM versions
- // don't report this error sanely through URL code.
- if (!f.exists ())
- throw new IOException ("no such file: " + f.getName ());
-
- // FIXME: getAbsolutePath() seems buggy; I'm seeing components
- // like "/foo/../" which are clearly not "absolute"
- // and should have been resolved with the filesystem.
-
- // Substituting "/" would be wrong, "foo" may have been
- // symlinked ... the URL code will make that change
- // later, so that things can get _really_ broken!
-
- temp = f.getAbsolutePath ();
-
- if (File.separatorChar != '/')
- temp = temp.replace (File.separatorChar, '/');
- if (!temp.startsWith ("/"))
- temp = "/" + temp;
- if (!temp.endsWith ("/") && f.isDirectory ())
- temp = temp + "/";
- return "file:" + temp;
+ String temp;
+
+ // NOTE: the javax.xml.parsers.DocumentBuilder and
+ // javax.xml.transform.stream.StreamSource versions
+ // of this don't have this test. Some JVM versions
+ // don't report this error sanely through URL code.
+ if (!f.exists ())
+ throw new IOException ("no such file: " + f.getName ());
+
+ // FIXME: getAbsolutePath() seems buggy; I'm seeing components
+ // like "/foo/../" which are clearly not "absolute"
+ // and should have been resolved with the filesystem.
+
+ // Substituting "/" would be wrong, "foo" may have been
+ // symlinked ... the URL code will make that change
+ // later, so that things can get _really_ broken!
+
+ temp = f.getAbsolutePath ();
+
+ if (File.separatorChar != '/')
+ temp = temp.replace (File.separatorChar, '/');
+ if (!temp.startsWith ("/"))
+ temp = "/" + temp;
+ if (!temp.endsWith ("/") && f.isDirectory ())
+ temp = temp + "/";
+ return "file:" + temp;
}
@@ -150,34 +150,34 @@ public class Resolver implements EntityResolver, Cloneable
* malformed.
*
* @param fileOrURL If this is the name of a file which exists,
- * then its URL is returned. Otherwise the argument is returned.
+ * then its URL is returned. Otherwise the argument is returned.
*/
public static String getURL (String fileOrURL)
{
- try {
- return fileNameToURL (fileOrURL);
- } catch (Exception e) {
- return fileOrURL;
- }
+ try {
+ return fileNameToURL (fileOrURL);
+ } catch (Exception e) {
+ return fileOrURL;
+ }
}
// note: cloneable, this is just copied; unguarded against mods
- private Dictionary pubidMapping;
+ private Dictionary pubidMapping;
/**
* Constructs a resolver which understands how to map PUBLIC identifiers
* to other URIs, typically for local copies of standard DTD components.
- *
+ *
* @param dict maps PUBLIC identifiers to URIs. This is not
- * copied; subsequent modifications will be reported through the
- * resolution operations.
+ * copied; subsequent modifications will be reported through the
+ * resolution operations.
*/
public Resolver (Dictionary dict)
- { pubidMapping = dict; }
+ { pubidMapping = dict; }
+
-
// FIXME: want notion of a "system default" resolver, presumably
// loaded with all sorts of useful stuff. At the same time need
// a notion of resolver chaining (failure --> next) so that subsystems
@@ -191,48 +191,48 @@ public class Resolver implements EntityResolver, Cloneable
* content typing.
*
* @param contentType the MIME content type that will be parsed; must
- * not be null.
+ * not be null.
* @return the appropriate encoding, or null if the content type is
- * not text and there's no <code>charset=...</code> attribute
+ * not text and there's no <code>charset=...</code> attribute
*/
static public String getEncoding (String contentType)
{
- // currently a dumb parsing algorithm that works "mostly" and handles
- // ..anything...charset=ABC
- // ..anything...charset=ABC;otherAttr=DEF
- // ..anything...charset=ABC (comment);otherAttr=DEF
- // ..anything...charset= "ABC" (comment);otherAttr=DEF
-
- int temp;
- String encoding;
- String defValue = null;
-
- if (contentType.startsWith ("text/"))
- defValue = contentType.startsWith ("text/html")
- ? "ISO-8859-1" : "US-ASCII";
-
- // Assumes 'charset' is only an attribute name, not part
- // of a value, comment, or other attribute name
- // ALSO assumes no escaped values like "\;" or "\)"
- if ((temp = contentType.indexOf ("charset")) != -1) {
- // strip out everything up to '=' ...
- temp = contentType.indexOf ('=', temp);
- if (temp == -1)
- return defValue;
- encoding = contentType.substring (temp + 1);
- // ... and any subsequent attributes
- if ((temp = encoding.indexOf (';')) != -1)
- encoding = encoding.substring (0, temp);
- // ... and any comments after value
- if ((temp = encoding.indexOf ('(')) != -1)
- encoding = encoding.substring (0, temp);
- // ... then whitespace, and any (double) quotes
- encoding = encoding.trim ();
- if (encoding.charAt (0) == '"')
- encoding = encoding.substring (1, encoding.length () - 1);
- } else
- encoding = defValue;
- return encoding;
+ // currently a dumb parsing algorithm that works "mostly" and handles
+ // ..anything...charset=ABC
+ // ..anything...charset=ABC;otherAttr=DEF
+ // ..anything...charset=ABC (comment);otherAttr=DEF
+ // ..anything...charset= "ABC" (comment);otherAttr=DEF
+
+ int temp;
+ String encoding;
+ String defValue = null;
+
+ if (contentType.startsWith ("text/"))
+ defValue = contentType.startsWith ("text/html")
+ ? "ISO-8859-1" : "US-ASCII";
+
+ // Assumes 'charset' is only an attribute name, not part
+ // of a value, comment, or other attribute name
+ // ALSO assumes no escaped values like "\;" or "\)"
+ if ((temp = contentType.indexOf ("charset")) != -1) {
+ // strip out everything up to '=' ...
+ temp = contentType.indexOf ('=', temp);
+ if (temp == -1)
+ return defValue;
+ encoding = contentType.substring (temp + 1);
+ // ... and any subsequent attributes
+ if ((temp = encoding.indexOf (';')) != -1)
+ encoding = encoding.substring (0, temp);
+ // ... and any comments after value
+ if ((temp = encoding.indexOf ('(')) != -1)
+ encoding = encoding.substring (0, temp);
+ // ... then whitespace, and any (double) quotes
+ encoding = encoding.trim ();
+ if (encoding.charAt (0) == '"')
+ encoding = encoding.substring (1, encoding.length () - 1);
+ } else
+ encoding = defValue;
+ return encoding;
}
@@ -243,21 +243,21 @@ public class Resolver implements EntityResolver, Cloneable
public InputSource resolveEntity (String publicId, String systemId)
throws IOException, SAXException
{
- InputSource retval = null;
- String uri;
+ InputSource retval = null;
+ String uri;
- if (publicId != null
- && ((uri = (String) pubidMapping.get (publicId)) != null)) {
- retval = new InputSource (uri);
- retval.setPublicId (publicId);
- }
+ if (publicId != null
+ && ((uri = (String) pubidMapping.get (publicId)) != null)) {
+ retval = new InputSource (uri);
+ retval.setPublicId (publicId);
+ }
- // Could do URN resolution here
+ // Could do URN resolution here
- // URL resolution always done by parser
+ // URL resolution always done by parser
- // FIXME: chain to "next" resolver
+ // FIXME: chain to "next" resolver
- return retval;
+ return retval;
}
}
diff --git a/gnu/xml/util/SAXNullTransformerFactory.java b/gnu/xml/util/SAXNullTransformerFactory.java
index 81ad82312..3a97678e0 100644
--- a/gnu/xml/util/SAXNullTransformerFactory.java
+++ b/gnu/xml/util/SAXNullTransformerFactory.java
@@ -1,4 +1,4 @@
-/* SAXNullTransformerFactory.java --
+/* SAXNullTransformerFactory.java --
Copyright (C) 2001 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -95,17 +95,17 @@ import org.xml.sax.helpers.LocatorImpl;
*/
public class SAXNullTransformerFactory extends SAXTransformerFactory
{
-
- private ErrorListener errListener;
- private URIResolver uriResolver;
-
+
+ private ErrorListener errListener;
+ private URIResolver uriResolver;
+
/** Default constructor */
public SAXNullTransformerFactory () { }
-
+
//
// only has stuff that makes sense with null transforms
//
-
+
/**
* Returns true if the requested feature is supported.
* All three kinds of input and output are accepted:
@@ -172,14 +172,14 @@ public class SAXNullTransformerFactory extends SAXTransformerFactory
public TransformerHandler newTransformerHandler ()
throws TransformerConfigurationException
{
- NullTransformer transformer = new NullTransformer ();
+ NullTransformer transformer = new NullTransformer ();
return transformer.handler;
}
//
// Stuff that depends on XSLT support, which we don't provide
//
- private static final String noXSLT = "No XSLT support";
+ private static final String noXSLT = "No XSLT support";
/** Throws an exception (XSLT is not supported). */
public Transformer newTransformer (Source stylesheet)
@@ -271,15 +271,15 @@ public class SAXNullTransformerFactory extends SAXTransformerFactory
super (DomDocument.class);
setHandler (new DomHandler (this, result));
}
-
+
}
static class DomHandler
extends Consumer.Backdoor
{
-
- private DOMResult result;
-
+
+ private DOMResult result;
+
DomHandler (DomConsumer c, DOMResult r)
throws SAXException
{
@@ -294,33 +294,33 @@ public class SAXNullTransformerFactory extends SAXTransformerFactory
super.endDocument ();
result.setNode (getDocument ());
}
-
+
}
private static OutputStream getOutputStream (String uri)
throws IOException
{
- // JDK stupidity: file "protocol does not support output" ...
+ // JDK stupidity: file "protocol does not support output" ...
if (uri.startsWith ("file:"))
return new FileOutputStream (uri.substring (5));
-
+
// Otherwise ...
- URL url = new URL (uri);
- URLConnection conn = url.openConnection ();
-
+ URL url = new URL (uri);
+ URLConnection conn = url.openConnection ();
+
conn.setDoOutput (true);
return conn.getOutputStream ();
}
-
+
static class NullHandler
extends EventFilter
implements TransformerHandler
{
-
- private String systemId;
- private Transformer transformer;
-
+
+ private String systemId;
+ private Transformer transformer;
+
NullHandler (Transformer t)
{
transformer = t;
@@ -345,24 +345,24 @@ public class SAXNullTransformerFactory extends SAXTransformerFactory
{
if (result.getSystemId () != null)
systemId = result.getSystemId ();
-
+
try
{
-
+
// output to partial SAX event stream?
if (result instanceof SAXResult)
{
- SAXResult r = (SAXResult) result;
-
+ SAXResult r = (SAXResult) result;
+
setContentHandler (r.getHandler ());
setProperty (LEXICAL_HANDLER, r.getLexicalHandler ());
// DTD info is filtered out by javax.transform
-
+
// output to DOM tree?
}
else if (result instanceof DOMResult)
{
- DomTerminus out = new DomTerminus ((DOMResult) result);
+ DomTerminus out = new DomTerminus ((DOMResult) result);
setContentHandler (out.getContentHandler ());
setProperty (LEXICAL_HANDLER,
@@ -378,8 +378,8 @@ public class SAXNullTransformerFactory extends SAXTransformerFactory
}
else if (result instanceof StreamResult)
{
- StreamResult r = (StreamResult) result;
- XMLWriter out;
+ StreamResult r = (StreamResult) result;
+ XMLWriter out;
// FIXME: when do output properties take effect?
// encoding, standalone decl, xml/xhtml/... ...
@@ -416,7 +416,7 @@ public class SAXNullTransformerFactory extends SAXTransformerFactory
setDTDHandler (out);
setProperty (DECL_HANDLER, out);
}
-
+
}
catch (SAXException e)
{
@@ -434,7 +434,7 @@ public class SAXNullTransformerFactory extends SAXTransformerFactory
extends LocatorImpl
implements SourceLocator
{
-
+
LocatorAdapter (SAXParseException e)
{
setSystemId (e.getSystemId ());
@@ -442,21 +442,21 @@ public class SAXNullTransformerFactory extends SAXTransformerFactory
setLineNumber (e.getLineNumber ());
setColumnNumber (e.getColumnNumber ());
}
-
+
}
// another interface that adds no value
static class ListenerAdapter
implements ErrorHandler
{
-
- NullTransformer transformer;
-
+
+ NullTransformer transformer;
+
ListenerAdapter (NullTransformer t)
{
transformer = t;
}
-
+
private TransformerException map (SAXParseException e)
{
return new TransformerException (
@@ -514,36 +514,36 @@ public class SAXNullTransformerFactory extends SAXTransformerFactory
static class NullTransformer
extends Transformer
{
-
- private URIResolver uriResolver;
- private Properties props = new Properties ();
- private Hashtable params = new Hashtable (7);
-
- ErrorListener errListener = null;
- TransformerException ex = null;
- NullHandler handler;
-
+
+ private URIResolver uriResolver;
+ private Properties props = new Properties ();
+ private Hashtable params = new Hashtable (7);
+
+ ErrorListener errListener = null;
+ TransformerException ex = null;
+ NullHandler handler;
+
NullTransformer ()
{
super ();
handler = new NullHandler (this);
}
-
+
public ErrorListener getErrorListener ()
{
return errListener;
}
-
+
public void setErrorListener (ErrorListener e)
{
errListener = e;
}
-
+
public URIResolver getURIResolver ()
{
return uriResolver;
}
-
+
public void setURIResolver (URIResolver u)
{
uriResolver = u;
@@ -553,7 +553,7 @@ public class SAXNullTransformerFactory extends SAXTransformerFactory
{
props = (Properties) p.clone ();
}
-
+
public Properties getOutputProperties ()
{
return (Properties) props.clone ();
@@ -563,7 +563,7 @@ public class SAXNullTransformerFactory extends SAXTransformerFactory
{
props.setProperty (name, value);
}
-
+
public String getOutputProperty (String name)
{
return props.getProperty (name);
@@ -573,12 +573,12 @@ public class SAXNullTransformerFactory extends SAXTransformerFactory
{
params.clear ();
}
-
+
public void setParameter (String name, Object value)
{
props.put (name, value);
}
-
+
public Object getParameter (String name)
{
return props.get (name);
@@ -589,29 +589,29 @@ public class SAXNullTransformerFactory extends SAXTransformerFactory
{
try
{
- XMLReader producer;
- InputSource input;
-
+ XMLReader producer;
+ InputSource input;
+
// Input from DOM?
if (in instanceof DOMSource)
{
- DOMSource source = (DOMSource) in;
-
+ DOMSource source = (DOMSource) in;
+
if (source.getNode () == null)
throw new IllegalArgumentException ("no DOM node");
producer = new DomParser (source.getNode ());
input = null;
-
+
// Input from SAX?
}
else if (in instanceof SAXSource)
{
- SAXSource source = (SAXSource) in;
-
+ SAXSource source = (SAXSource) in;
+
producer = source.getXMLReader ();
if (producer == null)
producer = XMLReaderFactory.createXMLReader ();
-
+
input = source.getInputSource ();
if (input == null)
{
@@ -621,7 +621,7 @@ public class SAXNullTransformerFactory extends SAXTransformerFactory
throw new IllegalArgumentException (
"missing SAX input");
}
-
+
// Input from a stream or something?
}
else
@@ -631,7 +631,7 @@ public class SAXNullTransformerFactory extends SAXTransformerFactory
if (input == null)
throw new IllegalArgumentException ("missing input");
}
-
+
// preserve original namespace prefixes
try
{
@@ -644,19 +644,19 @@ public class SAXNullTransformerFactory extends SAXTransformerFactory
/* ignore */
// FIXME if we couldn't, "NsFix" stage before the output ..
}
-
+
// arrange the output
handler.setResult (out);
EventFilter.bind (producer, handler);
-
+
// then parse ... single element pipeline
producer.parse (input);
-
+
}
catch (IOException e)
{
throw new TransformerException ("transform failed", e);
-
+
}
catch (SAXException e)
{
@@ -664,7 +664,7 @@ public class SAXNullTransformerFactory extends SAXTransformerFactory
throw ex;
else
throw new TransformerException ("transform failed", e);
-
+
}
finally
{
diff --git a/gnu/xml/util/XCat.java b/gnu/xml/util/XCat.java
index 93127f442..ea23ad682 100644
--- a/gnu/xml/util/XCat.java
+++ b/gnu/xml/util/XCat.java
@@ -1,4 +1,4 @@
-/* XCat.java --
+/* XCat.java --
Copyright (C) 2001 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -76,15 +76,15 @@ import org.xml.sax.helpers.XMLReaderFactory;
* <p> This has three main operational modes. The primary intended mode is
* to create a resolver, then preloading it with one or more site-standard
* catalogs before using it with one or more SAX parsers: <pre>
- * XCat catalog = new XCat ();
- * catalog.setErrorHandler (diagnosticErrorHandler);
- * catalog.loadCatalog ("file:/local/catalogs/catalog.cat");
- * catalog.loadCatalog ("http://shared/catalog.cat");
- * ...
- * catalog.disableLoading ();
- * parser1.setEntityResolver (catalog);
- * parser2.setEntityResolver (catalog);
- * ...</pre>
+ * XCat catalog = new XCat ();
+ * catalog.setErrorHandler (diagnosticErrorHandler);
+ * catalog.loadCatalog ("file:/local/catalogs/catalog.cat");
+ * catalog.loadCatalog ("http://shared/catalog.cat");
+ * ...
+ * catalog.disableLoading ();
+ * parser1.setEntityResolver (catalog);
+ * parser2.setEntityResolver (catalog);
+ * ...</pre>
*
* <p>A second mode is to arrange that your application uses instances of
* this class as its entity resolver, and automatically loads catalogs
@@ -127,25 +127,25 @@ import org.xml.sax.helpers.XMLReaderFactory;
*/
public class XCat implements EntityResolver2
{
- private Catalog catalogs [];
- private boolean usingPublic = true;
- private boolean loadingPermitted = true;
- private boolean unified = true;
- private String parserClass;
- private ErrorHandler errorHandler;
+ private Catalog catalogs [];
+ private boolean usingPublic = true;
+ private boolean loadingPermitted = true;
+ private boolean unified = true;
+ private String parserClass;
+ private ErrorHandler errorHandler;
- // private EntityResolver next; // chain to next if we fail...
+ // private EntityResolver next; // chain to next if we fail...
//
// NOTE: This is a straightforward implementation, and if
// there are lots of "nextCatalog" or "delegate*" entries
// in use, two tweaks would be worth considering:
//
- // - Centralize some sort of cache (key by URI) for individual
- // resolvers. That'd avoid multiple copies of a given catalog.
+ // - Centralize some sort of cache (key by URI) for individual
+ // resolvers. That'd avoid multiple copies of a given catalog.
//
- // - Have resolution track what catalogs (+modes) have been
- // searched. This would support loop detection.
+ // - Have resolution track what catalogs (+modes) have been
+ // searched. This would support loop detection.
//
@@ -170,7 +170,7 @@ public class XCat implements EntityResolver2
*/
public XCat (String uri)
throws SAXException, IOException
- { loadCatalog (uri); }
+ { loadCatalog (uri); }
/**
@@ -188,7 +188,7 @@ public class XCat implements EntityResolver2
*
* <p>Note that catalogs referenced by this one will not be loaded
* at this time. Catalogs referenced through <em>nextCatalog</em>
- * or <em>delegate*</em> elements are normally loaded only if needed.
+ * or <em>delegate*</em> elements are normally loaded only if needed.
*
* @see #setErrorHandler
* @see #setParserClass
@@ -197,44 +197,44 @@ public class XCat implements EntityResolver2
* @param uri absolute URI for the catalog file.
*
* @exception IOException As thrown by the parser, typically to
- * indicate problems reading data from that URI.
+ * indicate problems reading data from that URI.
* @exception SAXException As thrown by the parser, typically to
- * indicate problems parsing data from that URI. It may also
- * be thrown if the parser doesn't support necessary handlers.
+ * indicate problems parsing data from that URI. It may also
+ * be thrown if the parser doesn't support necessary handlers.
* @exception IllegalStateException When attempting to load a
- * catalog after loading has been {@link #disableLoading disabled},
- * such as after any entity or URI lookup has been performed.
+ * catalog after loading has been {@link #disableLoading disabled},
+ * such as after any entity or URI lookup has been performed.
*/
public synchronized void loadCatalog (String uri)
throws SAXException, IOException
{
- Catalog catalog;
- int index = -1;
-
- if (!loadingPermitted)
- throw new IllegalStateException ();
-
- uri = normalizeURI (uri);
- if (catalogs != null) {
- // maybe just reload
- for (index = 0; index < catalogs.length; index++)
- if (uri.equals (catalogs [index].catalogURI))
- break;
- }
- catalog = loadCatalog (parserClass, errorHandler, uri, unified);
-
- // add to list of catalogs
- if (catalogs == null) {
- index = 0;
- catalogs = new Catalog [1];
- } else if (index == catalogs.length) {
- Catalog tmp [];
-
- tmp = new Catalog [index + 1];
- System.arraycopy (catalogs, 0, tmp, 0, index);
- catalogs = tmp;
- }
- catalogs [index] = catalog;
+ Catalog catalog;
+ int index = -1;
+
+ if (!loadingPermitted)
+ throw new IllegalStateException ();
+
+ uri = normalizeURI (uri);
+ if (catalogs != null) {
+ // maybe just reload
+ for (index = 0; index < catalogs.length; index++)
+ if (uri.equals (catalogs [index].catalogURI))
+ break;
+ }
+ catalog = loadCatalog (parserClass, errorHandler, uri, unified);
+
+ // add to list of catalogs
+ if (catalogs == null) {
+ index = 0;
+ catalogs = new Catalog [1];
+ } else if (index == catalogs.length) {
+ Catalog tmp [];
+
+ tmp = new Catalog [index + 1];
+ System.arraycopy (catalogs, 0, tmp, 0, index);
+ catalogs = tmp;
+ }
+ catalogs [index] = catalog;
}
@@ -251,38 +251,38 @@ public class XCat implements EntityResolver2
* @param publicId Either a normalized public ID, or null.
* @param baseURI Absolute base URI associated with systemId.
* @param systemId URI found in entity declaration (may be
- * relative to baseURI).
+ * relative to baseURI).
*
* @return Input source for accessing the external entity, or null
- * if no mapping was found. The input source may have opened
- * the stream, and will have a fully resolved URI.
+ * if no mapping was found. The input source may have opened
+ * the stream, and will have a fully resolved URI.
*
* @see #getExternalSubset
*/
public InputSource resolveEntity (
- String name, // UNUSED ... systemId is always non-null
- String publicId,
- String baseURI, // UNUSED ... it just lets sysId be relative
- String systemId
+ String name, // UNUSED ... systemId is always non-null
+ String publicId,
+ String baseURI, // UNUSED ... it just lets sysId be relative
+ String systemId
) throws SAXException, IOException
{
- if (loadingPermitted)
- disableLoading ();
-
- try {
- // steps as found in OASIS XML catalog spec 7.1.2
- // steps 1, 8 involve looping over the list of catalogs
- for (int i = 0; i < catalogs.length; i++) {
- InputSource retval;
- retval = catalogs [i].resolve (usingPublic, publicId, systemId);
- if (retval != null)
- return retval;
- }
- } catch (DoneDelegation x) {
- // done!
- }
- // step 9 involves returning "no match"
- return null;
+ if (loadingPermitted)
+ disableLoading ();
+
+ try {
+ // steps as found in OASIS XML catalog spec 7.1.2
+ // steps 1, 8 involve looping over the list of catalogs
+ for (int i = 0; i < catalogs.length; i++) {
+ InputSource retval;
+ retval = catalogs [i].resolve (usingPublic, publicId, systemId);
+ if (retval != null)
+ return retval;
+ }
+ } catch (DoneDelegation x) {
+ // done!
+ }
+ // step 9 involves returning "no match"
+ return null;
}
@@ -302,28 +302,28 @@ public class XCat implements EntityResolver2
* certain well formedess errors.
*
* @param name Name of the document element, either as declared in
- * a DOCTYPE declaration or as observed in the text.
+ * a DOCTYPE declaration or as observed in the text.
* @param baseURI Document's base URI (absolute).
*
* @return Input source for accessing the external subset, or null
- * if no mapping was found. The input source may have opened
- * the stream, and will have a fully resolved URI.
+ * if no mapping was found. The input source may have opened
+ * the stream, and will have a fully resolved URI.
*/
public InputSource getExternalSubset (String name, String baseURI)
throws SAXException, IOException
{
- if (loadingPermitted)
- disableLoading ();
- try {
- for (int i = 0; i < catalogs.length; i++) {
- InputSource retval = catalogs [i].getExternalSubset (name);
- if (retval != null)
- return retval;
- }
- } catch (DoneDelegation x) {
- // done!
- }
- return null;
+ if (loadingPermitted)
+ disableLoading ();
+ try {
+ for (int i = 0; i < catalogs.length; i++) {
+ InputSource retval = catalogs [i].getExternalSubset (name);
+ if (retval != null)
+ return retval;
+ }
+ } catch (DoneDelegation x) {
+ // done!
+ }
+ return null;
}
@@ -335,23 +335,23 @@ public class XCat implements EntityResolver2
*
* <p>The functional limitations of this interface include:</p><ul>
*
- * <li>Since system IDs will be absolutized before the resolver
- * sees them, matching against relative URIs won't work.
- * This may affect <em>system</em>, <em>rewriteSystem</em>,
- * and <em>delegateSystem</em> catalog entries.
+ * <li>Since system IDs will be absolutized before the resolver
+ * sees them, matching against relative URIs won't work.
+ * This may affect <em>system</em>, <em>rewriteSystem</em>,
+ * and <em>delegateSystem</em> catalog entries.
*
- * <li>Because of that absolutization, documents declaring entities
- * with system IDs using URI schemes that the JVM does not recognize
- * may be unparsable. URI schemes such as <em>file:/</em>,
- * <em>http://</em>, <em>https://</em>, and <em>ftp://</em>
- * will usually work reliably.
+ * <li>Because of that absolutization, documents declaring entities
+ * with system IDs using URI schemes that the JVM does not recognize
+ * may be unparsable. URI schemes such as <em>file:/</em>,
+ * <em>http://</em>, <em>https://</em>, and <em>ftp://</em>
+ * will usually work reliably.
*
- * <li>Because missing external subsets can't be provided, the
- * <em>doctype</em> catalog entries will be ignored.
- * (The {@link #getExternalSubset getExternalSubset()} method is
- * a "New Style" resolution option.)
+ * <li>Because missing external subsets can't be provided, the
+ * <em>doctype</em> catalog entries will be ignored.
+ * (The {@link #getExternalSubset getExternalSubset()} method is
+ * a "New Style" resolution option.)
*
- * </ul>
+ * </ul>
*
* <p>Applications can tell whether this limited functionality will be
* used: if the feature flag associated with the {@link EntityResolver2}
@@ -365,13 +365,13 @@ public class XCat implements EntityResolver2
* @param systemId Always an absolute URI.
*
* @return Input source for accessing the external entity, or null
- * if no mapping was found. The input source may have opened
- * the stream, and will have a fully resolved URI.
+ * if no mapping was found. The input source may have opened
+ * the stream, and will have a fully resolved URI.
*/
final public InputSource resolveEntity (String publicId, String systemId)
throws SAXException, IOException
{
- return resolveEntity (null, publicId, null, systemId);
+ return resolveEntity (null, publicId, null, systemId);
}
@@ -398,40 +398,40 @@ public class XCat implements EntityResolver2
* @see #setUnified
*
* @param baseURI The relevant base URI as specified by the XML Base
- * specification. This recognizes <em>xml:base</em> attributes
- * as overriding the actual (physical) base URI.
+ * specification. This recognizes <em>xml:base</em> attributes
+ * as overriding the actual (physical) base URI.
* @param uri Either an absolute URI, or one relative to baseURI
*
* @return Input source for accessing the mapped URI, or null
- * if no mapping was found. The input source may have opened
- * the stream, and will have a fully resolved URI.
+ * if no mapping was found. The input source may have opened
+ * the stream, and will have a fully resolved URI.
*/
public InputSource resolveURI (String baseURI, String uri)
throws SAXException, IOException
{
- if (loadingPermitted)
- disableLoading ();
-
- // NOTE: baseURI isn't used here, but caller MUST have it,
- // and heuristics _might_ use it in the future ... plus,
- // it's symmetric with resolveEntity ().
-
- // steps 1, 6 involve looping
- try {
- for (int i = 0; i < catalogs.length; i++) {
- InputSource tmp = catalogs [i].resolveURI (uri);
- if (tmp != null)
- return tmp;
- }
- } catch (DoneDelegation x) {
- // done
- }
- // step 7 reports no match
- return null;
+ if (loadingPermitted)
+ disableLoading ();
+
+ // NOTE: baseURI isn't used here, but caller MUST have it,
+ // and heuristics _might_ use it in the future ... plus,
+ // it's symmetric with resolveEntity ().
+
+ // steps 1, 6 involve looping
+ try {
+ for (int i = 0; i < catalogs.length; i++) {
+ InputSource tmp = catalogs [i].resolveURI (uri);
+ if (tmp != null)
+ return tmp;
+ }
+ } catch (DoneDelegation x) {
+ // done
+ }
+ // step 7 reports no match
+ return null;
}
- /**
+ /**
* Records that catalog loading is no longer permitted.
* Loading is automatically disabled when lookups are performed,
* and should be manually disabled when <em>startDTD()</em> (or
@@ -440,12 +440,12 @@ public class XCat implements EntityResolver2
*/
public synchronized void disableLoading ()
{
- // NOTE: this method and loadCatalog() are synchronized
- // so that it's impossible to load (top level) catalogs
- // after lookups start. Likewise, deferred loading is also
- // synchronized (for "next" and delegated catalogs) to
- // ensure that parsers can share resolvers.
- loadingPermitted = false;
+ // NOTE: this method and loadCatalog() are synchronized
+ // so that it's impossible to load (top level) catalogs
+ // after lookups start. Likewise, deferred loading is also
+ // synchronized (for "next" and delegated catalogs) to
+ // ensure that parsers can share resolvers.
+ loadingPermitted = false;
}
@@ -457,12 +457,12 @@ public class XCat implements EntityResolver2
* @see #setErrorHandler
*/
public ErrorHandler getErrorHandler ()
- { return errorHandler; }
+ { return errorHandler; }
/**
* Assigns the error handler used to report catalog errors.
* These errors may come either from the SAX2 parser or
- * from the catalog parsing code driven by the parser.
+ * from the catalog parsing code driven by the parser.
*
* <p> If you're sharing the resolver between parsers, don't
* change this once lookups have begun.
@@ -470,10 +470,10 @@ public class XCat implements EntityResolver2
* @see #getErrorHandler
*
* @param parser The error handler, or null saying to use the default
- * (no diagnostics, and only fatal errors terminate loading).
+ * (no diagnostics, and only fatal errors terminate loading).
*/
public void setErrorHandler (ErrorHandler handler)
- { errorHandler = handler; }
+ { errorHandler = handler; }
/**
@@ -482,7 +482,7 @@ public class XCat implements EntityResolver2
* @see #setParserClass
*/
public String getParserClass ()
- { return parserClass; }
+ { return parserClass; }
/**
* Names the SAX2 parser class used to parse catalogs.
@@ -498,10 +498,10 @@ public class XCat implements EntityResolver2
* @see #getParserClass
*
* @param parser The parser class name, or null saying to use the
- * system default SAX2 parser.
+ * system default SAX2 parser.
*/
public void setParserClass (String parser)
- { parserClass = parser; }
+ { parserClass = parser; }
/**
@@ -527,7 +527,7 @@ public class XCat implements EntityResolver2
* @see #setUnified
*/
public boolean isUnified ()
- { return unified; }
+ { return unified; }
/**
* Assigns the value of the flag returned by {@link #isUnified}.
@@ -540,7 +540,7 @@ public class XCat implements EntityResolver2
* @param value new flag setting
*/
public void setUnified (boolean value)
- { unified = value; }
+ { unified = value; }
/**
@@ -556,7 +556,7 @@ public class XCat implements EntityResolver2
* @see #setUsingPublic
*/
public boolean isUsingPublic ()
- { return usingPublic; }
+ { return usingPublic; }
/**
* Specifies which catalog search mode is used.
@@ -572,150 +572,150 @@ public class XCat implements EntityResolver2
* @see #isUsingPublic
*
* @param value true to always use public identifier mappings,
- * false to only use them for system ids using the <em>urn:publicid:</em>
- * URI scheme.
+ * false to only use them for system ids using the <em>urn:publicid:</em>
+ * URI scheme.
*/
public void setUsingPublic (boolean value)
- { usingPublic = value; }
+ { usingPublic = value; }
// hmm, what's this do? :)
private static Catalog loadCatalog (
- String parserClass,
- ErrorHandler eh,
- String uri,
- boolean unified
+ String parserClass,
+ ErrorHandler eh,
+ String uri,
+ boolean unified
) throws SAXException, IOException
{
- XMLReader parser;
- Loader loader;
- boolean doesIntern = false;
-
- if (parserClass == null)
- parser = XMLReaderFactory.createXMLReader ();
- else
- parser = XMLReaderFactory.createXMLReader (parserClass);
- if (eh != null)
- parser.setErrorHandler (eh);
- // resolve-dtd-entities is at default value (unrecognized == true)
-
- try {
- doesIntern = parser.getFeature (
- "http://xml.org/sax/features/string-interning");
- } catch (SAXNotRecognizedException e) { }
-
- loader = new Loader (doesIntern, eh, unified);
- loader.cat.parserClass = parserClass;
- loader.cat.catalogURI = uri;
-
- parser.setContentHandler (loader);
- parser.setProperty (
- "http://xml.org/sax/properties/declaration-handler",
- loader);
- parser.setProperty (
- "http://xml.org/sax/properties/lexical-handler",
- loader);
- parser.parse (uri);
-
- return loader.cat;
+ XMLReader parser;
+ Loader loader;
+ boolean doesIntern = false;
+
+ if (parserClass == null)
+ parser = XMLReaderFactory.createXMLReader ();
+ else
+ parser = XMLReaderFactory.createXMLReader (parserClass);
+ if (eh != null)
+ parser.setErrorHandler (eh);
+ // resolve-dtd-entities is at default value (unrecognized == true)
+
+ try {
+ doesIntern = parser.getFeature (
+ "http://xml.org/sax/features/string-interning");
+ } catch (SAXNotRecognizedException e) { }
+
+ loader = new Loader (doesIntern, eh, unified);
+ loader.cat.parserClass = parserClass;
+ loader.cat.catalogURI = uri;
+
+ parser.setContentHandler (loader);
+ parser.setProperty (
+ "http://xml.org/sax/properties/declaration-handler",
+ loader);
+ parser.setProperty (
+ "http://xml.org/sax/properties/lexical-handler",
+ loader);
+ parser.parse (uri);
+
+ return loader.cat;
}
// perform one or both the normalizations for public ids
private static String normalizePublicId (boolean full, String publicId)
{
- if (publicId.startsWith ("urn:publicid:")) {
- CPStringBuilder buf = new CPStringBuilder ();
- char chars [] = publicId.toCharArray ();
+ if (publicId.startsWith ("urn:publicid:")) {
+ CPStringBuilder buf = new CPStringBuilder ();
+ char chars [] = publicId.toCharArray ();
boolean hasbug = false;
- for (int i = 13; i < chars.length; i++) {
- switch (chars [i]) {
- case '+': buf.append (' '); continue;
- case ':': buf.append ("//"); continue;
- case ';': buf.append ("::"); continue;
- case '%':
+ for (int i = 13; i < chars.length; i++) {
+ switch (chars [i]) {
+ case '+': buf.append (' '); continue;
+ case ':': buf.append ("//"); continue;
+ case ';': buf.append ("::"); continue;
+ case '%':
// FIXME unhex that char! meanwhile, warn and fallthrough ...
- hasbug = true;
- default: buf.append (chars [i]); continue;
- }
- }
- publicId = buf.toString ();
+ hasbug = true;
+ default: buf.append (chars [i]); continue;
+ }
+ }
+ publicId = buf.toString ();
if (hasbug)
System.err.println ("nyet unhexing public id: " + publicId);
- full = true;
- }
-
- // SAX parsers do everything except that URN mapping, but
- // we can't trust other sources to normalize correctly
- if (full) {
- StringTokenizer tokens;
- String token;
-
- tokens = new StringTokenizer (publicId, " \r\n");
- publicId = null;
- while (tokens.hasMoreTokens ()) {
- if (publicId == null)
- publicId = tokens.nextToken ();
- else
- publicId += " " + tokens.nextToken ();
- }
- }
- return publicId;
+ full = true;
+ }
+
+ // SAX parsers do everything except that URN mapping, but
+ // we can't trust other sources to normalize correctly
+ if (full) {
+ StringTokenizer tokens;
+ String token;
+
+ tokens = new StringTokenizer (publicId, " \r\n");
+ publicId = null;
+ while (tokens.hasMoreTokens ()) {
+ if (publicId == null)
+ publicId = tokens.nextToken ();
+ else
+ publicId += " " + tokens.nextToken ();
+ }
+ }
+ return publicId;
}
private static boolean isUriExcluded (int c)
- { return c <= 0x20 || c >= 0x7f || "\"<>^`{|}".indexOf (c) != -1; }
+ { return c <= 0x20 || c >= 0x7f || "\"<>^`{|}".indexOf (c) != -1; }
private static int hexNibble (int c)
{
- if (c < 10)
- return c + '0';
- return ('a' - 10) + c;
+ if (c < 10)
+ return c + '0';
+ return ('a' - 10) + c;
}
// handles URIs with "excluded" characters
private static String normalizeURI (String systemId)
{
- int length = systemId.length ();
-
- for (int i = 0; i < length; i++) {
- char c = systemId.charAt (i);
-
- // escape non-ASCII plus "excluded" characters
- if (isUriExcluded (c)) {
- byte buf [];
- ByteArrayOutputStream out;
- int b;
-
- // a JVM that doesn't know UTF8 and 8859_1 is unusable!
- try {
- buf = systemId.getBytes ("UTF8");
- out = new ByteArrayOutputStream (buf.length + 10);
-
- for (i = 0; i < buf.length; i++) {
- b = buf [i] & 0x0ff;
- if (isUriExcluded (b)) {
- out.write ((int) '%');
- out.write (hexNibble (b >> 4));
- out.write (hexNibble (b & 0x0f));
- } else
- out.write (b);
- }
- return out.toString ("8859_1");
- } catch (IOException e) {
- throw new RuntimeException (
- "can't normalize URI: " + e.getMessage ());
- }
- }
- }
- return systemId;
+ int length = systemId.length ();
+
+ for (int i = 0; i < length; i++) {
+ char c = systemId.charAt (i);
+
+ // escape non-ASCII plus "excluded" characters
+ if (isUriExcluded (c)) {
+ byte buf [];
+ ByteArrayOutputStream out;
+ int b;
+
+ // a JVM that doesn't know UTF8 and 8859_1 is unusable!
+ try {
+ buf = systemId.getBytes ("UTF8");
+ out = new ByteArrayOutputStream (buf.length + 10);
+
+ for (i = 0; i < buf.length; i++) {
+ b = buf [i] & 0x0ff;
+ if (isUriExcluded (b)) {
+ out.write ((int) '%');
+ out.write (hexNibble (b >> 4));
+ out.write (hexNibble (b & 0x0f));
+ } else
+ out.write (b);
+ }
+ return out.toString ("8859_1");
+ } catch (IOException e) {
+ throw new RuntimeException (
+ "can't normalize URI: " + e.getMessage ());
+ }
+ }
+ }
+ return systemId;
}
// thrown to mark authoritative end of a search
private static class DoneDelegation extends SAXException
{
- DoneDelegation () { }
+ DoneDelegation () { }
}
@@ -725,359 +725,359 @@ System.err.println ("nyet unhexing public id: " + publicId);
*/
private static class Catalog
{
- // loading infrastructure
- String catalogURI;
- ErrorHandler eh;
- boolean unified;
- String parserClass;
-
- // catalog data
- boolean hasPreference;
- boolean usingPublic;
-
- Hashtable publicIds;
- Hashtable publicDelegations;
-
- Hashtable systemIds;
- Hashtable systemRewrites;
- Hashtable systemDelegations;
-
- Hashtable uris;
- Hashtable uriRewrites;
- Hashtable uriDelegations;
-
- Hashtable doctypes;
-
- Vector next;
-
- // nonpublic!
- Catalog () { }
-
-
- // steps as found in OASIS XML catalog spec 7.1.2
- private InputSource locatePublicId (String publicId)
- throws SAXException, IOException
- {
- // 5. return (first) 'public' entry
- if (publicIds != null) {
- String retval = (String) publicIds.get (publicId);
- if (retval != null) {
- // IF the URI is accessible ...
- return new InputSource (retval);
- }
- }
-
- // 6. return delegatePublic catalog match [complex]
- if (publicDelegations != null)
- return checkDelegations (publicDelegations, publicId,
- publicId, null);
-
- return null;
- }
-
- // steps as found in OASIS XML catalog spec 7.1.2 or 7.2.2
- private InputSource mapURI (
- String uri,
- Hashtable ids,
- Hashtable rewrites,
- Hashtable delegations
- ) throws SAXException, IOException
- {
- // 7.1.2: 2. return (first) 'system' entry
- // 7.2.2: 2. return (first) 'uri' entry
- if (ids != null) {
- String retval = (String) ids.get (uri);
- if (retval != null) {
- // IF the URI is accessible ...
- return new InputSource (retval);
- }
- }
-
- // 7.1.2: 3. return 'rewriteSystem' entries
- // 7.2.2: 3. return 'rewriteURI' entries
- if (rewrites != null) {
- String prefix = null;
- String replace = null;
- int prefixLen = -1;
-
- for (Enumeration e = rewrites.keys ();
- e.hasMoreElements ();
- /* NOP */) {
- String temp = (String) e.nextElement ();
- int len = -1;
-
- if (!uri.startsWith (temp))
- continue;
- if (prefix != null
- && (len = temp.length ()) < prefixLen)
- continue;
- prefix = temp;
- prefixLen = len;
- replace = (String) rewrites.get (temp);
- }
- if (prefix != null) {
- CPStringBuilder buf = new CPStringBuilder (replace);
- buf.append (uri.substring (prefixLen));
- // IF the URI is accessible ...
- return new InputSource (buf.toString ());
- }
- }
-
- // 7.1.2: 4. return 'delegateSystem' catalog match [complex]
- // 7.2.2: 4. return 'delegateURI' catalog match [complex]
- if (delegations != null)
- return checkDelegations (delegations, uri, null, uri);
-
- return null;
- }
-
-
- /**
- * Returns a URI for an external entity.
- */
- public InputSource resolve (
- boolean usingPublic,
- String publicId,
- String systemId
- ) throws SAXException, IOException
- {
- boolean preferSystem;
- InputSource retval;
-
- if (hasPreference)
- preferSystem = !this.usingPublic;
- else
- preferSystem = !usingPublic;
-
- if (publicId != null)
- publicId = normalizePublicId (false, publicId);
-
- // behavior here matches section 7.1.1 of the oasis spec
- if (systemId != null) {
- if (systemId.startsWith ("urn:publicid:")) {
- String temp = normalizePublicId (true, systemId);
- if (publicId == null) {
- publicId = temp;
- systemId = null;
- } else if (!publicId.equals (temp)) {
- // error; ok to recover by:
- systemId = null;
- }
- } else
- systemId = normalizeURI (systemId);
- }
-
- if (systemId == null && publicId == null)
- return null;
-
- if (systemId != null) {
- retval = mapURI (systemId, systemIds, systemRewrites,
- systemDelegations);
- if (retval != null) {
- retval.setPublicId (publicId);
- return retval;
- }
- }
-
- if (publicId != null
- && !(systemId != null && preferSystem)) {
- retval = locatePublicId (publicId);
- if (retval != null) {
- retval.setPublicId (publicId);
- return retval;
- }
- }
-
- // 7. apply nextCatalog entries
- if (next != null) {
- int length = next.size ();
- for (int i = 0; i < length; i++) {
- Catalog n = getNext (i);
- retval = n.resolve (usingPublic, publicId, systemId);
- if (retval != null)
- return retval;
- }
- }
-
- return null;
- }
-
- /**
- * Maps one URI into another, for resources that are not defined
- * using XML external entity or notation syntax.
- */
- public InputSource resolveURI (String uri)
- throws SAXException, IOException
- {
- if (uri.startsWith ("urn:publicid:"))
- return resolve (true, normalizePublicId (true, uri), null);
-
- InputSource retval;
-
- uri = normalizeURI (uri);
-
- // 7.2.2 steps 2-4
- retval = mapURI (uri, uris, uriRewrites, uriDelegations);
- if (retval != null)
- return retval;
-
- // 7.2.2 step 5. apply nextCatalog entries
- if (next != null) {
- int length = next.size ();
- for (int i = 0; i < length; i++) {
- Catalog n = getNext (i);
- retval = n.resolveURI (uri);
- if (retval != null)
- return retval;
- }
- }
-
- return null;
- }
-
-
- /**
- * Finds the external subset associated with a given root element.
- */
- public InputSource getExternalSubset (String name)
- throws SAXException, IOException
- {
- if (doctypes != null) {
- String value = (String) doctypes.get (name);
- if (value != null) {
- // IF the URI is accessible ...
- return new InputSource (value);
- }
- }
- if (next != null) {
- int length = next.size ();
- for (int i = 0; i < length; i++) {
- Catalog n = getNext (i);
- if (n == null)
- continue;
- InputSource retval = n.getExternalSubset (name);
- if (retval != null)
- return retval;
- }
- }
- return null;
- }
-
- private synchronized Catalog getNext (int i)
- throws SAXException, IOException
- {
- Object obj;
-
- if (next == null || i < 0 || i >= next.size ())
- return null;
- obj = next.elementAt (i);
- if (obj instanceof Catalog)
- return (Catalog) obj;
-
- // ok, we deferred reading that catalog till now.
- // load and cache it.
- Catalog cat = null;
-
- try {
- cat = loadCatalog (parserClass, eh, (String) obj, unified);
- next.setElementAt (cat, i);
- } catch (SAXException e) {
- // must fail quietly, says the OASIS spec
- } catch (IOException e) {
- // same applies here
- }
- return cat;
- }
-
- private InputSource checkDelegations (
- Hashtable delegations,
- String id,
- String publicId, // only one of public/system
- String systemId // will be non-null...
- ) throws SAXException, IOException
- {
- Vector matches = null;
- int length = 0;
-
- // first, see if any prefixes match.
- for (Enumeration e = delegations.keys ();
- e.hasMoreElements ();
- /* NOP */) {
- String prefix = (String) e.nextElement ();
-
- if (!id.startsWith (prefix))
- continue;
- if (matches == null)
- matches = new Vector ();
-
- // maintain in longer->shorter sorted order
- // NOTE: assumes not many matches will fire!
- int index;
-
- for (index = 0; index < length; index++) {
- String temp = (String) matches.elementAt (index);
- if (prefix.length () > temp.length ()) {
- matches.insertElementAt (prefix, index);
- break;
- }
- }
- if (index == length)
- matches.addElement (prefix);
- length++;
- }
- if (matches == null)
- return null;
-
- // now we know the list of catalogs to replace our "top level"
- // list ... we use it here, rather than somehow going back and
- // restarting, since this helps avoid reading most catalogs.
- // this assumes stackspace won't be a problem.
- for (int i = 0; i < length; i++) {
- Catalog catalog = null;
- InputSource result;
-
- // get this catalog. we may not have read it yet.
- synchronized (delegations) {
- Object prefix = matches.elementAt (i);
- Object cat = delegations.get (prefix);
-
- if (cat instanceof Catalog)
- catalog = (Catalog) cat;
- else {
- try {
- // load and cache that catalog
- catalog = loadCatalog (parserClass, eh,
- (String) cat, unified);
- delegations.put (prefix, catalog);
- } catch (SAXException e) {
- // must ignore, says the OASIS spec
- } catch (IOException e) {
- // same applies here
- }
- }
- }
-
- // ignore failed loads, and proceed
- if (catalog == null)
- continue;
-
- // we have a catalog ... resolve!
- // usingPublic value can't matter, there's no choice
- result = catalog.resolve (true, publicId, systemId);
- if (result != null)
- return result;
- }
-
- // if there were no successes, the entire
- // lookup failed (all the way to top level)
- throw new DoneDelegation ();
- }
+ // loading infrastructure
+ String catalogURI;
+ ErrorHandler eh;
+ boolean unified;
+ String parserClass;
+
+ // catalog data
+ boolean hasPreference;
+ boolean usingPublic;
+
+ Hashtable publicIds;
+ Hashtable publicDelegations;
+
+ Hashtable systemIds;
+ Hashtable systemRewrites;
+ Hashtable systemDelegations;
+
+ Hashtable uris;
+ Hashtable uriRewrites;
+ Hashtable uriDelegations;
+
+ Hashtable doctypes;
+
+ Vector next;
+
+ // nonpublic!
+ Catalog () { }
+
+
+ // steps as found in OASIS XML catalog spec 7.1.2
+ private InputSource locatePublicId (String publicId)
+ throws SAXException, IOException
+ {
+ // 5. return (first) 'public' entry
+ if (publicIds != null) {
+ String retval = (String) publicIds.get (publicId);
+ if (retval != null) {
+ // IF the URI is accessible ...
+ return new InputSource (retval);
+ }
+ }
+
+ // 6. return delegatePublic catalog match [complex]
+ if (publicDelegations != null)
+ return checkDelegations (publicDelegations, publicId,
+ publicId, null);
+
+ return null;
+ }
+
+ // steps as found in OASIS XML catalog spec 7.1.2 or 7.2.2
+ private InputSource mapURI (
+ String uri,
+ Hashtable ids,
+ Hashtable rewrites,
+ Hashtable delegations
+ ) throws SAXException, IOException
+ {
+ // 7.1.2: 2. return (first) 'system' entry
+ // 7.2.2: 2. return (first) 'uri' entry
+ if (ids != null) {
+ String retval = (String) ids.get (uri);
+ if (retval != null) {
+ // IF the URI is accessible ...
+ return new InputSource (retval);
+ }
+ }
+
+ // 7.1.2: 3. return 'rewriteSystem' entries
+ // 7.2.2: 3. return 'rewriteURI' entries
+ if (rewrites != null) {
+ String prefix = null;
+ String replace = null;
+ int prefixLen = -1;
+
+ for (Enumeration e = rewrites.keys ();
+ e.hasMoreElements ();
+ /* NOP */) {
+ String temp = (String) e.nextElement ();
+ int len = -1;
+
+ if (!uri.startsWith (temp))
+ continue;
+ if (prefix != null
+ && (len = temp.length ()) < prefixLen)
+ continue;
+ prefix = temp;
+ prefixLen = len;
+ replace = (String) rewrites.get (temp);
+ }
+ if (prefix != null) {
+ CPStringBuilder buf = new CPStringBuilder (replace);
+ buf.append (uri.substring (prefixLen));
+ // IF the URI is accessible ...
+ return new InputSource (buf.toString ());
+ }
+ }
+
+ // 7.1.2: 4. return 'delegateSystem' catalog match [complex]
+ // 7.2.2: 4. return 'delegateURI' catalog match [complex]
+ if (delegations != null)
+ return checkDelegations (delegations, uri, null, uri);
+
+ return null;
+ }
+
+
+ /**
+ * Returns a URI for an external entity.
+ */
+ public InputSource resolve (
+ boolean usingPublic,
+ String publicId,
+ String systemId
+ ) throws SAXException, IOException
+ {
+ boolean preferSystem;
+ InputSource retval;
+
+ if (hasPreference)
+ preferSystem = !this.usingPublic;
+ else
+ preferSystem = !usingPublic;
+
+ if (publicId != null)
+ publicId = normalizePublicId (false, publicId);
+
+ // behavior here matches section 7.1.1 of the oasis spec
+ if (systemId != null) {
+ if (systemId.startsWith ("urn:publicid:")) {
+ String temp = normalizePublicId (true, systemId);
+ if (publicId == null) {
+ publicId = temp;
+ systemId = null;
+ } else if (!publicId.equals (temp)) {
+ // error; ok to recover by:
+ systemId = null;
+ }
+ } else
+ systemId = normalizeURI (systemId);
+ }
+
+ if (systemId == null && publicId == null)
+ return null;
+
+ if (systemId != null) {
+ retval = mapURI (systemId, systemIds, systemRewrites,
+ systemDelegations);
+ if (retval != null) {
+ retval.setPublicId (publicId);
+ return retval;
+ }
+ }
+
+ if (publicId != null
+ && !(systemId != null && preferSystem)) {
+ retval = locatePublicId (publicId);
+ if (retval != null) {
+ retval.setPublicId (publicId);
+ return retval;
+ }
+ }
+
+ // 7. apply nextCatalog entries
+ if (next != null) {
+ int length = next.size ();
+ for (int i = 0; i < length; i++) {
+ Catalog n = getNext (i);
+ retval = n.resolve (usingPublic, publicId, systemId);
+ if (retval != null)
+ return retval;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Maps one URI into another, for resources that are not defined
+ * using XML external entity or notation syntax.
+ */
+ public InputSource resolveURI (String uri)
+ throws SAXException, IOException
+ {
+ if (uri.startsWith ("urn:publicid:"))
+ return resolve (true, normalizePublicId (true, uri), null);
+
+ InputSource retval;
+
+ uri = normalizeURI (uri);
+
+ // 7.2.2 steps 2-4
+ retval = mapURI (uri, uris, uriRewrites, uriDelegations);
+ if (retval != null)
+ return retval;
+
+ // 7.2.2 step 5. apply nextCatalog entries
+ if (next != null) {
+ int length = next.size ();
+ for (int i = 0; i < length; i++) {
+ Catalog n = getNext (i);
+ retval = n.resolveURI (uri);
+ if (retval != null)
+ return retval;
+ }
+ }
+
+ return null;
+ }
+
+
+ /**
+ * Finds the external subset associated with a given root element.
+ */
+ public InputSource getExternalSubset (String name)
+ throws SAXException, IOException
+ {
+ if (doctypes != null) {
+ String value = (String) doctypes.get (name);
+ if (value != null) {
+ // IF the URI is accessible ...
+ return new InputSource (value);
+ }
+ }
+ if (next != null) {
+ int length = next.size ();
+ for (int i = 0; i < length; i++) {
+ Catalog n = getNext (i);
+ if (n == null)
+ continue;
+ InputSource retval = n.getExternalSubset (name);
+ if (retval != null)
+ return retval;
+ }
+ }
+ return null;
+ }
+
+ private synchronized Catalog getNext (int i)
+ throws SAXException, IOException
+ {
+ Object obj;
+
+ if (next == null || i < 0 || i >= next.size ())
+ return null;
+ obj = next.elementAt (i);
+ if (obj instanceof Catalog)
+ return (Catalog) obj;
+
+ // ok, we deferred reading that catalog till now.
+ // load and cache it.
+ Catalog cat = null;
+
+ try {
+ cat = loadCatalog (parserClass, eh, (String) obj, unified);
+ next.setElementAt (cat, i);
+ } catch (SAXException e) {
+ // must fail quietly, says the OASIS spec
+ } catch (IOException e) {
+ // same applies here
+ }
+ return cat;
+ }
+
+ private InputSource checkDelegations (
+ Hashtable delegations,
+ String id,
+ String publicId, // only one of public/system
+ String systemId // will be non-null...
+ ) throws SAXException, IOException
+ {
+ Vector matches = null;
+ int length = 0;
+
+ // first, see if any prefixes match.
+ for (Enumeration e = delegations.keys ();
+ e.hasMoreElements ();
+ /* NOP */) {
+ String prefix = (String) e.nextElement ();
+
+ if (!id.startsWith (prefix))
+ continue;
+ if (matches == null)
+ matches = new Vector ();
+
+ // maintain in longer->shorter sorted order
+ // NOTE: assumes not many matches will fire!
+ int index;
+
+ for (index = 0; index < length; index++) {
+ String temp = (String) matches.elementAt (index);
+ if (prefix.length () > temp.length ()) {
+ matches.insertElementAt (prefix, index);
+ break;
+ }
+ }
+ if (index == length)
+ matches.addElement (prefix);
+ length++;
+ }
+ if (matches == null)
+ return null;
+
+ // now we know the list of catalogs to replace our "top level"
+ // list ... we use it here, rather than somehow going back and
+ // restarting, since this helps avoid reading most catalogs.
+ // this assumes stackspace won't be a problem.
+ for (int i = 0; i < length; i++) {
+ Catalog catalog = null;
+ InputSource result;
+
+ // get this catalog. we may not have read it yet.
+ synchronized (delegations) {
+ Object prefix = matches.elementAt (i);
+ Object cat = delegations.get (prefix);
+
+ if (cat instanceof Catalog)
+ catalog = (Catalog) cat;
+ else {
+ try {
+ // load and cache that catalog
+ catalog = loadCatalog (parserClass, eh,
+ (String) cat, unified);
+ delegations.put (prefix, catalog);
+ } catch (SAXException e) {
+ // must ignore, says the OASIS spec
+ } catch (IOException e) {
+ // same applies here
+ }
+ }
+ }
+
+ // ignore failed loads, and proceed
+ if (catalog == null)
+ continue;
+
+ // we have a catalog ... resolve!
+ // usingPublic value can't matter, there's no choice
+ result = catalog.resolve (true, publicId, systemId);
+ if (result != null)
+ return result;
+ }
+
+ // if there were no successes, the entire
+ // lookup failed (all the way to top level)
+ throw new DoneDelegation ();
+ }
}
/** This is the namespace URI used for OASIS XML Catalogs. */
- private static final String catalogNamespace =
- "urn:oasis:names:tc:entity:xmlns:xml:catalog";
+ private static final String catalogNamespace =
+ "urn:oasis:names:tc:entity:xmlns:xml:catalog";
/**
@@ -1085,527 +1085,527 @@ System.err.println ("nyet unhexing public id: " + publicId);
*/
private static class Loader extends DefaultHandler2
{
- private boolean preInterned;
- private ErrorHandler handler;
- private boolean unified;
- private int ignoreDepth;
- private Locator locator;
- private boolean started;
- private Hashtable externals;
- private Stack bases;
-
- Catalog cat = new Catalog ();
-
-
- /**
- * Constructor.
- * @param flag true iff the parser already interns strings.
- * @param eh Errors and warnings are delegated to this.
- * @param unified true keeps one table for URI mappings;
- * false matches OASIS spec, storing mappings
- * for URIs and SYSTEM ids in parallel tables.
- */
- Loader (boolean flag, ErrorHandler eh, boolean unified)
- {
- preInterned = flag;
- handler = eh;
- this.unified = unified;
- cat.unified = unified;
- cat.eh = eh;
- }
-
-
- // strips out fragments
- private String nofrag (String uri)
- throws SAXException
- {
- if (uri.indexOf ('#') != -1) {
- warn ("URI with fragment: " + uri);
- uri = uri.substring (0, uri.indexOf ('#'));
- }
- return uri;
- }
-
- // absolutizes relative URIs
- private String absolutize (String uri)
- throws SAXException
- {
- // avoid creating URLs if they're already absolutized,
- // or if the URI is already using a known scheme
- if (uri.startsWith ("file:/")
- || uri.startsWith ("http:/")
- || uri.startsWith ("https:/")
- || uri.startsWith ("ftp:/")
- || uri.startsWith ("urn:")
- )
- return uri;
-
- // otherwise, let's hope the JDK handles this URI scheme.
- try {
- URL base = (URL) bases.peek ();
- return new URL (base, uri).toString ();
- } catch (Exception e) {
- fatal ("can't absolutize URI: " + uri);
- return null;
- }
- }
-
- // recoverable error
- private void error (String message)
- throws SAXException
- {
- if (handler == null)
- return;
- handler.error (new SAXParseException (message, locator));
- }
-
- // nonrecoverable error
- private void fatal (String message)
- throws SAXException
- {
- SAXParseException spe;
-
- spe = new SAXParseException (message, locator);
- if (handler != null)
- handler.fatalError (spe);
- throw spe;
- }
-
- // low severity problem
- private void warn (String message)
- throws SAXException
- {
- if (handler == null)
- return;
- handler.warning (new SAXParseException (message, locator));
- }
-
- // callbacks:
-
- public void setDocumentLocator (Locator l)
- { locator = l; }
-
- public void startDocument ()
- throws SAXException
- {
- if (locator == null)
- error ("no locator!");
- bases = new Stack ();
- String uri = locator.getSystemId ();
- try {
- bases.push (new URL (uri));
- } catch (IOException e) {
- fatal ("bad document base URI: " + uri);
- }
- }
-
- public void endDocument ()
- throws SAXException
- {
- try {
- if (!started)
- error ("not a catalog!");
- } finally {
- locator = null;
- handler = null;
- externals = null;
- bases = null;
- }
- }
-
- // XML Base support for external entities.
-
- // NOTE: expects parser is in default "resolve-dtd-uris" mode.
- public void externalEntityDecl (String name, String pub, String sys)
- throws SAXException
- {
- if (externals == null)
- externals = new Hashtable ();
- if (externals.get (name) == null)
- externals.put (name, pub);
- }
-
- public void startEntity (String name)
- throws SAXException
- {
- if (externals == null)
- return;
- String uri = (String) externals.get (name);
-
- // NOTE: breaks if an EntityResolver substitutes these URIs.
- // If toplevel loader supports one, must intercept calls...
- if (uri != null) {
- try {
- bases.push (new URL (uri));
- } catch (IOException e) {
- fatal ("entity '" + name + "', bad URI: " + uri);
- }
- }
- }
-
- public void endEntity (String name)
- {
- if (externals == null)
- return;
- String value = (String) externals.get (name);
-
- if (value != null)
- bases.pop ();
- }
-
- /**
- * Processes catalog elements, saving their data.
- */
- public void startElement (String namespace, String local,
- String qName, Attributes atts)
- throws SAXException
- {
- // must ignore non-catalog elements, and their contents
- if (ignoreDepth != 0 || !catalogNamespace.equals (namespace)) {
- ignoreDepth++;
- return;
- }
-
- // basic sanity checks
- if (!preInterned)
- local = local.intern ();
- if (!started) {
- started = true;
- if ("catalog" != local)
- fatal ("root element not 'catalog': " + local);
- }
-
- // Handle any xml:base attribute
- String xmlbase = atts.getValue ("xml:base");
-
- if (xmlbase != null) {
- URL base = (URL) bases.peek ();
- try {
- base = new URL (base, xmlbase);
- } catch (IOException e) {
- fatal ("can't resolve xml:base attribute: " + xmlbase);
- }
- bases.push (base);
- } else
- bases.push (bases.peek ());
-
- // fetch multi-element attributes, apply standard tweaks
- // values (uri, catalog, rewritePrefix) get normalized too,
- // as a precaution and since we may compare the values
- String catalog = atts.getValue ("catalog");
- if (catalog != null)
- catalog = normalizeURI (absolutize (catalog));
-
- String rewritePrefix = atts.getValue ("rewritePrefix");
- if (rewritePrefix != null)
- rewritePrefix = normalizeURI (absolutize (rewritePrefix));
-
- String systemIdStartString;
- systemIdStartString = atts.getValue ("systemIdStartString");
- if (systemIdStartString != null) {
- systemIdStartString = normalizeURI (systemIdStartString);
- // unmatchable <rewriteSystemId>, <delegateSystemId> elements
- if (systemIdStartString.startsWith ("urn:publicid:")) {
- error ("systemIdStartString is really a publicId!!");
- return;
- }
- }
-
- String uri = atts.getValue ("uri");
- if (uri != null)
- uri = normalizeURI (absolutize (uri));
-
- String uriStartString;
- uriStartString = atts.getValue ("uriStartString");
- if (uriStartString != null) {
- uriStartString = normalizeURI (uriStartString);
- // unmatchable <rewriteURI>, <delegateURI> elements
- if (uriStartString.startsWith ("urn:publicid:")) {
- error ("uriStartString is really a publicId!!");
- return;
- }
- }
-
- // strictly speaking "group" and "catalog" shouldn't nest
- // ... arbitrary restriction, no evident motivation
+ private boolean preInterned;
+ private ErrorHandler handler;
+ private boolean unified;
+ private int ignoreDepth;
+ private Locator locator;
+ private boolean started;
+ private Hashtable externals;
+ private Stack bases;
+
+ Catalog cat = new Catalog ();
+
+
+ /**
+ * Constructor.
+ * @param flag true iff the parser already interns strings.
+ * @param eh Errors and warnings are delegated to this.
+ * @param unified true keeps one table for URI mappings;
+ * false matches OASIS spec, storing mappings
+ * for URIs and SYSTEM ids in parallel tables.
+ */
+ Loader (boolean flag, ErrorHandler eh, boolean unified)
+ {
+ preInterned = flag;
+ handler = eh;
+ this.unified = unified;
+ cat.unified = unified;
+ cat.eh = eh;
+ }
+
+
+ // strips out fragments
+ private String nofrag (String uri)
+ throws SAXException
+ {
+ if (uri.indexOf ('#') != -1) {
+ warn ("URI with fragment: " + uri);
+ uri = uri.substring (0, uri.indexOf ('#'));
+ }
+ return uri;
+ }
+
+ // absolutizes relative URIs
+ private String absolutize (String uri)
+ throws SAXException
+ {
+ // avoid creating URLs if they're already absolutized,
+ // or if the URI is already using a known scheme
+ if (uri.startsWith ("file:/")
+ || uri.startsWith ("http:/")
+ || uri.startsWith ("https:/")
+ || uri.startsWith ("ftp:/")
+ || uri.startsWith ("urn:")
+ )
+ return uri;
+
+ // otherwise, let's hope the JDK handles this URI scheme.
+ try {
+ URL base = (URL) bases.peek ();
+ return new URL (base, uri).toString ();
+ } catch (Exception e) {
+ fatal ("can't absolutize URI: " + uri);
+ return null;
+ }
+ }
+
+ // recoverable error
+ private void error (String message)
+ throws SAXException
+ {
+ if (handler == null)
+ return;
+ handler.error (new SAXParseException (message, locator));
+ }
+
+ // nonrecoverable error
+ private void fatal (String message)
+ throws SAXException
+ {
+ SAXParseException spe;
+
+ spe = new SAXParseException (message, locator);
+ if (handler != null)
+ handler.fatalError (spe);
+ throw spe;
+ }
+
+ // low severity problem
+ private void warn (String message)
+ throws SAXException
+ {
+ if (handler == null)
+ return;
+ handler.warning (new SAXParseException (message, locator));
+ }
+
+ // callbacks:
+
+ public void setDocumentLocator (Locator l)
+ { locator = l; }
+
+ public void startDocument ()
+ throws SAXException
+ {
+ if (locator == null)
+ error ("no locator!");
+ bases = new Stack ();
+ String uri = locator.getSystemId ();
+ try {
+ bases.push (new URL (uri));
+ } catch (IOException e) {
+ fatal ("bad document base URI: " + uri);
+ }
+ }
+
+ public void endDocument ()
+ throws SAXException
+ {
+ try {
+ if (!started)
+ error ("not a catalog!");
+ } finally {
+ locator = null;
+ handler = null;
+ externals = null;
+ bases = null;
+ }
+ }
+
+ // XML Base support for external entities.
+
+ // NOTE: expects parser is in default "resolve-dtd-uris" mode.
+ public void externalEntityDecl (String name, String pub, String sys)
+ throws SAXException
+ {
+ if (externals == null)
+ externals = new Hashtable ();
+ if (externals.get (name) == null)
+ externals.put (name, pub);
+ }
+
+ public void startEntity (String name)
+ throws SAXException
+ {
+ if (externals == null)
+ return;
+ String uri = (String) externals.get (name);
+
+ // NOTE: breaks if an EntityResolver substitutes these URIs.
+ // If toplevel loader supports one, must intercept calls...
+ if (uri != null) {
+ try {
+ bases.push (new URL (uri));
+ } catch (IOException e) {
+ fatal ("entity '" + name + "', bad URI: " + uri);
+ }
+ }
+ }
+
+ public void endEntity (String name)
+ {
+ if (externals == null)
+ return;
+ String value = (String) externals.get (name);
+
+ if (value != null)
+ bases.pop ();
+ }
+
+ /**
+ * Processes catalog elements, saving their data.
+ */
+ public void startElement (String namespace, String local,
+ String qName, Attributes atts)
+ throws SAXException
+ {
+ // must ignore non-catalog elements, and their contents
+ if (ignoreDepth != 0 || !catalogNamespace.equals (namespace)) {
+ ignoreDepth++;
+ return;
+ }
+
+ // basic sanity checks
+ if (!preInterned)
+ local = local.intern ();
+ if (!started) {
+ started = true;
+ if ("catalog" != local)
+ fatal ("root element not 'catalog': " + local);
+ }
+
+ // Handle any xml:base attribute
+ String xmlbase = atts.getValue ("xml:base");
+
+ if (xmlbase != null) {
+ URL base = (URL) bases.peek ();
+ try {
+ base = new URL (base, xmlbase);
+ } catch (IOException e) {
+ fatal ("can't resolve xml:base attribute: " + xmlbase);
+ }
+ bases.push (base);
+ } else
+ bases.push (bases.peek ());
+
+ // fetch multi-element attributes, apply standard tweaks
+ // values (uri, catalog, rewritePrefix) get normalized too,
+ // as a precaution and since we may compare the values
+ String catalog = atts.getValue ("catalog");
+ if (catalog != null)
+ catalog = normalizeURI (absolutize (catalog));
+
+ String rewritePrefix = atts.getValue ("rewritePrefix");
+ if (rewritePrefix != null)
+ rewritePrefix = normalizeURI (absolutize (rewritePrefix));
+
+ String systemIdStartString;
+ systemIdStartString = atts.getValue ("systemIdStartString");
+ if (systemIdStartString != null) {
+ systemIdStartString = normalizeURI (systemIdStartString);
+ // unmatchable <rewriteSystemId>, <delegateSystemId> elements
+ if (systemIdStartString.startsWith ("urn:publicid:")) {
+ error ("systemIdStartString is really a publicId!!");
+ return;
+ }
+ }
+
+ String uri = atts.getValue ("uri");
+ if (uri != null)
+ uri = normalizeURI (absolutize (uri));
+
+ String uriStartString;
+ uriStartString = atts.getValue ("uriStartString");
+ if (uriStartString != null) {
+ uriStartString = normalizeURI (uriStartString);
+ // unmatchable <rewriteURI>, <delegateURI> elements
+ if (uriStartString.startsWith ("urn:publicid:")) {
+ error ("uriStartString is really a publicId!!");
+ return;
+ }
+ }
+
+ // strictly speaking "group" and "catalog" shouldn't nest
+ // ... arbitrary restriction, no evident motivation
// FIXME stack "prefer" settings (two elements only!) and use
// them to populate different public mapping/delegation tables
- if ("catalog" == local || "group" == local) {
- String prefer = atts.getValue ("prefer");
-
- if (prefer != null && !"public".equals (prefer)) {
- if (!"system".equals (prefer)) {
- error ("in <" + local + " ... prefer='...'>, "
- + "assuming 'public'");
- prefer = "public";
- }
- }
- if (prefer != null) {
- if ("catalog" == local) {
- cat.hasPreference = true;
- cat.usingPublic = "public".equals (prefer);
- } else {
- if (!cat.hasPreference || cat.usingPublic
- != "public".equals (prefer)) {
+ if ("catalog" == local || "group" == local) {
+ String prefer = atts.getValue ("prefer");
+
+ if (prefer != null && !"public".equals (prefer)) {
+ if (!"system".equals (prefer)) {
+ error ("in <" + local + " ... prefer='...'>, "
+ + "assuming 'public'");
+ prefer = "public";
+ }
+ }
+ if (prefer != null) {
+ if ("catalog" == local) {
+ cat.hasPreference = true;
+ cat.usingPublic = "public".equals (prefer);
+ } else {
+ if (!cat.hasPreference || cat.usingPublic
+ != "public".equals (prefer)) {
fatal ("<group prefer=...> case not handled");
- }
- }
- } else if ("group" == local && cat.hasPreference) {
+ }
+ }
+ } else if ("group" == local && cat.hasPreference) {
fatal ("<group prefer=...> case not handled");
- }
-
- //
- // PUBLIC ids: cleanly set up for id substitution
- //
- } else if ("public" == local) {
- String publicId = atts.getValue ("publicId");
- String value = null;
-
- if (publicId == null || uri == null) {
- error ("expecting <public publicId=... uri=.../>");
- return;
- }
- publicId = normalizePublicId (true, publicId);
- uri = nofrag (uri);
- if (cat.publicIds == null)
- cat.publicIds = new Hashtable ();
- else
- value = (String) cat.publicIds.get (publicId);
- if (value != null) {
- if (!value.equals (uri))
- warn ("ignoring <public...> entry for " + publicId);
- } else
- cat.publicIds.put (publicId, uri);
-
- } else if ("delegatePublic" == local) {
- String publicIdStartString;
- Object value = null;
-
- publicIdStartString = atts.getValue ("publicIdStartString");
- if (publicIdStartString == null || catalog == null) {
- error ("expecting <delegatePublic "
- + "publicIdStartString=... catalog=.../>");
- return;
- }
- publicIdStartString = normalizePublicId (true,
- publicIdStartString);
- if (cat.publicDelegations == null)
- cat.publicDelegations = new Hashtable ();
- else
- value = cat.publicDelegations.get (publicIdStartString);
- if (value != null) {
- if (!value.equals (catalog))
- warn ("ignoring <delegatePublic...> entry for "
- + uriStartString);
- } else
- cat.publicDelegations.put (publicIdStartString, catalog);
-
-
- //
- // SYSTEM ids: need substitution due to operational issues
- //
- } else if ("system" == local) {
- String systemId = atts.getValue ("systemId");
- String value = null;
-
- if (systemId == null || uri == null) {
- error ("expecting <system systemId=... uri=.../>");
- return;
- }
- systemId = normalizeURI (systemId);
- uri = nofrag (uri);
- if (systemId.startsWith ("urn:publicid:")) {
- error ("systemId is really a publicId!!");
- return;
- }
- if (cat.systemIds == null) {
- cat.systemIds = new Hashtable ();
- if (unified)
- cat.uris = cat.systemIds;
- } else
- value = (String) cat.systemIds.get (systemId);
- if (value != null) {
- if (!value.equals (uri))
- warn ("ignoring <system...> entry for " + systemId);
- } else
- cat.systemIds.put (systemId, uri);
-
- } else if ("rewriteSystem" == local) {
- String value = null;
-
- if (systemIdStartString == null || rewritePrefix == null
- || systemIdStartString.length () == 0
- || rewritePrefix.length () == 0
- ) {
- error ("expecting <rewriteSystem "
- + "systemIdStartString=... rewritePrefix=.../>");
- return;
- }
- if (cat.systemRewrites == null) {
- cat.systemRewrites = new Hashtable ();
- if (unified)
- cat.uriRewrites = cat.systemRewrites;
- } else
- value = (String) cat.systemRewrites.get (
- systemIdStartString);
- if (value != null) {
- if (!value.equals (rewritePrefix))
- warn ("ignoring <rewriteSystem...> entry for "
- + systemIdStartString);
- } else
- cat.systemRewrites.put (systemIdStartString,
- rewritePrefix);
-
- } else if ("delegateSystem" == local) {
- Object value = null;
-
- if (systemIdStartString == null || catalog == null) {
- error ("expecting <delegateSystem "
- + "systemIdStartString=... catalog=.../>");
- return;
- }
- if (cat.systemDelegations == null) {
- cat.systemDelegations = new Hashtable ();
- if (unified)
- cat.uriDelegations = cat.systemDelegations;
- } else
- value = cat.systemDelegations.get (systemIdStartString);
- if (value != null) {
- if (!value.equals (catalog))
- warn ("ignoring <delegateSystem...> entry for "
- + uriStartString);
- } else
- cat.systemDelegations.put (systemIdStartString, catalog);
-
-
- //
- // URI: just like "system" ID support, except that
- // fragment IDs are disallowed in "system" elements.
- //
- } else if ("uri" == local) {
- String name = atts.getValue ("name");
- String value = null;
-
- if (name == null || uri == null) {
- error ("expecting <uri name=... uri=.../>");
- return;
- }
- if (name.startsWith ("urn:publicid:")) {
- error ("name is really a publicId!!");
- return;
- }
- name = normalizeURI (name);
- if (cat.uris == null) {
- cat.uris = new Hashtable ();
- if (unified)
- cat.systemIds = cat.uris;
- } else
- value = (String) cat.uris.get (name);
- if (value != null) {
- if (!value.equals (uri))
- warn ("ignoring <uri...> entry for " + name);
- } else
- cat.uris.put (name, uri);
-
- } else if ("rewriteURI" == local) {
- String value = null;
-
- if (uriStartString == null || rewritePrefix == null
- || uriStartString.length () == 0
- || rewritePrefix.length () == 0
- ) {
- error ("expecting <rewriteURI "
- + "uriStartString=... rewritePrefix=.../>");
- return;
- }
- if (cat.uriRewrites == null) {
- cat.uriRewrites = new Hashtable ();
- if (unified)
- cat.systemRewrites = cat.uriRewrites;
- } else
- value = (String) cat.uriRewrites.get (uriStartString);
- if (value != null) {
- if (!value.equals (rewritePrefix))
- warn ("ignoring <rewriteURI...> entry for "
- + uriStartString);
- } else
- cat.uriRewrites.put (uriStartString, rewritePrefix);
-
- } else if ("delegateURI" == local) {
- Object value = null;
-
- if (uriStartString == null || catalog == null) {
- error ("expecting <delegateURI "
- + "uriStartString=... catalog=.../>");
- return;
- }
- if (cat.uriDelegations == null) {
- cat.uriDelegations = new Hashtable ();
- if (unified)
- cat.systemDelegations = cat.uriDelegations;
- } else
- value = cat.uriDelegations.get (uriStartString);
- if (value != null) {
- if (!value.equals (catalog))
- warn ("ignoring <delegateURI...> entry for "
- + uriStartString);
- } else
- cat.uriDelegations.put (uriStartString, catalog);
-
- //
- // NON-DELEGATING approach to modularity
- //
- } else if ("nextCatalog" == local) {
- if (catalog == null) {
- error ("expecting <nextCatalog catalog=.../>");
- return;
- }
- if (cat.next == null)
- cat.next = new Vector ();
- cat.next.addElement (catalog);
-
- //
- // EXTENSIONS from appendix E
- //
- } else if ("doctype" == local) {
- String name = atts.getValue ("name");
- String value = null;
-
- if (name == null || uri == null) {
- error ("expecting <doctype name=... uri=.../>");
- return;
- }
- name = normalizeURI (name);
- if (cat.doctypes == null)
- cat.doctypes = new Hashtable ();
- else
- value = (String) cat.doctypes.get (name);
- if (value != null) {
- if (!value.equals (uri))
- warn ("ignoring <doctype...> entry for "
- + uriStartString);
- } else
- cat.doctypes.put (name, uri);
-
-
- //
- // RESERVED ... ignore (like reserved attributes) but warn
- //
- } else {
- warn ("ignoring unknown catalog element: " + local);
- ignoreDepth++;
- }
- }
-
- public void endElement (String uri, String local, String qName)
- throws SAXException
- {
- if (ignoreDepth != 0)
- ignoreDepth--;
- else
- bases.pop ();
- }
+ }
+
+ //
+ // PUBLIC ids: cleanly set up for id substitution
+ //
+ } else if ("public" == local) {
+ String publicId = atts.getValue ("publicId");
+ String value = null;
+
+ if (publicId == null || uri == null) {
+ error ("expecting <public publicId=... uri=.../>");
+ return;
+ }
+ publicId = normalizePublicId (true, publicId);
+ uri = nofrag (uri);
+ if (cat.publicIds == null)
+ cat.publicIds = new Hashtable ();
+ else
+ value = (String) cat.publicIds.get (publicId);
+ if (value != null) {
+ if (!value.equals (uri))
+ warn ("ignoring <public...> entry for " + publicId);
+ } else
+ cat.publicIds.put (publicId, uri);
+
+ } else if ("delegatePublic" == local) {
+ String publicIdStartString;
+ Object value = null;
+
+ publicIdStartString = atts.getValue ("publicIdStartString");
+ if (publicIdStartString == null || catalog == null) {
+ error ("expecting <delegatePublic "
+ + "publicIdStartString=... catalog=.../>");
+ return;
+ }
+ publicIdStartString = normalizePublicId (true,
+ publicIdStartString);
+ if (cat.publicDelegations == null)
+ cat.publicDelegations = new Hashtable ();
+ else
+ value = cat.publicDelegations.get (publicIdStartString);
+ if (value != null) {
+ if (!value.equals (catalog))
+ warn ("ignoring <delegatePublic...> entry for "
+ + uriStartString);
+ } else
+ cat.publicDelegations.put (publicIdStartString, catalog);
+
+
+ //
+ // SYSTEM ids: need substitution due to operational issues
+ //
+ } else if ("system" == local) {
+ String systemId = atts.getValue ("systemId");
+ String value = null;
+
+ if (systemId == null || uri == null) {
+ error ("expecting <system systemId=... uri=.../>");
+ return;
+ }
+ systemId = normalizeURI (systemId);
+ uri = nofrag (uri);
+ if (systemId.startsWith ("urn:publicid:")) {
+ error ("systemId is really a publicId!!");
+ return;
+ }
+ if (cat.systemIds == null) {
+ cat.systemIds = new Hashtable ();
+ if (unified)
+ cat.uris = cat.systemIds;
+ } else
+ value = (String) cat.systemIds.get (systemId);
+ if (value != null) {
+ if (!value.equals (uri))
+ warn ("ignoring <system...> entry for " + systemId);
+ } else
+ cat.systemIds.put (systemId, uri);
+
+ } else if ("rewriteSystem" == local) {
+ String value = null;
+
+ if (systemIdStartString == null || rewritePrefix == null
+ || systemIdStartString.length () == 0
+ || rewritePrefix.length () == 0
+ ) {
+ error ("expecting <rewriteSystem "
+ + "systemIdStartString=... rewritePrefix=.../>");
+ return;
+ }
+ if (cat.systemRewrites == null) {
+ cat.systemRewrites = new Hashtable ();
+ if (unified)
+ cat.uriRewrites = cat.systemRewrites;
+ } else
+ value = (String) cat.systemRewrites.get (
+ systemIdStartString);
+ if (value != null) {
+ if (!value.equals (rewritePrefix))
+ warn ("ignoring <rewriteSystem...> entry for "
+ + systemIdStartString);
+ } else
+ cat.systemRewrites.put (systemIdStartString,
+ rewritePrefix);
+
+ } else if ("delegateSystem" == local) {
+ Object value = null;
+
+ if (systemIdStartString == null || catalog == null) {
+ error ("expecting <delegateSystem "
+ + "systemIdStartString=... catalog=.../>");
+ return;
+ }
+ if (cat.systemDelegations == null) {
+ cat.systemDelegations = new Hashtable ();
+ if (unified)
+ cat.uriDelegations = cat.systemDelegations;
+ } else
+ value = cat.systemDelegations.get (systemIdStartString);
+ if (value != null) {
+ if (!value.equals (catalog))
+ warn ("ignoring <delegateSystem...> entry for "
+ + uriStartString);
+ } else
+ cat.systemDelegations.put (systemIdStartString, catalog);
+
+
+ //
+ // URI: just like "system" ID support, except that
+ // fragment IDs are disallowed in "system" elements.
+ //
+ } else if ("uri" == local) {
+ String name = atts.getValue ("name");
+ String value = null;
+
+ if (name == null || uri == null) {
+ error ("expecting <uri name=... uri=.../>");
+ return;
+ }
+ if (name.startsWith ("urn:publicid:")) {
+ error ("name is really a publicId!!");
+ return;
+ }
+ name = normalizeURI (name);
+ if (cat.uris == null) {
+ cat.uris = new Hashtable ();
+ if (unified)
+ cat.systemIds = cat.uris;
+ } else
+ value = (String) cat.uris.get (name);
+ if (value != null) {
+ if (!value.equals (uri))
+ warn ("ignoring <uri...> entry for " + name);
+ } else
+ cat.uris.put (name, uri);
+
+ } else if ("rewriteURI" == local) {
+ String value = null;
+
+ if (uriStartString == null || rewritePrefix == null
+ || uriStartString.length () == 0
+ || rewritePrefix.length () == 0
+ ) {
+ error ("expecting <rewriteURI "
+ + "uriStartString=... rewritePrefix=.../>");
+ return;
+ }
+ if (cat.uriRewrites == null) {
+ cat.uriRewrites = new Hashtable ();
+ if (unified)
+ cat.systemRewrites = cat.uriRewrites;
+ } else
+ value = (String) cat.uriRewrites.get (uriStartString);
+ if (value != null) {
+ if (!value.equals (rewritePrefix))
+ warn ("ignoring <rewriteURI...> entry for "
+ + uriStartString);
+ } else
+ cat.uriRewrites.put (uriStartString, rewritePrefix);
+
+ } else if ("delegateURI" == local) {
+ Object value = null;
+
+ if (uriStartString == null || catalog == null) {
+ error ("expecting <delegateURI "
+ + "uriStartString=... catalog=.../>");
+ return;
+ }
+ if (cat.uriDelegations == null) {
+ cat.uriDelegations = new Hashtable ();
+ if (unified)
+ cat.systemDelegations = cat.uriDelegations;
+ } else
+ value = cat.uriDelegations.get (uriStartString);
+ if (value != null) {
+ if (!value.equals (catalog))
+ warn ("ignoring <delegateURI...> entry for "
+ + uriStartString);
+ } else
+ cat.uriDelegations.put (uriStartString, catalog);
+
+ //
+ // NON-DELEGATING approach to modularity
+ //
+ } else if ("nextCatalog" == local) {
+ if (catalog == null) {
+ error ("expecting <nextCatalog catalog=.../>");
+ return;
+ }
+ if (cat.next == null)
+ cat.next = new Vector ();
+ cat.next.addElement (catalog);
+
+ //
+ // EXTENSIONS from appendix E
+ //
+ } else if ("doctype" == local) {
+ String name = atts.getValue ("name");
+ String value = null;
+
+ if (name == null || uri == null) {
+ error ("expecting <doctype name=... uri=.../>");
+ return;
+ }
+ name = normalizeURI (name);
+ if (cat.doctypes == null)
+ cat.doctypes = new Hashtable ();
+ else
+ value = (String) cat.doctypes.get (name);
+ if (value != null) {
+ if (!value.equals (uri))
+ warn ("ignoring <doctype...> entry for "
+ + uriStartString);
+ } else
+ cat.doctypes.put (name, uri);
+
+
+ //
+ // RESERVED ... ignore (like reserved attributes) but warn
+ //
+ } else {
+ warn ("ignoring unknown catalog element: " + local);
+ ignoreDepth++;
+ }
+ }
+
+ public void endElement (String uri, String local, String qName)
+ throws SAXException
+ {
+ if (ignoreDepth != 0)
+ ignoreDepth--;
+ else
+ bases.pop ();
+ }
}
}
diff --git a/gnu/xml/util/XHTMLWriter.java b/gnu/xml/util/XHTMLWriter.java
index 02a0afca8..3a0c1adb7 100644
--- a/gnu/xml/util/XHTMLWriter.java
+++ b/gnu/xml/util/XHTMLWriter.java
@@ -1,4 +1,4 @@
-/* XHTMLWriter.java --
+/* XHTMLWriter.java --
Copyright (C) 1999,2000,2001 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -67,7 +67,7 @@ public class XHTMLWriter extends XMLWriter
public XHTMLWriter ()
throws IOException
{
- this (System.out);
+ this (System.out);
}
/**
@@ -75,15 +75,15 @@ public class XHTMLWriter extends XMLWriter
* is used to write SAX events in the US-ASCII encoding, as XHTML.
*
* @param out Where US-ASCII encoding of the stream of SAX
- * events will be sent.
+ * events will be sent.
*/
public XHTMLWriter (OutputStream out)
throws IOException
{
- // not all JVMs understand "ASCII" as an encoding name, so
- // we use 8859_1 (they all seem to handle that one) and
- // make the echo handler filter out non-ASCII characters
- this (new OutputStreamWriter (out, "8859_1"), "US-ASCII");
+ // not all JVMs understand "ASCII" as an encoding name, so
+ // we use 8859_1 (they all seem to handle that one) and
+ // make the echo handler filter out non-ASCII characters
+ this (new OutputStreamWriter (out, "8859_1"), "US-ASCII");
}
/**
@@ -94,7 +94,7 @@ public class XHTMLWriter extends XMLWriter
*/
public XHTMLWriter (Writer out)
{
- this (out, null);
+ this (out, null);
}
/**
@@ -104,11 +104,11 @@ public class XHTMLWriter extends XMLWriter
*
* @param out Where the stream of SAX events will be written.
* @param encoding If non-null, this names the encoding to be
- * placed in the encoding declaration.
+ * placed in the encoding declaration.
*/
public XHTMLWriter (Writer out, String encoding)
{
- super (out, encoding);
- setXhtml (true);
+ super (out, encoding);
+ setXhtml (true);
}
}
diff --git a/gnu/xml/util/XMLWriter.java b/gnu/xml/util/XMLWriter.java
index 274594720..a371debff 100644
--- a/gnu/xml/util/XMLWriter.java
+++ b/gnu/xml/util/XMLWriter.java
@@ -1,4 +1,4 @@
-/* XMLWriter.java --
+/* XMLWriter.java --
Copyright (C) 1999,2000,2001 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -111,74 +111,74 @@ public class XMLWriter
implements ContentHandler, LexicalHandler, DTDHandler, DeclHandler
{
// text prints/escapes differently depending on context
- // CTX_ENTITY ... entity literal value
- // CTX_ATTRIBUTE ... attribute literal value
- // CTX_CONTENT ... content of an element
- // CTX_UNPARSED ... CDATA, comment, PI, names, etc
+ // CTX_ENTITY ... entity literal value
+ // CTX_ATTRIBUTE ... attribute literal value
+ // CTX_CONTENT ... content of an element
+ // CTX_UNPARSED ... CDATA, comment, PI, names, etc
// CTX_NAME ... name or nmtoken, no escapes possible
- private static final int CTX_ENTITY = 1;
- private static final int CTX_ATTRIBUTE = 2;
- private static final int CTX_CONTENT = 3;
- private static final int CTX_UNPARSED = 4;
- private static final int CTX_NAME = 5;
+ private static final int CTX_ENTITY = 1;
+ private static final int CTX_ATTRIBUTE = 2;
+ private static final int CTX_CONTENT = 3;
+ private static final int CTX_UNPARSED = 4;
+ private static final int CTX_NAME = 5;
// FIXME: names (element, attribute, PI, notation, etc) are not
// currently written out with range checks (escapeChars).
// In non-XHTML, some names can't be directly written; panic!
- private static String sysEOL;
+ private static String sysEOL;
static {
- try {
- sysEOL = System.getProperty ("line.separator", "\n");
+ try {
+ sysEOL = System.getProperty ("line.separator", "\n");
- // don't use the system's EOL if it's illegal XML.
- if (!isLineEnd (sysEOL))
- sysEOL = "\n";
+ // don't use the system's EOL if it's illegal XML.
+ if (!isLineEnd (sysEOL))
+ sysEOL = "\n";
- } catch (SecurityException e) {
- sysEOL = "\n";
- }
+ } catch (SecurityException e) {
+ sysEOL = "\n";
+ }
}
private static boolean isLineEnd (String eol)
{
- return "\n".equals (eol)
- || "\r".equals (eol)
- || "\r\n".equals (eol);
+ return "\n".equals (eol)
+ || "\r".equals (eol)
+ || "\r\n".equals (eol);
}
- private Writer out;
- private boolean inCDATA;
- private int elementNestLevel;
- private String eol = sysEOL;
+ private Writer out;
+ private boolean inCDATA;
+ private int elementNestLevel;
+ private String eol = sysEOL;
- private short dangerMask;
- private CPStringBuilder stringBuf;
- private Locator locator;
- private ErrorHandler errHandler;
+ private short dangerMask;
+ private CPStringBuilder stringBuf;
+ private Locator locator;
+ private ErrorHandler errHandler;
- private boolean expandingEntities = false;
- private int entityNestLevel;
- private boolean xhtml;
- private boolean startedDoctype;
- private String encoding;
+ private boolean expandingEntities = false;
+ private int entityNestLevel;
+ private boolean xhtml;
+ private boolean startedDoctype;
+ private String encoding;
- private boolean canonical;
- private boolean inDoctype;
- private boolean inEpilogue;
+ private boolean canonical;
+ private boolean inDoctype;
+ private boolean inEpilogue;
// pretty printing controls
- private boolean prettyPrinting;
- private int column;
- private boolean noWrap;
- private Stack space = new Stack ();
+ private boolean prettyPrinting;
+ private int column;
+ private boolean noWrap;
+ private Stack space = new Stack ();
// this is not a hard'n'fast rule -- longer lines are OK,
// but are to be avoided. Here, prettyprinting is more to
// show structure "cleanly" than to be precise about it.
// better to have ragged layout than one line 24Kb long.
- private static final int lineLength = 75;
+ private static final int lineLength = 75;
/**
@@ -187,7 +187,7 @@ public class XMLWriter
* it's safe to close System.out at the end of the document.
*/
public XMLWriter () throws IOException
- { this (System.out); }
+ { this (System.out); }
/**
* Constructs a handler which writes all input to the output stream
@@ -198,7 +198,7 @@ public class XMLWriter
*/
public XMLWriter (OutputStream out) throws IOException
{
- this (new OutputStreamWriter (out, "UTF8"));
+ this (new OutputStreamWriter (out, "UTF8"));
}
/**
@@ -215,7 +215,7 @@ public class XMLWriter
*/
public XMLWriter (Writer writer)
{
- this (writer, null);
+ this (writer, null);
}
/**
@@ -248,53 +248,53 @@ public class XMLWriter
*
* @param writer XML text is written to this writer.
* @param encoding if non-null, and an XML declaration is written,
- * this is the name that will be used for the character encoding.
+ * this is the name that will be used for the character encoding.
*/
public XMLWriter (Writer writer, String encoding)
{
- setWriter (writer, encoding);
+ setWriter (writer, encoding);
}
-
+
private void setEncoding (String encoding)
{
- if (encoding == null && out instanceof OutputStreamWriter)
- encoding = ((OutputStreamWriter)out).getEncoding ();
-
- if (encoding != null) {
- encoding = encoding.toUpperCase ();
-
- // Use official encoding names where we know them,
- // avoiding the Java-only names. When using common
- // encodings where we can easily tell if characters
- // are out of range, we'll escape out-of-range
- // characters using character refs for safety.
-
- // I _think_ these are all the main synonyms for these!
- if ("UTF8".equals (encoding)) {
- encoding = "UTF-8";
- } else if ("US-ASCII".equals (encoding)
- || "ASCII".equals (encoding)) {
- dangerMask = (short) 0xff80;
- encoding = "US-ASCII";
- } else if ("ISO-8859-1".equals (encoding)
- || "8859_1".equals (encoding)
- || "ISO8859_1".equals (encoding)) {
- dangerMask = (short) 0xff00;
- encoding = "ISO-8859-1";
- } else if ("UNICODE".equals (encoding)
- || "UNICODE-BIG".equals (encoding)
- || "UNICODE-LITTLE".equals (encoding)) {
- encoding = "UTF-16";
-
- // TODO: UTF-16BE, UTF-16LE ... no BOM; what
- // release of JDK supports those Unicode names?
- }
-
- if (dangerMask != 0)
- stringBuf = new CPStringBuilder ();
- }
-
- this.encoding = encoding;
+ if (encoding == null && out instanceof OutputStreamWriter)
+ encoding = ((OutputStreamWriter)out).getEncoding ();
+
+ if (encoding != null) {
+ encoding = encoding.toUpperCase ();
+
+ // Use official encoding names where we know them,
+ // avoiding the Java-only names. When using common
+ // encodings where we can easily tell if characters
+ // are out of range, we'll escape out-of-range
+ // characters using character refs for safety.
+
+ // I _think_ these are all the main synonyms for these!
+ if ("UTF8".equals (encoding)) {
+ encoding = "UTF-8";
+ } else if ("US-ASCII".equals (encoding)
+ || "ASCII".equals (encoding)) {
+ dangerMask = (short) 0xff80;
+ encoding = "US-ASCII";
+ } else if ("ISO-8859-1".equals (encoding)
+ || "8859_1".equals (encoding)
+ || "ISO8859_1".equals (encoding)) {
+ dangerMask = (short) 0xff00;
+ encoding = "ISO-8859-1";
+ } else if ("UNICODE".equals (encoding)
+ || "UNICODE-BIG".equals (encoding)
+ || "UNICODE-LITTLE".equals (encoding)) {
+ encoding = "UTF-16";
+
+ // TODO: UTF-16BE, UTF-16LE ... no BOM; what
+ // release of JDK supports those Unicode names?
+ }
+
+ if (dangerMask != 0)
+ stringBuf = new CPStringBuilder ();
+ }
+
+ this.encoding = encoding;
}
@@ -303,37 +303,37 @@ public class XMLWriter
*
* @param writer XML text is written to this writer.
* @param encoding if non-null, and an XML declaration is written,
- * this is the name that will be used for the character encoding.
+ * this is the name that will be used for the character encoding.
*
* @exception IllegalStateException if the current
- * document hasn't yet ended (with {@link #endDocument})
+ * document hasn't yet ended (with {@link #endDocument})
*/
final public void setWriter (Writer writer, String encoding)
{
- if (out != null)
- throw new IllegalStateException (
- "can't change stream in mid course");
- out = writer;
- if (out != null)
- setEncoding (encoding);
- if (!(out instanceof BufferedWriter))
- out = new BufferedWriter (out);
- space.push ("default");
+ if (out != null)
+ throw new IllegalStateException (
+ "can't change stream in mid course");
+ out = writer;
+ if (out != null)
+ setEncoding (encoding);
+ if (!(out instanceof BufferedWriter))
+ out = new BufferedWriter (out);
+ space.push ("default");
}
/**
* Assigns the line ending style to be used on output.
* @param eolString null to use the system default; else
- * "\n", "\r", or "\r\n".
+ * "\n", "\r", or "\r\n".
*/
final public void setEOL (String eolString)
{
- if (eolString == null)
- eol = sysEOL;
- else if (!isLineEnd (eolString))
- eol = eolString;
- else
- throw new IllegalArgumentException (eolString);
+ if (eolString == null)
+ eol = sysEOL;
+ else if (!isLineEnd (eolString))
+ eol = eolString;
+ else
+ throw new IllegalArgumentException (eolString);
}
/**
@@ -342,7 +342,7 @@ public class XMLWriter
*/
public void setErrorHandler (ErrorHandler handler)
{
- errHandler = handler;
+ errHandler = handler;
}
/**
@@ -355,15 +355,15 @@ public class XMLWriter
protected void fatal (String message, Exception e)
throws SAXException
{
- SAXParseException x;
-
- if (locator == null)
- x = new SAXParseException (message, null, null, -1, -1, e);
- else
- x = new SAXParseException (message, locator, e);
- if (errHandler != null)
- errHandler.fatalError (x);
- throw x;
+ SAXParseException x;
+
+ if (locator == null)
+ x = new SAXParseException (message, null, null, -1, -1, e);
+ else
+ x = new SAXParseException (message, locator, e);
+ if (errHandler != null)
+ errHandler.fatalError (x);
+ throw x;
}
@@ -385,47 +385,47 @@ public class XMLWriter
* be careful of in all cases, as described in the appendix referenced
* above, include: <ul>
*
- * <li> Element and attribute names must be in lower case, both
- * in the document and in any CSS style sheet.
- * <li> All XML constructs must be valid as defined by the XHTML
- * "transitional" DTD (including all familiar constructs,
- * even deprecated ones).
- * <li> The root element must be "html".
- * <li> Elements that must be empty (such as <em>&lt;br&gt;</em>
- * must have no content.
- * <li> Use both <em>lang</em> and <em>xml:lang</em> attributes
- * when specifying language.
- * <li> Similarly, use both <em>id</em> and <em>name</em> attributes
- * when defining elements that may be referred to through
- * URI fragment identifiers ... and make sure that the
- * value is a legal NMTOKEN, since not all such HTML 4.0
- * identifiers are valid in XML.
- * <li> Be careful with character encodings; make sure you provide
- * a <em>&lt;meta http-equiv="Content-type"
- * content="text/xml;charset=..." /&gt;</em> element in
- * the HTML "head" element, naming the same encoding
- * used to create this handler. Also, if that encoding
- * is anything other than US-ASCII, make sure that if
- * the document is given a MIME content type, it has
- * a <em>charset=...</em> attribute with that encoding.
- * </ul>
+ * <li> Element and attribute names must be in lower case, both
+ * in the document and in any CSS style sheet.
+ * <li> All XML constructs must be valid as defined by the XHTML
+ * "transitional" DTD (including all familiar constructs,
+ * even deprecated ones).
+ * <li> The root element must be "html".
+ * <li> Elements that must be empty (such as <em>&lt;br&gt;</em>
+ * must have no content.
+ * <li> Use both <em>lang</em> and <em>xml:lang</em> attributes
+ * when specifying language.
+ * <li> Similarly, use both <em>id</em> and <em>name</em> attributes
+ * when defining elements that may be referred to through
+ * URI fragment identifiers ... and make sure that the
+ * value is a legal NMTOKEN, since not all such HTML 4.0
+ * identifiers are valid in XML.
+ * <li> Be careful with character encodings; make sure you provide
+ * a <em>&lt;meta http-equiv="Content-type"
+ * content="text/xml;charset=..." /&gt;</em> element in
+ * the HTML "head" element, naming the same encoding
+ * used to create this handler. Also, if that encoding
+ * is anything other than US-ASCII, make sure that if
+ * the document is given a MIME content type, it has
+ * a <em>charset=...</em> attribute with that encoding.
+ * </ul>
*
* <p> Additionally, some of the oldest browsers have additional
* quirks, to address with guidelines such as: <ul>
*
- * <li> Processing instructions may be rendered, so avoid them.
- * (Similarly for an XML declaration.)
- * <li> Embedded style sheets and scripts should not contain XML
- * markup delimiters: &amp;, &lt;, and ]]&gt; are trouble.
- * <li> Attribute values should not have line breaks or multiple
- * consecutive white space characters.
- * <li> Use no more than one of the deprecated (transitional)
- * <em>&lt;isindex&gt;</em> elements.
- * <li> Some boolean attributes (such as <em>compact, checked,
- * disabled, readonly, selected,</em> and more) confuse
- * some browsers, since they only understand minimized
- * versions which are illegal in XML.
- * </ul>
+ * <li> Processing instructions may be rendered, so avoid them.
+ * (Similarly for an XML declaration.)
+ * <li> Embedded style sheets and scripts should not contain XML
+ * markup delimiters: &amp;, &lt;, and ]]&gt; are trouble.
+ * <li> Attribute values should not have line breaks or multiple
+ * consecutive white space characters.
+ * <li> Use no more than one of the deprecated (transitional)
+ * <em>&lt;isindex&gt;</em> elements.
+ * <li> Some boolean attributes (such as <em>compact, checked,
+ * disabled, readonly, selected,</em> and more) confuse
+ * some browsers, since they only understand minimized
+ * versions which are illegal in XML.
+ * </ul>
*
* <p> Also, some characteristics of the resulting output may be
* a function of whether the document is later given a MIME
@@ -437,11 +437,11 @@ public class XMLWriter
*/
final public void setXhtml (boolean value)
{
- if (locator != null)
- throw new IllegalStateException ("started parsing");
- xhtml = value;
- if (xhtml)
- canonical = false;
+ if (locator != null)
+ throw new IllegalStateException ("started parsing");
+ xhtml = value;
+ if (xhtml)
+ canonical = false;
}
/**
@@ -452,7 +452,7 @@ public class XMLWriter
*/
final public boolean isXhtml ()
{
- return xhtml;
+ return xhtml;
}
/**
@@ -462,11 +462,11 @@ public class XMLWriter
*/
final public void setExpandingEntities (boolean value)
{
- if (locator != null)
- throw new IllegalStateException ("started parsing");
- expandingEntities = value;
- if (!expandingEntities)
- canonical = false;
+ if (locator != null)
+ throw new IllegalStateException ("started parsing");
+ expandingEntities = value;
+ if (!expandingEntities)
+ canonical = false;
}
/**
@@ -475,7 +475,7 @@ public class XMLWriter
*/
final public boolean isExpandingEntities ()
{
- return expandingEntities;
+ return expandingEntities;
}
/**
@@ -499,15 +499,15 @@ public class XMLWriter
* to make this be more strictly formatted!
*
* @exception IllegalStateException thrown if this method is invoked
- * after output has begun.
+ * after output has begun.
*/
final public void setPrettyPrinting (boolean value)
{
- if (locator != null)
- throw new IllegalStateException ("started parsing");
- prettyPrinting = value;
- if (prettyPrinting)
- canonical = false;
+ if (locator != null)
+ throw new IllegalStateException ("started parsing");
+ prettyPrinting = value;
+ if (prettyPrinting)
+ canonical = false;
}
/**
@@ -515,7 +515,7 @@ public class XMLWriter
*/
final public boolean isPrettyPrinting ()
{
- return prettyPrinting;
+ return prettyPrinting;
}
@@ -524,31 +524,31 @@ public class XMLWriter
* meet requirements that are slightly more stringent than the
* basic well-formedness ones, and include: <ul>
*
- * <li> Namespace prefixes must not have been changed from those
- * in the original document. (This may only be ensured by setting
- * the SAX2 XMLReader <em>namespace-prefixes</em> feature flag;
- * by default, it is cleared.)
+ * <li> Namespace prefixes must not have been changed from those
+ * in the original document. (This may only be ensured by setting
+ * the SAX2 XMLReader <em>namespace-prefixes</em> feature flag;
+ * by default, it is cleared.)
*
- * <li> Redundant namespace declaration attributes have been
- * removed. (If an ancestor element defines a namespace prefix
- * and that declaration hasn't been overriden, an element must
- * not redeclare it.)
+ * <li> Redundant namespace declaration attributes have been
+ * removed. (If an ancestor element defines a namespace prefix
+ * and that declaration hasn't been overriden, an element must
+ * not redeclare it.)
*
- * <li> If comments are not to be included in the canonical output,
- * they must first be removed from the input event stream; this
- * <em>Canonical XML with comments</em> by default.
+ * <li> If comments are not to be included in the canonical output,
+ * they must first be removed from the input event stream; this
+ * <em>Canonical XML with comments</em> by default.
*
- * <li> If the input character encoding was not UCS-based, the
- * character data must have been normalized using Unicode
- * Normalization Form C. (UTF-8 and UTF-16 are UCS-based.)
+ * <li> If the input character encoding was not UCS-based, the
+ * character data must have been normalized using Unicode
+ * Normalization Form C. (UTF-8 and UTF-16 are UCS-based.)
*
- * <li> Attribute values must have been normalized, as is done
- * by any conformant XML processor which processes all external
- * parameter entities.
+ * <li> Attribute values must have been normalized, as is done
+ * by any conformant XML processor which processes all external
+ * parameter entities.
*
- * <li> Similarly, attribute value defaulting has been performed.
+ * <li> Similarly, attribute value defaulting has been performed.
*
- * </ul>
+ * </ul>
*
* <p> Note that fragments of XML documents, as specified by an XPath
* node set, may be canonicalized. In such cases, elements may need
@@ -556,18 +556,18 @@ public class XMLWriter
* context).
*
* @exception IllegalArgumentException if the output encoding
- * is anything other than UTF-8.
+ * is anything other than UTF-8.
*/
final public void setCanonical (boolean value)
{
- if (value && !"UTF-8".equals (encoding))
- throw new IllegalArgumentException ("encoding != UTF-8");
- canonical = value;
- if (canonical) {
- prettyPrinting = xhtml = false;
- expandingEntities = true;
- eol = "\n";
- }
+ if (value && !"UTF-8".equals (encoding))
+ throw new IllegalArgumentException ("encoding != UTF-8");
+ canonical = value;
+ if (canonical) {
+ prettyPrinting = xhtml = false;
+ expandingEntities = true;
+ eol = "\n";
+ }
}
@@ -576,7 +576,7 @@ public class XMLWriter
*/
final public boolean isCanonical ()
{
- return canonical;
+ return canonical;
}
@@ -588,8 +588,8 @@ public class XMLWriter
final public void flush ()
throws IOException
{
- if (out != null)
- out.flush ();
+ if (out != null)
+ out.flush ();
}
@@ -597,7 +597,7 @@ public class XMLWriter
// FIXME: probably want a subclass that holds a lot of these...
// and maybe more!
-
+
/**
* Writes the string as if characters() had been called on the contents
* of the string. This is particularly useful when applications act as
@@ -606,8 +606,8 @@ public class XMLWriter
final public void write (String data)
throws SAXException
{
- char buf [] = data.toCharArray ();
- characters (buf, 0, buf.length);
+ char buf [] = data.toCharArray ();
+ characters (buf, 0, buf.length);
}
@@ -617,21 +617,21 @@ public class XMLWriter
* @see #startElement
*/
public void writeElement (
- String uri,
- String localName,
- String qName,
- Attributes atts,
- String content
+ String uri,
+ String localName,
+ String qName,
+ Attributes atts,
+ String content
) throws SAXException
{
- if (content == null || content.length () == 0) {
- writeEmptyElement (uri, localName, qName, atts);
- return;
- }
- startElement (uri, localName, qName, atts);
- char chars [] = content.toCharArray ();
- characters (chars, 0, chars.length);
- endElement (uri, localName, qName);
+ if (content == null || content.length () == 0) {
+ writeEmptyElement (uri, localName, qName, atts);
+ return;
+ }
+ startElement (uri, localName, qName, atts);
+ char chars [] = content.toCharArray ();
+ characters (chars, 0, chars.length);
+ endElement (uri, localName, qName);
}
@@ -642,14 +642,14 @@ public class XMLWriter
* @see #startElement
*/
public void writeElement (
- String uri,
- String localName,
- String qName,
- Attributes atts,
- int content
+ String uri,
+ String localName,
+ String qName,
+ Attributes atts,
+ int content
) throws SAXException
{
- writeElement (uri, localName, qName, atts, Integer.toString (content));
+ writeElement (uri, localName, qName, atts, Integer.toString (content));
}
@@ -657,7 +657,7 @@ public class XMLWriter
/** <b>SAX1</b>: provides parser status information */
final public void setDocumentLocator (Locator l)
{
- locator = l;
+ locator = l;
}
@@ -665,7 +665,7 @@ public class XMLWriter
private static final String xhtmlFullDTD =
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";
-
+
/**
* <b>SAX1</b>: indicates the beginning of a document parse.
* If you're writing (well formed) fragments of XML, neither
@@ -675,60 +675,60 @@ public class XMLWriter
public void startDocument ()
throws SAXException
{
- try {
- if (out == null)
- throw new IllegalStateException (
- "null Writer given to XMLWriter");
-
- // Not all parsers provide the locator we want; this also
- // flags whether events are being sent to this object yet.
- // We could only have this one call if we only printed whole
- // documents ... but we also print fragments, so most of the
- // callbacks here replicate this test.
-
- if (locator == null)
- locator = new LocatorImpl ();
-
- // Unless the data is in US-ASCII or we're canonicalizing, write
- // the XML declaration if we know the encoding. US-ASCII won't
- // normally get mangled by web server confusion about the
- // character encodings used. Plus, it's an easy way to
- // ensure we can write ASCII that's unlikely to confuse
- // elderly HTML parsers.
-
- if (!canonical
- && dangerMask != (short) 0xff80
- && encoding != null) {
- rawWrite ("<?xml version='1.0'");
- rawWrite (" encoding='" + encoding + "'");
- rawWrite ("?>");
- newline ();
- }
-
- if (xhtml) {
-
- rawWrite ("<!DOCTYPE html PUBLIC");
- newline ();
- rawWrite (" '-//W3C//DTD XHTML 1.0 Transitional//EN'");
- newline ();
- rawWrite (" '");
- // NOTE: URL (above) matches the REC
- rawWrite (xhtmlFullDTD);
- rawWrite ("'>");
- newline ();
- newline ();
-
- // fake the rest of the handler into ignoring
- // everything until the root element, so any
- // XHTML DTD comments, PIs, etc are ignored
- startedDoctype = true;
- }
-
- entityNestLevel = 0;
-
- } catch (IOException e) {
- fatal ("can't write", e);
- }
+ try {
+ if (out == null)
+ throw new IllegalStateException (
+ "null Writer given to XMLWriter");
+
+ // Not all parsers provide the locator we want; this also
+ // flags whether events are being sent to this object yet.
+ // We could only have this one call if we only printed whole
+ // documents ... but we also print fragments, so most of the
+ // callbacks here replicate this test.
+
+ if (locator == null)
+ locator = new LocatorImpl ();
+
+ // Unless the data is in US-ASCII or we're canonicalizing, write
+ // the XML declaration if we know the encoding. US-ASCII won't
+ // normally get mangled by web server confusion about the
+ // character encodings used. Plus, it's an easy way to
+ // ensure we can write ASCII that's unlikely to confuse
+ // elderly HTML parsers.
+
+ if (!canonical
+ && dangerMask != (short) 0xff80
+ && encoding != null) {
+ rawWrite ("<?xml version='1.0'");
+ rawWrite (" encoding='" + encoding + "'");
+ rawWrite ("?>");
+ newline ();
+ }
+
+ if (xhtml) {
+
+ rawWrite ("<!DOCTYPE html PUBLIC");
+ newline ();
+ rawWrite (" '-//W3C//DTD XHTML 1.0 Transitional//EN'");
+ newline ();
+ rawWrite (" '");
+ // NOTE: URL (above) matches the REC
+ rawWrite (xhtmlFullDTD);
+ rawWrite ("'>");
+ newline ();
+ newline ();
+
+ // fake the rest of the handler into ignoring
+ // everything until the root element, so any
+ // XHTML DTD comments, PIs, etc are ignored
+ startedDoctype = true;
+ }
+
+ entityNestLevel = 0;
+
+ } catch (IOException e) {
+ fatal ("can't write", e);
+ }
}
/**
@@ -740,164 +740,164 @@ public class XMLWriter
public void endDocument ()
throws SAXException
{
- try {
- if (!canonical) {
- newline ();
- newline ();
- }
- out.close ();
- out = null;
- locator = null;
- } catch (IOException e) {
- fatal ("can't write", e);
- }
+ try {
+ if (!canonical) {
+ newline ();
+ newline ();
+ }
+ out.close ();
+ out = null;
+ locator = null;
+ } catch (IOException e) {
+ fatal ("can't write", e);
+ }
}
// XHTML elements declared as EMPTY print differently
final private static boolean isEmptyElementTag (String tag)
{
- switch (tag.charAt (0)) {
- case 'a': return "area".equals (tag);
- case 'b': return "base".equals (tag)
- || "basefont".equals (tag)
- || "br".equals (tag);
- case 'c': return "col".equals (tag);
- case 'f': return "frame".equals (tag);
- case 'h': return "hr".equals (tag);
- case 'i': return "img".equals (tag)
- || "input".equals (tag)
- || "isindex".equals (tag);
- case 'l': return "link".equals (tag);
- case 'm': return "meta".equals (tag);
- case 'p': return "param".equals (tag);
- }
- return false;
+ switch (tag.charAt (0)) {
+ case 'a': return "area".equals (tag);
+ case 'b': return "base".equals (tag)
+ || "basefont".equals (tag)
+ || "br".equals (tag);
+ case 'c': return "col".equals (tag);
+ case 'f': return "frame".equals (tag);
+ case 'h': return "hr".equals (tag);
+ case 'i': return "img".equals (tag)
+ || "input".equals (tag)
+ || "isindex".equals (tag);
+ case 'l': return "link".equals (tag);
+ case 'm': return "meta".equals (tag);
+ case 'p': return "param".equals (tag);
+ }
+ return false;
}
private static boolean indentBefore (String tag)
{
- // basically indent before block content
- // and within structure like tables, lists
- switch (tag.charAt (0)) {
- case 'a': return "applet".equals (tag);
- case 'b': return "body".equals (tag)
- || "blockquote".equals (tag);
- case 'c': return "center".equals (tag);
- case 'f': return "frame".equals (tag)
- || "frameset".equals (tag);
- case 'h': return "head".equals (tag);
- case 'm': return "meta".equals (tag);
- case 'o': return "object".equals (tag);
- case 'p': return "param".equals (tag)
- || "pre".equals (tag);
- case 's': return "style".equals (tag);
- case 't': return "title".equals (tag)
- || "td".equals (tag)
- || "th".equals (tag);
- }
- // ... but not inline elements like "em", "b", "font"
- return false;
+ // basically indent before block content
+ // and within structure like tables, lists
+ switch (tag.charAt (0)) {
+ case 'a': return "applet".equals (tag);
+ case 'b': return "body".equals (tag)
+ || "blockquote".equals (tag);
+ case 'c': return "center".equals (tag);
+ case 'f': return "frame".equals (tag)
+ || "frameset".equals (tag);
+ case 'h': return "head".equals (tag);
+ case 'm': return "meta".equals (tag);
+ case 'o': return "object".equals (tag);
+ case 'p': return "param".equals (tag)
+ || "pre".equals (tag);
+ case 's': return "style".equals (tag);
+ case 't': return "title".equals (tag)
+ || "td".equals (tag)
+ || "th".equals (tag);
+ }
+ // ... but not inline elements like "em", "b", "font"
+ return false;
}
private static boolean spaceBefore (String tag)
{
- // blank line AND INDENT before certain structural content
- switch (tag.charAt (0)) {
- case 'h': return "h1".equals (tag)
- || "h2".equals (tag)
- || "h3".equals (tag)
- || "h4".equals (tag)
- || "h5".equals (tag)
- || "h6".equals (tag)
- || "hr".equals (tag);
- case 'l': return "li".equals (tag);
- case 'o': return "ol".equals (tag);
- case 'p': return "p".equals (tag);
- case 't': return "table".equals (tag)
- || "tr".equals (tag);
- case 'u': return "ul".equals (tag);
- }
- return false;
+ // blank line AND INDENT before certain structural content
+ switch (tag.charAt (0)) {
+ case 'h': return "h1".equals (tag)
+ || "h2".equals (tag)
+ || "h3".equals (tag)
+ || "h4".equals (tag)
+ || "h5".equals (tag)
+ || "h6".equals (tag)
+ || "hr".equals (tag);
+ case 'l': return "li".equals (tag);
+ case 'o': return "ol".equals (tag);
+ case 'p': return "p".equals (tag);
+ case 't': return "table".equals (tag)
+ || "tr".equals (tag);
+ case 'u': return "ul".equals (tag);
+ }
+ return false;
}
// XHTML DTDs say these three have xml:space="preserve"
private static boolean spacePreserve (String tag)
{
- return "pre".equals (tag)
- || "style".equals (tag)
- || "script".equals (tag);
+ return "pre".equals (tag)
+ || "style".equals (tag)
+ || "script".equals (tag);
}
/**
* <b>SAX2</b>: ignored.
*/
final public void startPrefixMapping (String prefix, String uri)
- {}
+ {}
/**
* <b>SAX2</b>: ignored.
*/
final public void endPrefixMapping (String prefix)
- {}
+ {}
private void writeStartTag (
- String name,
- Attributes atts,
- boolean isEmpty
+ String name,
+ Attributes atts,
+ boolean isEmpty
) throws SAXException, IOException
{
- rawWrite ('<');
- rawWrite (name);
+ rawWrite ('<');
+ rawWrite (name);
- // write out attributes ... sorting is particularly useful
- // with output that's been heavily defaulted.
- if (atts != null && atts.getLength () != 0) {
+ // write out attributes ... sorting is particularly useful
+ // with output that's been heavily defaulted.
+ if (atts != null && atts.getLength () != 0) {
- // Set up to write, with optional sorting
- int indices [] = new int [atts.getLength ()];
+ // Set up to write, with optional sorting
+ int indices [] = new int [atts.getLength ()];
- for (int i= 0; i < indices.length; i++)
- indices [i] = i;
-
- // optionally sort
+ for (int i= 0; i < indices.length; i++)
+ indices [i] = i;
+
+ // optionally sort
// FIXME: canon xml demands xmlns nodes go first,
// and sorting by URI first (empty first) then localname
// it should maybe use a different sort
- if (canonical || prettyPrinting) {
-
- // insertion sort by attribute name
- for (int i = 1; i < indices.length; i++) {
- int n = indices [i], j;
- String s = atts.getQName (n);
-
- for (j = i - 1; j >= 0; j--) {
- if (s.compareTo (atts.getQName (indices [j]))
- >= 0)
- break;
- indices [j + 1] = indices [j];
- }
- indices [j + 1] = n;
- }
- }
-
- // write, sorted or no
- for (int i= 0; i < indices.length; i++) {
- String s = atts.getQName (indices [i]);
-
- if (s == null || "".equals (s))
- throw new IllegalArgumentException ("no XML name");
- rawWrite (" ");
- rawWrite (s);
- rawWrite ("=");
- writeQuotedValue (atts.getValue (indices [i]),
- CTX_ATTRIBUTE);
- }
- }
- if (isEmpty)
- rawWrite (" /");
- rawWrite ('>');
+ if (canonical || prettyPrinting) {
+
+ // insertion sort by attribute name
+ for (int i = 1; i < indices.length; i++) {
+ int n = indices [i], j;
+ String s = atts.getQName (n);
+
+ for (j = i - 1; j >= 0; j--) {
+ if (s.compareTo (atts.getQName (indices [j]))
+ >= 0)
+ break;
+ indices [j + 1] = indices [j];
+ }
+ indices [j + 1] = n;
+ }
+ }
+
+ // write, sorted or no
+ for (int i= 0; i < indices.length; i++) {
+ String s = atts.getQName (indices [i]);
+
+ if (s == null || "".equals (s))
+ throw new IllegalArgumentException ("no XML name");
+ rawWrite (" ");
+ rawWrite (s);
+ rawWrite ("=");
+ writeQuotedValue (atts.getValue (indices [i]),
+ CTX_ATTRIBUTE);
+ }
+ }
+ if (isEmpty)
+ rawWrite (" /");
+ rawWrite ('>');
}
/**
@@ -907,59 +907,59 @@ public class XMLWriter
* not all user agents handle them correctly.
*/
final public void startElement (
- String uri,
- String localName,
- String qName,
- Attributes atts
+ String uri,
+ String localName,
+ String qName,
+ Attributes atts
) throws SAXException
{
- startedDoctype = false;
-
- if (locator == null)
- locator = new LocatorImpl ();
-
- if (qName == null || "".equals (qName))
- throw new IllegalArgumentException ("no XML name");
-
- try {
- if (entityNestLevel != 0)
- return;
- if (prettyPrinting) {
- String whitespace = null;
-
- if (xhtml && spacePreserve (qName))
- whitespace = "preserve";
- else if (atts != null)
- whitespace = atts.getValue ("xml:space");
- if (whitespace == null)
- whitespace = (String) space.peek ();
- space.push (whitespace);
-
- if ("default".equals (whitespace)) {
- if (xhtml) {
- if (spaceBefore (qName)) {
- newline ();
- doIndent ();
- } else if (indentBefore (qName))
- doIndent ();
- // else it's inlined, modulo line length
- // FIXME: incrementing element nest level
- // for inlined elements causes ugliness
- } else
- doIndent ();
- }
- }
- elementNestLevel++;
- writeStartTag (qName, atts, xhtml && isEmptyElementTag (qName));
-
- if (xhtml) {
+ startedDoctype = false;
+
+ if (locator == null)
+ locator = new LocatorImpl ();
+
+ if (qName == null || "".equals (qName))
+ throw new IllegalArgumentException ("no XML name");
+
+ try {
+ if (entityNestLevel != 0)
+ return;
+ if (prettyPrinting) {
+ String whitespace = null;
+
+ if (xhtml && spacePreserve (qName))
+ whitespace = "preserve";
+ else if (atts != null)
+ whitespace = atts.getValue ("xml:space");
+ if (whitespace == null)
+ whitespace = (String) space.peek ();
+ space.push (whitespace);
+
+ if ("default".equals (whitespace)) {
+ if (xhtml) {
+ if (spaceBefore (qName)) {
+ newline ();
+ doIndent ();
+ } else if (indentBefore (qName))
+ doIndent ();
+ // else it's inlined, modulo line length
+ // FIXME: incrementing element nest level
+ // for inlined elements causes ugliness
+ } else
+ doIndent ();
+ }
+ }
+ elementNestLevel++;
+ writeStartTag (qName, atts, xhtml && isEmptyElementTag (qName));
+
+ if (xhtml) {
// FIXME: if this is an XHTML "pre" element, turn
// off automatic wrapping.
- }
+ }
- } catch (IOException e) {
- fatal ("can't write", e);
- }
+ } catch (IOException e) {
+ fatal ("can't write", e);
+ }
}
/**
@@ -967,22 +967,22 @@ public class XMLWriter
* @see #startElement
*/
public void writeEmptyElement (
- String uri,
- String localName,
- String qName,
- Attributes atts
+ String uri,
+ String localName,
+ String qName,
+ Attributes atts
) throws SAXException
{
- if (canonical) {
- startElement (uri, localName, qName, atts);
- endElement (uri, localName, qName);
- } else {
- try {
- writeStartTag (qName, atts, true);
- } catch (IOException e) {
- fatal ("can't write", e);
- }
- }
+ if (canonical) {
+ startElement (uri, localName, qName, atts);
+ endElement (uri, localName, qName);
+ } else {
+ try {
+ writeStartTag (qName, atts, true);
+ } catch (IOException e) {
+ fatal ("can't write", e);
+ }
+ }
}
@@ -990,68 +990,68 @@ public class XMLWriter
final public void endElement (String uri, String localName, String qName)
throws SAXException
{
- if (qName == null || "".equals (qName))
- throw new IllegalArgumentException ("no XML name");
-
- try {
- elementNestLevel--;
- if (entityNestLevel != 0)
- return;
- if (xhtml && isEmptyElementTag (qName))
- return;
- rawWrite ("</");
- rawWrite (qName);
- rawWrite ('>');
-
- if (prettyPrinting) {
- if (!space.empty ())
- space.pop ();
- else
- fatal ("stack discipline", null);
- }
- if (elementNestLevel == 0)
- inEpilogue = true;
-
- } catch (IOException e) {
- fatal ("can't write", e);
- }
+ if (qName == null || "".equals (qName))
+ throw new IllegalArgumentException ("no XML name");
+
+ try {
+ elementNestLevel--;
+ if (entityNestLevel != 0)
+ return;
+ if (xhtml && isEmptyElementTag (qName))
+ return;
+ rawWrite ("</");
+ rawWrite (qName);
+ rawWrite ('>');
+
+ if (prettyPrinting) {
+ if (!space.empty ())
+ space.pop ();
+ else
+ fatal ("stack discipline", null);
+ }
+ if (elementNestLevel == 0)
+ inEpilogue = true;
+
+ } catch (IOException e) {
+ fatal ("can't write", e);
+ }
}
/** <b>SAX1</b>: reports content characters */
final public void characters (char ch [], int start, int length)
throws SAXException
{
- if (locator == null)
- locator = new LocatorImpl ();
-
- try {
- if (entityNestLevel != 0)
- return;
- if (inCDATA) {
- escapeChars (ch, start, length, CTX_UNPARSED);
- } else {
- escapeChars (ch, start, length, CTX_CONTENT);
- }
- } catch (IOException e) {
- fatal ("can't write", e);
- }
+ if (locator == null)
+ locator = new LocatorImpl ();
+
+ try {
+ if (entityNestLevel != 0)
+ return;
+ if (inCDATA) {
+ escapeChars (ch, start, length, CTX_UNPARSED);
+ } else {
+ escapeChars (ch, start, length, CTX_CONTENT);
+ }
+ } catch (IOException e) {
+ fatal ("can't write", e);
+ }
}
/** <b>SAX1</b>: reports ignorable whitespace */
final public void ignorableWhitespace (char ch [], int start, int length)
throws SAXException
{
- if (locator == null)
- locator = new LocatorImpl ();
-
- try {
- if (entityNestLevel != 0)
- return;
- // don't forget to map NL to CRLF, CR, etc
- escapeChars (ch, start, length, CTX_CONTENT);
- } catch (IOException e) {
- fatal ("can't write", e);
- }
+ if (locator == null)
+ locator = new LocatorImpl ();
+
+ try {
+ if (entityNestLevel != 0)
+ return;
+ // don't forget to map NL to CRLF, CR, etc
+ escapeChars (ch, start, length, CTX_CONTENT);
+ } catch (IOException e) {
+ fatal ("can't write", e);
+ }
}
/**
@@ -1063,44 +1063,44 @@ public class XMLWriter
final public void processingInstruction (String target, String data)
throws SAXException
{
- if (locator == null)
- locator = new LocatorImpl ();
-
- // don't print internal subset for XHTML
- if (xhtml && startedDoctype)
- return;
-
- // ancient HTML browsers might render these ... their loss.
- // to prevent: "if (xhtml) return;".
-
- try {
- if (entityNestLevel != 0)
- return;
- if (canonical && inEpilogue)
- newline ();
- rawWrite ("<?");
- rawWrite (target);
- rawWrite (' ');
- escapeChars (data.toCharArray (), -1, -1, CTX_UNPARSED);
- rawWrite ("?>");
- if (elementNestLevel == 0 && !(canonical && inEpilogue))
- newline ();
- } catch (IOException e) {
- fatal ("can't write", e);
- }
+ if (locator == null)
+ locator = new LocatorImpl ();
+
+ // don't print internal subset for XHTML
+ if (xhtml && startedDoctype)
+ return;
+
+ // ancient HTML browsers might render these ... their loss.
+ // to prevent: "if (xhtml) return;".
+
+ try {
+ if (entityNestLevel != 0)
+ return;
+ if (canonical && inEpilogue)
+ newline ();
+ rawWrite ("<?");
+ rawWrite (target);
+ rawWrite (' ');
+ escapeChars (data.toCharArray (), -1, -1, CTX_UNPARSED);
+ rawWrite ("?>");
+ if (elementNestLevel == 0 && !(canonical && inEpilogue))
+ newline ();
+ } catch (IOException e) {
+ fatal ("can't write", e);
+ }
}
/** <b>SAX1</b>: indicates a non-expanded entity reference */
public void skippedEntity (String name)
throws SAXException
{
- try {
- rawWrite ("&");
- rawWrite (name);
- rawWrite (";");
- } catch (IOException e) {
- fatal ("can't write", e);
- }
+ try {
+ rawWrite ("&");
+ rawWrite (name);
+ rawWrite (";");
+ } catch (IOException e) {
+ fatal ("can't write", e);
+ }
}
// SAX2 LexicalHandler
@@ -1109,35 +1109,35 @@ public class XMLWriter
final public void startCDATA ()
throws SAXException
{
- if (locator == null)
- locator = new LocatorImpl ();
-
- if (canonical)
- return;
-
- try {
- inCDATA = true;
- if (entityNestLevel == 0)
- rawWrite ("<![CDATA[");
- } catch (IOException e) {
- fatal ("can't write", e);
- }
+ if (locator == null)
+ locator = new LocatorImpl ();
+
+ if (canonical)
+ return;
+
+ try {
+ inCDATA = true;
+ if (entityNestLevel == 0)
+ rawWrite ("<![CDATA[");
+ } catch (IOException e) {
+ fatal ("can't write", e);
+ }
}
/** <b>SAX2</b>: called after parsing CDATA characters */
final public void endCDATA ()
throws SAXException
{
- if (canonical)
- return;
-
- try {
- inCDATA = false;
- if (entityNestLevel == 0)
- rawWrite ("]]>");
- } catch (IOException e) {
- fatal ("can't write", e);
- }
+ if (canonical)
+ return;
+
+ try {
+ inCDATA = false;
+ if (entityNestLevel == 0)
+ rawWrite ("]]>");
+ } catch (IOException e) {
+ fatal ("can't write", e);
+ }
}
/**
@@ -1148,45 +1148,45 @@ public class XMLWriter
final public void startDTD (String name, String publicId, String systemId)
throws SAXException
{
- if (locator == null)
- locator = new LocatorImpl ();
- if (xhtml)
- return;
- try {
- inDoctype = startedDoctype = true;
- if (canonical)
- return;
- rawWrite ("<!DOCTYPE ");
- rawWrite (name);
- rawWrite (' ');
-
- if (!expandingEntities) {
- if (publicId != null)
- rawWrite ("PUBLIC '" + publicId + "' '" + systemId + "' ");
- else if (systemId != null)
- rawWrite ("SYSTEM '" + systemId + "' ");
- }
-
- rawWrite ('[');
- newline ();
- } catch (IOException e) {
- fatal ("can't write", e);
- }
+ if (locator == null)
+ locator = new LocatorImpl ();
+ if (xhtml)
+ return;
+ try {
+ inDoctype = startedDoctype = true;
+ if (canonical)
+ return;
+ rawWrite ("<!DOCTYPE ");
+ rawWrite (name);
+ rawWrite (' ');
+
+ if (!expandingEntities) {
+ if (publicId != null)
+ rawWrite ("PUBLIC '" + publicId + "' '" + systemId + "' ");
+ else if (systemId != null)
+ rawWrite ("SYSTEM '" + systemId + "' ");
+ }
+
+ rawWrite ('[');
+ newline ();
+ } catch (IOException e) {
+ fatal ("can't write", e);
+ }
}
/** <b>SAX2</b>: called after the doctype is parsed */
final public void endDTD ()
throws SAXException
{
- inDoctype = false;
- if (canonical || xhtml)
- return;
- try {
- rawWrite ("]>");
- newline ();
- } catch (IOException e) {
- fatal ("can't write", e);
- }
+ inDoctype = false;
+ if (canonical || xhtml)
+ return;
+ try {
+ rawWrite ("]>");
+ newline ();
+ } catch (IOException e) {
+ fatal ("can't write", e);
+ }
}
/**
@@ -1195,30 +1195,30 @@ public class XMLWriter
final public void startEntity (String name)
throws SAXException
{
- try {
- boolean writeEOL = true;
-
- // Predefined XHTML entities (for characters) will get
- // mapped back later.
- if (xhtml || expandingEntities)
- return;
-
- entityNestLevel++;
- if (name.equals ("[dtd]"))
- return;
- if (entityNestLevel != 1)
- return;
- if (!name.startsWith ("%")) {
- writeEOL = false;
- rawWrite ('&');
- }
- rawWrite (name);
- rawWrite (';');
- if (writeEOL)
- newline ();
- } catch (IOException e) {
- fatal ("can't write", e);
- }
+ try {
+ boolean writeEOL = true;
+
+ // Predefined XHTML entities (for characters) will get
+ // mapped back later.
+ if (xhtml || expandingEntities)
+ return;
+
+ entityNestLevel++;
+ if (name.equals ("[dtd]"))
+ return;
+ if (entityNestLevel != 1)
+ return;
+ if (!name.startsWith ("%")) {
+ writeEOL = false;
+ rawWrite ('&');
+ }
+ rawWrite (name);
+ rawWrite (';');
+ if (writeEOL)
+ newline ();
+ } catch (IOException e) {
+ fatal ("can't write", e);
+ }
}
/**
@@ -1227,9 +1227,9 @@ public class XMLWriter
final public void endEntity (String name)
throws SAXException
{
- if (xhtml || expandingEntities)
- return;
- entityNestLevel--;
+ if (xhtml || expandingEntities)
+ return;
+ entityNestLevel--;
}
/**
@@ -1243,294 +1243,294 @@ public class XMLWriter
final public void comment (char ch [], int start, int length)
throws SAXException
{
- if (locator == null)
- locator = new LocatorImpl ();
-
- // don't print internal subset for XHTML
- if (xhtml && startedDoctype)
- return;
- // don't print comment in doctype for canon xml
- if (canonical && inDoctype)
- return;
-
- try {
- boolean indent;
-
- if (prettyPrinting && space.empty ())
- fatal ("stack discipline", null);
- indent = prettyPrinting && "default".equals (space.peek ());
- if (entityNestLevel != 0)
- return;
- if (indent)
- doIndent ();
- if (canonical && inEpilogue)
- newline ();
- rawWrite ("<!--");
- escapeChars (ch, start, length, CTX_UNPARSED);
- rawWrite ("-->");
- if (indent)
- doIndent ();
- if (elementNestLevel == 0 && !(canonical && inEpilogue))
- newline ();
- } catch (IOException e) {
- fatal ("can't write", e);
- }
+ if (locator == null)
+ locator = new LocatorImpl ();
+
+ // don't print internal subset for XHTML
+ if (xhtml && startedDoctype)
+ return;
+ // don't print comment in doctype for canon xml
+ if (canonical && inDoctype)
+ return;
+
+ try {
+ boolean indent;
+
+ if (prettyPrinting && space.empty ())
+ fatal ("stack discipline", null);
+ indent = prettyPrinting && "default".equals (space.peek ());
+ if (entityNestLevel != 0)
+ return;
+ if (indent)
+ doIndent ();
+ if (canonical && inEpilogue)
+ newline ();
+ rawWrite ("<!--");
+ escapeChars (ch, start, length, CTX_UNPARSED);
+ rawWrite ("-->");
+ if (indent)
+ doIndent ();
+ if (elementNestLevel == 0 && !(canonical && inEpilogue))
+ newline ();
+ } catch (IOException e) {
+ fatal ("can't write", e);
+ }
}
// SAX1 DTDHandler
/** <b>SAX1</b>: called on notation declarations */
final public void notationDecl (String name,
- String publicId, String systemId)
+ String publicId, String systemId)
throws SAXException
{
- if (xhtml)
- return;
- try {
- // At this time, only SAX2 callbacks start these.
- if (!startedDoctype)
- return;
-
- if (entityNestLevel != 0)
- return;
- rawWrite ("<!NOTATION " + name + " ");
- if (publicId != null)
- rawWrite ("PUBLIC \"" + publicId + '"');
- else
- rawWrite ("SYSTEM ");
- if (systemId != null)
- rawWrite ('"' + systemId + '"');
- rawWrite (">");
- newline ();
- } catch (IOException e) {
- fatal ("can't write", e);
- }
+ if (xhtml)
+ return;
+ try {
+ // At this time, only SAX2 callbacks start these.
+ if (!startedDoctype)
+ return;
+
+ if (entityNestLevel != 0)
+ return;
+ rawWrite ("<!NOTATION " + name + " ");
+ if (publicId != null)
+ rawWrite ("PUBLIC \"" + publicId + '"');
+ else
+ rawWrite ("SYSTEM ");
+ if (systemId != null)
+ rawWrite ('"' + systemId + '"');
+ rawWrite (">");
+ newline ();
+ } catch (IOException e) {
+ fatal ("can't write", e);
+ }
}
/** <b>SAX1</b>: called on unparsed entity declarations */
final public void unparsedEntityDecl (String name,
- String publicId, String systemId,
- String notationName)
+ String publicId, String systemId,
+ String notationName)
throws SAXException
{
- if (xhtml)
- return;
- try {
- // At this time, only SAX2 callbacks start these.
- if (!startedDoctype) {
- // FIXME: write to temporary buffer, and make the start
- // of the root element write these declarations.
- return;
- }
-
- if (entityNestLevel != 0)
- return;
- rawWrite ("<!ENTITY " + name + " ");
- if (publicId != null)
- rawWrite ("PUBLIC \"" + publicId + '"');
- else
- rawWrite ("SYSTEM ");
- rawWrite ('"' + systemId + '"');
- rawWrite (" NDATA " + notationName + ">");
- newline ();
- } catch (IOException e) {
- fatal ("can't write", e);
- }
+ if (xhtml)
+ return;
+ try {
+ // At this time, only SAX2 callbacks start these.
+ if (!startedDoctype) {
+ // FIXME: write to temporary buffer, and make the start
+ // of the root element write these declarations.
+ return;
+ }
+
+ if (entityNestLevel != 0)
+ return;
+ rawWrite ("<!ENTITY " + name + " ");
+ if (publicId != null)
+ rawWrite ("PUBLIC \"" + publicId + '"');
+ else
+ rawWrite ("SYSTEM ");
+ rawWrite ('"' + systemId + '"');
+ rawWrite (" NDATA " + notationName + ">");
+ newline ();
+ } catch (IOException e) {
+ fatal ("can't write", e);
+ }
}
// SAX2 DeclHandler
/** <b>SAX2</b>: called on attribute declarations */
final public void attributeDecl (String eName, String aName,
- String type, String mode, String value)
+ String type, String mode, String value)
throws SAXException
{
- if (xhtml)
- return;
- try {
- // At this time, only SAX2 callbacks start these.
- if (!startedDoctype)
- return;
- if (entityNestLevel != 0)
- return;
- rawWrite ("<!ATTLIST " + eName + ' ' + aName + ' ');
- rawWrite (type);
- rawWrite (' ');
- if (mode != null)
- rawWrite (mode + ' ');
- if (value != null)
- writeQuotedValue (value, CTX_ATTRIBUTE);
- rawWrite ('>');
- newline ();
- } catch (IOException e) {
- fatal ("can't write", e);
- }
+ if (xhtml)
+ return;
+ try {
+ // At this time, only SAX2 callbacks start these.
+ if (!startedDoctype)
+ return;
+ if (entityNestLevel != 0)
+ return;
+ rawWrite ("<!ATTLIST " + eName + ' ' + aName + ' ');
+ rawWrite (type);
+ rawWrite (' ');
+ if (mode != null)
+ rawWrite (mode + ' ');
+ if (value != null)
+ writeQuotedValue (value, CTX_ATTRIBUTE);
+ rawWrite ('>');
+ newline ();
+ } catch (IOException e) {
+ fatal ("can't write", e);
+ }
}
/** <b>SAX2</b>: called on element declarations */
final public void elementDecl (String name, String model)
throws SAXException
{
- if (xhtml)
- return;
- try {
- // At this time, only SAX2 callbacks start these.
- if (!startedDoctype)
- return;
- if (entityNestLevel != 0)
- return;
- rawWrite ("<!ELEMENT " + name + ' ' + model + '>');
- newline ();
- } catch (IOException e) {
- fatal ("can't write", e);
- }
+ if (xhtml)
+ return;
+ try {
+ // At this time, only SAX2 callbacks start these.
+ if (!startedDoctype)
+ return;
+ if (entityNestLevel != 0)
+ return;
+ rawWrite ("<!ELEMENT " + name + ' ' + model + '>');
+ newline ();
+ } catch (IOException e) {
+ fatal ("can't write", e);
+ }
}
/** <b>SAX2</b>: called on external entity declarations */
final public void externalEntityDecl (
- String name,
- String publicId,
- String systemId)
+ String name,
+ String publicId,
+ String systemId)
throws SAXException
{
- if (xhtml)
- return;
- try {
- // At this time, only SAX2 callbacks start these.
- if (!startedDoctype)
- return;
- if (entityNestLevel != 0)
- return;
- rawWrite ("<!ENTITY ");
- if (name.startsWith ("%")) {
- rawWrite ("% ");
- rawWrite (name.substring (1));
- } else
- rawWrite (name);
- if (publicId != null)
- rawWrite (" PUBLIC \"" + publicId + '"');
- else
- rawWrite (" SYSTEM ");
- rawWrite ('"' + systemId + "\">");
- newline ();
- } catch (IOException e) {
- fatal ("can't write", e);
- }
+ if (xhtml)
+ return;
+ try {
+ // At this time, only SAX2 callbacks start these.
+ if (!startedDoctype)
+ return;
+ if (entityNestLevel != 0)
+ return;
+ rawWrite ("<!ENTITY ");
+ if (name.startsWith ("%")) {
+ rawWrite ("% ");
+ rawWrite (name.substring (1));
+ } else
+ rawWrite (name);
+ if (publicId != null)
+ rawWrite (" PUBLIC \"" + publicId + '"');
+ else
+ rawWrite (" SYSTEM ");
+ rawWrite ('"' + systemId + "\">");
+ newline ();
+ } catch (IOException e) {
+ fatal ("can't write", e);
+ }
}
/** <b>SAX2</b>: called on internal entity declarations */
final public void internalEntityDecl (String name, String value)
throws SAXException
{
- if (xhtml)
- return;
- try {
- // At this time, only SAX2 callbacks start these.
- if (!startedDoctype)
- return;
- if (entityNestLevel != 0)
- return;
- rawWrite ("<!ENTITY ");
- if (name.startsWith ("%")) {
- rawWrite ("% ");
- rawWrite (name.substring (1));
- } else
- rawWrite (name);
- rawWrite (' ');
- writeQuotedValue (value, CTX_ENTITY);
- rawWrite ('>');
- newline ();
- } catch (IOException e) {
- fatal ("can't write", e);
- }
+ if (xhtml)
+ return;
+ try {
+ // At this time, only SAX2 callbacks start these.
+ if (!startedDoctype)
+ return;
+ if (entityNestLevel != 0)
+ return;
+ rawWrite ("<!ENTITY ");
+ if (name.startsWith ("%")) {
+ rawWrite ("% ");
+ rawWrite (name.substring (1));
+ } else
+ rawWrite (name);
+ rawWrite (' ');
+ writeQuotedValue (value, CTX_ENTITY);
+ rawWrite ('>');
+ newline ();
+ } catch (IOException e) {
+ fatal ("can't write", e);
+ }
}
private void writeQuotedValue (String value, int code)
throws SAXException, IOException
{
- char buf [] = value.toCharArray ();
- int off = 0, len = buf.length;
-
- // we can't add line breaks to attribute/entity/... values
- noWrap = true;
- rawWrite ('"');
- escapeChars (buf, off, len, code);
- rawWrite ('"');
- noWrap = false;
+ char buf [] = value.toCharArray ();
+ int off = 0, len = buf.length;
+
+ // we can't add line breaks to attribute/entity/... values
+ noWrap = true;
+ rawWrite ('"');
+ escapeChars (buf, off, len, code);
+ rawWrite ('"');
+ noWrap = false;
}
-
+
// From "HTMLlat1x.ent" ... names of entities for ISO-8859-1
// (Latin/1) characters, all codes: 160-255 (0xA0-0xFF).
// Codes 128-159 have no assigned values.
private static final String HTMLlat1x [] = {
- // 160
- "nbsp", "iexcl", "cent", "pound", "curren",
- "yen", "brvbar", "sect", "uml", "copy",
+ // 160
+ "nbsp", "iexcl", "cent", "pound", "curren",
+ "yen", "brvbar", "sect", "uml", "copy",
- // 170
- "ordf", "laquo", "not", "shy", "reg",
- "macr", "deg", "plusmn", "sup2", "sup3",
+ // 170
+ "ordf", "laquo", "not", "shy", "reg",
+ "macr", "deg", "plusmn", "sup2", "sup3",
- // 180
- "acute", "micro", "para", "middot", "cedil",
- "sup1", "ordm", "raquo", "frac14", "frac12",
+ // 180
+ "acute", "micro", "para", "middot", "cedil",
+ "sup1", "ordm", "raquo", "frac14", "frac12",
- // 190
- "frac34", "iquest", "Agrave", "Aacute", "Acirc",
- "Atilde", "Auml", "Aring", "AElig", "Ccedil",
+ // 190
+ "frac34", "iquest", "Agrave", "Aacute", "Acirc",
+ "Atilde", "Auml", "Aring", "AElig", "Ccedil",
- // 200
- "Egrave", "Eacute", "Ecirc", "Euml", "Igrave",
- "Iacute", "Icirc", "Iuml", "ETH", "Ntilde",
+ // 200
+ "Egrave", "Eacute", "Ecirc", "Euml", "Igrave",
+ "Iacute", "Icirc", "Iuml", "ETH", "Ntilde",
- // 210
- "Ograve", "Oacute", "Ocirc", "Otilde", "Ouml",
- "times", "Oslash", "Ugrave", "Uacute", "Ucirc",
+ // 210
+ "Ograve", "Oacute", "Ocirc", "Otilde", "Ouml",
+ "times", "Oslash", "Ugrave", "Uacute", "Ucirc",
- // 220
- "Uuml", "Yacute", "THORN", "szlig", "agrave",
- "aacute", "acirc", "atilde", "auml", "aring",
+ // 220
+ "Uuml", "Yacute", "THORN", "szlig", "agrave",
+ "aacute", "acirc", "atilde", "auml", "aring",
- // 230
- "aelig", "ccedil", "egrave", "eacute", "ecirc",
- "euml", "igrave", "iacute", "icirc", "iuml",
+ // 230
+ "aelig", "ccedil", "egrave", "eacute", "ecirc",
+ "euml", "igrave", "iacute", "icirc", "iuml",
- // 240
- "eth", "ntilde", "ograve", "oacute", "ocirc",
- "otilde", "ouml", "divide", "oslash", "ugrave",
+ // 240
+ "eth", "ntilde", "ograve", "oacute", "ocirc",
+ "otilde", "ouml", "divide", "oslash", "ugrave",
- // 250
- "uacute", "ucirc", "uuml", "yacute", "thorn",
- "yuml"
+ // 250
+ "uacute", "ucirc", "uuml", "yacute", "thorn",
+ "yuml"
};
// From "HTMLsymbolx.ent" ... some of the symbols that
// we can conveniently handle. Entities for the Greek.
// alphabet (upper and lower cases) are compact.
private static final String HTMLsymbolx_GR [] = {
- // 913
- "Alpha", "Beta", "Gamma", "Delta", "Epsilon",
- "Zeta", "Eta", "Theta", "Iota", "Kappa",
+ // 913
+ "Alpha", "Beta", "Gamma", "Delta", "Epsilon",
+ "Zeta", "Eta", "Theta", "Iota", "Kappa",
- // 923
- "Lambda", "Mu", "Nu", "Xi", "Omicron",
- "Pi", "Rho", null, "Sigma", "Tau",
+ // 923
+ "Lambda", "Mu", "Nu", "Xi", "Omicron",
+ "Pi", "Rho", null, "Sigma", "Tau",
- // 933
- "Upsilon", "Phi", "Chi", "Psi", "Omega"
+ // 933
+ "Upsilon", "Phi", "Chi", "Psi", "Omega"
};
private static final String HTMLsymbolx_gr [] = {
- // 945
- "alpha", "beta", "gamma", "delta", "epsilon",
- "zeta", "eta", "theta", "iota", "kappa",
+ // 945
+ "alpha", "beta", "gamma", "delta", "epsilon",
+ "zeta", "eta", "theta", "iota", "kappa",
- // 955
- "lambda", "mu", "nu", "xi", "omicron",
- "pi", "rho", "sigmaf", "sigma", "tau",
+ // 955
+ "lambda", "mu", "nu", "xi", "omicron",
+ "pi", "rho", "sigmaf", "sigma", "tau",
- // 965
- "upsilon", "phi", "chi", "psi", "omega"
+ // 965
+ "upsilon", "phi", "chi", "psi", "omega"
};
@@ -1539,268 +1539,268 @@ public class XMLWriter
private void escapeChars (char buf [], int off, int len, int code)
throws SAXException, IOException
{
- int first = 0;
-
- if (off < 0) {
- off = 0;
- len = buf.length;
- }
- for (int i = 0; i < len; i++) {
- String esc;
- char c = buf [off + i];
-
- switch (c) {
- // Note that CTX_ATTRIBUTE isn't explicitly tested here;
- // all syntax delimiters are escaped in CTX_ATTRIBUTE,
- // otherwise it's similar to CTX_CONTENT
-
- // ampersand flags entity references; entity replacement
- // text has unexpanded references, other text doesn't.
- case '&':
- if (code == CTX_ENTITY || code == CTX_UNPARSED)
- continue;
- esc = "amp";
- break;
-
- // attributes and text may NOT have literal '<', but
- // entities may have markup constructs
- case '<':
- if (code == CTX_ENTITY || code == CTX_UNPARSED)
- continue;
- esc = "lt";
- break;
-
- // as above re markup constructs; but otherwise
- // except when canonicalizing, this is for consistency
- case '>':
- if (code == CTX_ENTITY || code == CTX_UNPARSED)
- continue;
- esc = "gt";
- break;
- case '\'':
- if (code == CTX_CONTENT || code == CTX_UNPARSED)
- continue;
- if (canonical)
- continue;
- esc = "apos";
- break;
-
- // needed when printing quoted attribute/entity values
- case '"':
- if (code == CTX_CONTENT || code == CTX_UNPARSED)
- continue;
- esc = "quot";
- break;
-
- // make line ends work per host OS convention
- case '\n':
- esc = eol;
- break;
-
- //
- // No other characters NEED special treatment ... except
- // for encoding-specific issues, like whether the character
- // can really be represented in that encoding.
- //
- default:
- //
- // There are characters we can never write safely; getting
- // them is an error.
- //
- // (a) They're never legal in XML ... detected by range
- // checks, and (eventually) by remerging surrogate
- // pairs on output. (Easy error for apps to prevent.)
- //
- // (b) This encoding can't represent them, and we
- // can't make reference substitution (e.g. inside
- // CDATA sections, names, PI data, etc). (Hard for
- // apps to prevent, except by using UTF-8 or UTF-16
- // as their output encoding.)
- //
- // We know a very little bit about what characters
- // the US-ASCII and ISO-8859-1 encodings support. For
- // other encodings we can't detect the second type of
- // error at all. (Never an issue for UTF-8 or UTF-16.)
- //
+ int first = 0;
+
+ if (off < 0) {
+ off = 0;
+ len = buf.length;
+ }
+ for (int i = 0; i < len; i++) {
+ String esc;
+ char c = buf [off + i];
+
+ switch (c) {
+ // Note that CTX_ATTRIBUTE isn't explicitly tested here;
+ // all syntax delimiters are escaped in CTX_ATTRIBUTE,
+ // otherwise it's similar to CTX_CONTENT
+
+ // ampersand flags entity references; entity replacement
+ // text has unexpanded references, other text doesn't.
+ case '&':
+ if (code == CTX_ENTITY || code == CTX_UNPARSED)
+ continue;
+ esc = "amp";
+ break;
+
+ // attributes and text may NOT have literal '<', but
+ // entities may have markup constructs
+ case '<':
+ if (code == CTX_ENTITY || code == CTX_UNPARSED)
+ continue;
+ esc = "lt";
+ break;
+
+ // as above re markup constructs; but otherwise
+ // except when canonicalizing, this is for consistency
+ case '>':
+ if (code == CTX_ENTITY || code == CTX_UNPARSED)
+ continue;
+ esc = "gt";
+ break;
+ case '\'':
+ if (code == CTX_CONTENT || code == CTX_UNPARSED)
+ continue;
+ if (canonical)
+ continue;
+ esc = "apos";
+ break;
+
+ // needed when printing quoted attribute/entity values
+ case '"':
+ if (code == CTX_CONTENT || code == CTX_UNPARSED)
+ continue;
+ esc = "quot";
+ break;
+
+ // make line ends work per host OS convention
+ case '\n':
+ esc = eol;
+ break;
+
+ //
+ // No other characters NEED special treatment ... except
+ // for encoding-specific issues, like whether the character
+ // can really be represented in that encoding.
+ //
+ default:
+ //
+ // There are characters we can never write safely; getting
+ // them is an error.
+ //
+ // (a) They're never legal in XML ... detected by range
+ // checks, and (eventually) by remerging surrogate
+ // pairs on output. (Easy error for apps to prevent.)
+ //
+ // (b) This encoding can't represent them, and we
+ // can't make reference substitution (e.g. inside
+ // CDATA sections, names, PI data, etc). (Hard for
+ // apps to prevent, except by using UTF-8 or UTF-16
+ // as their output encoding.)
+ //
+ // We know a very little bit about what characters
+ // the US-ASCII and ISO-8859-1 encodings support. For
+ // other encodings we can't detect the second type of
+ // error at all. (Never an issue for UTF-8 or UTF-16.)
+ //
// FIXME: CR in CDATA is an error; in text, turn to a char ref
// FIXME: CR/LF/TAB in attributes should become char refs
- if ((c > 0xfffd)
- || ((c < 0x0020) && !((c == 0x0009)
- || (c == 0x000A) || (c == 0x000D)))
- || (((c & dangerMask) != 0)
- && (code == CTX_UNPARSED))) {
-
- // if case (b) in CDATA, we might end the section,
- // write a reference, then restart ... possible
- // in one DOM L3 draft.
-
- throw new CharConversionException (
- "Illegal or non-writable character: U+"
- + Integer.toHexString (c));
- }
-
- //
- // If the output encoding represents the character
- // directly, let it do so! Else we'll escape it.
- //
- if ((c & dangerMask) == 0)
- continue;
- esc = null;
-
- // Avoid numeric refs where symbolic ones exist, as
- // symbolic ones make more sense to humans reading!
- if (xhtml) {
- // all the HTMLlat1x.ent entities
- // (all the "ISO-8859-1" characters)
- if (c >= 160 && c <= 255)
- esc = HTMLlat1x [c - 160];
-
- // not quite half the HTMLsymbolx.ent entities
- else if (c >= 913 && c <= 937)
- esc = HTMLsymbolx_GR [c - 913];
- else if (c >= 945 && c <= 969)
- esc = HTMLsymbolx_gr [c - 945];
-
- else switch (c) {
- // all of the HTMLspecialx.ent entities
- case 338: esc = "OElig"; break;
- case 339: esc = "oelig"; break;
- case 352: esc = "Scaron"; break;
- case 353: esc = "scaron"; break;
- case 376: esc = "Yuml"; break;
- case 710: esc = "circ"; break;
- case 732: esc = "tilde"; break;
- case 8194: esc = "ensp"; break;
- case 8195: esc = "emsp"; break;
- case 8201: esc = "thinsp"; break;
- case 8204: esc = "zwnj"; break;
- case 8205: esc = "zwj"; break;
- case 8206: esc = "lrm"; break;
- case 8207: esc = "rlm"; break;
- case 8211: esc = "ndash"; break;
- case 8212: esc = "mdash"; break;
- case 8216: esc = "lsquo"; break;
- case 8217: esc = "rsquo"; break;
- case 8218: esc = "sbquo"; break;
- case 8220: esc = "ldquo"; break;
- case 8221: esc = "rdquo"; break;
- case 8222: esc = "bdquo"; break;
- case 8224: esc = "dagger"; break;
- case 8225: esc = "Dagger"; break;
- case 8240: esc = "permil"; break;
- case 8249: esc = "lsaquo"; break;
- case 8250: esc = "rsaquo"; break;
- case 8364: esc = "euro"; break;
-
- // the other HTMLsymbox.ent entities
- case 402: esc = "fnof"; break;
- case 977: esc = "thetasym"; break;
- case 978: esc = "upsih"; break;
- case 982: esc = "piv"; break;
- case 8226: esc = "bull"; break;
- case 8230: esc = "hellip"; break;
- case 8242: esc = "prime"; break;
- case 8243: esc = "Prime"; break;
- case 8254: esc = "oline"; break;
- case 8260: esc = "frasl"; break;
- case 8472: esc = "weierp"; break;
- case 8465: esc = "image"; break;
- case 8476: esc = "real"; break;
- case 8482: esc = "trade"; break;
- case 8501: esc = "alefsym"; break;
- case 8592: esc = "larr"; break;
- case 8593: esc = "uarr"; break;
- case 8594: esc = "rarr"; break;
- case 8595: esc = "darr"; break;
- case 8596: esc = "harr"; break;
- case 8629: esc = "crarr"; break;
- case 8656: esc = "lArr"; break;
- case 8657: esc = "uArr"; break;
- case 8658: esc = "rArr"; break;
- case 8659: esc = "dArr"; break;
- case 8660: esc = "hArr"; break;
- case 8704: esc = "forall"; break;
- case 8706: esc = "part"; break;
- case 8707: esc = "exist"; break;
- case 8709: esc = "empty"; break;
- case 8711: esc = "nabla"; break;
- case 8712: esc = "isin"; break;
- case 8713: esc = "notin"; break;
- case 8715: esc = "ni"; break;
- case 8719: esc = "prod"; break;
- case 8721: esc = "sum"; break;
- case 8722: esc = "minus"; break;
- case 8727: esc = "lowast"; break;
- case 8730: esc = "radic"; break;
- case 8733: esc = "prop"; break;
- case 8734: esc = "infin"; break;
- case 8736: esc = "ang"; break;
- case 8743: esc = "and"; break;
- case 8744: esc = "or"; break;
- case 8745: esc = "cap"; break;
- case 8746: esc = "cup"; break;
- case 8747: esc = "int"; break;
- case 8756: esc = "there4"; break;
- case 8764: esc = "sim"; break;
- case 8773: esc = "cong"; break;
- case 8776: esc = "asymp"; break;
- case 8800: esc = "ne"; break;
- case 8801: esc = "equiv"; break;
- case 8804: esc = "le"; break;
- case 8805: esc = "ge"; break;
- case 8834: esc = "sub"; break;
- case 8835: esc = "sup"; break;
- case 8836: esc = "nsub"; break;
- case 8838: esc = "sube"; break;
- case 8839: esc = "supe"; break;
- case 8853: esc = "oplus"; break;
- case 8855: esc = "otimes"; break;
- case 8869: esc = "perp"; break;
- case 8901: esc = "sdot"; break;
- case 8968: esc = "lceil"; break;
- case 8969: esc = "rceil"; break;
- case 8970: esc = "lfloor"; break;
- case 8971: esc = "rfloor"; break;
- case 9001: esc = "lang"; break;
- case 9002: esc = "rang"; break;
- case 9674: esc = "loz"; break;
- case 9824: esc = "spades"; break;
- case 9827: esc = "clubs"; break;
- case 9829: esc = "hearts"; break;
- case 9830: esc = "diams"; break;
- }
- }
-
- // else escape with numeric char refs
- if (esc == null) {
- stringBuf.setLength (0);
- stringBuf.append ("#x");
- stringBuf.append (Integer.toHexString (c).toUpperCase ());
- esc = stringBuf.toString ();
-
- // FIXME: We don't write surrogate pairs correctly.
- // They should work as one ref per character, since
- // each pair is one character. For reading back into
- // Unicode, it matters beginning in Unicode 3.1 ...
- }
- break;
- }
- if (i != first)
- rawWrite (buf, off + first, i - first);
- first = i + 1;
- if (esc == eol)
- newline ();
- else {
- rawWrite ('&');
- rawWrite (esc);
- rawWrite (';');
- }
- }
- if (first < len)
- rawWrite (buf, off + first, len - first);
+ if ((c > 0xfffd)
+ || ((c < 0x0020) && !((c == 0x0009)
+ || (c == 0x000A) || (c == 0x000D)))
+ || (((c & dangerMask) != 0)
+ && (code == CTX_UNPARSED))) {
+
+ // if case (b) in CDATA, we might end the section,
+ // write a reference, then restart ... possible
+ // in one DOM L3 draft.
+
+ throw new CharConversionException (
+ "Illegal or non-writable character: U+"
+ + Integer.toHexString (c));
+ }
+
+ //
+ // If the output encoding represents the character
+ // directly, let it do so! Else we'll escape it.
+ //
+ if ((c & dangerMask) == 0)
+ continue;
+ esc = null;
+
+ // Avoid numeric refs where symbolic ones exist, as
+ // symbolic ones make more sense to humans reading!
+ if (xhtml) {
+ // all the HTMLlat1x.ent entities
+ // (all the "ISO-8859-1" characters)
+ if (c >= 160 && c <= 255)
+ esc = HTMLlat1x [c - 160];
+
+ // not quite half the HTMLsymbolx.ent entities
+ else if (c >= 913 && c <= 937)
+ esc = HTMLsymbolx_GR [c - 913];
+ else if (c >= 945 && c <= 969)
+ esc = HTMLsymbolx_gr [c - 945];
+
+ else switch (c) {
+ // all of the HTMLspecialx.ent entities
+ case 338: esc = "OElig"; break;
+ case 339: esc = "oelig"; break;
+ case 352: esc = "Scaron"; break;
+ case 353: esc = "scaron"; break;
+ case 376: esc = "Yuml"; break;
+ case 710: esc = "circ"; break;
+ case 732: esc = "tilde"; break;
+ case 8194: esc = "ensp"; break;
+ case 8195: esc = "emsp"; break;
+ case 8201: esc = "thinsp"; break;
+ case 8204: esc = "zwnj"; break;
+ case 8205: esc = "zwj"; break;
+ case 8206: esc = "lrm"; break;
+ case 8207: esc = "rlm"; break;
+ case 8211: esc = "ndash"; break;
+ case 8212: esc = "mdash"; break;
+ case 8216: esc = "lsquo"; break;
+ case 8217: esc = "rsquo"; break;
+ case 8218: esc = "sbquo"; break;
+ case 8220: esc = "ldquo"; break;
+ case 8221: esc = "rdquo"; break;
+ case 8222: esc = "bdquo"; break;
+ case 8224: esc = "dagger"; break;
+ case 8225: esc = "Dagger"; break;
+ case 8240: esc = "permil"; break;
+ case 8249: esc = "lsaquo"; break;
+ case 8250: esc = "rsaquo"; break;
+ case 8364: esc = "euro"; break;
+
+ // the other HTMLsymbox.ent entities
+ case 402: esc = "fnof"; break;
+ case 977: esc = "thetasym"; break;
+ case 978: esc = "upsih"; break;
+ case 982: esc = "piv"; break;
+ case 8226: esc = "bull"; break;
+ case 8230: esc = "hellip"; break;
+ case 8242: esc = "prime"; break;
+ case 8243: esc = "Prime"; break;
+ case 8254: esc = "oline"; break;
+ case 8260: esc = "frasl"; break;
+ case 8472: esc = "weierp"; break;
+ case 8465: esc = "image"; break;
+ case 8476: esc = "real"; break;
+ case 8482: esc = "trade"; break;
+ case 8501: esc = "alefsym"; break;
+ case 8592: esc = "larr"; break;
+ case 8593: esc = "uarr"; break;
+ case 8594: esc = "rarr"; break;
+ case 8595: esc = "darr"; break;
+ case 8596: esc = "harr"; break;
+ case 8629: esc = "crarr"; break;
+ case 8656: esc = "lArr"; break;
+ case 8657: esc = "uArr"; break;
+ case 8658: esc = "rArr"; break;
+ case 8659: esc = "dArr"; break;
+ case 8660: esc = "hArr"; break;
+ case 8704: esc = "forall"; break;
+ case 8706: esc = "part"; break;
+ case 8707: esc = "exist"; break;
+ case 8709: esc = "empty"; break;
+ case 8711: esc = "nabla"; break;
+ case 8712: esc = "isin"; break;
+ case 8713: esc = "notin"; break;
+ case 8715: esc = "ni"; break;
+ case 8719: esc = "prod"; break;
+ case 8721: esc = "sum"; break;
+ case 8722: esc = "minus"; break;
+ case 8727: esc = "lowast"; break;
+ case 8730: esc = "radic"; break;
+ case 8733: esc = "prop"; break;
+ case 8734: esc = "infin"; break;
+ case 8736: esc = "ang"; break;
+ case 8743: esc = "and"; break;
+ case 8744: esc = "or"; break;
+ case 8745: esc = "cap"; break;
+ case 8746: esc = "cup"; break;
+ case 8747: esc = "int"; break;
+ case 8756: esc = "there4"; break;
+ case 8764: esc = "sim"; break;
+ case 8773: esc = "cong"; break;
+ case 8776: esc = "asymp"; break;
+ case 8800: esc = "ne"; break;
+ case 8801: esc = "equiv"; break;
+ case 8804: esc = "le"; break;
+ case 8805: esc = "ge"; break;
+ case 8834: esc = "sub"; break;
+ case 8835: esc = "sup"; break;
+ case 8836: esc = "nsub"; break;
+ case 8838: esc = "sube"; break;
+ case 8839: esc = "supe"; break;
+ case 8853: esc = "oplus"; break;
+ case 8855: esc = "otimes"; break;
+ case 8869: esc = "perp"; break;
+ case 8901: esc = "sdot"; break;
+ case 8968: esc = "lceil"; break;
+ case 8969: esc = "rceil"; break;
+ case 8970: esc = "lfloor"; break;
+ case 8971: esc = "rfloor"; break;
+ case 9001: esc = "lang"; break;
+ case 9002: esc = "rang"; break;
+ case 9674: esc = "loz"; break;
+ case 9824: esc = "spades"; break;
+ case 9827: esc = "clubs"; break;
+ case 9829: esc = "hearts"; break;
+ case 9830: esc = "diams"; break;
+ }
+ }
+
+ // else escape with numeric char refs
+ if (esc == null) {
+ stringBuf.setLength (0);
+ stringBuf.append ("#x");
+ stringBuf.append (Integer.toHexString (c).toUpperCase ());
+ esc = stringBuf.toString ();
+
+ // FIXME: We don't write surrogate pairs correctly.
+ // They should work as one ref per character, since
+ // each pair is one character. For reading back into
+ // Unicode, it matters beginning in Unicode 3.1 ...
+ }
+ break;
+ }
+ if (i != first)
+ rawWrite (buf, off + first, i - first);
+ first = i + 1;
+ if (esc == eol)
+ newline ();
+ else {
+ rawWrite ('&');
+ rawWrite (esc);
+ rawWrite (';');
+ }
+ }
+ if (first < len)
+ rawWrite (buf, off + first, len - first);
}
@@ -1808,45 +1808,45 @@ public class XMLWriter
private void newline ()
throws SAXException, IOException
{
- out.write (eol);
- column = 0;
+ out.write (eol);
+ column = 0;
}
private void doIndent ()
throws SAXException, IOException
{
- int space = elementNestLevel * 2;
-
- newline ();
- column = space;
- // track tabs only at line starts
- while (space > 8) {
- out.write ("\t");
- space -= 8;
- }
- while (space > 0) {
- out.write (" ");
- space -= 2;
- }
+ int space = elementNestLevel * 2;
+
+ newline ();
+ column = space;
+ // track tabs only at line starts
+ while (space > 8) {
+ out.write ("\t");
+ space -= 8;
+ }
+ while (space > 0) {
+ out.write (" ");
+ space -= 2;
+ }
}
private void rawWrite (char c)
throws IOException
{
- out.write (c);
- column++;
+ out.write (c);
+ column++;
}
private void rawWrite (String s)
throws SAXException, IOException
{
- if (prettyPrinting && "default".equals (space.peek ())) {
- char data [] = s.toCharArray ();
- rawWrite (data, 0, data.length);
- } else {
- out.write (s);
- column += s.length ();
- }
+ if (prettyPrinting && "default".equals (space.peek ())) {
+ char data [] = s.toCharArray ();
+ rawWrite (data, 0, data.length);
+ } else {
+ out.write (s);
+ column += s.length ();
+ }
}
// NOTE: if xhtml, the REC gives some rules about whitespace
@@ -1862,70 +1862,70 @@ public class XMLWriter
private void rawWrite (char buf [], int offset, int length)
throws SAXException, IOException
{
- boolean wrap;
-
- if (prettyPrinting && space.empty ())
- fatal ("stack discipline", null);
-
- wrap = prettyPrinting && "default".equals (space.peek ());
- if (!wrap) {
- out.write (buf, offset, length);
- column += length;
- return;
- }
-
- // we're pretty printing and want to fill lines out only
- // to the desired line length.
- while (length > 0) {
- int target = lineLength - column;
- boolean wrote = false;
-
- // Do we even have a problem?
- if (target > length || noWrap) {
- out.write (buf, offset, length);
- column += length;
- return;
- }
-
- // break the line at a space character, trying to fill
- // as much of the line as possible.
- char c;
-
- for (int i = target - 1; i >= 0; i--) {
- if ((c = buf [offset + i]) == ' ' || c == '\t') {
- i++;
- out.write (buf, offset, i);
- doIndent ();
- offset += i;
- length -= i;
- wrote = true;
- break;
- }
- }
- if (wrote)
- continue;
-
- // no space character permitting break before target
- // line length is filled. So, take the next one.
- if (target < 0)
- target = 0;
- for (int i = target; i < length; i++)
- if ((c = buf [offset + i]) == ' ' || c == '\t') {
- i++;
- out.write (buf, offset, i);
- doIndent ();
- offset += i;
- length -= i;
- wrote = true;
- break;
- }
- if (wrote)
- continue;
-
- // no such luck.
- out.write (buf, offset, length);
- column += length;
- break;
- }
+ boolean wrap;
+
+ if (prettyPrinting && space.empty ())
+ fatal ("stack discipline", null);
+
+ wrap = prettyPrinting && "default".equals (space.peek ());
+ if (!wrap) {
+ out.write (buf, offset, length);
+ column += length;
+ return;
+ }
+
+ // we're pretty printing and want to fill lines out only
+ // to the desired line length.
+ while (length > 0) {
+ int target = lineLength - column;
+ boolean wrote = false;
+
+ // Do we even have a problem?
+ if (target > length || noWrap) {
+ out.write (buf, offset, length);
+ column += length;
+ return;
+ }
+
+ // break the line at a space character, trying to fill
+ // as much of the line as possible.
+ char c;
+
+ for (int i = target - 1; i >= 0; i--) {
+ if ((c = buf [offset + i]) == ' ' || c == '\t') {
+ i++;
+ out.write (buf, offset, i);
+ doIndent ();
+ offset += i;
+ length -= i;
+ wrote = true;
+ break;
+ }
+ }
+ if (wrote)
+ continue;
+
+ // no space character permitting break before target
+ // line length is filled. So, take the next one.
+ if (target < 0)
+ target = 0;
+ for (int i = target; i < length; i++)
+ if ((c = buf [offset + i]) == ' ' || c == '\t') {
+ i++;
+ out.write (buf, offset, i);
+ doIndent ();
+ offset += i;
+ length -= i;
+ wrote = true;
+ break;
+ }
+ if (wrote)
+ continue;
+
+ // no such luck.
+ out.write (buf, offset, length);
+ column += length;
+ break;
+ }
}
}
diff --git a/gnu/xml/validation/datatype/Annotation.java b/gnu/xml/validation/datatype/Annotation.java
index cba6954b6..6438e2ebb 100644
--- a/gnu/xml/validation/datatype/Annotation.java
+++ b/gnu/xml/validation/datatype/Annotation.java
@@ -1,4 +1,4 @@
-/* Annotation.java --
+/* Annotation.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -56,6 +56,5 @@ public class Annotation
{
return documentation;
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/AnySimpleType.java b/gnu/xml/validation/datatype/AnySimpleType.java
index 63441c70a..36fb98daa 100644
--- a/gnu/xml/validation/datatype/AnySimpleType.java
+++ b/gnu/xml/validation/datatype/AnySimpleType.java
@@ -1,4 +1,4 @@
-/* AnySimpleType.java --
+/* AnySimpleType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -44,7 +44,7 @@ import javax.xml.namespace.QName;
final class AnySimpleType
extends SimpleType
{
-
+
AnySimpleType()
{
super(new QName(XMLConstants.W3C_XML_SCHEMA_NS_URI, "anySimpleType"),
@@ -56,4 +56,3 @@ final class AnySimpleType
}
}
-
diff --git a/gnu/xml/validation/datatype/AnyType.java b/gnu/xml/validation/datatype/AnyType.java
index f26a0756d..2a3f116dd 100644
--- a/gnu/xml/validation/datatype/AnyType.java
+++ b/gnu/xml/validation/datatype/AnyType.java
@@ -1,4 +1,4 @@
-/* AnyType.java --
+/* AnyType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -43,7 +43,7 @@ import javax.xml.namespace.QName;
final class AnyType
extends SimpleType
{
-
+
AnyType()
{
super(new QName(XMLConstants.W3C_XML_SCHEMA_NS_URI, "anyType"),
@@ -55,4 +55,3 @@ final class AnyType
}
}
-
diff --git a/gnu/xml/validation/datatype/AnyURIType.java b/gnu/xml/validation/datatype/AnyURIType.java
index 56c0a0658..ef409b99c 100644
--- a/gnu/xml/validation/datatype/AnyURIType.java
+++ b/gnu/xml/validation/datatype/AnyURIType.java
@@ -1,4 +1,4 @@
-/* AnyURIType.java --
+/* AnyURIType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -89,6 +89,5 @@ final class AnyURIType
throw e2;
}
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/AtomicSimpleType.java b/gnu/xml/validation/datatype/AtomicSimpleType.java
index d685e5cf0..38528eecf 100644
--- a/gnu/xml/validation/datatype/AtomicSimpleType.java
+++ b/gnu/xml/validation/datatype/AtomicSimpleType.java
@@ -1,4 +1,4 @@
-/* AtomicSimpleType.java --
+/* AtomicSimpleType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -50,7 +50,7 @@ import org.relaxng.datatype.ValidationContext;
public class AtomicSimpleType
extends SimpleType
{
-
+
public AtomicSimpleType(QName name,
Set facets,
int fundamentalFacets,
@@ -73,6 +73,5 @@ public class AtomicSimpleType
if (baseType != null)
baseType.checkValid(value, context);
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/Base64BinaryType.java b/gnu/xml/validation/datatype/Base64BinaryType.java
index 2fc4c33b9..3f3442f8c 100644
--- a/gnu/xml/validation/datatype/Base64BinaryType.java
+++ b/gnu/xml/validation/datatype/Base64BinaryType.java
@@ -1,4 +1,4 @@
-/* Base64BinaryType.java --
+/* Base64BinaryType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -98,7 +98,7 @@ final class Base64BinaryType
char c1 = value.charAt(i--);
if (c1 == ' ')
c1 = value.charAt(i--);
-
+
if (c4 == '=')
{
if (c3 == '=')
@@ -124,6 +124,5 @@ final class Base64BinaryType
throw new DatatypeException("illegal BASE64");
}
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/BooleanType.java b/gnu/xml/validation/datatype/BooleanType.java
index 25e488a05..5d98d2412 100644
--- a/gnu/xml/validation/datatype/BooleanType.java
+++ b/gnu/xml/validation/datatype/BooleanType.java
@@ -1,4 +1,4 @@
-/* BooleanType.java --
+/* BooleanType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -80,11 +80,10 @@ final class BooleanType
if (!VALUE_SPACE.contains(value))
throw new DatatypeException("invalid boolean value");
}
-
+
public Object createValue(String literal, ValidationContext context) {
return ("1".equals(literal) || "true".equals(literal)) ? Boolean.TRUE :
Boolean.FALSE;
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/ByteType.java b/gnu/xml/validation/datatype/ByteType.java
index 539dba29a..9bce45bf9 100644
--- a/gnu/xml/validation/datatype/ByteType.java
+++ b/gnu/xml/validation/datatype/ByteType.java
@@ -1,4 +1,4 @@
-/* ByteType.java --
+/* ByteType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -117,7 +117,7 @@ final class ByteType
throw new DatatypeException(i, "invalid byte value");
}
}
-
+
public Object createValue(String literal, ValidationContext context) {
try
{
@@ -128,6 +128,5 @@ final class ByteType
return null;
}
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/DateTimeType.java b/gnu/xml/validation/datatype/DateTimeType.java
index 749ba8106..81d2785bc 100644
--- a/gnu/xml/validation/datatype/DateTimeType.java
+++ b/gnu/xml/validation/datatype/DateTimeType.java
@@ -1,4 +1,4 @@
-/* DateTimeType.java --
+/* DateTimeType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -213,7 +213,7 @@ final class DateTimeType
throw new DatatypeException(len, "invalid dateTime value");
}
}
-
+
public Object createValue(String value, ValidationContext context) {
int len = value.length();
int state = 0;
@@ -330,6 +330,5 @@ final class DateTimeType
return null;
}
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/DateType.java b/gnu/xml/validation/datatype/DateType.java
index 6a4e1d771..8e6e3c35a 100644
--- a/gnu/xml/validation/datatype/DateType.java
+++ b/gnu/xml/validation/datatype/DateType.java
@@ -1,4 +1,4 @@
-/* DateType.java --
+/* DateType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -128,7 +128,7 @@ final class DateType
throw new DatatypeException("invalid date value");
}
}
-
+
public Object createValue(String value, ValidationContext context) {
int len = value.length();
int state = 0;
@@ -217,6 +217,5 @@ final class DateType
return null;
}
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/DecimalType.java b/gnu/xml/validation/datatype/DecimalType.java
index b895c44b2..43a26a399 100644
--- a/gnu/xml/validation/datatype/DecimalType.java
+++ b/gnu/xml/validation/datatype/DecimalType.java
@@ -1,4 +1,4 @@
-/* DecimalType.java --
+/* DecimalType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -103,7 +103,7 @@ final class DecimalType
throw new DatatypeException(i, "invalid decimal value");
}
}
-
+
public Object createValue(String literal, ValidationContext context) {
try
{
@@ -114,6 +114,5 @@ final class DecimalType
return null;
}
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/DoubleType.java b/gnu/xml/validation/datatype/DoubleType.java
index 5d2d8662d..dfaa7c8cb 100644
--- a/gnu/xml/validation/datatype/DoubleType.java
+++ b/gnu/xml/validation/datatype/DoubleType.java
@@ -1,4 +1,4 @@
-/* DoubleType.java --
+/* DoubleType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -95,7 +95,7 @@ final class DoubleType
throw e2;
}
}
-
+
public Object createValue(String literal, ValidationContext context) {
try
{
@@ -106,6 +106,5 @@ final class DoubleType
return null;
}
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/DurationType.java b/gnu/xml/validation/datatype/DurationType.java
index 2cb92baae..6c0f7b889 100644
--- a/gnu/xml/validation/datatype/DurationType.java
+++ b/gnu/xml/validation/datatype/DurationType.java
@@ -1,4 +1,4 @@
-/* DurationType.java --
+/* DurationType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -103,7 +103,7 @@ final class DurationType
}
return 0;
}
-
+
}
static final int[] CONSTRAINING_FACETS = {
@@ -170,7 +170,7 @@ final class DurationType
throw new DatatypeException(i, "illegal duration value");
}
}
-
+
public Object createValue(String value, ValidationContext context) {
boolean negative = false;
int days = 0, months = 0, years = 0;
@@ -236,4 +236,3 @@ final class DurationType
}
}
-
diff --git a/gnu/xml/validation/datatype/EntitiesType.java b/gnu/xml/validation/datatype/EntitiesType.java
index d16106e00..5415e88e2 100644
--- a/gnu/xml/validation/datatype/EntitiesType.java
+++ b/gnu/xml/validation/datatype/EntitiesType.java
@@ -1,4 +1,4 @@
-/* EntitiesType.java --
+/* EntitiesType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -104,6 +104,5 @@ final class EntitiesType
{
return true;
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/EntityType.java b/gnu/xml/validation/datatype/EntityType.java
index f1443bcb9..f4a10bd50 100644
--- a/gnu/xml/validation/datatype/EntityType.java
+++ b/gnu/xml/validation/datatype/EntityType.java
@@ -1,4 +1,4 @@
-/* EntityType.java --
+/* EntityType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -83,6 +83,5 @@ final class EntityType
{
return true;
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/EnumerationFacet.java b/gnu/xml/validation/datatype/EnumerationFacet.java
index 0ad3d3fa4..45b9c2378 100644
--- a/gnu/xml/validation/datatype/EnumerationFacet.java
+++ b/gnu/xml/validation/datatype/EnumerationFacet.java
@@ -1,4 +1,4 @@
-/* EnumerationFacet.java --
+/* EnumerationFacet.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -45,7 +45,7 @@ package gnu.xml.validation.datatype;
public final class EnumerationFacet
extends Facet
{
-
+
public final String value;
public EnumerationFacet(String value, Annotation annotation)
@@ -64,6 +64,5 @@ public final class EnumerationFacet
return (other instanceof EnumerationFacet &&
((EnumerationFacet) other).value.equals(value));
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/Facet.java b/gnu/xml/validation/datatype/Facet.java
index 490abf8ee..9f18bedc8 100644
--- a/gnu/xml/validation/datatype/Facet.java
+++ b/gnu/xml/validation/datatype/Facet.java
@@ -1,4 +1,4 @@
-/* Facet.java --
+/* Facet.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -73,6 +73,5 @@ public abstract class Facet
this.type = type;
this.annotation = annotation;
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/FloatType.java b/gnu/xml/validation/datatype/FloatType.java
index 372e38871..8dbb4aa56 100644
--- a/gnu/xml/validation/datatype/FloatType.java
+++ b/gnu/xml/validation/datatype/FloatType.java
@@ -1,4 +1,4 @@
-/* FloatType.java --
+/* FloatType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -95,7 +95,7 @@ final class FloatType
throw e2;
}
}
-
+
public Object createValue(String literal, ValidationContext context) {
try
{
@@ -106,6 +106,5 @@ final class FloatType
return null;
}
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/FractionDigitsFacet.java b/gnu/xml/validation/datatype/FractionDigitsFacet.java
index efd986200..c0d714578 100644
--- a/gnu/xml/validation/datatype/FractionDigitsFacet.java
+++ b/gnu/xml/validation/datatype/FractionDigitsFacet.java
@@ -1,4 +1,4 @@
-/* FractionDigitsFacet.java --
+/* FractionDigitsFacet.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -45,7 +45,7 @@ package gnu.xml.validation.datatype;
public final class FractionDigitsFacet
extends Facet
{
-
+
public final int value;
public final boolean fixed;
@@ -56,7 +56,7 @@ public final class FractionDigitsFacet
this.value = value;
this.fixed = fixed;
}
-
+
public int hashCode()
{
return value;
@@ -67,6 +67,5 @@ public final class FractionDigitsFacet
return (other instanceof FractionDigitsFacet &&
((FractionDigitsFacet) other).value == value);
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/GDayType.java b/gnu/xml/validation/datatype/GDayType.java
index 009af3585..cc6b8e3d4 100644
--- a/gnu/xml/validation/datatype/GDayType.java
+++ b/gnu/xml/validation/datatype/GDayType.java
@@ -1,4 +1,4 @@
-/* GDayType.java --
+/* GDayType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -80,7 +80,7 @@ final class GDayType
}
return 0;
}
-
+
}
static final int[] CONSTRAINING_FACETS = {
@@ -157,7 +157,7 @@ final class GDayType
throw new DatatypeException("invalid GDay value");
}
}
-
+
public Object createValue(String literal, ValidationContext context) {
try
{
@@ -170,6 +170,5 @@ final class GDayType
return null;
}
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/GMonthDayType.java b/gnu/xml/validation/datatype/GMonthDayType.java
index a39a1cc43..d293d9b57 100644
--- a/gnu/xml/validation/datatype/GMonthDayType.java
+++ b/gnu/xml/validation/datatype/GMonthDayType.java
@@ -1,4 +1,4 @@
-/* GMonthDayType.java --
+/* GMonthDayType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -88,7 +88,7 @@ final class GMonthDayType
}
return 0;
}
-
+
}
static final int[] CONSTRAINING_FACETS = {
@@ -165,7 +165,7 @@ final class GMonthDayType
throw new DatatypeException("illegal GMonthDay type");
}
}
-
+
public Object createValue(String literal, ValidationContext context) {
try
{
@@ -179,6 +179,5 @@ final class GMonthDayType
return null;
}
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/GMonthType.java b/gnu/xml/validation/datatype/GMonthType.java
index 5a08af287..9450874b9 100644
--- a/gnu/xml/validation/datatype/GMonthType.java
+++ b/gnu/xml/validation/datatype/GMonthType.java
@@ -1,4 +1,4 @@
-/* GMonthType.java --
+/* GMonthType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -80,7 +80,7 @@ final class GMonthType
}
return 0;
}
-
+
}
static final int[] CONSTRAINING_FACETS = {
@@ -146,7 +146,7 @@ final class GMonthType
throw new DatatypeException("illegal GMonth value");
}
}
-
+
public Object createValue(String literal, ValidationContext context) {
try
{
@@ -159,6 +159,5 @@ final class GMonthType
return null;
}
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/GYearMonthType.java b/gnu/xml/validation/datatype/GYearMonthType.java
index 9ec38c0e7..9aabfb61c 100644
--- a/gnu/xml/validation/datatype/GYearMonthType.java
+++ b/gnu/xml/validation/datatype/GYearMonthType.java
@@ -1,4 +1,4 @@
-/* GYearMonthType.java --
+/* GYearMonthType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -88,7 +88,7 @@ final class GYearMonthType
}
return 0;
}
-
+
}
static final int[] CONSTRAINING_FACETS = {
@@ -155,7 +155,7 @@ final class GYearMonthType
throw new DatatypeException("illegal GYear value");
}
}
-
+
public Object createValue(String literal, ValidationContext context) {
try
{
@@ -172,6 +172,5 @@ final class GYearMonthType
return null;
}
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/GYearType.java b/gnu/xml/validation/datatype/GYearType.java
index 6dea89b76..5b1e03232 100644
--- a/gnu/xml/validation/datatype/GYearType.java
+++ b/gnu/xml/validation/datatype/GYearType.java
@@ -1,4 +1,4 @@
-/* GYearType.java --
+/* GYearType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -80,7 +80,7 @@ final class GYearType
}
return 0;
}
-
+
}
static final int[] CONSTRAINING_FACETS = {
@@ -134,7 +134,7 @@ final class GYearType
throw new DatatypeException("invalid GYear value");
}
}
-
+
public Object createValue(String literal, ValidationContext context) {
try
{
@@ -147,6 +147,5 @@ final class GYearType
return null;
}
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/HexBinaryType.java b/gnu/xml/validation/datatype/HexBinaryType.java
index 8a92b15f6..5f133e322 100644
--- a/gnu/xml/validation/datatype/HexBinaryType.java
+++ b/gnu/xml/validation/datatype/HexBinaryType.java
@@ -1,4 +1,4 @@
-/* HexBinaryType.java --
+/* HexBinaryType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -85,6 +85,5 @@ final class HexBinaryType
throw new DatatypeException(i, "invalid hexBinary value");
}
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/IDRefType.java b/gnu/xml/validation/datatype/IDRefType.java
index 8ea9805b0..932089549 100644
--- a/gnu/xml/validation/datatype/IDRefType.java
+++ b/gnu/xml/validation/datatype/IDRefType.java
@@ -1,4 +1,4 @@
-/* IDRefType.java --
+/* IDRefType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -82,6 +82,5 @@ final class IDRefType
{
return ID_TYPE_IDREF;
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/IDRefsType.java b/gnu/xml/validation/datatype/IDRefsType.java
index 57f7e56d7..6adaed13b 100644
--- a/gnu/xml/validation/datatype/IDRefsType.java
+++ b/gnu/xml/validation/datatype/IDRefsType.java
@@ -1,4 +1,4 @@
-/* IDRefsType.java --
+/* IDRefsType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -82,6 +82,5 @@ final class IDRefsType
{
return ID_TYPE_IDREFS;
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/IDType.java b/gnu/xml/validation/datatype/IDType.java
index c55601aaf..792601d78 100644
--- a/gnu/xml/validation/datatype/IDType.java
+++ b/gnu/xml/validation/datatype/IDType.java
@@ -1,4 +1,4 @@
-/* IDType.java --
+/* IDType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -82,6 +82,5 @@ final class IDType
{
return ID_TYPE_ID;
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/IntType.java b/gnu/xml/validation/datatype/IntType.java
index 6bf786604..c8f756832 100644
--- a/gnu/xml/validation/datatype/IntType.java
+++ b/gnu/xml/validation/datatype/IntType.java
@@ -1,4 +1,4 @@
-/* IntType.java --
+/* IntType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -117,7 +117,7 @@ final class IntType
throw new DatatypeException(i, "invalid int value");
}
}
-
+
public Object createValue(String literal, ValidationContext context) {
try
{
@@ -128,6 +128,5 @@ final class IntType
return null;
}
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/IntegerType.java b/gnu/xml/validation/datatype/IntegerType.java
index 2098a7d8d..b9a2a564a 100644
--- a/gnu/xml/validation/datatype/IntegerType.java
+++ b/gnu/xml/validation/datatype/IntegerType.java
@@ -1,4 +1,4 @@
-/* IntegerType.java --
+/* IntegerType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -94,7 +94,7 @@ final class IntegerType
throw new DatatypeException(i, "invalid integer value");
}
}
-
+
public Object createValue(String literal, ValidationContext context) {
try
{
@@ -105,6 +105,5 @@ final class IntegerType
return null;
}
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/LanguageType.java b/gnu/xml/validation/datatype/LanguageType.java
index 3df903c48..d30cc538f 100644
--- a/gnu/xml/validation/datatype/LanguageType.java
+++ b/gnu/xml/validation/datatype/LanguageType.java
@@ -1,4 +1,4 @@
-/* LanguageType.java --
+/* LanguageType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -82,6 +82,5 @@ final class LanguageType
if (!PATTERN.matcher(value).matches())
throw new DatatypeException("invalid language value");
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/LengthFacet.java b/gnu/xml/validation/datatype/LengthFacet.java
index cab4496b1..d6eaacd71 100644
--- a/gnu/xml/validation/datatype/LengthFacet.java
+++ b/gnu/xml/validation/datatype/LengthFacet.java
@@ -1,4 +1,4 @@
-/* LengthFacet.java --
+/* LengthFacet.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -45,7 +45,7 @@ package gnu.xml.validation.datatype;
public final class LengthFacet
extends Facet
{
-
+
public final int value;
public final boolean fixed;
@@ -56,7 +56,7 @@ public final class LengthFacet
this.value = value;
this.fixed = fixed;
}
-
+
public int hashCode()
{
return value;
@@ -67,6 +67,5 @@ public final class LengthFacet
return (other instanceof LengthFacet &&
((LengthFacet) other).value == value);
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/ListSimpleType.java b/gnu/xml/validation/datatype/ListSimpleType.java
index 1f0cb76fa..1e0d41d01 100644
--- a/gnu/xml/validation/datatype/ListSimpleType.java
+++ b/gnu/xml/validation/datatype/ListSimpleType.java
@@ -1,4 +1,4 @@
-/* ListSimpleType.java --
+/* ListSimpleType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -56,7 +56,7 @@ public class ListSimpleType
* The type of the items in this list (atomic or union).
*/
public final SimpleType itemType;
-
+
public ListSimpleType(QName name, Set facets,
int fundamentalFacets, SimpleType baseType,
Annotation annotation, SimpleType itemType)
@@ -64,7 +64,7 @@ public class ListSimpleType
super(name, LIST, facets, fundamentalFacets, baseType, annotation);
this.itemType = itemType;
}
-
+
public void checkValid(String value, ValidationContext context)
throws DatatypeException
{
@@ -78,6 +78,5 @@ public class ListSimpleType
itemType.checkValid(token, context);
}
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/LongType.java b/gnu/xml/validation/datatype/LongType.java
index eaf69df38..781b17f62 100644
--- a/gnu/xml/validation/datatype/LongType.java
+++ b/gnu/xml/validation/datatype/LongType.java
@@ -1,4 +1,4 @@
-/* LongType.java --
+/* LongType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -117,7 +117,7 @@ final class LongType
throw new DatatypeException(i, "invalid long value");
}
}
-
+
public Object createValue(String literal, ValidationContext context) {
try
{
@@ -128,6 +128,5 @@ final class LongType
return null;
}
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/MaxExclusiveFacet.java b/gnu/xml/validation/datatype/MaxExclusiveFacet.java
index 7aac1f743..90e940371 100644
--- a/gnu/xml/validation/datatype/MaxExclusiveFacet.java
+++ b/gnu/xml/validation/datatype/MaxExclusiveFacet.java
@@ -1,4 +1,4 @@
-/* MaxExclusiveFacet.java --
+/* MaxExclusiveFacet.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -49,7 +49,7 @@ import java.util.Date;
public final class MaxExclusiveFacet
extends Facet
{
-
+
public final Object value; // date or number
public final boolean fixed;
@@ -60,7 +60,7 @@ public final class MaxExclusiveFacet
this.value = value;
this.fixed = fixed;
}
-
+
public int hashCode()
{
return value.hashCode();
@@ -106,6 +106,5 @@ public final class MaxExclusiveFacet
return false;
return ((Number) test).doubleValue() < nvalue.doubleValue();
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/MaxInclusiveFacet.java b/gnu/xml/validation/datatype/MaxInclusiveFacet.java
index bb145ed41..c260113da 100644
--- a/gnu/xml/validation/datatype/MaxInclusiveFacet.java
+++ b/gnu/xml/validation/datatype/MaxInclusiveFacet.java
@@ -1,4 +1,4 @@
-/* MaxInclusiveFacet.java --
+/* MaxInclusiveFacet.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -49,7 +49,7 @@ import java.util.Date;
public final class MaxInclusiveFacet
extends Facet
{
-
+
public final Object value;
public final boolean fixed;
@@ -60,7 +60,7 @@ public final class MaxInclusiveFacet
this.value = value;
this.fixed = fixed;
}
-
+
public int hashCode()
{
return value.hashCode();
@@ -71,7 +71,7 @@ public final class MaxInclusiveFacet
return (other instanceof MaxInclusiveFacet &&
((MaxInclusiveFacet) other).value.equals(value));
}
-
+
boolean matches(Object test)
{
if (value instanceof Date)
@@ -107,6 +107,5 @@ public final class MaxInclusiveFacet
return false;
return ((Number) test).doubleValue() <= nvalue.doubleValue();
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/MaxLengthFacet.java b/gnu/xml/validation/datatype/MaxLengthFacet.java
index d03326311..ba77ff2df 100644
--- a/gnu/xml/validation/datatype/MaxLengthFacet.java
+++ b/gnu/xml/validation/datatype/MaxLengthFacet.java
@@ -1,4 +1,4 @@
-/* MaxLengthFacet.java --
+/* MaxLengthFacet.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -67,6 +67,5 @@ public final class MaxLengthFacet
return (other instanceof MaxLengthFacet &&
((MaxLengthFacet) other).value == value);
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/MinExclusiveFacet.java b/gnu/xml/validation/datatype/MinExclusiveFacet.java
index 2289bb11c..a779d09d8 100644
--- a/gnu/xml/validation/datatype/MinExclusiveFacet.java
+++ b/gnu/xml/validation/datatype/MinExclusiveFacet.java
@@ -1,4 +1,4 @@
-/* MinExclusiveFacet.java --
+/* MinExclusiveFacet.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -49,7 +49,7 @@ import java.util.Date;
public final class MinExclusiveFacet
extends Facet
{
-
+
public final Object value;
public final boolean fixed;
@@ -60,7 +60,7 @@ public final class MinExclusiveFacet
this.value = value;
this.fixed = fixed;
}
-
+
public int hashCode()
{
return value.hashCode();
@@ -71,7 +71,7 @@ public final class MinExclusiveFacet
return (other instanceof MinExclusiveFacet &&
((MinExclusiveFacet) other).value.equals(value));
}
-
+
boolean matches(Object test)
{
if (value instanceof Date)
@@ -106,6 +106,5 @@ public final class MinExclusiveFacet
return false;
return ((Number) test).doubleValue() > nvalue.doubleValue();
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/MinInclusiveFacet.java b/gnu/xml/validation/datatype/MinInclusiveFacet.java
index 6c07c3644..6138c9af8 100644
--- a/gnu/xml/validation/datatype/MinInclusiveFacet.java
+++ b/gnu/xml/validation/datatype/MinInclusiveFacet.java
@@ -1,4 +1,4 @@
-/* MinInclusiveFacet.java --
+/* MinInclusiveFacet.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -49,7 +49,7 @@ import java.util.Date;
public final class MinInclusiveFacet
extends Facet
{
-
+
public final Object value;
public final boolean fixed;
@@ -60,7 +60,7 @@ public final class MinInclusiveFacet
this.value = value;
this.fixed = fixed;
}
-
+
public int hashCode()
{
return value.hashCode();
@@ -71,7 +71,7 @@ public final class MinInclusiveFacet
return (other instanceof MinInclusiveFacet &&
((MinInclusiveFacet) other).value.equals(value));
}
-
+
boolean matches(Object test)
{
if (value instanceof Date)
@@ -107,6 +107,5 @@ public final class MinInclusiveFacet
return false;
return ((Number) test).doubleValue() >= nvalue.doubleValue();
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/MinLengthFacet.java b/gnu/xml/validation/datatype/MinLengthFacet.java
index c7dee200b..f13e80b62 100644
--- a/gnu/xml/validation/datatype/MinLengthFacet.java
+++ b/gnu/xml/validation/datatype/MinLengthFacet.java
@@ -1,4 +1,4 @@
-/* MinLengthFacet.java --
+/* MinLengthFacet.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -67,6 +67,5 @@ public final class MinLengthFacet
return (other instanceof MinLengthFacet &&
((MinLengthFacet) other).value == value);
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/NCNameType.java b/gnu/xml/validation/datatype/NCNameType.java
index 4188d886a..3f2088f9b 100644
--- a/gnu/xml/validation/datatype/NCNameType.java
+++ b/gnu/xml/validation/datatype/NCNameType.java
@@ -1,4 +1,4 @@
-/* NCNameType.java --
+/* NCNameType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -106,6 +106,5 @@ final class NCNameType
throw e2;
}
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/NMTokenType.java b/gnu/xml/validation/datatype/NMTokenType.java
index 4498fecfa..ca3271fef 100644
--- a/gnu/xml/validation/datatype/NMTokenType.java
+++ b/gnu/xml/validation/datatype/NMTokenType.java
@@ -1,4 +1,4 @@
-/* NMTokenType.java --
+/* NMTokenType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -97,6 +97,5 @@ final class NMTokenType
throw e2;
}
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/NMTokensType.java b/gnu/xml/validation/datatype/NMTokensType.java
index d49964561..388b451db 100644
--- a/gnu/xml/validation/datatype/NMTokensType.java
+++ b/gnu/xml/validation/datatype/NMTokensType.java
@@ -1,4 +1,4 @@
-/* NMTokensType.java --
+/* NMTokensType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -120,7 +120,6 @@ final class NMTokensType
throw e2;
}
}
-
-
-}
+
+}
diff --git a/gnu/xml/validation/datatype/NameType.java b/gnu/xml/validation/datatype/NameType.java
index a2fbb9d5b..70349aed8 100644
--- a/gnu/xml/validation/datatype/NameType.java
+++ b/gnu/xml/validation/datatype/NameType.java
@@ -1,4 +1,4 @@
-/* NameType.java --
+/* NameType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -99,6 +99,5 @@ final class NameType
throw e2;
}
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/NegativeIntegerType.java b/gnu/xml/validation/datatype/NegativeIntegerType.java
index fd436cb55..1e6439c99 100644
--- a/gnu/xml/validation/datatype/NegativeIntegerType.java
+++ b/gnu/xml/validation/datatype/NegativeIntegerType.java
@@ -1,4 +1,4 @@
-/* NegativeIntegerType.java --
+/* NegativeIntegerType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -95,7 +95,7 @@ final class NegativeIntegerType
throw new DatatypeException(i, "invalid negative integer value");
}
}
-
+
public Object createValue(String literal, ValidationContext context) {
try
{
@@ -106,6 +106,5 @@ final class NegativeIntegerType
return null;
}
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/NonNegativeIntegerType.java b/gnu/xml/validation/datatype/NonNegativeIntegerType.java
index 857778582..c5192f346 100644
--- a/gnu/xml/validation/datatype/NonNegativeIntegerType.java
+++ b/gnu/xml/validation/datatype/NonNegativeIntegerType.java
@@ -1,4 +1,4 @@
-/* NonNegativeIntegerType.java --
+/* NonNegativeIntegerType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -105,7 +105,7 @@ final class NonNegativeIntegerType
throw new DatatypeException(i, "invalid non-negative integer value");
}
}
-
+
public Object createValue(String literal, ValidationContext context) {
try
{
@@ -116,6 +116,5 @@ final class NonNegativeIntegerType
return null;
}
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/NonPositiveIntegerType.java b/gnu/xml/validation/datatype/NonPositiveIntegerType.java
index 0b43d5227..e418c0615 100644
--- a/gnu/xml/validation/datatype/NonPositiveIntegerType.java
+++ b/gnu/xml/validation/datatype/NonPositiveIntegerType.java
@@ -1,4 +1,4 @@
-/* NonPositiveIntegerType.java --
+/* NonPositiveIntegerType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -105,7 +105,7 @@ final class NonPositiveIntegerType
throw new DatatypeException(i, "invalid non-positive integer value");
}
}
-
+
public Object createValue(String literal, ValidationContext context) {
try
{
@@ -116,6 +116,5 @@ final class NonPositiveIntegerType
return null;
}
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/NormalizedStringType.java b/gnu/xml/validation/datatype/NormalizedStringType.java
index a74312d11..9009f648a 100644
--- a/gnu/xml/validation/datatype/NormalizedStringType.java
+++ b/gnu/xml/validation/datatype/NormalizedStringType.java
@@ -1,4 +1,4 @@
-/* NormalizedStringType.java --
+/* NormalizedStringType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -83,6 +83,5 @@ final class NormalizedStringType
throw new DatatypeException(i, "invalid normalized-string value");
}
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/NotationType.java b/gnu/xml/validation/datatype/NotationType.java
index e9d7c9fda..b661cb4e1 100644
--- a/gnu/xml/validation/datatype/NotationType.java
+++ b/gnu/xml/validation/datatype/NotationType.java
@@ -1,4 +1,4 @@
-/* NotationType.java --
+/* NotationType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -83,6 +83,5 @@ final class NotationType
{
return true;
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/PatternFacet.java b/gnu/xml/validation/datatype/PatternFacet.java
index d594b26b9..9c1cb7e30 100644
--- a/gnu/xml/validation/datatype/PatternFacet.java
+++ b/gnu/xml/validation/datatype/PatternFacet.java
@@ -1,4 +1,4 @@
-/* PatternFacet.java --
+/* PatternFacet.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -66,6 +66,5 @@ public final class PatternFacet
return (other instanceof PatternFacet &&
((PatternFacet) other).value.equals(value));
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/PositiveIntegerType.java b/gnu/xml/validation/datatype/PositiveIntegerType.java
index 0c10df3ab..15d0febfc 100644
--- a/gnu/xml/validation/datatype/PositiveIntegerType.java
+++ b/gnu/xml/validation/datatype/PositiveIntegerType.java
@@ -1,4 +1,4 @@
-/* PositiveIntegerType.java --
+/* PositiveIntegerType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -95,7 +95,7 @@ final class PositiveIntegerType
throw new DatatypeException(i, "invalid positive integer value");
}
}
-
+
public Object createValue(String literal, ValidationContext context) {
try
{
@@ -106,6 +106,5 @@ final class PositiveIntegerType
return null;
}
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/QNameType.java b/gnu/xml/validation/datatype/QNameType.java
index 1eaa51895..bdc40c97f 100644
--- a/gnu/xml/validation/datatype/QNameType.java
+++ b/gnu/xml/validation/datatype/QNameType.java
@@ -1,4 +1,4 @@
-/* QNameType.java --
+/* QNameType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -117,6 +117,5 @@ final class QNameType
{
return true;
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/ShortType.java b/gnu/xml/validation/datatype/ShortType.java
index 3179c8dae..43255571d 100644
--- a/gnu/xml/validation/datatype/ShortType.java
+++ b/gnu/xml/validation/datatype/ShortType.java
@@ -1,4 +1,4 @@
-/* ShortType.java --
+/* ShortType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -117,7 +117,7 @@ final class ShortType
throw new DatatypeException(i, "invalid short value");
}
}
-
+
public Object createValue(String literal, ValidationContext context) {
try
{
@@ -128,6 +128,5 @@ final class ShortType
return null;
}
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/SimpleType.java b/gnu/xml/validation/datatype/SimpleType.java
index 1b8479922..1233723bd 100644
--- a/gnu/xml/validation/datatype/SimpleType.java
+++ b/gnu/xml/validation/datatype/SimpleType.java
@@ -1,4 +1,4 @@
-/* SimpleType.java --
+/* SimpleType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -60,12 +60,12 @@ public class SimpleType
* The variety of the <code>anySimpleType</code> datatype.
*/
public static final int ANY = 0;
-
+
/**
* The atomic variety.
*/
public static final int ATOMIC = 1;
-
+
/**
* The list variety.
*/
@@ -229,15 +229,15 @@ public class SimpleType
{
throw new UnsupportedOperationException();
}
-
+
public Object createValue(String literal, ValidationContext context) {
return literal;
}
-
+
public boolean sameValue(Object value1, Object value2) {
return value1.equals(value2);
}
-
+
public int valueHashCode(Object value) {
return value.hashCode();
}
@@ -253,4 +253,3 @@ public class SimpleType
}
}
-
diff --git a/gnu/xml/validation/datatype/StringType.java b/gnu/xml/validation/datatype/StringType.java
index 593c265dc..e20d1b87e 100644
--- a/gnu/xml/validation/datatype/StringType.java
+++ b/gnu/xml/validation/datatype/StringType.java
@@ -1,4 +1,4 @@
-/* StringType.java --
+/* StringType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -70,4 +70,3 @@ final class StringType
}
}
-
diff --git a/gnu/xml/validation/datatype/TimeType.java b/gnu/xml/validation/datatype/TimeType.java
index 0152e1171..83ada5bc6 100644
--- a/gnu/xml/validation/datatype/TimeType.java
+++ b/gnu/xml/validation/datatype/TimeType.java
@@ -1,4 +1,4 @@
-/* TimeType.java --
+/* TimeType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -86,7 +86,7 @@ final class TimeType
}
return 0;
}
-
+
}
static final int[] CONSTRAINING_FACETS = {
@@ -217,7 +217,7 @@ final class TimeType
throw new DatatypeException(len, "invalid time value");
}
}
-
+
public Object createValue(String value, ValidationContext context) {
int len = value.length();
int state = 3;
@@ -298,6 +298,5 @@ final class TimeType
return null;
}
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/TokenType.java b/gnu/xml/validation/datatype/TokenType.java
index 18e1e8ad5..dfe5f14ce 100644
--- a/gnu/xml/validation/datatype/TokenType.java
+++ b/gnu/xml/validation/datatype/TokenType.java
@@ -1,4 +1,4 @@
-/* TokenType.java --
+/* TokenType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -91,6 +91,5 @@ final class TokenType
last = c;
}
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/TotalDigitsFacet.java b/gnu/xml/validation/datatype/TotalDigitsFacet.java
index 4debc638e..25b50cd6f 100644
--- a/gnu/xml/validation/datatype/TotalDigitsFacet.java
+++ b/gnu/xml/validation/datatype/TotalDigitsFacet.java
@@ -1,4 +1,4 @@
-/* TotalDigitsFacet.java --
+/* TotalDigitsFacet.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -45,7 +45,7 @@ package gnu.xml.validation.datatype;
public final class TotalDigitsFacet
extends Facet
{
-
+
public final int value;
public final boolean fixed;
@@ -56,7 +56,7 @@ public final class TotalDigitsFacet
this.value = value;
this.fixed = fixed;
}
-
+
public int hashCode()
{
return value;
@@ -67,6 +67,5 @@ public final class TotalDigitsFacet
return (other instanceof TotalDigitsFacet &&
((TotalDigitsFacet) other).value == value);
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/Type.java b/gnu/xml/validation/datatype/Type.java
index be6f0a0b4..ebd650933 100644
--- a/gnu/xml/validation/datatype/Type.java
+++ b/gnu/xml/validation/datatype/Type.java
@@ -1,4 +1,4 @@
-/* Type.java --
+/* Type.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -58,6 +58,5 @@ public abstract class Type
{
this.name = name;
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/TypeBuilder.java b/gnu/xml/validation/datatype/TypeBuilder.java
index 054eb8a55..087333153 100644
--- a/gnu/xml/validation/datatype/TypeBuilder.java
+++ b/gnu/xml/validation/datatype/TypeBuilder.java
@@ -1,4 +1,4 @@
-/* TypeBuilder.java --
+/* TypeBuilder.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -54,7 +54,7 @@ public class TypeBuilder
{
final SimpleType type;
-
+
TypeBuilder(SimpleType type)
{
this.type = type;
@@ -136,7 +136,7 @@ public class TypeBuilder
}
return new MaxLengthFacet(Integer.parseInt(value), fixed, null);
}
-
+
PatternFacet parsePatternFacet(String value)
throws DatatypeException
{
@@ -185,7 +185,7 @@ public class TypeBuilder
}
return new MaxInclusiveFacet(type.createValue(value, context), fixed, null);
}
-
+
MaxExclusiveFacet parseMaxExclusiveFacet(String value,
ValidationContext context)
throws DatatypeException
@@ -201,7 +201,7 @@ public class TypeBuilder
}
return new MaxExclusiveFacet(type.createValue(value, context), fixed, null);
}
-
+
MinExclusiveFacet parseMinExclusiveFacet(String value,
ValidationContext context)
throws DatatypeException
@@ -217,7 +217,7 @@ public class TypeBuilder
}
return new MinExclusiveFacet(type.createValue(value, context), fixed, null);
}
-
+
MinInclusiveFacet parseMinInclusiveFacet(String value,
ValidationContext context)
throws DatatypeException
@@ -233,7 +233,7 @@ public class TypeBuilder
}
return new MinInclusiveFacet(type.createValue(value, context), fixed, null);
}
-
+
TotalDigitsFacet parseTotalDigitsFacet(String value)
throws DatatypeException
{
@@ -251,7 +251,7 @@ public class TypeBuilder
throw new DatatypeException("value must be a positiveInteger");
return new TotalDigitsFacet(val, fixed, null);
}
-
+
FractionDigitsFacet parseFractionDigitsFacet(String value)
throws DatatypeException
{
@@ -269,10 +269,10 @@ public class TypeBuilder
throw new DatatypeException("value must be a positiveInteger");
return new FractionDigitsFacet(val, fixed, null);
}
-
+
public Datatype createDatatype()
{
return type;
}
-
+
}
diff --git a/gnu/xml/validation/datatype/TypeLibrary.java b/gnu/xml/validation/datatype/TypeLibrary.java
index f1daecebd..4db48f799 100644
--- a/gnu/xml/validation/datatype/TypeLibrary.java
+++ b/gnu/xml/validation/datatype/TypeLibrary.java
@@ -1,4 +1,4 @@
-/* TypeLibrary.java --
+/* TypeLibrary.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -52,7 +52,7 @@ import org.relaxng.datatype.DatatypeLibrary;
public class TypeLibrary
implements DatatypeLibrary
{
-
+
public static final SimpleType ANY_SIMPLE_TYPE = new AnySimpleType();
public static final SimpleType STRING = new StringType();
@@ -169,5 +169,5 @@ public class TypeLibrary
throw new DatatypeException("Unknown type name: " + typeLocalName);
return type;
}
-
+
}
diff --git a/gnu/xml/validation/datatype/TypeLibraryFactory.java b/gnu/xml/validation/datatype/TypeLibraryFactory.java
index 21ee64224..2f9bbd3c6 100644
--- a/gnu/xml/validation/datatype/TypeLibraryFactory.java
+++ b/gnu/xml/validation/datatype/TypeLibraryFactory.java
@@ -1,4 +1,4 @@
-/* TypeLibraryFactory.java --
+/* TypeLibraryFactory.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -56,5 +56,5 @@ public class TypeLibraryFactory
return new TypeLibrary();
return null;
}
-
+
}
diff --git a/gnu/xml/validation/datatype/UnionSimpleType.java b/gnu/xml/validation/datatype/UnionSimpleType.java
index d87c2aa7a..253e1df7b 100644
--- a/gnu/xml/validation/datatype/UnionSimpleType.java
+++ b/gnu/xml/validation/datatype/UnionSimpleType.java
@@ -1,4 +1,4 @@
-/* UnionSimpleType.java --
+/* UnionSimpleType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -57,7 +57,7 @@ public class UnionSimpleType
* The member types in this union.
*/
public final List memberTypes;
-
+
public UnionSimpleType(QName name, Set facets,
int fundamentalFacets, SimpleType baseType,
Annotation annotation, List memberTypes)
@@ -78,6 +78,5 @@ public class UnionSimpleType
}
throw new DatatypeException("invalid union type value");
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/UnsignedByteType.java b/gnu/xml/validation/datatype/UnsignedByteType.java
index 772c9cc0a..cf12abe3a 100644
--- a/gnu/xml/validation/datatype/UnsignedByteType.java
+++ b/gnu/xml/validation/datatype/UnsignedByteType.java
@@ -1,4 +1,4 @@
-/* UnsignedByteType.java --
+/* UnsignedByteType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -105,7 +105,7 @@ final class UnsignedByteType
throw new DatatypeException(i, "invalid unsigned byte value");
}
}
-
+
public Object createValue(String literal, ValidationContext context) {
try
{
@@ -116,6 +116,5 @@ final class UnsignedByteType
return null;
}
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/UnsignedIntType.java b/gnu/xml/validation/datatype/UnsignedIntType.java
index a4e8a6820..b634442bb 100644
--- a/gnu/xml/validation/datatype/UnsignedIntType.java
+++ b/gnu/xml/validation/datatype/UnsignedIntType.java
@@ -1,4 +1,4 @@
-/* UnsignedIntType.java --
+/* UnsignedIntType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -105,7 +105,7 @@ final class UnsignedIntType
throw new DatatypeException(i, "invalid unsigned int value");
}
}
-
+
public Object createValue(String literal, ValidationContext context) {
try
{
@@ -116,6 +116,5 @@ final class UnsignedIntType
return null;
}
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/UnsignedLongType.java b/gnu/xml/validation/datatype/UnsignedLongType.java
index 5a36d8a31..784b86663 100644
--- a/gnu/xml/validation/datatype/UnsignedLongType.java
+++ b/gnu/xml/validation/datatype/UnsignedLongType.java
@@ -1,4 +1,4 @@
-/* UnsignedLongType.java --
+/* UnsignedLongType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -105,7 +105,7 @@ final class UnsignedLongType
throw new DatatypeException(i, "invalid unsigned long value");
}
}
-
+
public Object createValue(String literal, ValidationContext context) {
try
{
@@ -116,6 +116,5 @@ final class UnsignedLongType
return null;
}
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/UnsignedShortType.java b/gnu/xml/validation/datatype/UnsignedShortType.java
index 49f621be7..ececb608c 100644
--- a/gnu/xml/validation/datatype/UnsignedShortType.java
+++ b/gnu/xml/validation/datatype/UnsignedShortType.java
@@ -1,4 +1,4 @@
-/* UnsignedShortType.java --
+/* UnsignedShortType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -106,7 +106,7 @@ final class UnsignedShortType
throw new DatatypeException(i, "invalid unsigned short value");
}
}
-
+
public Object createValue(String literal, ValidationContext context) {
try
{
@@ -117,6 +117,5 @@ final class UnsignedShortType
return null;
}
}
-
-}
+}
diff --git a/gnu/xml/validation/datatype/WhiteSpaceFacet.java b/gnu/xml/validation/datatype/WhiteSpaceFacet.java
index 5920e1c88..0f2109cfc 100644
--- a/gnu/xml/validation/datatype/WhiteSpaceFacet.java
+++ b/gnu/xml/validation/datatype/WhiteSpaceFacet.java
@@ -1,4 +1,4 @@
-/* WhiteSpaceFacet.java --
+/* WhiteSpaceFacet.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -45,11 +45,11 @@ package gnu.xml.validation.datatype;
public final class WhiteSpaceFacet
extends Facet
{
-
+
public static final int PRESERVE = 0;
public static final int REPLACE = 1;
public static final int COLLAPSE = 2;
-
+
public final int value;
public final boolean fixed;
@@ -59,7 +59,7 @@ public final class WhiteSpaceFacet
this.value = value;
this.fixed = fixed;
}
-
+
public int hashCode()
{
return value;
@@ -70,6 +70,5 @@ public final class WhiteSpaceFacet
return (other instanceof WhiteSpaceFacet &&
((WhiteSpaceFacet) other).value == value);
}
-
-}
+}
diff --git a/gnu/xml/validation/relaxng/AnyNameNameClass.java b/gnu/xml/validation/relaxng/AnyNameNameClass.java
index ecc016d4b..7b27a3c98 100644
--- a/gnu/xml/validation/relaxng/AnyNameNameClass.java
+++ b/gnu/xml/validation/relaxng/AnyNameNameClass.java
@@ -1,4 +1,4 @@
-/* AnyNameNameClass.java --
+/* AnyNameNameClass.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -47,7 +47,7 @@ class AnyNameNameClass
{
NameClass exceptNameClass;
-
+
boolean matchesName(String uri, String localName)
{
return (exceptNameClass == null) ? true :
@@ -55,4 +55,3 @@ class AnyNameNameClass
}
}
-
diff --git a/gnu/xml/validation/relaxng/AttributePattern.java b/gnu/xml/validation/relaxng/AttributePattern.java
index 48443d61b..54e414dc5 100644
--- a/gnu/xml/validation/relaxng/AttributePattern.java
+++ b/gnu/xml/validation/relaxng/AttributePattern.java
@@ -1,4 +1,4 @@
-/* AttributePattern.java --
+/* AttributePattern.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -50,4 +50,3 @@ class AttributePattern
Pattern pattern;
}
-
diff --git a/gnu/xml/validation/relaxng/ChoiceNameClass.java b/gnu/xml/validation/relaxng/ChoiceNameClass.java
index e196cd4ee..9c762b926 100644
--- a/gnu/xml/validation/relaxng/ChoiceNameClass.java
+++ b/gnu/xml/validation/relaxng/ChoiceNameClass.java
@@ -1,4 +1,4 @@
-/* ChoiceNameClass.java --
+/* ChoiceNameClass.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -54,6 +54,5 @@ class ChoiceNameClass
return name1.matchesName(uri, localName) ||
name2.matchesName(uri, localName);
}
-
-}
+}
diff --git a/gnu/xml/validation/relaxng/ChoicePattern.java b/gnu/xml/validation/relaxng/ChoicePattern.java
index 54739b270..48c96b2fb 100644
--- a/gnu/xml/validation/relaxng/ChoicePattern.java
+++ b/gnu/xml/validation/relaxng/ChoicePattern.java
@@ -1,4 +1,4 @@
-/* ChoicePattern.java --
+/* ChoicePattern.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -50,4 +50,3 @@ class ChoicePattern
Pattern pattern2;
}
-
diff --git a/gnu/xml/validation/relaxng/DataPattern.java b/gnu/xml/validation/relaxng/DataPattern.java
index 2315b2ce6..f4e36c726 100644
--- a/gnu/xml/validation/relaxng/DataPattern.java
+++ b/gnu/xml/validation/relaxng/DataPattern.java
@@ -1,4 +1,4 @@
-/* DataPattern.java --
+/* DataPattern.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -55,6 +55,5 @@ class DataPattern
DatatypeLibrary datatypeLibrary;
List params = new LinkedList();
Pattern exceptPattern;
-
-}
+}
diff --git a/gnu/xml/validation/relaxng/Define.java b/gnu/xml/validation/relaxng/Define.java
index 8801d581e..ffb1d41ee 100644
--- a/gnu/xml/validation/relaxng/Define.java
+++ b/gnu/xml/validation/relaxng/Define.java
@@ -1,4 +1,4 @@
-/* Define.java --
+/* Define.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -47,6 +47,5 @@ class Define
String name;
ElementPattern element;
-
-}
+}
diff --git a/gnu/xml/validation/relaxng/ElementPattern.java b/gnu/xml/validation/relaxng/ElementPattern.java
index 9ff357075..e02731968 100644
--- a/gnu/xml/validation/relaxng/ElementPattern.java
+++ b/gnu/xml/validation/relaxng/ElementPattern.java
@@ -1,4 +1,4 @@
-/* ElementPattern.java --
+/* ElementPattern.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -50,4 +50,3 @@ class ElementPattern
Pattern pattern;
}
-
diff --git a/gnu/xml/validation/relaxng/EmptyPattern.java b/gnu/xml/validation/relaxng/EmptyPattern.java
index ce568f84b..13c2d3f61 100644
--- a/gnu/xml/validation/relaxng/EmptyPattern.java
+++ b/gnu/xml/validation/relaxng/EmptyPattern.java
@@ -1,4 +1,4 @@
-/* EmptyPattern.java --
+/* EmptyPattern.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -49,4 +49,3 @@ class EmptyPattern
static final EmptyPattern INSTANCE = new EmptyPattern();
}
-
diff --git a/gnu/xml/validation/relaxng/FullSyntaxBuilder.java b/gnu/xml/validation/relaxng/FullSyntaxBuilder.java
index 78e9f8533..bb73c4f38 100644
--- a/gnu/xml/validation/relaxng/FullSyntaxBuilder.java
+++ b/gnu/xml/validation/relaxng/FullSyntaxBuilder.java
@@ -1,4 +1,4 @@
-/* FullSyntaxBuilder.java --
+/* FullSyntaxBuilder.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -97,7 +97,7 @@ class FullSyntaxBuilder
defineAttrs.add("name");
defineAttrs.add("combine");
Set nsAttrs = Collections.singleton("ns");
-
+
VOCABULARY.put("element", elementAttrs);
VOCABULARY.put("attribute", elementAttrs);
VOCABULARY.put("group", Collections.EMPTY_SET);
@@ -164,10 +164,10 @@ class FullSyntaxBuilder
{
urls = new HashSet();
refCount = 1;
-
+
doc.normalizeDocument(); // Normalize XML document
transform(doc); // Apply transformation rules to provide simple syntax
-
+
// 4.18. grammar element
Element p = doc.getDocumentElement();
Element grammar =
@@ -248,7 +248,7 @@ class FullSyntaxBuilder
}
transform2(p); // Apply second stage transformation rules
-
+
Grammar ret = parseGrammar(grammar);
datatypeLibraries = null; // free datatype libraries cache
return ret;
@@ -463,7 +463,7 @@ class FullSyntaxBuilder
!"grammar".equals(eName))
throw new GrammarException("included element is not " +
"a grammar");
-
+
transform(element);
urls.remove(href);
// handle components
@@ -513,9 +513,9 @@ class FullSyntaxBuilder
}
// transform to div element
Document doc = include.getOwnerDocument();
- Element includeDiv =
+ Element includeDiv =
doc.createElementNS(XMLConstants.RELAXNG_NS_URI, "div");
- Element grammarDiv =
+ Element grammarDiv =
doc.createElementNS(XMLConstants.RELAXNG_NS_URI, "div");
// XXX copy include non-href attributes (none defined?)
element = (Element) doc.importNode(element, true);
@@ -849,7 +849,7 @@ class FullSyntaxBuilder
}
}
}
-
+
break;
case Node.TEXT_NODE:
case Node.CDATA_SECTION_NODE:
@@ -935,7 +935,7 @@ class FullSyntaxBuilder
Node grammar = grammar2;
if ("parentRef".equals(elementName))
grammar = grammar1;
-
+
String name = ((Element) node).getAttribute("name");
if (name != null)
throw new GrammarException("no name attribute on " +
@@ -1240,7 +1240,7 @@ class FullSyntaxBuilder
}
node.appendChild(child);
}
-
+
private static Element getFirstChildElement(Node node)
{
Node ctx = node.getFirstChild();
@@ -1485,7 +1485,7 @@ class FullSyntaxBuilder
value.value = node.getTextContent();
return value;
}
-
+
ListPattern parseList(Element node)
throws GrammarException
{
diff --git a/gnu/xml/validation/relaxng/Grammar.java b/gnu/xml/validation/relaxng/Grammar.java
index 76eff4f3a..c2407da2b 100644
--- a/gnu/xml/validation/relaxng/Grammar.java
+++ b/gnu/xml/validation/relaxng/Grammar.java
@@ -1,4 +1,4 @@
-/* Grammar.java --
+/* Grammar.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -65,6 +65,5 @@ class Grammar
// TODO
return null;
}
-
-}
+}
diff --git a/gnu/xml/validation/relaxng/GrammarException.java b/gnu/xml/validation/relaxng/GrammarException.java
index 71d03de97..167cf6482 100644
--- a/gnu/xml/validation/relaxng/GrammarException.java
+++ b/gnu/xml/validation/relaxng/GrammarException.java
@@ -1,4 +1,4 @@
-/* GrammarException.java --
+/* GrammarException.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -52,5 +52,5 @@ class GrammarException
{
super(message);
}
-
+
}
diff --git a/gnu/xml/validation/relaxng/GrammarValidator.java b/gnu/xml/validation/relaxng/GrammarValidator.java
index d811aeec9..e4ff3dab4 100644
--- a/gnu/xml/validation/relaxng/GrammarValidator.java
+++ b/gnu/xml/validation/relaxng/GrammarValidator.java
@@ -1,4 +1,4 @@
-/* GrammarValidator.java --
+/* GrammarValidator.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -93,5 +93,5 @@ class GrammarValidator
{
// TODO
}
-
+
}
diff --git a/gnu/xml/validation/relaxng/GroupPattern.java b/gnu/xml/validation/relaxng/GroupPattern.java
index b01090efa..b63c7aaa7 100644
--- a/gnu/xml/validation/relaxng/GroupPattern.java
+++ b/gnu/xml/validation/relaxng/GroupPattern.java
@@ -1,4 +1,4 @@
-/* GroupPattern.java --
+/* GroupPattern.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -48,6 +48,5 @@ class GroupPattern
Pattern pattern1;
Pattern pattern2;
-
-}
+}
diff --git a/gnu/xml/validation/relaxng/InterleavePattern.java b/gnu/xml/validation/relaxng/InterleavePattern.java
index aa7c28e5e..8a877d7af 100644
--- a/gnu/xml/validation/relaxng/InterleavePattern.java
+++ b/gnu/xml/validation/relaxng/InterleavePattern.java
@@ -1,4 +1,4 @@
-/* InterleavePattern.java --
+/* InterleavePattern.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -48,6 +48,5 @@ class InterleavePattern
Pattern pattern1;
Pattern pattern2;
-
-}
+}
diff --git a/gnu/xml/validation/relaxng/ListPattern.java b/gnu/xml/validation/relaxng/ListPattern.java
index 4c0393ae5..e16d5f6e5 100644
--- a/gnu/xml/validation/relaxng/ListPattern.java
+++ b/gnu/xml/validation/relaxng/ListPattern.java
@@ -1,4 +1,4 @@
-/* ListPattern.java --
+/* ListPattern.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -49,4 +49,3 @@ class ListPattern
Pattern pattern;
}
-
diff --git a/gnu/xml/validation/relaxng/NSNameNameClass.java b/gnu/xml/validation/relaxng/NSNameNameClass.java
index f485e9970..2f620c1d0 100644
--- a/gnu/xml/validation/relaxng/NSNameNameClass.java
+++ b/gnu/xml/validation/relaxng/NSNameNameClass.java
@@ -1,4 +1,4 @@
-/* NSNameNameClass.java --
+/* NSNameNameClass.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -56,6 +56,5 @@ class NSNameNameClass
return (exceptNameClass == null) ? true :
!exceptNameClass.matchesName(uri, localName);
}
-
-}
+}
diff --git a/gnu/xml/validation/relaxng/NameClass.java b/gnu/xml/validation/relaxng/NameClass.java
index 2a3dc83e5..0ef9ef131 100644
--- a/gnu/xml/validation/relaxng/NameClass.java
+++ b/gnu/xml/validation/relaxng/NameClass.java
@@ -1,4 +1,4 @@
-/* NameClass.java --
+/* NameClass.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -46,5 +46,5 @@ abstract class NameClass
{
abstract boolean matchesName(String uri, String localName);
-
+
}
diff --git a/gnu/xml/validation/relaxng/NameNameClass.java b/gnu/xml/validation/relaxng/NameNameClass.java
index d5a0c5f04..b2d0e04ee 100644
--- a/gnu/xml/validation/relaxng/NameNameClass.java
+++ b/gnu/xml/validation/relaxng/NameNameClass.java
@@ -1,4 +1,4 @@
-/* NameNameClass.java --
+/* NameNameClass.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -57,4 +57,3 @@ class NameNameClass
}
}
-
diff --git a/gnu/xml/validation/relaxng/NotAllowedPattern.java b/gnu/xml/validation/relaxng/NotAllowedPattern.java
index 8263a4573..d56afb2d7 100644
--- a/gnu/xml/validation/relaxng/NotAllowedPattern.java
+++ b/gnu/xml/validation/relaxng/NotAllowedPattern.java
@@ -1,4 +1,4 @@
-/* NotAllowedPattern.java --
+/* NotAllowedPattern.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -49,5 +49,3 @@ class NotAllowedPattern
static final NotAllowedPattern INSTANCE = new NotAllowedPattern();
}
-
-
diff --git a/gnu/xml/validation/relaxng/OneOrMorePattern.java b/gnu/xml/validation/relaxng/OneOrMorePattern.java
index 99864d72a..0545130ad 100644
--- a/gnu/xml/validation/relaxng/OneOrMorePattern.java
+++ b/gnu/xml/validation/relaxng/OneOrMorePattern.java
@@ -1,4 +1,4 @@
-/* OneOrMorePattern.java --
+/* OneOrMorePattern.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -49,4 +49,3 @@ class OneOrMorePattern
Pattern pattern;
}
-
diff --git a/gnu/xml/validation/relaxng/Param.java b/gnu/xml/validation/relaxng/Param.java
index 246ad20b7..65a1b6689 100644
--- a/gnu/xml/validation/relaxng/Param.java
+++ b/gnu/xml/validation/relaxng/Param.java
@@ -1,4 +1,4 @@
-/* Param.java --
+/* Param.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -49,4 +49,3 @@ class Param
String value;
}
-
diff --git a/gnu/xml/validation/relaxng/Pattern.java b/gnu/xml/validation/relaxng/Pattern.java
index 3bf9a9919..157f22316 100644
--- a/gnu/xml/validation/relaxng/Pattern.java
+++ b/gnu/xml/validation/relaxng/Pattern.java
@@ -1,4 +1,4 @@
-/* Pattern.java --
+/* Pattern.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -45,4 +45,3 @@ package gnu.xml.validation.relaxng;
abstract class Pattern
{
}
-
diff --git a/gnu/xml/validation/relaxng/RELAXNGSchemaFactory.java b/gnu/xml/validation/relaxng/RELAXNGSchemaFactory.java
index 890ca8eeb..c0c9bd887 100644
--- a/gnu/xml/validation/relaxng/RELAXNGSchemaFactory.java
+++ b/gnu/xml/validation/relaxng/RELAXNGSchemaFactory.java
@@ -1,4 +1,4 @@
-/* RelaxNGSchemaFactory.java --
+/* RelaxNGSchemaFactory.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -75,7 +75,7 @@ public class RELAXNGSchemaFactory
public void setResourceResolver(LSResourceResolver resourceResolver)
{
this.resourceResolver = resourceResolver;
- }
+ }
public ErrorHandler getErrorHandler()
{
@@ -84,7 +84,7 @@ public class RELAXNGSchemaFactory
public void setErrorHandler(ErrorHandler errorHandler)
{
- this.errorHandler = errorHandler;
+ this.errorHandler = errorHandler;
}
public boolean isSchemaLanguageSupported(String schemaLanguage)
@@ -159,5 +159,5 @@ public class RELAXNGSchemaFactory
throw e2;
}
}
-
+
}
diff --git a/gnu/xml/validation/relaxng/RefPattern.java b/gnu/xml/validation/relaxng/RefPattern.java
index d7de09542..8c1ff8539 100644
--- a/gnu/xml/validation/relaxng/RefPattern.java
+++ b/gnu/xml/validation/relaxng/RefPattern.java
@@ -1,4 +1,4 @@
-/* RefPattern.java --
+/* RefPattern.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -49,4 +49,3 @@ class RefPattern
String name;
}
-
diff --git a/gnu/xml/validation/relaxng/TextPattern.java b/gnu/xml/validation/relaxng/TextPattern.java
index 06af3c34a..81c502820 100644
--- a/gnu/xml/validation/relaxng/TextPattern.java
+++ b/gnu/xml/validation/relaxng/TextPattern.java
@@ -1,4 +1,4 @@
-/* TextPattern.java --
+/* TextPattern.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -49,4 +49,3 @@ class TextPattern
static final TextPattern INSTANCE = new TextPattern();
}
-
diff --git a/gnu/xml/validation/relaxng/ValuePattern.java b/gnu/xml/validation/relaxng/ValuePattern.java
index 81260b0ca..8b63d79ae 100644
--- a/gnu/xml/validation/relaxng/ValuePattern.java
+++ b/gnu/xml/validation/relaxng/ValuePattern.java
@@ -1,4 +1,4 @@
-/* ValuePattern.java --
+/* ValuePattern.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -53,6 +53,5 @@ class ValuePattern
Datatype type;
String ns;
String value;
-
-}
+}
diff --git a/gnu/xml/validation/xmlschema/AnyAttribute.java b/gnu/xml/validation/xmlschema/AnyAttribute.java
index df90dc626..6f94bfe28 100644
--- a/gnu/xml/validation/xmlschema/AnyAttribute.java
+++ b/gnu/xml/validation/xmlschema/AnyAttribute.java
@@ -1,4 +1,4 @@
-/* AnyAttribute.java --
+/* AnyAttribute.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -62,6 +62,5 @@ final class AnyAttribute
this.namespace = namespace;
this.processContents = processContents;
}
-
-}
+}
diff --git a/gnu/xml/validation/xmlschema/AttributeDeclaration.java b/gnu/xml/validation/xmlschema/AttributeDeclaration.java
index 98b322bee..c475b368d 100644
--- a/gnu/xml/validation/xmlschema/AttributeDeclaration.java
+++ b/gnu/xml/validation/xmlschema/AttributeDeclaration.java
@@ -1,4 +1,4 @@
-/* AttributeDeclaration.java --
+/* AttributeDeclaration.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -63,7 +63,7 @@ class AttributeDeclaration
* One of NONE, DEFAULT, FIXED.
*/
final int type;
-
+
/**
* The value constraint.
*/
@@ -78,7 +78,7 @@ class AttributeDeclaration
* The type definition corresponding to this attribute.
*/
final SimpleType datatype;
-
+
/**
* The annotation associated with this attribute declaration, if any.
*/
@@ -94,6 +94,5 @@ class AttributeDeclaration
this.datatype = datatype;
this.annotation = annotation;
}
-
-}
+}
diff --git a/gnu/xml/validation/xmlschema/AttributeUse.java b/gnu/xml/validation/xmlschema/AttributeUse.java
index f8bb11b91..937076338 100644
--- a/gnu/xml/validation/xmlschema/AttributeUse.java
+++ b/gnu/xml/validation/xmlschema/AttributeUse.java
@@ -1,4 +1,4 @@
-/* AttributeUse.java --
+/* AttributeUse.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -55,7 +55,7 @@ class AttributeUse
* One of NONE, DEFAULT, FIXED.
*/
final int type;
-
+
/**
* The value constraint.
*/
@@ -74,6 +74,5 @@ class AttributeUse
this.value = value;
this.declaration = declaration;
}
-
-}
+}
diff --git a/gnu/xml/validation/xmlschema/ComplexType.java b/gnu/xml/validation/xmlschema/ComplexType.java
index 2c7acb10a..826ba32d9 100644
--- a/gnu/xml/validation/xmlschema/ComplexType.java
+++ b/gnu/xml/validation/xmlschema/ComplexType.java
@@ -1,4 +1,4 @@
-/* ComplexType.java --
+/* ComplexType.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -97,6 +97,5 @@ class ComplexType
this.finality = finality;
attributeUses = new LinkedHashSet();
}
-
-}
+}
diff --git a/gnu/xml/validation/xmlschema/ElementDeclaration.java b/gnu/xml/validation/xmlschema/ElementDeclaration.java
index d41f5e536..7392ca596 100644
--- a/gnu/xml/validation/xmlschema/ElementDeclaration.java
+++ b/gnu/xml/validation/xmlschema/ElementDeclaration.java
@@ -1,4 +1,4 @@
-/* ElementDeclaration.java --
+/* ElementDeclaration.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -58,7 +58,7 @@ class ElementDeclaration
* The type definition corresponding to this element.
*/
Type datatype;
-
+
/**
* The scope of this schema component.
* One of GLOBAL, LOCAL, or ABSENT.
@@ -75,7 +75,7 @@ class ElementDeclaration
* One of NONE, DEFAULT, FIXED.
*/
final int type;
-
+
/**
* The value constraint.
*/
@@ -84,7 +84,7 @@ class ElementDeclaration
final boolean nillable;
// TODO identity-constraint definitions
-
+
final QName substitutionGroup;
final int substitutionGroupExclusions;
@@ -120,6 +120,5 @@ class ElementDeclaration
this.disallowedSubstitutions = disallowedSubstitutions;
this.isAbstract = isAbstract;
}
-
-}
+}
diff --git a/gnu/xml/validation/xmlschema/Particle.java b/gnu/xml/validation/xmlschema/Particle.java
index 995c4ff09..5fe49203e 100644
--- a/gnu/xml/validation/xmlschema/Particle.java
+++ b/gnu/xml/validation/xmlschema/Particle.java
@@ -1,4 +1,4 @@
-/* Particle.java --
+/* Particle.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -56,6 +56,5 @@ class Particle
this.maxOccurs = maxOccurs;
this.term = term;
}
-
-}
+}
diff --git a/gnu/xml/validation/xmlschema/ValidationException.java b/gnu/xml/validation/xmlschema/ValidationException.java
index f2d684309..716ba8800 100644
--- a/gnu/xml/validation/xmlschema/ValidationException.java
+++ b/gnu/xml/validation/xmlschema/ValidationException.java
@@ -1,4 +1,4 @@
-/* ValidationException.java --
+/* ValidationException.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -53,6 +53,5 @@ class ValidationException
{
super(message, locator);
}
-
-}
+}
diff --git a/gnu/xml/validation/xmlschema/XMLSchema.java b/gnu/xml/validation/xmlschema/XMLSchema.java
index 647cbdeff..fb8eb88b1 100644
--- a/gnu/xml/validation/xmlschema/XMLSchema.java
+++ b/gnu/xml/validation/xmlschema/XMLSchema.java
@@ -1,4 +1,4 @@
-/* XMLSchema.java --
+/* XMLSchema.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -58,7 +58,7 @@ final class XMLSchema
static final int FINAL_LIST = 0x04;
static final int FINAL_UNION = 0x08;
static final int FINAL_ALL = 0x0f;
-
+
static final int BLOCK_NONE = 0x00;
static final int BLOCK_EXTENSION = 0x01;
static final int BLOCK_RESTRICTION = 0x02;
@@ -129,6 +129,5 @@ final class XMLSchema
//return new XMLSchemaValidatorHandler(this);
return null;
}
-
-}
+}
diff --git a/gnu/xml/validation/xmlschema/XMLSchemaAttributeTypeInfo.java b/gnu/xml/validation/xmlschema/XMLSchemaAttributeTypeInfo.java
index 45064075a..ba83973df 100644
--- a/gnu/xml/validation/xmlschema/XMLSchemaAttributeTypeInfo.java
+++ b/gnu/xml/validation/xmlschema/XMLSchemaAttributeTypeInfo.java
@@ -1,4 +1,4 @@
-/* XMLSchemaAttributeTypeInfo.java --
+/* XMLSchemaAttributeTypeInfo.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -94,6 +94,5 @@ final class XMLSchemaAttributeTypeInfo
derivationMethod);
}
}
-
-}
+}
diff --git a/gnu/xml/validation/xmlschema/XMLSchemaBuilder.java b/gnu/xml/validation/xmlschema/XMLSchemaBuilder.java
index ecf3ad3b8..a7bad3129 100644
--- a/gnu/xml/validation/xmlschema/XMLSchemaBuilder.java
+++ b/gnu/xml/validation/xmlschema/XMLSchemaBuilder.java
@@ -1,4 +1,4 @@
-/* XMLSchemaBuilder.java --
+/* XMLSchemaBuilder.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -209,7 +209,7 @@ class XMLSchemaBuilder
datatype,
annotation);
}
- else
+ else
{
boolean required = "required".equals(use);
// TODO ref
@@ -427,7 +427,7 @@ class XMLSchemaBuilder
String sgNamespace = node.lookupNamespaceURI(sgPrefix);
substitutionGroup = new QName(sgNamespace, sgName);
}
-
+
String block = getAttribute(attrs, "block");
int substitutionGroupExclusions = (block == null) ?
schema.blockDefault :
@@ -436,10 +436,10 @@ class XMLSchemaBuilder
int disallowedSubstitutions = (final_ == null) ?
schema.finalDefault :
parseFullDerivationSet(final_);
-
+
boolean nillable = "true".equals(getAttribute(attrs, "nillable"));
boolean isAbstract = "true".equals(getAttribute(attrs, "abstract"));
-
+
if (notTopLevel)
{
minOccurs = getOccurrence(getAttribute(attrs, "minOccurs"));
@@ -463,11 +463,11 @@ class XMLSchemaBuilder
scope, parent,
constraintType, constraintValue,
nillable,
- substitutionGroup,
- substitutionGroupExclusions,
+ substitutionGroup,
+ substitutionGroupExclusions,
disallowedSubstitutions,
isAbstract);
-
+
for (Node child = node.getFirstChild(); child != null;
child = child.getNextSibling())
{
@@ -623,7 +623,7 @@ class XMLSchemaBuilder
if (mixed)
{
type.contentType = XMLSchema.CONTENT_MIXED;
- }
+ }
return type;
}
@@ -835,6 +835,5 @@ class XMLSchemaBuilder
}
return name;
}
-
-}
+}
diff --git a/gnu/xml/validation/xmlschema/XMLSchemaElementTypeInfo.java b/gnu/xml/validation/xmlschema/XMLSchemaElementTypeInfo.java
index a65133c20..99a59f39d 100644
--- a/gnu/xml/validation/xmlschema/XMLSchemaElementTypeInfo.java
+++ b/gnu/xml/validation/xmlschema/XMLSchemaElementTypeInfo.java
@@ -1,4 +1,4 @@
-/* XMLSchemaElementTypeInfo.java --
+/* XMLSchemaElementTypeInfo.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -87,6 +87,5 @@ final class XMLSchemaElementTypeInfo
return false;
}
}
-
-}
+}
diff --git a/gnu/xml/validation/xmlschema/XMLSchemaSchemaFactory.java b/gnu/xml/validation/xmlschema/XMLSchemaSchemaFactory.java
index 2b985a28c..18e91f28d 100644
--- a/gnu/xml/validation/xmlschema/XMLSchemaSchemaFactory.java
+++ b/gnu/xml/validation/xmlschema/XMLSchemaSchemaFactory.java
@@ -1,4 +1,4 @@
-/* XMLSchemaSchemaFactory.java --
+/* XMLSchemaSchemaFactory.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -77,7 +77,7 @@ public class XMLSchemaSchemaFactory
{
this.resourceResolver = resourceResolver;
}
-
+
public ErrorHandler getErrorHandler()
{
return this.errorHandler;
@@ -85,7 +85,7 @@ public class XMLSchemaSchemaFactory
public void setErrorHandler(ErrorHandler errorHandler)
{
- this.errorHandler = errorHandler;
+ this.errorHandler = errorHandler;
}
@@ -167,6 +167,5 @@ public class XMLSchemaSchemaFactory
throw e2;
}
}
-
-}
+}
diff --git a/gnu/xml/validation/xmlschema/XMLSchemaTypeInfo.java b/gnu/xml/validation/xmlschema/XMLSchemaTypeInfo.java
index 60cc25fc4..c1ca95114 100644
--- a/gnu/xml/validation/xmlschema/XMLSchemaTypeInfo.java
+++ b/gnu/xml/validation/xmlschema/XMLSchemaTypeInfo.java
@@ -1,4 +1,4 @@
-/* XMLSchemaTypeInfo.java --
+/* XMLSchemaTypeInfo.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -72,6 +72,5 @@ abstract class XMLSchemaTypeInfo
}
return false;
}
-
-}
+}
diff --git a/gnu/xml/validation/xmlschema/XMLSchemaTypeInfoProvider.java b/gnu/xml/validation/xmlschema/XMLSchemaTypeInfoProvider.java
index 9b20c0c8d..4fc80d34b 100644
--- a/gnu/xml/validation/xmlschema/XMLSchemaTypeInfoProvider.java
+++ b/gnu/xml/validation/xmlschema/XMLSchemaTypeInfoProvider.java
@@ -1,4 +1,4 @@
-/* XMLSchemaTypeInfoProvider.java --
+/* XMLSchemaTypeInfoProvider.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -77,6 +77,5 @@ final class XMLSchemaTypeInfoProvider
{
return handler.isSpecified(index);
}
-
-}
+}
diff --git a/gnu/xml/validation/xmlschema/XMLSchemaValidator.java b/gnu/xml/validation/xmlschema/XMLSchemaValidator.java
index 056babf64..6239ba6c6 100644
--- a/gnu/xml/validation/xmlschema/XMLSchemaValidator.java
+++ b/gnu/xml/validation/xmlschema/XMLSchemaValidator.java
@@ -1,4 +1,4 @@
-/* XMLSchemaValidator.java --
+/* XMLSchemaValidator.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -58,7 +58,7 @@ final class XMLSchemaValidator
ErrorHandler errorHandler;
LSResourceResolver resourceResolver;
-
+
XMLSchemaValidator(XMLSchema schema)
{
this.schema = schema;
@@ -93,6 +93,5 @@ final class XMLSchemaValidator
{
this.resourceResolver = resourceResolver;
}
-
-}
+}
diff --git a/gnu/xml/validation/xmlschema/XMLSchemaValidatorHandler.java b/gnu/xml/validation/xmlschema/XMLSchemaValidatorHandler.java
index 9e6d8e9a9..6c4f1f392 100644
--- a/gnu/xml/validation/xmlschema/XMLSchemaValidatorHandler.java
+++ b/gnu/xml/validation/xmlschema/XMLSchemaValidatorHandler.java
@@ -1,4 +1,4 @@
-/* XMLSchemaValidatorHandler.java --
+/* XMLSchemaValidatorHandler.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -260,7 +260,7 @@ final class XMLSchemaValidatorHandler
}
}
// TODO 5, 6, 7
-
+
// parent
if (!context.isEmpty())
{
@@ -300,7 +300,7 @@ final class XMLSchemaValidatorHandler
XMLSchemaAttributeTypeInfo attTypeInfo =
new XMLSchemaAttributeTypeInfo(schema, attDecl, true);
attributes.add(attTypeInfo);
-
+
atts2.addAttribute(attUri, attLocalName, attQName, attType, attValue);
atts2.setDeclared(count, declared);
atts2.setSpecified(count, true);
@@ -363,7 +363,7 @@ final class XMLSchemaValidatorHandler
contentHandler.processingInstruction(target, data);
}
}
-
+
public void skippedEntity(String name)
throws SAXException
{
@@ -389,6 +389,5 @@ final class XMLSchemaValidatorHandler
return Type.ANY_TYPE;
return (SimpleType) typeLibrary.createDatatype(localName);
}
-
-}
+}
diff --git a/gnu/xml/xpath/AndExpr.java b/gnu/xml/xpath/AndExpr.java
index dd2e1c9a1..9213a40cc 100644
--- a/gnu/xml/xpath/AndExpr.java
+++ b/gnu/xml/xpath/AndExpr.java
@@ -1,4 +1,4 @@
-/* AndExpr.java --
+/* AndExpr.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -83,5 +83,5 @@ public final class AndExpr
{
return lhs + " and " + rhs;
}
-
+
}
diff --git a/gnu/xml/xpath/ArithmeticExpr.java b/gnu/xml/xpath/ArithmeticExpr.java
index 61098d6e4..a7bc62f2e 100644
--- a/gnu/xml/xpath/ArithmeticExpr.java
+++ b/gnu/xml/xpath/ArithmeticExpr.java
@@ -1,4 +1,4 @@
-/* ArithmeticExpr.java --
+/* ArithmeticExpr.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -72,8 +72,8 @@ final class ArithmeticExpr
case MULTIPLY:
case DIVIDE:
case MODULO:
- this.op = op;
- break;
+ this.op = op;
+ break;
default:
throw new IllegalArgumentException();
}
@@ -166,5 +166,5 @@ final class ArithmeticExpr
buf.append(rhs);
return buf.toString();
}
-
+
}
diff --git a/gnu/xml/xpath/BooleanFunction.java b/gnu/xml/xpath/BooleanFunction.java
index f661b2ac2..05e0bd5bc 100644
--- a/gnu/xml/xpath/BooleanFunction.java
+++ b/gnu/xml/xpath/BooleanFunction.java
@@ -1,4 +1,4 @@
-/* BooleanFunction.java --
+/* BooleanFunction.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -60,7 +60,7 @@ final class BooleanFunction
{
final Expr arg;
-
+
BooleanFunction(List<Expr> args)
{
this(args.get(0));
@@ -70,7 +70,7 @@ final class BooleanFunction
{
this.arg = arg;
}
-
+
public Object evaluate(Node context, int pos, int len)
{
Object val = arg.evaluate(context, pos, len);
@@ -86,10 +86,10 @@ final class BooleanFunction
{
return arg.references(var);
}
-
+
public String toString()
{
return "boolean(" + arg + ")";
}
-
+
}
diff --git a/gnu/xml/xpath/CeilingFunction.java b/gnu/xml/xpath/CeilingFunction.java
index 153988422..aa906e0dd 100644
--- a/gnu/xml/xpath/CeilingFunction.java
+++ b/gnu/xml/xpath/CeilingFunction.java
@@ -1,4 +1,4 @@
-/* CeilingFunction.java --
+/* CeilingFunction.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -53,17 +53,17 @@ final class CeilingFunction
{
final Expr arg;
-
+
CeilingFunction(List<Expr> args)
{
this(args.get(0));
}
-
+
CeilingFunction(Expr arg)
{
this.arg = arg;
}
-
+
public Object evaluate(Node context, int pos, int len)
{
Object val = arg.evaluate(context, pos, len);
@@ -80,10 +80,10 @@ final class CeilingFunction
{
return arg.references(var);
}
-
+
public String toString()
{
return "ceiling(" + arg + ")";
}
-
+
}
diff --git a/gnu/xml/xpath/ConcatFunction.java b/gnu/xml/xpath/ConcatFunction.java
index a61a45477..58096e5ac 100644
--- a/gnu/xml/xpath/ConcatFunction.java
+++ b/gnu/xml/xpath/ConcatFunction.java
@@ -1,4 +1,4 @@
-/* ConcatFunction.java --
+/* ConcatFunction.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -111,5 +111,5 @@ final class ConcatFunction
buf.append(')');
return buf.toString();
}
-
+
}
diff --git a/gnu/xml/xpath/Constant.java b/gnu/xml/xpath/Constant.java
index d5ca764a1..5ed39cc05 100644
--- a/gnu/xml/xpath/Constant.java
+++ b/gnu/xml/xpath/Constant.java
@@ -1,4 +1,4 @@
-/* Constant.java --
+/* Constant.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -94,5 +94,5 @@ public final class Constant
}
return ret;
}
-
-}
+
+}
diff --git a/gnu/xml/xpath/ContainsFunction.java b/gnu/xml/xpath/ContainsFunction.java
index 620606b3f..473d2532f 100644
--- a/gnu/xml/xpath/ContainsFunction.java
+++ b/gnu/xml/xpath/ContainsFunction.java
@@ -1,4 +1,4 @@
-/* ContainsFunction.java --
+/* ContainsFunction.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -89,5 +89,5 @@ final class ContainsFunction
{
return "contains(" + arg1 + "," + arg2 + ")";
}
-
+
}
diff --git a/gnu/xml/xpath/CountFunction.java b/gnu/xml/xpath/CountFunction.java
index f29d83310..e1892a058 100644
--- a/gnu/xml/xpath/CountFunction.java
+++ b/gnu/xml/xpath/CountFunction.java
@@ -1,4 +1,4 @@
-/* CountFunction.java --
+/* CountFunction.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -64,7 +64,7 @@ final class CountFunction
this.arg = arg;
}
- @Override
+ @Override
public Object evaluate(Node context, int pos, int len)
{
Object val = arg.evaluate(context, pos, len);
@@ -85,5 +85,5 @@ final class CountFunction
{
return "count(" + arg + ")";
}
-
+
}
diff --git a/gnu/xml/xpath/DocumentOrderComparator.java b/gnu/xml/xpath/DocumentOrderComparator.java
index 605749d09..c4471c120 100644
--- a/gnu/xml/xpath/DocumentOrderComparator.java
+++ b/gnu/xml/xpath/DocumentOrderComparator.java
@@ -1,4 +1,4 @@
-/* DocumentOrderComparator.java --
+/* DocumentOrderComparator.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -48,7 +48,7 @@ import org.w3c.dom.Node;
public class DocumentOrderComparator
implements Comparator<Node>
{
-
+
public int compare(Node n1, Node n2)
{
return (int) n1.compareDocumentPosition(n2);
diff --git a/gnu/xml/xpath/EqualityExpr.java b/gnu/xml/xpath/EqualityExpr.java
index 3b6fd568a..133e1ff20 100644
--- a/gnu/xml/xpath/EqualityExpr.java
+++ b/gnu/xml/xpath/EqualityExpr.java
@@ -1,4 +1,4 @@
-/* EqualityExpr.java --
+/* EqualityExpr.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -91,20 +91,20 @@ final class EqualityExpr
boolean frns = right instanceof Collection;
if (flns && frns)
{
- /* Suppression is safe, as we know context produces Collection<Node> */
- @SuppressWarnings("unchecked")
- Collection<Node> lns = (Collection<Node>) left;
- @SuppressWarnings("unchecked")
- Collection<Node> rns = (Collection<Node>) right;
+ /* Suppression is safe, as we know context produces Collection<Node> */
+ @SuppressWarnings("unchecked")
+ Collection<Node> lns = (Collection<Node>) left;
+ @SuppressWarnings("unchecked")
+ Collection<Node> rns = (Collection<Node>) right;
if (lns.isEmpty())
{
return false;
}
boolean all = true;
- for (Node ltest : lns)
- {
- for (Node rtest : rns)
- {
+ for (Node ltest : lns)
+ {
+ for (Node rtest : rns)
+ {
if (ltest == rtest || ltest.equals(rtest))
{
// much shorter
@@ -128,7 +128,7 @@ final class EqualityExpr
}
return all;
}
- /*
+ /*
* If one object to be compared is a node-set and the other is a number,
* then the comparison will be true if and only if there is a node in
* the node-set such that the result of performing the comparison on the
@@ -140,13 +140,13 @@ final class EqualityExpr
boolean frn = right instanceof Double;
if ((flns && frn) || (frns && fln))
{
- /* Suppression is safe, as we know context produces Collection<Node> */
- @SuppressWarnings("unchecked")
- Collection<Node> ns = flns ? (Collection<Node>) left : (Collection<Node>) right;
+ /* Suppression is safe, as we know context produces Collection<Node> */
+ @SuppressWarnings("unchecked")
+ Collection<Node> ns = flns ? (Collection<Node>) left : (Collection<Node>) right;
double n = fln ? ((Double) left).doubleValue() :
((Double) right).doubleValue();
boolean all = true;
- for (Node test : ns)
+ for (Node test : ns)
{
double nn = _number(context, stringValue(test));
if (nn == n)
@@ -174,12 +174,12 @@ final class EqualityExpr
boolean frs = right instanceof String;
if ((flns && frs) || (frns && fls))
{
- /* Suppression is safe, as we know context produces Collection<Node> */
- @SuppressWarnings("unchecked")
- Collection<Node> ns = flns ? (Collection<Node>) left : (Collection<Node>) right;
+ /* Suppression is safe, as we know context produces Collection<Node> */
+ @SuppressWarnings("unchecked")
+ Collection<Node> ns = flns ? (Collection<Node>) left : (Collection<Node>) right;
String s = fls ? (String) left : (String) right;
boolean all = true;
- for (Node test : ns)
+ for (Node test : ns)
{
if (stringValue(test).equals(s))
{
@@ -206,9 +206,9 @@ final class EqualityExpr
boolean frb = right instanceof Boolean;
if ((flns && frb) || (frns && flb))
{
- /* Suppression is safe, as we know context produces Collection<Node> */
- @SuppressWarnings("unchecked")
- Collection<Node> ns = flns ? (Collection<Node>) left : (Collection<Node>) right;
+ /* Suppression is safe, as we know context produces Collection<Node> */
+ @SuppressWarnings("unchecked")
+ Collection<Node> ns = flns ? (Collection<Node>) left : (Collection<Node>) right;
boolean b = flb ? ((Boolean) left).booleanValue() :
((Boolean) right).booleanValue();
return _boolean(context, ns) == b;
@@ -270,5 +270,5 @@ final class EqualityExpr
return lhs + " = " + rhs;
}
}
-
+
}
diff --git a/gnu/xml/xpath/Expr.java b/gnu/xml/xpath/Expr.java
index 87ce3dfb6..0e98f43f5 100644
--- a/gnu/xml/xpath/Expr.java
+++ b/gnu/xml/xpath/Expr.java
@@ -1,4 +1,4 @@
-/* Expr.java --
+/* Expr.java --
Copyright (C) 2004,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -112,7 +112,7 @@ public abstract class Expr
return null;
}
}
-
+
}
public Object evaluate(Object item, QName returnType)
@@ -143,10 +143,10 @@ public abstract class Expr
{
if (ret instanceof Collection)
{
- /* Suppression is safe, as we know context
- produces Collection<Node> */
- @SuppressWarnings("unchecked")
- Collection<Node> ns = (Collection<Node>) ret;
+ /* Suppression is safe, as we know context
+ produces Collection<Node> */
+ @SuppressWarnings("unchecked")
+ Collection<Node> ns = (Collection<Node>) ret;
switch (ns.size())
{
case 0:
@@ -171,12 +171,12 @@ public abstract class Expr
throw new XPathExpressionException("return value is not a node-set");
}
if (ret != null)
- {
- /* Suppression is safe, as we know context produces Collection<Node> */
- @SuppressWarnings("unchecked")
- Collection<Node> nodes = (Collection<Node>) ret;
- ret = new ExprNodeSet(nodes);
- }
+ {
+ /* Suppression is safe, as we know context produces Collection<Node> */
+ @SuppressWarnings("unchecked")
+ Collection<Node> nodes = (Collection<Node>) ret;
+ ret = new ExprNodeSet(nodes);
+ }
}
}
return ret;
@@ -185,7 +185,7 @@ public abstract class Expr
public String evaluate(Object item)
throws XPathExpressionException
{
- return (String) evaluate(item, XPathConstants.STRING);
+ return (String) evaluate(item, XPathConstants.STRING);
}
public Object evaluate(InputSource source, QName returnType)
@@ -201,15 +201,15 @@ public abstract class Expr
}
catch (ParserConfigurationException e)
{
- throw new XPathExpressionException(e);
+ throw new XPathExpressionException(e);
}
catch (SAXException e)
{
- throw new XPathExpressionException(e);
+ throw new XPathExpressionException(e);
}
catch (IOException e)
{
- throw new XPathExpressionException(e);
+ throw new XPathExpressionException(e);
}
}
@@ -224,7 +224,7 @@ public abstract class Expr
public abstract Expr clone(Object context);
public abstract boolean references(QName var);
-
+
/* -- 4.1 Node Set Functions -- */
/**
@@ -244,9 +244,9 @@ public abstract class Expr
Set<Node> ret = new HashSet<Node>();
if (object instanceof Collection)
{
- /* Suppression is safe, as the iteration will check each value is a Node */
- @SuppressWarnings("unchecked")
- Collection<Node> nodeSet = (Collection<Node>) object;
+ /* Suppression is safe, as the iteration will check each value is a Node */
+ @SuppressWarnings("unchecked")
+ Collection<Node> nodeSet = (Collection<Node>) object;
for (Iterator<Node> i = nodeSet.iterator(); i.hasNext(); )
{
String string = stringValue(i.next());
@@ -303,7 +303,7 @@ public abstract class Expr
String ret = node.getNamespaceURI();
return (ret == null) ? "" : ret;
}
-
+
/**
* The name function returns a string containing a QName representing the
* expanded-name of the node in the argument node-set that is first in
@@ -391,7 +391,7 @@ public abstract class Expr
{
String ret = decimalFormat.format(d);
if (ret.endsWith (".0"))
- {
+ {
ret = ret.substring(0, ret.length() - 2);
}
return ret;
@@ -399,10 +399,10 @@ public abstract class Expr
}
if (object instanceof Collection)
{
- /* Suppression is safe, as we fail immediately if the
- * first element is not a Node and don't use the rest */
- @SuppressWarnings("unchecked")
- Collection<Node> nodeSet = (Collection<Node>) object;
+ /* Suppression is safe, as we fail immediately if the
+ * first element is not a Node and don't use the rest */
+ @SuppressWarnings("unchecked")
+ Collection<Node> nodeSet = (Collection<Node>) object;
if (nodeSet.isEmpty())
{
return "";
@@ -414,7 +414,7 @@ public abstract class Expr
}
/* -- 4.3 Boolean Functions -- */
-
+
/**
* Implementation of the XPath <code>boolean</code> function.
*/
@@ -463,10 +463,10 @@ public abstract class Expr
}
if (object instanceof Collection)
{
- /* Suppression is safe, as we fail immediately if one
- * of the elements is not a Node */
- @SuppressWarnings("unchecked")
- Collection<Node> nodeSet = (Collection<Node>) object;
+ /* Suppression is safe, as we fail immediately if one
+ * of the elements is not a Node */
+ @SuppressWarnings("unchecked")
+ Collection<Node> nodeSet = (Collection<Node>) object;
// Convert node-set to string
object = stringValue(nodeSet);
}
@@ -505,7 +505,7 @@ public abstract class Expr
{
return stringValue(node, false);
}
-
+
static String stringValue(Node node, boolean elementMode)
{
switch (node.getNodeType())
diff --git a/gnu/xml/xpath/FalseFunction.java b/gnu/xml/xpath/FalseFunction.java
index 87660ec81..9a20f9163 100644
--- a/gnu/xml/xpath/FalseFunction.java
+++ b/gnu/xml/xpath/FalseFunction.java
@@ -1,4 +1,4 @@
-/* FalseFunction.java --
+/* FalseFunction.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -68,5 +68,5 @@ final class FalseFunction
{
return "false()";
}
-
+
}
diff --git a/gnu/xml/xpath/FloorFunction.java b/gnu/xml/xpath/FloorFunction.java
index bbf56c911..ed61742a3 100644
--- a/gnu/xml/xpath/FloorFunction.java
+++ b/gnu/xml/xpath/FloorFunction.java
@@ -1,4 +1,4 @@
-/* FloorFunction.java --
+/* FloorFunction.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -86,5 +86,5 @@ final class FloorFunction
{
return "floor(" + arg + ")";
}
-
+
}
diff --git a/gnu/xml/xpath/Function.java b/gnu/xml/xpath/Function.java
index 12e2e1141..f9eab2b73 100644
--- a/gnu/xml/xpath/Function.java
+++ b/gnu/xml/xpath/Function.java
@@ -1,4 +1,4 @@
-/* Function.java --
+/* Function.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -54,4 +54,3 @@ public interface Function
void setArguments(List<Expr> args);
}
-
diff --git a/gnu/xml/xpath/FunctionCall.java b/gnu/xml/xpath/FunctionCall.java
index e811f53a2..977482a8f 100644
--- a/gnu/xml/xpath/FunctionCall.java
+++ b/gnu/xml/xpath/FunctionCall.java
@@ -1,4 +1,4 @@
-/* FunctionCall.java --
+/* FunctionCall.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -83,7 +83,7 @@ public final class FunctionCall
if (resolver != null)
{
QName qname = QName.valueOf(name);
- int arity = args.size();
+ int arity = args.size();
XPathFunction function = resolver.resolveFunction(qname, arity);
if (function != null)
{
@@ -165,5 +165,5 @@ public final class FunctionCall
buf.append(')');
return buf.toString();
}
-
+
}
diff --git a/gnu/xml/xpath/IdFunction.java b/gnu/xml/xpath/IdFunction.java
index b3d2208c8..7b6c6ac25 100644
--- a/gnu/xml/xpath/IdFunction.java
+++ b/gnu/xml/xpath/IdFunction.java
@@ -1,4 +1,4 @@
-/* IdFunction.java --
+/* IdFunction.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -99,5 +99,5 @@ public final class IdFunction
{
return "id(" + arg + ")";
}
-
+
}
diff --git a/gnu/xml/xpath/LangFunction.java b/gnu/xml/xpath/LangFunction.java
index 33cf8b0a2..5a8d32fc0 100644
--- a/gnu/xml/xpath/LangFunction.java
+++ b/gnu/xml/xpath/LangFunction.java
@@ -1,4 +1,4 @@
-/* LangFunction.java --
+/* LangFunction.java --
Copyright (C) 2004,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -104,7 +104,7 @@ final class LangFunction
}
return null;
}
-
+
public Expr clone(Object context)
{
return new IdFunction(arg.clone(context));
@@ -119,5 +119,5 @@ final class LangFunction
{
return "lang(" + arg + ")";
}
-
+
}
diff --git a/gnu/xml/xpath/LastFunction.java b/gnu/xml/xpath/LastFunction.java
index 751a0a9c1..51f988f3c 100644
--- a/gnu/xml/xpath/LastFunction.java
+++ b/gnu/xml/xpath/LastFunction.java
@@ -1,4 +1,4 @@
-/* LastFunction.java --
+/* LastFunction.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -69,5 +69,5 @@ final class LastFunction
{
return "last()";
}
-
+
}
diff --git a/gnu/xml/xpath/LocalNameFunction.java b/gnu/xml/xpath/LocalNameFunction.java
index dbad9d3b4..d829075c7 100644
--- a/gnu/xml/xpath/LocalNameFunction.java
+++ b/gnu/xml/xpath/LocalNameFunction.java
@@ -1,4 +1,4 @@
-/* LocalNameFunction.java --
+/* LocalNameFunction.java --
Copyright (C) 2004,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -69,7 +69,7 @@ final class LocalNameFunction
this.arg = arg;
}
- @Override
+ @Override
public Object evaluate(Node context, int pos, int len)
{
/* Suppression is safe, as we know context produces Collection<Node> */
@@ -94,5 +94,5 @@ final class LocalNameFunction
{
return (arg == null) ? "local-name()" : "local-name(" + arg + ")";
}
-
+
}
diff --git a/gnu/xml/xpath/NameFunction.java b/gnu/xml/xpath/NameFunction.java
index 239a53453..7db0be531 100644
--- a/gnu/xml/xpath/NameFunction.java
+++ b/gnu/xml/xpath/NameFunction.java
@@ -1,4 +1,4 @@
-/* NameFunction.java --
+/* NameFunction.java --
Copyright (C) 2004,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -77,7 +77,7 @@ final class NameFunction
this.arg = arg;
}
- @Override
+ @Override
public Object evaluate(Node context, int pos, int len)
{
/* Suppression is safe, as we know context produces Collection<Node> */
@@ -93,17 +93,17 @@ final class NameFunction
return new NameFunction((arg == null) ? null :
arg.clone(context));
}
-
+
@Override
public boolean references(QName var)
{
return (arg == null) ? false : arg.references(var);
}
-
+
@Override
public String toString()
{
return (arg == null) ? "name()" : "name(" + arg + ")";
}
-
+
}
diff --git a/gnu/xml/xpath/NameTest.java b/gnu/xml/xpath/NameTest.java
index 171010390..8bd06bd3b 100644
--- a/gnu/xml/xpath/NameTest.java
+++ b/gnu/xml/xpath/NameTest.java
@@ -1,4 +1,4 @@
-/* NameTest.java --
+/* NameTest.java --
Copyright (C) 2004,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -139,5 +139,5 @@ public final class NameTest
return "*";
return qName.toString();
}
-
+
}
diff --git a/gnu/xml/xpath/NamespaceTest.java b/gnu/xml/xpath/NamespaceTest.java
index d93b76d9d..2f4fec179 100644
--- a/gnu/xml/xpath/NamespaceTest.java
+++ b/gnu/xml/xpath/NamespaceTest.java
@@ -1,4 +1,4 @@
-/* NamespaceTest.java --
+/* NamespaceTest.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -116,5 +116,5 @@ public final class NamespaceTest
return "*";
return qName.toString();
}
-
+
}
diff --git a/gnu/xml/xpath/NamespaceUriFunction.java b/gnu/xml/xpath/NamespaceUriFunction.java
index 56da90f8c..4972b0607 100644
--- a/gnu/xml/xpath/NamespaceUriFunction.java
+++ b/gnu/xml/xpath/NamespaceUriFunction.java
@@ -1,4 +1,4 @@
-/* NamespaceUriFunction.java --
+/* NamespaceUriFunction.java --
Copyright (C) 2004,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -63,13 +63,13 @@ final class NamespaceUriFunction
{
this(args.size() > 0 ? args.get(0) : null);
}
-
+
NamespaceUriFunction(Expr arg)
{
this.arg = arg;
}
- @Override
+ @Override
public Object evaluate(Node context, int pos, int len)
{
/* Suppression is safe, as we know context produces Collection<Node> */
@@ -89,10 +89,10 @@ final class NamespaceUriFunction
{
return (arg == null) ? false : arg.references(var);
}
-
+
public String toString()
{
return (arg == null) ? "namespace-uri()" : "namespace-uri(" + arg + ")";
}
-
+
}
diff --git a/gnu/xml/xpath/NegativeExpr.java b/gnu/xml/xpath/NegativeExpr.java
index 9e24aff81..215ef3fa9 100644
--- a/gnu/xml/xpath/NegativeExpr.java
+++ b/gnu/xml/xpath/NegativeExpr.java
@@ -1,4 +1,4 @@
-/* NegativeExpr.java --
+/* NegativeExpr.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -77,5 +77,5 @@ final class NegativeExpr
{
return "-" + expr;
}
-
+
}
diff --git a/gnu/xml/xpath/NodeTypeTest.java b/gnu/xml/xpath/NodeTypeTest.java
index 4fe164625..43e26994b 100644
--- a/gnu/xml/xpath/NodeTypeTest.java
+++ b/gnu/xml/xpath/NodeTypeTest.java
@@ -1,4 +1,4 @@
-/* NodeTypeTest.java --
+/* NodeTypeTest.java --
Copyright (C) 2004,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -137,5 +137,5 @@ public final class NodeTypeTest
throw new IllegalStateException();
}
}
-
+
}
diff --git a/gnu/xml/xpath/NormalizeSpaceFunction.java b/gnu/xml/xpath/NormalizeSpaceFunction.java
index 30069acdc..6d728d9e7 100644
--- a/gnu/xml/xpath/NormalizeSpaceFunction.java
+++ b/gnu/xml/xpath/NormalizeSpaceFunction.java
@@ -1,4 +1,4 @@
-/* NormalizeSpaceFunction.java --
+/* NormalizeSpaceFunction.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -65,7 +65,7 @@ final class NormalizeSpaceFunction
{
this(args.get(0));
}
-
+
NormalizeSpaceFunction(Expr arg)
{
this.arg = arg;
@@ -80,7 +80,7 @@ final class NormalizeSpaceFunction
CPStringBuilder buf = new CPStringBuilder();
if (st.hasMoreTokens())
{
- buf.append(st.nextToken());
+ buf.append(st.nextToken());
while (st.hasMoreTokens())
{
buf.append(' ');
@@ -104,5 +104,5 @@ final class NormalizeSpaceFunction
{
return (arg == null) ? "normalize-space()" : "normalize-space(" + arg + ")";
}
-
+
}
diff --git a/gnu/xml/xpath/NotFunction.java b/gnu/xml/xpath/NotFunction.java
index 188b3dbc4..a7c20a0c1 100644
--- a/gnu/xml/xpath/NotFunction.java
+++ b/gnu/xml/xpath/NotFunction.java
@@ -1,4 +1,4 @@
-/* NotFunction.java --
+/* NotFunction.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -84,5 +84,5 @@ final class NotFunction
{
return "not(" + arg + ")";
}
-
+
}
diff --git a/gnu/xml/xpath/NumberFunction.java b/gnu/xml/xpath/NumberFunction.java
index 8804a7886..08831020b 100644
--- a/gnu/xml/xpath/NumberFunction.java
+++ b/gnu/xml/xpath/NumberFunction.java
@@ -1,4 +1,4 @@
-/* NumberFunction.java --
+/* NumberFunction.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -99,5 +99,5 @@ final class NumberFunction
{
return "number(" + arg + ")";
}
-
+
}
diff --git a/gnu/xml/xpath/OrExpr.java b/gnu/xml/xpath/OrExpr.java
index 1085f5112..937dedf6a 100644
--- a/gnu/xml/xpath/OrExpr.java
+++ b/gnu/xml/xpath/OrExpr.java
@@ -1,4 +1,4 @@
-/* OrExpr.java --
+/* OrExpr.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -83,5 +83,5 @@ public final class OrExpr
{
return lhs + " or " + rhs;
}
-
+
}
diff --git a/gnu/xml/xpath/ParenthesizedExpr.java b/gnu/xml/xpath/ParenthesizedExpr.java
index adadd6745..e8ceb5aa5 100644
--- a/gnu/xml/xpath/ParenthesizedExpr.java
+++ b/gnu/xml/xpath/ParenthesizedExpr.java
@@ -1,4 +1,4 @@
-/* ParenthesizedExpr.java --
+/* ParenthesizedExpr.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -60,16 +60,16 @@ final class ParenthesizedExpr
this.expr = expr;
}
- @Override
+ @Override
public Object evaluate(Node context, int pos, int len)
{
Object ret = expr.evaluate(context, pos, len);
if (ret instanceof Collection)
{
- /* Suppression is safe, as we know context produces
- Collection<Node> */
- @SuppressWarnings("unchecked")
- Collection<Node> nodes = (Collection<Node>) ret;
+ /* Suppression is safe, as we know context produces
+ Collection<Node> */
+ @SuppressWarnings("unchecked")
+ Collection<Node> nodes = (Collection<Node>) ret;
List<Node> list = new ArrayList<Node>(nodes);
Collections.sort(list, documentOrderComparator);
ret = list;
@@ -91,5 +91,5 @@ final class ParenthesizedExpr
{
return "(" + expr + ")";
}
-
+
}
diff --git a/gnu/xml/xpath/Path.java b/gnu/xml/xpath/Path.java
index 809f965cc..f19759567 100644
--- a/gnu/xml/xpath/Path.java
+++ b/gnu/xml/xpath/Path.java
@@ -1,4 +1,4 @@
-/* Path.java --
+/* Path.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -50,5 +50,5 @@ abstract class Path
{
abstract Collection<Node> evaluate(Node context, Collection<Node> nodeSet);
-
+
}
diff --git a/gnu/xml/xpath/Pattern.java b/gnu/xml/xpath/Pattern.java
index 859ab5692..ca03cda37 100644
--- a/gnu/xml/xpath/Pattern.java
+++ b/gnu/xml/xpath/Pattern.java
@@ -1,4 +1,4 @@
-/* Pattern.java --
+/* Pattern.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -51,4 +51,3 @@ public abstract class Pattern
public abstract boolean matches(Node context);
}
-
diff --git a/gnu/xml/xpath/PositionFunction.java b/gnu/xml/xpath/PositionFunction.java
index 3060eeaed..28ead3af0 100644
--- a/gnu/xml/xpath/PositionFunction.java
+++ b/gnu/xml/xpath/PositionFunction.java
@@ -1,4 +1,4 @@
-/* PositionFunction.java --
+/* PositionFunction.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -69,5 +69,5 @@ final class PositionFunction
{
return "position()";
}
-
+
}
diff --git a/gnu/xml/xpath/Predicate.java b/gnu/xml/xpath/Predicate.java
index 5538c55aa..a02e22b94 100644
--- a/gnu/xml/xpath/Predicate.java
+++ b/gnu/xml/xpath/Predicate.java
@@ -1,4 +1,4 @@
-/* Predicate.java --
+/* Predicate.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -76,10 +76,10 @@ class Predicate
{
return expr.references(var);
}
-
+
public String toString()
{
return "[" + expr + "]";
}
-
+
}
diff --git a/gnu/xml/xpath/RelationalExpr.java b/gnu/xml/xpath/RelationalExpr.java
index 5cbb6bb22..ac79d5049 100644
--- a/gnu/xml/xpath/RelationalExpr.java
+++ b/gnu/xml/xpath/RelationalExpr.java
@@ -1,4 +1,4 @@
-/* RelationalExpr.java --
+/* RelationalExpr.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -103,5 +103,5 @@ final class RelationalExpr
{
return lhs + " " + (lt ? "<" : ">") + (eq ? "=" : "") + " " + rhs;
}
-
+
}
diff --git a/gnu/xml/xpath/Root.java b/gnu/xml/xpath/Root.java
index cbcb24999..8eef3408f 100644
--- a/gnu/xml/xpath/Root.java
+++ b/gnu/xml/xpath/Root.java
@@ -1,4 +1,4 @@
-/* Root.java --
+/* Root.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -87,5 +87,5 @@ public final class Root
{
return "/";
}
-
+
}
diff --git a/gnu/xml/xpath/RoundFunction.java b/gnu/xml/xpath/RoundFunction.java
index 2d1bd5447..3b79e3e21 100644
--- a/gnu/xml/xpath/RoundFunction.java
+++ b/gnu/xml/xpath/RoundFunction.java
@@ -1,4 +1,4 @@
-/* RoundFunction.java --
+/* RoundFunction.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -93,5 +93,5 @@ final class RoundFunction
{
return "round(" + arg + ")";
}
-
+
}
diff --git a/gnu/xml/xpath/Selector.java b/gnu/xml/xpath/Selector.java
index 429b3f7e2..2146f26f5 100644
--- a/gnu/xml/xpath/Selector.java
+++ b/gnu/xml/xpath/Selector.java
@@ -1,4 +1,4 @@
-/* Selector.java --
+/* Selector.java --
Copyright (C) 2004,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -115,7 +115,7 @@ public final class Selector
getContextPosition(context),
getContextSize(context));
}
-
+
boolean matches(Node context, int pos, int len)
{
short nodeType = context.getNodeType();
@@ -499,5 +499,5 @@ public final class Selector
}
return buf.toString();
}
-
+
}
diff --git a/gnu/xml/xpath/StartsWithFunction.java b/gnu/xml/xpath/StartsWithFunction.java
index 2dc2c409d..6f9716a2d 100644
--- a/gnu/xml/xpath/StartsWithFunction.java
+++ b/gnu/xml/xpath/StartsWithFunction.java
@@ -1,4 +1,4 @@
-/* StartsWithFunction.java --
+/* StartsWithFunction.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -88,5 +88,5 @@ final class StartsWithFunction
{
return "starts-with(" + arg1 + "," + arg2 + ")";
}
-
+
}
diff --git a/gnu/xml/xpath/Steps.java b/gnu/xml/xpath/Steps.java
index 427fbe201..75644541c 100644
--- a/gnu/xml/xpath/Steps.java
+++ b/gnu/xml/xpath/Steps.java
@@ -1,4 +1,4 @@
-/* Steps.java --
+/* Steps.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -86,7 +86,7 @@ public final class Steps
if (pos > 0)
{
Pattern left = (Pattern) path.get(pos - 1);
- for (Node candidate : possibleContexts(right, context))
+ for (Node candidate : possibleContexts(right, context))
{
if (left.matches(candidate) &&
matches(candidate, pos - 1))
@@ -160,7 +160,7 @@ public final class Steps
return Collections.emptySet();
}
- @Override
+ @Override
public Object evaluate(Node context, int pos, int len)
{
//System.err.println(toString()+" evaluate");
@@ -172,16 +172,16 @@ public final class Steps
while (val instanceof Collection && i.hasNext())
{
Path rhs = (Path) i.next();
- /* Suppression is safe, as we know context produces Collection<Node> */
+ /* Suppression is safe, as we know context produces Collection<Node> */
@SuppressWarnings("unchecked")
- Collection<Node> nodes = (Collection<Node>) val;
- val = rhs.evaluate(context, nodes);
+ Collection<Node> nodes = (Collection<Node>) val;
+ val = rhs.evaluate(context, nodes);
//System.err.println("\tevaluate "+rhs+" = "+val);
}
return val;
}
- @Override
+ @Override
Collection<Node> evaluate(Node context, Collection<Node> ns)
{
// Left to right
@@ -195,14 +195,14 @@ public final class Steps
{
Set<Node> acc = new LinkedHashSet<Node>();
int pos = 1, len = ns.size();
- for (Node node : ns)
+ for (Node node : ns)
{
Object ret = lhs.evaluate(node, pos++, len);
if (ret instanceof Collection)
{
- /* Suppression is safe, as we know context produces Collection<Node> */
- @SuppressWarnings("unchecked")
- Collection<Node> nodes = (Collection<Node>) ret;
+ /* Suppression is safe, as we know context produces Collection<Node> */
+ @SuppressWarnings("unchecked")
+ Collection<Node> nodes = (Collection<Node>) ret;
acc.addAll(nodes);
}
}
diff --git a/gnu/xml/xpath/StringFunction.java b/gnu/xml/xpath/StringFunction.java
index b8cba3798..b2b3cecf7 100644
--- a/gnu/xml/xpath/StringFunction.java
+++ b/gnu/xml/xpath/StringFunction.java
@@ -1,4 +1,4 @@
-/* StringFunction.java --
+/* StringFunction.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -88,7 +88,7 @@ final class StringFunction
{
this(args.size() > 0 ? args.get(0) : null);
}
-
+
StringFunction(Expr arg)
{
this.arg = arg;
@@ -115,5 +115,5 @@ final class StringFunction
{
return (arg == null) ? "string()" : "string(" + arg + ")";
}
-
+
}
diff --git a/gnu/xml/xpath/StringLengthFunction.java b/gnu/xml/xpath/StringLengthFunction.java
index 561537e99..c72b0d9bc 100644
--- a/gnu/xml/xpath/StringLengthFunction.java
+++ b/gnu/xml/xpath/StringLengthFunction.java
@@ -1,4 +1,4 @@
-/* StringLengthFunction.java --
+/* StringLengthFunction.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -59,7 +59,7 @@ final class StringLengthFunction
{
this(args.isEmpty() ? null : (Expr) args.get(0));
}
-
+
StringLengthFunction(Expr arg)
{
this.arg = arg;
@@ -88,5 +88,5 @@ final class StringLengthFunction
{
return (arg == null) ? "string-length()" : "string-length(" + arg + ")";
}
-
+
}
diff --git a/gnu/xml/xpath/SubstringAfterFunction.java b/gnu/xml/xpath/SubstringAfterFunction.java
index ad75f2e3c..4f10723a7 100644
--- a/gnu/xml/xpath/SubstringAfterFunction.java
+++ b/gnu/xml/xpath/SubstringAfterFunction.java
@@ -1,4 +1,4 @@
-/* SubstringAfterFunction.java --
+/* SubstringAfterFunction.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -94,5 +94,5 @@ final class SubstringAfterFunction
{
return "substring-after(" + arg1 + "," + arg2 + ")";
}
-
+
}
diff --git a/gnu/xml/xpath/SubstringBeforeFunction.java b/gnu/xml/xpath/SubstringBeforeFunction.java
index 1bf165777..1a5a04c4f 100644
--- a/gnu/xml/xpath/SubstringBeforeFunction.java
+++ b/gnu/xml/xpath/SubstringBeforeFunction.java
@@ -1,4 +1,4 @@
-/* SubstringBeforeFunction.java --
+/* SubstringBeforeFunction.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -93,5 +93,5 @@ final class SubstringBeforeFunction
{
return "substring-before(" + arg1 + "," + arg2 + ")";
}
-
+
}
diff --git a/gnu/xml/xpath/SubstringFunction.java b/gnu/xml/xpath/SubstringFunction.java
index 33bcade0c..d17c3b662 100644
--- a/gnu/xml/xpath/SubstringFunction.java
+++ b/gnu/xml/xpath/SubstringFunction.java
@@ -1,4 +1,4 @@
-/* SubstringFunction.java --
+/* SubstringFunction.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -91,7 +91,7 @@ final class SubstringFunction
{
Object val3 = arg3.evaluate(context, pos, len);
int v3 = Expr.intValue(val3);
- if (v3 < l)
+ if (v3 < l)
l = v3;
}
@@ -115,5 +115,5 @@ final class SubstringFunction
return (arg3 == null) ? "substring(" + arg1 + "," + arg2 + ")" :
"substring(" + arg1 + "," + arg2 + "," + arg3 + ")";
}
-
+
}
diff --git a/gnu/xml/xpath/SumFunction.java b/gnu/xml/xpath/SumFunction.java
index 73db2a91d..6c3323fb2 100644
--- a/gnu/xml/xpath/SumFunction.java
+++ b/gnu/xml/xpath/SumFunction.java
@@ -1,4 +1,4 @@
-/* SumFunction.java --
+/* SumFunction.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -66,18 +66,18 @@ final class SumFunction
this.arg = arg;
}
- @Override
+ @Override
public Object evaluate(Node context, int pos, int len)
{
Object val = arg.evaluate(context, pos, len);
double sum = 0.0d;
if (val instanceof Collection)
{
- /* Suppression is safe, as we know context produces
- Collection<Node> */
- @SuppressWarnings("unchecked")
- Collection<Node> nodes = (Collection<Node>) val;
- for (Node node : nodes)
+ /* Suppression is safe, as we know context produces
+ Collection<Node> */
+ @SuppressWarnings("unchecked")
+ Collection<Node> nodes = (Collection<Node>) val;
+ for (Node node : nodes)
{
String s = stringValue(node);
sum += _number(context, s);
@@ -100,5 +100,5 @@ final class SumFunction
{
return "sum(" + arg + ")";
}
-
+
}
diff --git a/gnu/xml/xpath/Test.java b/gnu/xml/xpath/Test.java
index 94837ffac..529c99bd8 100644
--- a/gnu/xml/xpath/Test.java
+++ b/gnu/xml/xpath/Test.java
@@ -1,4 +1,4 @@
-/* Test.java --
+/* Test.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/gnu/xml/xpath/TranslateFunction.java b/gnu/xml/xpath/TranslateFunction.java
index 8b4b8b233..4e06354c3 100644
--- a/gnu/xml/xpath/TranslateFunction.java
+++ b/gnu/xml/xpath/TranslateFunction.java
@@ -1,4 +1,4 @@
-/* TranslateFunction.java --
+/* TranslateFunction.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -110,8 +110,8 @@ final class TranslateFunction
if (!replaced)
{
buf.append(c);
- }
- }
+ }
+ }
return buf.toString();
}
@@ -126,10 +126,10 @@ final class TranslateFunction
return (arg1.references(var) || arg2.references(var) ||
arg3.references(var));
}
-
+
public String toString()
{
return "translate(" + arg1 + "," + arg2 + "," + arg3 + ")";
}
-
+
}
diff --git a/gnu/xml/xpath/TrueFunction.java b/gnu/xml/xpath/TrueFunction.java
index 6ad42d726..41ab54b75 100644
--- a/gnu/xml/xpath/TrueFunction.java
+++ b/gnu/xml/xpath/TrueFunction.java
@@ -1,4 +1,4 @@
-/* TrueFunction.java --
+/* TrueFunction.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -68,5 +68,5 @@ final class TrueFunction
{
return "true()";
}
-
+
}
diff --git a/gnu/xml/xpath/UnionExpr.java b/gnu/xml/xpath/UnionExpr.java
index 03ae5c06d..bd5f5e990 100644
--- a/gnu/xml/xpath/UnionExpr.java
+++ b/gnu/xml/xpath/UnionExpr.java
@@ -1,4 +1,4 @@
-/* UnionExpr.java --
+/* UnionExpr.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -74,7 +74,7 @@ public final class UnionExpr
return false;
}
- @Override
+ @Override
public Object evaluate(Node context, int pos, int len)
{
Object left = lhs.evaluate(context, pos, len);
@@ -83,13 +83,13 @@ public final class UnionExpr
if (left instanceof Collection && right instanceof Collection)
{
Set<Node> set = new HashSet<Node>();
- /* Suppression is safe as addAll will check the types
- of the elements and throw a ClassCastException as necessary */
- @SuppressWarnings("unchecked")
- Collection<Node> l = (Collection<Node>) left;
- @SuppressWarnings("unchecked")
- Collection<Node> r = (Collection<Node>) right;
- set.addAll (l);
+ /* Suppression is safe as addAll will check the types
+ of the elements and throw a ClassCastException as necessary */
+ @SuppressWarnings("unchecked")
+ Collection<Node> l = (Collection<Node>) left;
+ @SuppressWarnings("unchecked")
+ Collection<Node> r = (Collection<Node>) right;
+ set.addAll (l);
set.addAll (r);
list = new ArrayList<Node>(set);
Collections.sort(list, documentOrderComparator);
@@ -113,5 +113,5 @@ public final class UnionExpr
{
return lhs + " | " + rhs;
}
-
+
}
diff --git a/gnu/xml/xpath/VariableReference.java b/gnu/xml/xpath/VariableReference.java
index 9ef6f160f..e1698c94c 100644
--- a/gnu/xml/xpath/VariableReference.java
+++ b/gnu/xml/xpath/VariableReference.java
@@ -1,4 +1,4 @@
-/* VariableReference.java --
+/* VariableReference.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -98,5 +98,5 @@ public class VariableReference
buf.append(name.getLocalPart());
return buf.toString();
}
-
+
}
diff --git a/gnu/xml/xpath/XPathFactoryImpl.java b/gnu/xml/xpath/XPathFactoryImpl.java
index 45dc57ed1..970cf0e5d 100644
--- a/gnu/xml/xpath/XPathFactoryImpl.java
+++ b/gnu/xml/xpath/XPathFactoryImpl.java
@@ -1,4 +1,4 @@
-/* XPathFactoryImpl.java --
+/* XPathFactoryImpl.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -86,5 +86,5 @@ public class XPathFactoryImpl
{
return new XPathImpl(null, variableResolver, functionResolver);
}
-
+
}
diff --git a/gnu/xml/xpath/XPathImpl.java b/gnu/xml/xpath/XPathImpl.java
index 3511834ca..62f86171b 100644
--- a/gnu/xml/xpath/XPathImpl.java
+++ b/gnu/xml/xpath/XPathImpl.java
@@ -1,4 +1,4 @@
-/* XPathImpl.java --
+/* XPathImpl.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -126,7 +126,7 @@ public class XPathImpl
throw new XPathExpressionException(expression);
}
}
-
+
public Object evaluate(String expression,
Object item,
QName returnType)
diff --git a/gnu/xml/xpath/XPathParser.java b/gnu/xml/xpath/XPathParser.java
index e8c8e94da..26e59091e 100644
--- a/gnu/xml/xpath/XPathParser.java
+++ b/gnu/xml/xpath/XPathParser.java
@@ -1,6 +1,6 @@
// created by jay 0.8 (c) 1998 Axel.Schreiner@informatik.uni-osnabrueck.de
- // line 2 "XPathParser.y"
+ // line 2 "XPathParser.y"
/* XPathParser.y - An XPath 1.0 parser.
Copyright (C) 2004 The Free Software Foundation
@@ -206,7 +206,7 @@ public class XPathParser
return new FunctionCall(functionResolver, name, args);
}
- // line 211 "-"
+ // line 211 "-"
// %token constants
public static final int LITERAL = 257;
@@ -364,7 +364,7 @@ public class XPathParser
@throws yyException on irrecoverable parse error.
*/
public Object yyparse (yyInput yyLex, Object yydebug)
- throws java.io.IOException, yyException {
+ throws java.io.IOException, yyException {
//t this.yydebug = (jay.yydebug.yyDebug)yydebug;
return yyparse(yyLex);
}
@@ -392,15 +392,15 @@ public class XPathParser
@throws yyException on irrecoverable parse error.
*/
public Object yyparse (yyInput yyLex)
- throws java.io.IOException, yyException {
- if (yyMax <= 0) yyMax = 256; // initial size
- int yyState = 0, yyStates[] = new int[yyMax]; // state stack
- Object yyVal = null, yyVals[] = new Object[yyMax]; // value stack
- int yyToken = -1; // current input
- int yyErrorFlag = 0; // #tks to shift
+ throws java.io.IOException, yyException {
+ if (yyMax <= 0) yyMax = 256; // initial size
+ int yyState = 0, yyStates[] = new int[yyMax]; // state stack
+ Object yyVal = null, yyVals[] = new Object[yyMax]; // value stack
+ int yyToken = -1; // current input
+ int yyErrorFlag = 0; // #tks to shift
yyLoop: for (int yyTop = 0;; ++ yyTop) {
- if (yyTop >= yyStates.length) { // dynamically increase
+ if (yyTop >= yyStates.length) { // dynamically increase
int[] i = new int[yyStates.length+yyMax];
System.arraycopy(yyStates, 0, i, 0, yyStates.length);
yyStates = i;
@@ -412,9 +412,9 @@ public class XPathParser
yyVals[yyTop] = yyVal;
//t if (yydebug != null) yydebug.push(yyState, yyVal);
- yyDiscarded: for (;;) { // discarding a token does not change stack
+ yyDiscarded: for (;;) { // discarding a token does not change stack
int yyN;
- if ((yyN = YyDefRedClass.yyDefRed[yyState]) == 0) { // else [default] reduce (yyN)
+ if ((yyN = YyDefRedClass.yyDefRed[yyState]) == 0) { // else [default] reduce (yyN)
if (yyToken < 0) {
yyToken = yyLex.advance() ? yyLex.token() : 0;
//t if (yydebug != null)
@@ -424,7 +424,7 @@ public class XPathParser
&& yyN < YyTableClass.yyTable.length && YyCheckClass.yyCheck[yyN] == yyToken) {
//t if (yydebug != null)
//t yydebug.shift(yyState, YyTableClass.yyTable[yyN], yyErrorFlag-1);
- yyState = YyTableClass.yyTable[yyN]; // shift to yyN
+ yyState = YyTableClass.yyTable[yyN]; // shift to yyN
yyVal = yyLex.value();
yyToken = -1;
if (yyErrorFlag > 0) -- yyErrorFlag;
@@ -432,14 +432,14 @@ public class XPathParser
}
if ((yyN = YyRindexClass.yyRindex[yyState]) != 0 && (yyN += yyToken) >= 0
&& yyN < YyTableClass.yyTable.length && YyCheckClass.yyCheck[yyN] == yyToken)
- yyN = YyTableClass.yyTable[yyN]; // reduce (yyN)
+ yyN = YyTableClass.yyTable[yyN]; // reduce (yyN)
else
switch (yyErrorFlag) {
-
+
case 0:
yyerror("syntax error", yyExpecting(yyState));
//t if (yydebug != null) yydebug.error("syntax error");
-
+
case 1: case 2:
yyErrorFlag = 3;
do {
@@ -456,7 +456,7 @@ public class XPathParser
} while (-- yyTop >= 0);
//t if (yydebug != null) yydebug.reject();
throw new yyException("irrecoverable syntax error");
-
+
case 3:
if (yyToken == 0) {
//t if (yydebug != null) yydebug.reject();
@@ -464,9 +464,9 @@ public class XPathParser
}
//t if (yydebug != null)
//t yydebug.discard(yyState, yyToken, yyname(yyToken),
-//t yyLex.value());
+//t yyLex.value());
yyToken = -1;
- continue yyDiscarded; // leave stack alone
+ continue yyDiscarded; // leave stack alone
}
}
int yyV = yyTop + 1-YyLenClass.yyLen[yyN];
@@ -475,13 +475,13 @@ public class XPathParser
yyVal = yyDefault(yyV > yyTop ? null : yyVals[yyV]);
switch (yyN) {
case 4:
- // line 277 "XPathParser.y"
+ // line 277 "XPathParser.y"
{
yyVal = new Root();
}
break;
case 5:
- // line 281 "XPathParser.y"
+ // line 281 "XPathParser.y"
{
Steps steps;
if (yyVals[0+yyTop] instanceof Steps)
@@ -499,7 +499,7 @@ case 5:
}
break;
case 6:
- // line 297 "XPathParser.y"
+ // line 297 "XPathParser.y"
{
Test nt = new NodeTypeTest((short) 0);
Selector s = new Selector(Selector.DESCENDANT_OR_SELF,
@@ -522,7 +522,7 @@ case 6:
}
break;
case 8:
- // line 322 "XPathParser.y"
+ // line 322 "XPathParser.y"
{
Steps steps;
if (yyVals[-2+yyTop] instanceof Steps)
@@ -540,7 +540,7 @@ case 8:
}
break;
case 9:
- // line 338 "XPathParser.y"
+ // line 338 "XPathParser.y"
{
Test nt = new NodeTypeTest((short) 0);
Selector s = new Selector(Selector.DESCENDANT_OR_SELF,
@@ -563,14 +563,14 @@ case 9:
}
break;
case 10:
- // line 362 "XPathParser.y"
+ // line 362 "XPathParser.y"
{
@SuppressWarnings("unchecked") List<Test> tests = (List<Test>) yyVals[0+yyTop];
yyVal = new Selector (Selector.CHILD, tests);
}
break;
case 11:
- // line 366 "XPathParser.y"
+ // line 366 "XPathParser.y"
{
/* This is safe as we create this in one of the other cases */
@SuppressWarnings("unchecked") List<Test> tests = (List<Test>) yyVals[0+yyTop];
@@ -578,7 +578,7 @@ case 11:
}
break;
case 12:
- // line 370 "XPathParser.y"
+ // line 370 "XPathParser.y"
{
/* This is safe as we create this in one of the other cases */
@SuppressWarnings("unchecked") List<Test> tests = (List<Test>) yyVals[0+yyTop];
@@ -586,21 +586,21 @@ case 12:
}
break;
case 13:
- // line 374 "XPathParser.y"
+ // line 374 "XPathParser.y"
{
List<Test> emptyList = Collections.emptyList();
yyVal = new Selector (Selector.SELF, emptyList);
}
break;
case 14:
- // line 378 "XPathParser.y"
+ // line 378 "XPathParser.y"
{
List<Test> emptyList = Collections.emptyList();
yyVal = new Selector (Selector.PARENT, emptyList);
}
break;
case 15:
- // line 385 "XPathParser.y"
+ // line 385 "XPathParser.y"
{
List<Test> list = new ArrayList<Test>();
list.add((Test) yyVals[0+yyTop]);
@@ -608,7 +608,7 @@ case 15:
}
break;
case 16:
- // line 391 "XPathParser.y"
+ // line 391 "XPathParser.y"
{
/* This is safe as we create this in one of the other cases */
@SuppressWarnings("unchecked") List<Test> tests = (List<Test>)yyVals[-1+yyTop];
@@ -617,128 +617,128 @@ case 16:
}
break;
case 17:
- // line 415 "XPathParser.y"
+ // line 415 "XPathParser.y"
{
yyVal = new Integer(Selector.ANCESTOR);
}
break;
case 18:
- // line 419 "XPathParser.y"
+ // line 419 "XPathParser.y"
{
yyVal = new Integer(Selector.ANCESTOR_OR_SELF);
}
break;
case 19:
- // line 423 "XPathParser.y"
+ // line 423 "XPathParser.y"
{
yyVal = new Integer(Selector.ATTRIBUTE);
}
break;
case 20:
- // line 427 "XPathParser.y"
+ // line 427 "XPathParser.y"
{
yyVal = new Integer(Selector.CHILD);
}
break;
case 21:
- // line 431 "XPathParser.y"
+ // line 431 "XPathParser.y"
{
yyVal = new Integer(Selector.DESCENDANT);
}
break;
case 22:
- // line 435 "XPathParser.y"
+ // line 435 "XPathParser.y"
{
yyVal = new Integer(Selector.DESCENDANT_OR_SELF);
}
break;
case 23:
- // line 439 "XPathParser.y"
+ // line 439 "XPathParser.y"
{
yyVal = new Integer(Selector.FOLLOWING);
}
break;
case 24:
- // line 443 "XPathParser.y"
+ // line 443 "XPathParser.y"
{
yyVal = new Integer(Selector.FOLLOWING_SIBLING);
}
break;
case 25:
- // line 447 "XPathParser.y"
+ // line 447 "XPathParser.y"
{
yyVal = new Integer(Selector.NAMESPACE);
}
break;
case 26:
- // line 451 "XPathParser.y"
+ // line 451 "XPathParser.y"
{
yyVal = new Integer(Selector.PARENT);
}
break;
case 27:
- // line 455 "XPathParser.y"
+ // line 455 "XPathParser.y"
{
yyVal = new Integer(Selector.PRECEDING);
}
break;
case 28:
- // line 459 "XPathParser.y"
+ // line 459 "XPathParser.y"
{
yyVal = new Integer(Selector.PRECEDING_SIBLING);
}
break;
case 29:
- // line 463 "XPathParser.y"
+ // line 463 "XPathParser.y"
{
yyVal = new Integer(Selector.SELF);
}
break;
case 31:
- // line 472 "XPathParser.y"
+ // line 472 "XPathParser.y"
{
yyVal = new NodeTypeTest(Node.PROCESSING_INSTRUCTION_NODE, (String) yyVals[-1+yyTop]);
}
break;
case 32:
- // line 477 "XPathParser.y"
+ // line 477 "XPathParser.y"
{
yyVal = new NodeTypeTest(((Short) yyVals[-1+yyTop]).shortValue());
}
break;
case 33:
- // line 484 "XPathParser.y"
+ // line 484 "XPathParser.y"
{
yyVal = new Predicate((Expr) yyVals[-1+yyTop]);
}
break;
case 35:
- // line 492 "XPathParser.y"
+ // line 492 "XPathParser.y"
{
yyVal = new ParenthesizedExpr((Expr) yyVals[-1+yyTop]);
}
break;
case 36:
- // line 496 "XPathParser.y"
+ // line 496 "XPathParser.y"
{
yyVal = new Constant(yyVals[0+yyTop]);
}
break;
case 37:
- // line 500 "XPathParser.y"
+ // line 500 "XPathParser.y"
{
yyVal = new Constant(yyVals[0+yyTop]);
}
break;
case 39:
- // line 508 "XPathParser.y"
+ // line 508 "XPathParser.y"
{
List<Expr> emptyList = Collections.emptyList();
yyVal = lookupFunction((String) yyVals[-2+yyTop], emptyList);
}
break;
case 40:
- // line 512 "XPathParser.y"
+ // line 512 "XPathParser.y"
{
/* This is safe as we create this below */
@SuppressWarnings("unchecked") List<Expr> exprs = (List<Expr>) yyVals[-1+yyTop];
@@ -746,7 +746,7 @@ case 40:
}
break;
case 41:
- // line 519 "XPathParser.y"
+ // line 519 "XPathParser.y"
{
List<Expr> list = new ArrayList<Expr>();
list.add((Expr) yyVals[0+yyTop]);
@@ -754,7 +754,7 @@ case 41:
}
break;
case 42:
- // line 525 "XPathParser.y"
+ // line 525 "XPathParser.y"
{
/* This is safe as we create this above */
@SuppressWarnings("unchecked") List<Expr> list = (List<Expr>) yyVals[0+yyTop];
@@ -763,13 +763,13 @@ case 42:
}
break;
case 44:
- // line 535 "XPathParser.y"
+ // line 535 "XPathParser.y"
{
yyVal = new UnionExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop]);
}
break;
case 47:
- // line 544 "XPathParser.y"
+ // line 544 "XPathParser.y"
{
Steps steps;
if (yyVals[0+yyTop] instanceof Steps)
@@ -787,7 +787,7 @@ case 47:
}
break;
case 48:
- // line 560 "XPathParser.y"
+ // line 560 "XPathParser.y"
{
Test nt = new NodeTypeTest((short) 0);
Selector s = new Selector(Selector.DESCENDANT_OR_SELF,
@@ -810,7 +810,7 @@ case 48:
}
break;
case 50:
- // line 585 "XPathParser.y"
+ // line 585 "XPathParser.y"
{
Predicate filter = (Predicate) yyVals[0+yyTop];
Selector s = new Selector(Selector.SELF,
@@ -831,171 +831,171 @@ case 50:
}
break;
case 52:
- // line 608 "XPathParser.y"
+ // line 608 "XPathParser.y"
{
yyVal = new OrExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop]);
}
break;
case 54:
- // line 616 "XPathParser.y"
+ // line 616 "XPathParser.y"
{
yyVal = new AndExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop]);
}
break;
case 56:
- // line 624 "XPathParser.y"
+ // line 624 "XPathParser.y"
{
yyVal = new EqualityExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], false);
}
break;
case 57:
- // line 628 "XPathParser.y"
+ // line 628 "XPathParser.y"
{
yyVal = new EqualityExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], true);
}
break;
case 59:
- // line 636 "XPathParser.y"
+ // line 636 "XPathParser.y"
{
yyVal = new RelationalExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], true, false);
}
break;
case 60:
- // line 640 "XPathParser.y"
+ // line 640 "XPathParser.y"
{
yyVal = new RelationalExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], false, false);
}
break;
case 61:
- // line 644 "XPathParser.y"
+ // line 644 "XPathParser.y"
{
yyVal = new RelationalExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], true, true);
}
break;
case 62:
- // line 648 "XPathParser.y"
+ // line 648 "XPathParser.y"
{
yyVal = new RelationalExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], false, true);
}
break;
case 64:
- // line 656 "XPathParser.y"
+ // line 656 "XPathParser.y"
{
yyVal = new ArithmeticExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], ArithmeticExpr.ADD);
}
break;
case 65:
- // line 660 "XPathParser.y"
+ // line 660 "XPathParser.y"
{
yyVal = new ArithmeticExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], ArithmeticExpr.SUBTRACT);
}
break;
case 67:
- // line 668 "XPathParser.y"
+ // line 668 "XPathParser.y"
{
yyVal = new ArithmeticExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], ArithmeticExpr.MULTIPLY);
}
break;
case 68:
- // line 672 "XPathParser.y"
+ // line 672 "XPathParser.y"
{
yyVal = new ArithmeticExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], ArithmeticExpr.DIVIDE);
}
break;
case 69:
- // line 676 "XPathParser.y"
+ // line 676 "XPathParser.y"
{
yyVal = new ArithmeticExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], ArithmeticExpr.MODULO);
}
break;
case 71:
- // line 684 "XPathParser.y"
+ // line 684 "XPathParser.y"
{
yyVal = new NegativeExpr((Expr) yyVals[0+yyTop]);
}
break;
case 72:
- // line 691 "XPathParser.y"
+ // line 691 "XPathParser.y"
{
yyVal = new Double((String) yyVals[0+yyTop] + ".0");
}
break;
case 73:
- // line 695 "XPathParser.y"
+ // line 695 "XPathParser.y"
{
yyVal = new Double((String) yyVals[-1+yyTop] + ".0");
}
break;
case 74:
- // line 699 "XPathParser.y"
+ // line 699 "XPathParser.y"
{
yyVal = new Double((String) yyVals[-2+yyTop] + "." + (String) yyVals[0+yyTop]);
}
break;
case 75:
- // line 703 "XPathParser.y"
+ // line 703 "XPathParser.y"
{
yyVal = new Double("0." + (String) yyVals[0+yyTop]);
}
break;
case 77:
- // line 732 "XPathParser.y"
+ // line 732 "XPathParser.y"
{
String name = (String) yyVals[0+yyTop];
yyVal = new VariableReference(variableResolver, getQName(name));
}
break;
case 78:
- // line 740 "XPathParser.y"
+ // line 740 "XPathParser.y"
{
yyVal = new NameTest(null, true, true);
}
break;
case 79:
- // line 744 "XPathParser.y"
+ // line 744 "XPathParser.y"
{
QName qName = getQName((String) yyVals[-2+yyTop]);
yyVal = new NameTest(qName, true, false);
}
break;
case 80:
- // line 749 "XPathParser.y"
+ // line 749 "XPathParser.y"
{
QName qName = getQName((String) yyVals[0+yyTop]);
yyVal = new NameTest(qName, false, false);
}
break;
case 82:
- // line 758 "XPathParser.y"
+ // line 758 "XPathParser.y"
{
yyVal = (String) yyVals[-2+yyTop] + ':' + (String) yyVals[0+yyTop];
}
break;
case 83:
- // line 765 "XPathParser.y"
+ // line 765 "XPathParser.y"
{
yyVal = new Short(Node.COMMENT_NODE);
}
break;
case 84:
- // line 769 "XPathParser.y"
+ // line 769 "XPathParser.y"
{
yyVal = new Short(Node.TEXT_NODE);
}
break;
case 85:
- // line 773 "XPathParser.y"
+ // line 773 "XPathParser.y"
{
yyVal = new Short(Node.PROCESSING_INSTRUCTION_NODE);
}
break;
case 86:
- // line 777 "XPathParser.y"
+ // line 777 "XPathParser.y"
{
yyVal = new Short((short) 0);
}
break;
- // line 988 "-"
+ // line 988 "-"
}
yyTop -= YyLenClass.yyLen[yyN];
yyState = yyStates[yyTop];
@@ -1020,7 +1020,7 @@ case 86:
else
yyState = YyDgotoClass.yyDgoto[yyM];
//t if (yydebug != null) yydebug.shift(yyStates[yyTop], yyState);
- continue yyLoop;
+ continue yyLoop;
}
}
}
@@ -1438,7 +1438,7 @@ case 86:
protected static final class YyNameClass {
- public static final String yyName [] = {
+ public static final String yyName [] = {
"end-of-file",null,null,null,null,null,null,null,null,null,null,null,
null,null,null,null,null,null,null,null,null,null,null,null,null,null,
null,null,null,null,null,null,null,null,null,null,null,null,null,null,
@@ -1469,7 +1469,7 @@ case 86:
} /* End of class YyNameClass */
- // line 783 "XPathParser.y"
+ // line 783 "XPathParser.y"
}
- // line 1463 "-"
+ // line 1463 "-"
diff --git a/gnu/xml/xpath/XPathTokenizer.java b/gnu/xml/xpath/XPathTokenizer.java
index bf4516afa..879931bd5 100644
--- a/gnu/xml/xpath/XPathTokenizer.java
+++ b/gnu/xml/xpath/XPathTokenizer.java
@@ -1,4 +1,4 @@
-/* XPathTokenizer.java --
+/* XPathTokenizer.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -53,7 +53,7 @@ import antlr.TokenStreamIOException;*/
/**
* XPath 1.0 expression tokenizer.
- *
+ *
* @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
*/
public class XPathTokenizer
@@ -89,7 +89,7 @@ implements XPathParser.yyInput
{
return val;
}
-
+
}
static final Map<String,Integer> keywords = new TreeMap<String,Integer> ();
@@ -151,7 +151,7 @@ implements XPathParser.yyInput
throw new TokenStreamIOException (e);
}
}
-
+
* End ANTLR specific */
public boolean advance ()