Examples of InvalidFormatException


Examples of com.amazonaws.services.cloudwatch.model.InvalidFormatException

        // marshaller understands.
        String errorCode = parseErrorCode(node);
        if (errorCode == null || !errorCode.equals("InvalidFormat"))
            return null;

        InvalidFormatException e = (InvalidFormatException)super.unmarshall(node);
       
        return e;
    }
View Full Code Here

Examples of com.coherentlogic.usaspending.client.core.exceptions.InvalidFormatException

            if (matcher.matches())
                matches = true;
        }

        if (!matches)
            throw new InvalidFormatException ("The year '" + year + "' does " +
                "not conform to the expected format YYYY -- for " +
                "example '1992'.");
    }
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.jackson.databind.exc.InvalidFormatException

                if (value.startsWith("[")) {
                    // bracketed IPv6 (with port number)

                    int i = value.lastIndexOf(']');
                    if (i == -1) {
                        throw new InvalidFormatException("Bracketed IPv6 address must contain closing bracket",
                                value, InetSocketAddress.class);
                    }

                    int j = value.indexOf(':', i);
                    int port = j > -1 ? Integer.parseInt(value.substring(j + 1)) : 0;
View Full Code Here

Examples of com.fasterxml.jackson.databind.exc.InvalidFormatException

                if (value.startsWith("[")) {
                    // bracketed IPv6 (with port number)

                    int i = value.lastIndexOf(']');
                    if (i == -1) {
                        throw new InvalidFormatException("Bracketed IPv6 address must contain closing bracket",
                                value, InetSocketAddress.class);
                    }

                    int j = value.indexOf(':', i);
                    int port = j > -1 ? Integer.parseInt(value.substring(j + 1)) : 0;
View Full Code Here

Examples of com.ibm.icu.impl.InvalidFormatException

            else {
                errln("FAIL: Assert.fail returned " + e.getMessage());
            }
        }
        try {
            Assert.fail(new InvalidFormatException());
            errln("FAIL: Assert.fail with an exception");
        }
        catch (IllegalStateException e) {
            logln("Assert.fail works");
        }
View Full Code Here

Examples of com.sk89q.worldedit.world.storage.InvalidFormatException

     * @return child tag
     * @throws InvalidFormatException
     */
    public static <T extends Tag> T getChildTag(Map<String, Tag> items, String key, Class<T> expected) throws InvalidFormatException {
        if (!items.containsKey(key)) {
            throw new InvalidFormatException("Missing a \"" + key + "\" tag");
        }
        Tag tag = items.get(key);
        if (!expected.isInstance(tag)) {
            throw new InvalidFormatException(key + " tag is not of tag type " + expected.getName());
        }
        return expected.cast(tag);
    }
View Full Code Here

Examples of com.sk89q.worldedit.world.storage.InvalidFormatException

        rootX = NBTUtils.getChildTag(rootTag.getValue(), "xPos", IntTag.class).getValue();
        rootZ = NBTUtils.getChildTag(rootTag.getValue(), "zPos", IntTag.class).getValue();

        int size = 16 * 16 * 128;
        if (blocks.length != size) {
            throw new InvalidFormatException("Chunk blocks byte array expected "
                    + "to be " + size + " bytes; found " + blocks.length);
        }

        if (data.length != (size/2)) {
            throw new InvalidFormatException("Chunk block data byte array "
                    + "expected to be " + size + " bytes; found " + data.length);
        }
    }
View Full Code Here

Examples of com.sk89q.worldedit.world.storage.InvalidFormatException

        tileEntities = new HashMap<BlockVector, Map<String, Tag>>();

        for (Tag tag : tags) {
            if (!(tag instanceof CompoundTag)) {
                throw new InvalidFormatException("CompoundTag expected in TileEntities");
            }

            CompoundTag t = (CompoundTag) tag;

            int x = 0;
View Full Code Here

Examples of com.sk89q.worldedit.world.storage.InvalidFormatException

        }

        int sectionsize = 16 * 16 * 16;
        for (byte[] block : blocks) {
            if (block.length != sectionsize) {
                throw new InvalidFormatException(
                        "Chunk blocks byte array expected " + "to be "
                                + sectionsize + " bytes; found "
                                + block.length);
            }
        }

        for (byte[] aData : data) {
            if (aData.length != (sectionsize / 2)) {
                throw new InvalidFormatException("Chunk block data byte array "
                        + "expected to be " + sectionsize + " bytes; found "
                        + aData.length);
            }
        }
    }
View Full Code Here

Examples of com.sk89q.worldedit.world.storage.InvalidFormatException

        tileEntities = new HashMap<BlockVector, Map<String, Tag>>();

        for (Tag tag : tags) {
            if (!(tag instanceof CompoundTag)) {
                throw new InvalidFormatException(
                        "CompoundTag expected in TileEntities");
            }

            CompoundTag t = (CompoundTag) tag;
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.