javax.imageio.metadata.IIOMetadataFormatImpl Java Examples

The following examples show how to use javax.imageio.metadata.IIOMetadataFormatImpl. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: JPEGMetadata.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public Node getAsTree(String formatName) {
    if (formatName == null) {
        throw new IllegalArgumentException("null formatName!");
    }
    if (isStream) {
        if (formatName.equals(JPEG.nativeStreamMetadataFormatName)) {
            return getNativeTree();
        }
    } else {
        if (formatName.equals(JPEG.nativeImageMetadataFormatName)) {
            return getNativeTree();
        }
        if (formatName.equals
                (IIOMetadataFormatImpl.standardMetadataFormatName)) {
            return getStandardTree();
        }
    }
    throw  new IllegalArgumentException("Unsupported format name: "
                                            + formatName);
}
 
Example #2
Source File: PNGMetadata.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
public void mergeTree(String formatName, Node root)
    throws IIOInvalidTreeException {
    if (formatName.equals(nativeMetadataFormatName)) {
        if (root == null) {
            throw new IllegalArgumentException("root == null!");
        }
        mergeNativeTree(root);
    } else if (formatName.equals
               (IIOMetadataFormatImpl.standardMetadataFormatName)) {
        if (root == null) {
            throw new IllegalArgumentException("root == null!");
        }
        mergeStandardTree(root);
    } else {
        throw new IllegalArgumentException("Not a recognized format!");
    }
}
 
Example #3
Source File: JPEGMetadata.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
public void setFromTree(String formatName, Node root)
    throws IIOInvalidTreeException {
    if (formatName == null) {
        throw new IllegalArgumentException("null formatName!");
    }
    if (root == null) {
        throw new IllegalArgumentException("null root!");
    }
    if (isStream &&
        (formatName.equals(JPEG.nativeStreamMetadataFormatName))) {
        setFromNativeTree(root);
    } else if (!isStream &&
               (formatName.equals(JPEG.nativeImageMetadataFormatName))) {
        setFromNativeTree(root);
    } else if (!isStream &&
               (formatName.equals
                (IIOMetadataFormatImpl.standardMetadataFormatName))) {
        // In this case a reset followed by a merge is correct
        super.setFromTree(formatName, root);
    } else {
        throw  new IllegalArgumentException("Unsupported format name: "
                                            + formatName);
    }
}
 
Example #4
Source File: GIFMetadata.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
public void mergeTree(String formatName, Node root)
  throws IIOInvalidTreeException {
    if (formatName.equals(nativeMetadataFormatName)) {
        if (root == null) {
            throw new IllegalArgumentException("root == null!");
        }
        mergeNativeTree(root);
    } else if (formatName.equals
              (IIOMetadataFormatImpl.standardMetadataFormatName)) {
        if (root == null) {
            throw new IllegalArgumentException("root == null!");
        }
        mergeStandardTree(root);
    } else {
        throw new IllegalArgumentException("Not a recognized format!");
    }
}
 
Example #5
Source File: JPEGMetadata.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
public Node getAsTree(String formatName) {
    if (formatName == null) {
        throw new IllegalArgumentException("null formatName!");
    }
    if (isStream) {
        if (formatName.equals(JPEG.nativeStreamMetadataFormatName)) {
            return getNativeTree();
        }
    } else {
        if (formatName.equals(JPEG.nativeImageMetadataFormatName)) {
            return getNativeTree();
        }
        if (formatName.equals
                (IIOMetadataFormatImpl.standardMetadataFormatName)) {
            return getStandardTree();
        }
    }
    throw  new IllegalArgumentException("Unsupported format name: "
                                            + formatName);
}
 
Example #6
Source File: JPEGMetadata.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
public Node getAsTree(String formatName) {
    if (formatName == null) {
        throw new IllegalArgumentException("null formatName!");
    }
    if (isStream) {
        if (formatName.equals(JPEG.nativeStreamMetadataFormatName)) {
            return getNativeTree();
        }
    } else {
        if (formatName.equals(JPEG.nativeImageMetadataFormatName)) {
            return getNativeTree();
        }
        if (formatName.equals
                (IIOMetadataFormatImpl.standardMetadataFormatName)) {
            return getStandardTree();
        }
    }
    throw  new IllegalArgumentException("Unsupported format name: "
                                            + formatName);
}
 
