summaryrefslogtreecommitdiff
path: root/gnu/javax
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/javax')
-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
443 files changed, 4475 insertions, 4495 deletions
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)
{