Package com.alibaba.antx.config

Examples of com.alibaba.antx.config.ConfigException


                istream = new BufferedInputStream(istream, 8192);
            }

            return addConfigDescriptor(descriptorResource, istream);
        } catch (IOException e) {
            throw new ConfigException(e);
        } finally {
            if (istream != null) {
                try {
                    istream.close();
                } catch (IOException e) {
View Full Code Here


        assertFile();

        try {
            return StreamUtil.readBytes(getInputStream(), true).toByteArray();
        } catch (IOException e) {
            throw new ConfigException(e);
        }
    }
View Full Code Here

        assertFile();

        try {
            return channel.get(getURI().getPath());
        } catch (SftpException e) {
            throw new ConfigException(e);
        }
    }
View Full Code Here

        assertFile();

        try {
            return channel.put(getURI().getPath());
        } catch (SftpException e) {
            throw new ConfigException(e);
        }
    }
View Full Code Here

        List entries;

        try {
            entries = channel.ls(getURI().getPath());
        } catch (SftpException e) {
            throw new ConfigException(e);
        }

        List result = new ArrayList(entries.size());

        for (Iterator i = entries.iterator(); i.hasNext();) {
View Full Code Here

            return new SshResource(this, channel, uri, stat);
        } catch (RuntimeException e) {
            throw e;
        } catch (Exception e) {
            throw new ConfigException(e);
        }
    }
View Full Code Here

                    // �ɹ���������Ա����ظ���ʾ��������
                    ResourceContext.get().getVisitedURIs().remove(new ResourceKey(new ResourceURI(uri.getURI())));
                } catch (RuntimeException e) {
                    throw e;
                } catch (Exception e) {
                    throw new ConfigException(e);
                } finally {
                    ResourceContext.get().setCurrentURI(null);
                }
            }
        }
View Full Code Here

    public byte[] getContent() {
        try {
            return StreamUtil.readBytes(getInputStream(), true).toByteArray();
        } catch (IOException e) {
            throw new ConfigException(e);
        }
    }
View Full Code Here

        digester.push(new ConfigDescriptor(descriptorResource));

        try {
            return (ConfigDescriptor) digester.parse(istream);
        } catch (Exception e) {
            throw new ConfigException("Failed to load config descriptor: " + descriptorResource.getURL(), e);
        }
    }
View Full Code Here

        InputStream istream = getClass().getResourceAsStream("validators.xml");

        try {
            digester.push(digester.parse(istream));
        } catch (Exception e) {
            throw new ConfigException("Failed to load validators", e);
        } finally {
            if (istream != null) {
                try {
                    istream.close();
                } catch (IOException e) {
View Full Code Here

TOP

Related Classes of com.alibaba.antx.config.ConfigException

Copyright © 2018 www.massapicom. 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.