Example #7
Source File: GIFMetadata.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
public void mergeTree(String formatName, Node root)
  throws IIOInvalidTreeException {
    if (formatName.equals(nativeMetadataFormatName)) {
        if (root == null) {
            throw new IllegalArgumentException("root == null!");
        }
        mergeNativeTree(root);
    } else if (formatName.equals
              (IIOMetadataFormatImpl.standardMetadataFormatName)) {
        if (root == null) {
            throw new IllegalArgumentException("root == null!");
        }
        mergeStandardTree(root);
    } else {
        throw new IllegalArgumentException("Not a recognized format!");
    }
}
 
Example #8
Source File: GIFMetadata.java    From Bytecoder with Apache License 2.0 6 votes vote down vote up
public void mergeTree(String formatName, Node root)
  throws IIOInvalidTreeException {
    if (formatName.equals(nativeMetadataFormatName)) {
        if (root == null) {
            throw new IllegalArgumentException("root == null!");
        }
        mergeNativeTree(root);
    } else if (formatName.equals
              (IIOMetadataFormatImpl.standardMetadataFormatName)) {
        if (root == null) {
            throw new IllegalArgumentException("root == null!");
        }
        mergeStandardTree(root);
    } else {
        throw new IllegalArgumentException("Not a recognized format!");
    }
}
 
Example #9
Source File: GIFMetadata.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
public void mergeTree(String formatName, Node root)
  throws IIOInvalidTreeException {
    if (formatName.equals(nativeMetadataFormatName)) {
        if (root == null) {
            throw new IllegalArgumentException("root == null!");
        }
        mergeNativeTree(root);
    } else if (formatName.equals
              (IIOMetadataFormatImpl.standardMetadataFormatName)) {
        if (root == null) {
            throw new IllegalArgumentException("root == null!");
        }
        mergeStandardTree(root);
    } else {
        throw new IllegalArgumentException("Not a recognized format!");
    }
}
 
Example #10
Source File: JPEGMetadata.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public Node getAsTree(String formatName) {
    if (formatName == null) {
        throw new IllegalArgumentException("null formatName!");
    }
    if (isStream) {
        if (formatName.equals(JPEG.nativeStreamMetadataFormatName)) {
            return getNativeTree();
        }
    } else {
        if (formatName.equals(JPEG.nativeImageMetadataFormatName)) {
            return getNativeTree();
        }
        if (formatName.equals
                (IIOMetadataFormatImpl.standardMetadataFormatName)) {
            return getStandardTree();
        }
    }
    throw  new IllegalArgumentException("Unsupported format name: "
                                            + formatName);
}
 
Example #11
Source File: JPEGMetadata.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public void setFromTree(String formatName, Node root)
    throws IIOInvalidTreeException {
    if (formatName == null) {
        throw new IllegalArgumentException("null formatName!");
    }
    if (root == null) {
        throw new IllegalArgumentException("null root!");
    }
    if (isStream &&
        (formatName.equals(JPEG.nativeStreamMetadataFormatName))) {
        setFromNativeTree(root);
    } else if (!isStream &&
               (formatName.equals(JPEG.nativeImageMetadataFormatName))) {
        setFromNativeTree(root);
    } else if (!isStream &&
               (formatName.equals
                (IIOMetadataFormatImpl.standardMetadataFormatName))) {
        // In this case a reset followed by a merge is correct
        super.setFromTree(formatName, root);
    } else {
        throw  new IllegalArgumentException("Unsupported format name: "
                                            + formatName);
    }
}
 
Example #12
Source File: PNGMetadata.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
public void mergeTree(String formatName, Node root)
    throws IIOInvalidTreeException {
    if (formatName.equals(nativeMetadataFormatName)) {
        if (root == null) {
            throw new IllegalArgumentException("root == null!");
        }
        mergeNativeTree(root);
    } else if (formatName.equals
               (IIOMetadataFormatImpl.standardMetadataFormatName)) {
        if (root == null) {
            throw new IllegalArgumentException("root == null!");
        }
        mergeStandardTree(root);
    } else {
        throw new IllegalArgumentException("Not a recognized format!");
    }
}
 
