Examples of readObject()


Examples of org.bouncycastle.asn1.DERInputStream.readObject()

  super("X.509");
  try {
      if ( encoding.equals( "PkiPath" ) )
      {
    DERInputStream derInStream = new DERInputStream(inStream);
    DERObject derObject = derInStream.readObject();
    if ( derObject == null || ! ( derObject instanceof ASN1Sequence ) )
    {
        throw new CertificateException("input stream does not contain a ASN1 SEQUENCE while reading PkiPath encoded data to load CertPath" );
    }
    Enumeration enumx = ((ASN1Sequence)derObject).getObjects();
View Full Code Here

Examples of org.bouncycastle.openssl.PEMParser.readObject()

        List<KeyPair> keys = new ArrayList<KeyPair>();
        for (int i = 0; i < files.length; i++) {
            try {
                PEMParser r = new PEMParser(new InputStreamReader(new FileInputStream(files[i])));
                try {
                    Object o = r.readObject();
                   
                    JcaPEMKeyConverter pemConverter = new JcaPEMKeyConverter();
                    pemConverter.setProvider("BC");
                    if (passwordFinder != null && o instanceof PEMEncryptedKeyPair) {
                        JcePEMDecryptorProviderBuilder decryptorBuilder = new JcePEMDecryptorProviderBuilder();
View Full Code Here

Examples of org.bouncycastle.openssl.PEMReader.readObject()

        try {
            for (; ; ) {
                // while the PasswordFinder tells us we should retry
                try {
                    r = new PEMReader(resource.getReader(), pFinder);
                    o = r.readObject();
                } catch (EncryptionException e) {
                    if (pwdf.shouldRetry(resource))
                        continue;
                    else
                        throw e;
View Full Code Here

Examples of org.bouncycastle.sasn1.Asn1InputStream.readObject()

    {
        ByteArrayInputStream     bIn = new ByteArrayInputStream(enc);
        Asn1InputStream          aIn = new Asn1InputStream(bIn);

        Asn1ObjectIdentifier      o = new Asn1ObjectIdentifier(oid);
        Asn1ObjectIdentifier      encO = (Asn1ObjectIdentifier)aIn.readObject();
       
        if (!o.equals(encO))
        {
            fail("oid ID didn't match - got: " + o + " expected " + encO);
        }
View Full Code Here

Examples of org.bouncycastle.sasn1.Asn1Sequence.readObject()

        Object          o = null;
        int             count = 0;
       
        assertNotNull("null sequence returned", seq);
       
        while ((o = seq.readObject()) != null)
        {
            switch (count)
            {
            case 0:
                assertTrue(o instanceof Asn1Integer);
View Full Code Here

Examples of org.bouncycastle.sasn1.BerSequence.readObject()

      
       Asn1InputStream aIn = new Asn1InputStream(bOut.toByteArray());
      
       BerSequence     sq = (BerSequence)aIn.readObject();
      
       BerOctetString s = (BerOctetString)sq.readObject();
      
       Asn1InputStream aIn2 = new Asn1InputStream(s.getOctetStream());
      
       BerSequence sq2 = (BerSequence)aIn2.readObject();
      
View Full Code Here

Examples of org.bouncycastle2.asn1.ASN1InputStream.readObject()

    {
        try
        {
            ASN1InputStream         dIn = new ASN1InputStream(bytes);

            return (ASN1Sequence)dIn.readObject();
        }
        catch (Exception e)
        {
            throw new IllegalArgumentException("badly encoded request");
        }
View Full Code Here

Examples of org.bson.BSONDecoder.readObject()

            out.write( b );
       
        ByteArrayInputStream in = new ByteArrayInputStream( out.toByteArray() );
        BSONDecoder d = new BasicBSONDecoder();
        for ( int i=0; i<n; i++ ){
            BSONObject x = d.readObject( in );
            assertEquals( orig , x );
        }
        assertEquals( -1 , in.read() );
    }
View Full Code Here

Examples of org.bson.BasicBSONDecoder.readObject()

            out.write( b );
       
        ByteArrayInputStream in = new ByteArrayInputStream( out.toByteArray() );
        BSONDecoder d = new BasicBSONDecoder();
        for ( int i=0; i<n; i++ ){
            BSONObject x = d.readObject( in );
            assertEquals( orig , x );
        }
        assertEquals( -1 , in.read() );
    }
View Full Code Here

Examples of org.bukkit.util.io.BukkitObjectInputStream.readObject()

    }

    private static Object fromString(String s) throws IOException, ClassNotFoundException {
        byte[] data = s.getBytes();
        BukkitObjectInputStream ois = new BukkitObjectInputStream(new ByteArrayInputStream(data));
        Object o  = ois.readObject();
        ois.close();
        return o;
    }

    private static String toString(Object o) throws IOException {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.