Example #13
Source File: GIFWritableStreamMetadata.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
public void mergeTree(String formatName, Node root)
  throws IIOInvalidTreeException {
    if (formatName.equals(nativeMetadataFormatName)) {
        if (root == null) {
            throw new IllegalArgumentException("root == null!");
        }
        mergeNativeTree(root);
    } else if (formatName.equals
               (IIOMetadataFormatImpl.standardMetadataFormatName)) {
        if (root == null) {
            throw new IllegalArgumentException("root == null!");
        }
        mergeStandardTree(root);
    } else {
        throw new IllegalArgumentException("Not a recognized format!");
    }
}
 
Example #14
Source File: JPEGMetadata.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
public Node getAsTree(String formatName) {
    if (formatName == null) {
        throw new IllegalArgumentException("null formatName!");
    }
    if (isStream) {
        if (formatName.equals(JPEG.nativeStreamMetadataFormatName)) {
            return getNativeTree();
        }
    } else {
        if (formatName.equals(JPEG.nativeImageMetadataFormatName)) {
            return getNativeTree();
        }
        if (formatName.equals
                (IIOMetadataFormatImpl.standardMetadataFormatName)) {
            return getStandardTree();
        }
    }
    throw  new IllegalArgumentException("Unsupported format name: "
                                            + formatName);
}
 
Example #15
Source File: JPEGMetadata.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public Node getAsTree(String formatName) {
    if (formatName == null) {
        throw new IllegalArgumentException("null formatName!");
    }
    if (isStream) {
        if (formatName.equals(JPEG.nativeStreamMetadataFormatName)) {
            return getNativeTree();
        }
    } else {
        if (formatName.equals(JPEG.nativeImageMetadataFormatName)) {
            return getNativeTree();
        }
        if (formatName.equals
                (IIOMetadataFormatImpl.standardMetadataFormatName)) {
            return getStandardTree();
        }
    }
    throw  new IllegalArgumentException("Unsupported format name: "
                                            + formatName);
}
 
Example #16
Source File: PNGMetadata.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public void mergeTree(String formatName, Node root)
    throws IIOInvalidTreeException {
    if (formatName.equals(nativeMetadataFormatName)) {
        if (root == null) {
            throw new IllegalArgumentException("root == null!");
        }
        mergeNativeTree(root);
    } else if (formatName.equals
               (IIOMetadataFormatImpl.standardMetadataFormatName)) {
        if (root == null) {
            throw new IllegalArgumentException("root == null!");
        }
        mergeStandardTree(root);
    } else {
        throw new IllegalArgumentException("Not a recognized format!");
    }
}
 
Example #17
Source File: PNGMetadata.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public void mergeTree(String formatName, Node root)
    throws IIOInvalidTreeException {
    if (formatName.equals(nativeMetadataFormatName)) {
        if (root == null) {
            throw new IllegalArgumentException("root == null!");
        }
        mergeNativeTree(root);
    } else if (formatName.equals
               (IIOMetadataFormatImpl.standardMetadataFormatName)) {
        if (root == null) {
            throw new IllegalArgumentException("root == null!");
        }
        mergeStandardTree(root);
    } else {
        throw new IllegalArgumentException("Not a recognized format!");
    }
}
 
Example #18
Source File: PNGMetadata.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
public void mergeTree(String formatName, Node root)
    throws IIOInvalidTreeException {
    if (formatName.equals(nativeMetadataFormatName)) {
        if (root == null) {
            throw new IllegalArgumentException("root == null!");
        }
        mergeNativeTree(root);
    } else if (formatName.equals
               (IIOMetadataFormatImpl.standardMetadataFormatName)) {
        if (root == null) {
            throw new IllegalArgumentException("root == null!");
        }
        mergeStandardTree(root);
    } else {
        throw new IllegalArgumentException("Not a recognized format!");
    }
}
 
Example #19
Source File: JPEGMetadata.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
public Node getAsTree(String formatName) {
    if (formatName == null) {
        throw new IllegalArgumentException("null formatName!");
    }
    if (isStream) {
        if (formatName.equals(JPEG.nativeStreamMetadataFormatName)) {
            return getNativeTree();
        }
    } else {
        if (formatName.equals(JPEG.nativeImageMetadataFormatName)) {
            return getNativeTree();
        }
        if (formatName.equals
                (IIOMetadataFormatImpl.standardMetadataFormatName)) {
            return getStandardTree();
        }
    }
    throw  new IllegalArgumentException("Unsupported format name: "
                                            + formatName);
}
 
Example #20
Source File: GIFWritableStreamMetadata.java    From jdk8u_jdk with GNU General Public License v2.0 6 votes vote down vote up
public void mergeTree(String formatName, Node root)
  throws IIOInvalidTreeException {
    if (formatName.equals(nativeMetadataFormatName)) {
        if (root == null) {
            throw new IllegalArgumentException("root == null!");
        }
        mergeNativeTree(root);
    } else if (formatName.equals
               (IIOMetadataFormatImpl.standardMetadataFormatName)) {
        if (root == null) {
            throw new IllegalArgumentException("root == null!");
        }
        mergeStandardTree(root);
    } else {
        throw new IllegalArgumentException("Not a recognized format!");
    }
}
 
Example #21
Source File: JPEGMetadata.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
public void setFromTree(String formatName, Node root)
    throws IIOInvalidTreeException {
    if (formatName == null) {
        throw new IllegalArgumentException("null formatName!");
    }
    if (root == null) {
        throw new IllegalArgumentException("null root!");
    }
    if (isStream &&
        (formatName.equals(JPEG.nativeStreamMetadataFormatName))) {
        setFromNativeTree(root);
    } else if (!isStream &&
               (formatName.equals(JPEG.nativeImageMetadataFormatName))) {
        setFromNativeTree(root);
    } else if (!isStream &&
               (formatName.equals
                (IIOMetadataFormatImpl.standardMetadataFormatName))) {
        // In this case a reset followed by a merge is correct
        super.setFromTree(formatName, root);
    } else {
        throw  new IllegalArgumentException("Unsupported format name: "
                                            + formatName);
    }
}
 
Example #22
Source File: GIFWritableStreamMetadata.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
public void mergeTree(String formatName, Node root)
  throws IIOInvalidTreeException {
    if (formatName.equals(nativeMetadataFormatName)) {
        if (root == null) {
            throw new IllegalArgumentException("root == null!");
        }
        mergeNativeTree(root);
    } else if (formatName.equals
               (IIOMetadataFormatImpl.standardMetadataFormatName)) {
        if (root == null) {
            throw new IllegalArgumentException("root == null!");
        }
        mergeStandardTree(root);
    } else {
        throw new IllegalArgumentException("Not a recognized format!");
    }
}
 
Example #23
Source File: JPEGMetadata.java    From Bytecoder with Apache License 2.0 6 votes vote down vote up
public void setFromTree(String formatName, Node root)
    throws IIOInvalidTreeException {
    if (formatName == null) {
        throw new IllegalArgumentException("null formatName!");
    }
    if (root == null) {
        throw new IllegalArgumentException("null root!");
    }
    if (isStream &&
        (formatName.equals(JPEG.nativeStreamMetadataFormatName))) {
        setFromNativeTree(root);
    } else if (!isStream &&
               (formatName.equals(JPEG.nativeImageMetadataFormatName))) {
        setFromNativeTree(root);
    } else if (!isStream &&
               (formatName.equals
                (IIOMetadataFormatImpl.standardMetadataFormatName))) {
        // In this case a reset followed by a merge is correct
        super.setFromTree(formatName, root);
    } else {
        throw  new IllegalArgumentException("Unsupported format name: "
                                            + formatName);
    }
}
 
Example #24
Source File: GIFWritableStreamMetadata.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
public void mergeTree(String formatName, Node root)
  throws IIOInvalidTreeException {
    if (formatName.equals(nativeMetadataFormatName)) {
        if (root == null) {
            throw new IllegalArgumentException("root == null!");
        }
        mergeNativeTree(root);
    } else if (formatName.equals
               (IIOMetadataFormatImpl.standardMetadataFormatName)) {
        if (root == null) {
            throw new IllegalArgumentException("root == null!");
        }
        mergeStandardTree(root);
    } else {
        throw new IllegalArgumentException("Not a recognized format!");
    }
}
 
Example #25
Source File: PNGMetadata.java    From jdk8u-dev-jdk with GNU General Public License v2.0 6 votes vote down vote up
public void mergeTree(String formatName, Node root)
    throws IIOInvalidTreeException {
    if (formatName.equals(nativeMetadataFormatName)) {
        if (root == null) {
            throw new IllegalArgumentException("root == null!");
        }
        mergeNativeTree(root);
    } else if (formatName.equals
               (IIOMetadataFormatImpl.standardMetadataFormatName)) {
        if (root == null) {
            throw new IllegalArgumentException("root == null!");
        }
        mergeStandardTree(root);
    } else {
        throw new IllegalArgumentException("Not a recognized format!");
    }
}
 
Example #26
Source File: JPEGMetadata.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public void setFromTree(String formatName, Node root)
    throws IIOInvalidTreeException {
    if (formatName == null) {
        throw new IllegalArgumentException("null formatName!");
    }
    if (root == null) {
        throw new IllegalArgumentException("null root!");
    }
    if (isStream &&
        (formatName.equals(JPEG.nativeStreamMetadataFormatName))) {
        setFromNativeTree(root);
    } else if (!isStream &&
               (formatName.equals(JPEG.nativeImageMetadataFormatName))) {
        setFromNativeTree(root);
    } else if (!isStream &&
               (formatName.equals
                (IIOMetadataFormatImpl.standardMetadataFormatName))) {
        // In this case a reset followed by a merge is correct
        super.setFromTree(formatName, root);
    } else {
        throw  new IllegalArgumentException("Unsupported format name: "
                                            + formatName);
    }
}
 
Example #27
Source File: GIFWritableStreamMetadata.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public void mergeTree(String formatName, Node root)
  throws IIOInvalidTreeException {
    if (formatName.equals(nativeMetadataFormatName)) {
        if (root == null) {
            throw new IllegalArgumentException("root == null!");
        }
        mergeNativeTree(root);
    } else if (formatName.equals
               (IIOMetadataFormatImpl.standardMetadataFormatName)) {
        if (root == null) {
            throw new IllegalArgumentException("root == null!");
        }
        mergeStandardTree(root);
    } else {
        throw new IllegalArgumentException("Not a recognized format!");
    }
}
 
Example #28
Source File: JPEGMetadata.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
public void setFromTree(String formatName, Node root)
    throws IIOInvalidTreeException {
    if (formatName == null) {
        throw new IllegalArgumentException("null formatName!");
    }
    if (root == null) {
        throw new IllegalArgumentException("null root!");
    }
    if (isStream &&
        (formatName.equals(JPEG.nativeStreamMetadataFormatName))) {
        setFromNativeTree(root);
    } else if (!isStream &&
               (formatName.equals(JPEG.nativeImageMetadataFormatName))) {
        setFromNativeTree(root);
    } else if (!isStream &&
               (formatName.equals
                (IIOMetadataFormatImpl.standardMetadataFormatName))) {
        // In this case a reset followed by a merge is correct
        super.setFromTree(formatName, root);
    } else {
        throw  new IllegalArgumentException("Unsupported format name: "
                                            + formatName);
    }
}
 
Example #29
Source File: GIFMetadata.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public void mergeTree(String formatName, Node root)
  throws IIOInvalidTreeException {
    if (formatName.equals(nativeMetadataFormatName)) {
        if (root == null) {
            throw new IllegalArgumentException("root == null!");
        }
        mergeNativeTree(root);
    } else if (formatName.equals
              (IIOMetadataFormatImpl.standardMetadataFormatName)) {
        if (root == null) {
            throw new IllegalArgumentException("root == null!");
        }
        mergeStandardTree(root);
    } else {
        throw new IllegalArgumentException("Not a recognized format!");
    }
}
 
Example #30
Source File: GIFMetadata.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
public void mergeTree(String formatName, Node root)
  throws IIOInvalidTreeException {
    if (formatName.equals(nativeMetadataFormatName)) {
        if (root == null) {
            throw new IllegalArgumentException("root == null!");
        }
        mergeNativeTree(root);
    } else if (formatName.equals
              (IIOMetadataFormatImpl.standardMetadataFormatName)) {
        if (root == null) {
            throw new IllegalArgumentException("root == null!");
        }
        mergeStandardTree(root);
    } else {
        throw new IllegalArgumentException("Not a recognized format!");
    }
}