com.sun.imageio.plugins.common.I18N Java Examples

The following examples show how to use com.sun.imageio.plugins.common.I18N. 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: BMPImageWriter.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public void setOutput(Object output) {
    super.setOutput(output); // validates output
    if (output != null) {
        if (!(output instanceof ImageOutputStream))
            throw new IllegalArgumentException(I18N.getString("BMPImageWriter0"));
        this.stream = (ImageOutputStream)output;
        stream.setByteOrder(ByteOrder.LITTLE_ENDIAN);
    } else
        this.stream = null;
}
 
Example #2
Source File: BMPImageReader.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
public int getHeight(int imageIndex) throws IOException {
    checkIndex(imageIndex);
    try {
        readHeader();
    } catch (IllegalArgumentException e) {
        throw new IIOException(I18N.getString("BMPImageReader6"), e);
    }
    return height;
}
 
Example #3
Source File: BMPImageReader.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/** Overrides the method defined in the superclass. */
public int getNumImages(boolean allowSearch) throws IOException {
    if (iis == null) {
        throw new IllegalStateException(I18N.getString("GetNumImages0"));
    }
    if (seekForwardOnly && allowSearch) {
        throw new IllegalStateException(I18N.getString("GetNumImages1"));
    }
    return 1;
}
 
Example #4
Source File: BMPImageWriter.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public void setOutput(Object output) {
    super.setOutput(output); // validates output
    if (output != null) {
        if (!(output instanceof ImageOutputStream))
            throw new IllegalArgumentException(I18N.getString("BMPImageWriter0"));
        this.stream = (ImageOutputStream)output;
        stream.setByteOrder(ByteOrder.LITTLE_ENDIAN);
    } else
        this.stream = null;
}
 
Example #5
Source File: BMPImageReader.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/** Overrides the method defined in the superclass. */
public int getNumImages(boolean allowSearch) throws IOException {
    if (iis == null) {
        throw new IllegalStateException(I18N.getString("GetNumImages0"));
    }
    if (seekForwardOnly && allowSearch) {
        throw new IllegalStateException(I18N.getString("GetNumImages1"));
    }
    return 1;
}
 
Example #6
Source File: BMPMetadata.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
public Node getAsTree(String formatName) {
    if (formatName.equals(nativeMetadataFormatName)) {
        return getNativeTree();
    } else if (formatName.equals
               (IIOMetadataFormatImpl.standardMetadataFormatName)) {
        return getStandardTree();
    } else {
        throw new IllegalArgumentException(I18N.getString("BMPMetadata0"));
    }
}
 
Example #7
Source File: WBMPImageWriter.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public void setOutput(Object output) {
    super.setOutput(output); // validates output
    if (output != null) {
        if (!(output instanceof ImageOutputStream))
            throw new IllegalArgumentException(I18N.getString("WBMPImageWriter"));
        this.stream = (ImageOutputStream)output;
    } else
        this.stream = null;
}
 
Example #8
Source File: WBMPImageReader.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
/** Overrides the method defined in the superclass. */
public int getNumImages(boolean allowSearch) throws IOException {
    if (iis == null) {
        throw new IllegalStateException(I18N.getString("GetNumImages0"));
    }
    if (seekForwardOnly && allowSearch) {
        throw new IllegalStateException(I18N.getString("GetNumImages1"));
    }
    return 1;
}
 
Example #9
Source File: BMPImageWriter.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public void setOutput(Object output) {
    super.setOutput(output); // validates output
    if (output != null) {
        if (!(output instanceof ImageOutputStream))
            throw new IllegalArgumentException(I18N.getString("BMPImageWriter0"));
        this.stream = (ImageOutputStream)output;
        stream.setByteOrder(ByteOrder.LITTLE_ENDIAN);
    } else
        this.stream = null;
}
 
Example #10
Source File: WBMPMetadata.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public Node getAsTree(String formatName) {
    if (formatName.equals(nativeMetadataFormatName)) {
        return getNativeTree();
    } else if (formatName.equals
               (IIOMetadataFormatImpl.standardMetadataFormatName)) {
        return getStandardTree();
    } else {
        throw new IllegalArgumentException(I18N.getString("WBMPMetadata0"));
    }
}
 
Example #11
Source File: BMPMetadata.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
public Node getAsTree(String formatName) {
    if (formatName.equals(nativeMetadataFormatName)) {
        return getNativeTree();
    } else if (formatName.equals
               (IIOMetadataFormatImpl.standardMetadataFormatName)) {
        return getStandardTree();
    } else {
        throw new IllegalArgumentException(I18N.getString("BMPMetadata0"));
    }
}
 
Example #12
Source File: BMPImageReader.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
public int getHeight(int imageIndex) throws IOException {
    checkIndex(imageIndex);
    try {
        readHeader();
    } catch (IllegalArgumentException e) {
        throw new IIOException(I18N.getString("BMPImageReader6"), e);
    }
    return height;
}
 
Example #13
Source File: WBMPImageReader.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/** Overrides the method defined in the superclass. */
public int getNumImages(boolean allowSearch) throws IOException {
    if (iis == null) {
        throw new IllegalStateException(I18N.getString("GetNumImages0"));
    }
    if (seekForwardOnly && allowSearch) {
        throw new IllegalStateException(I18N.getString("GetNumImages1"));
    }
    return 1;
}
 
Example #14
Source File: WBMPImageWriter.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
public void setOutput(Object output) {
    super.setOutput(output); // validates output
    if (output != null) {
        if (!(output instanceof ImageOutputStream))
            throw new IllegalArgumentException(I18N.getString("WBMPImageWriter"));
        this.stream = (ImageOutputStream)output;
    } else
        this.stream = null;
}
 
Example #15
Source File: BMPImageReader.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
/** Overrides the method defined in the superclass. */
public int getNumImages(boolean allowSearch) throws IOException {
    if (iis == null) {
        throw new IllegalStateException(I18N.getString("GetNumImages0"));
    }
    if (seekForwardOnly && allowSearch) {
        throw new IllegalStateException(I18N.getString("GetNumImages1"));
    }
    return 1;
}
 
Example #16
Source File: WBMPMetadata.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
public Node getAsTree(String formatName) {
    if (formatName.equals(nativeMetadataFormatName)) {
        return getNativeTree();
    } else if (formatName.equals
               (IIOMetadataFormatImpl.standardMetadataFormatName)) {
        return getStandardTree();
    } else {
        throw new IllegalArgumentException(I18N.getString("WBMPMetadata0"));
    }
}
 
Example #17
Source File: BMPImageReader.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public boolean isRandomAccessEasy(int imageIndex) throws IOException {
    checkIndex(imageIndex);
    try {
        readHeader();
    } catch (IllegalArgumentException e) {
        throw new IIOException(I18N.getString("BMPImageReader6"), e);
    }
    return metadata.compression == BI_RGB;
}
 
Example #18
Source File: BMPImageReader.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
public Iterator getImageTypes(int imageIndex)
  throws IOException {
    checkIndex(imageIndex);
    try {
        readHeader();
    } catch (IllegalArgumentException e) {
        throw new IIOException(I18N.getString("BMPImageReader6"), e);
    }
    ArrayList list = new ArrayList(1);
    list.add(new ImageTypeSpecifier(originalColorModel,
                                    originalSampleModel));
    return list.iterator();
}
 
Example #19
Source File: BMPImageReader.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public boolean isRandomAccessEasy(int imageIndex) throws IOException {
    checkIndex(imageIndex);
    try {
        readHeader();
    } catch (IllegalArgumentException e) {
        throw new IIOException(I18N.getString("BMPImageReader6"), e);
    }
    return metadata.compression == BI_RGB;
}
 
Example #20
Source File: BMPImageReader.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public Iterator getImageTypes(int imageIndex)
  throws IOException {
    checkIndex(imageIndex);
    try {
        readHeader();
    } catch (IllegalArgumentException e) {
        throw new IIOException(I18N.getString("BMPImageReader6"), e);
    }
    ArrayList list = new ArrayList(1);
    list.add(new ImageTypeSpecifier(originalColorModel,
                                    originalSampleModel));
    return list.iterator();
}
 
Example #21
Source File: BMPImageWriter.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
public void setOutput(Object output) {
    super.setOutput(output); // validates output
    if (output != null) {
        if (!(output instanceof ImageOutputStream))
            throw new IllegalArgumentException(I18N.getString("BMPImageWriter0"));
        this.stream = (ImageOutputStream)output;
        stream.setByteOrder(ByteOrder.LITTLE_ENDIAN);
    } else
        this.stream = null;
}
 
Example #22
Source File: WBMPMetadata.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public Node getAsTree(String formatName) {
    if (formatName.equals(nativeMetadataFormatName)) {
        return getNativeTree();
    } else if (formatName.equals
               (IIOMetadataFormatImpl.standardMetadataFormatName)) {
        return getStandardTree();
    } else {
        throw new IllegalArgumentException(I18N.getString("WBMPMetadata0"));
    }
}
 
Example #23
Source File: BMPImageReader.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public Iterator getImageTypes(int imageIndex)
  throws IOException {
    checkIndex(imageIndex);
    try {
        readHeader();
    } catch (IllegalArgumentException e) {
        throw new IIOException(I18N.getString("BMPImageReader6"), e);
    }
    ArrayList list = new ArrayList(1);
    list.add(new ImageTypeSpecifier(originalColorModel,
                                    originalSampleModel));
    return list.iterator();
}
 
Example #24
Source File: BMPImageReader.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public int getHeight(int imageIndex) throws IOException {
    checkIndex(imageIndex);
    try {
        readHeader();
    } catch (IllegalArgumentException e) {
        throw new IIOException(I18N.getString("BMPImageReader6"), e);
    }
    return height;
}
 
Example #25
Source File: WBMPImageReader.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/** Overrides the method defined in the superclass. */
public int getNumImages(boolean allowSearch) throws IOException {
    if (iis == null) {
        throw new IllegalStateException(I18N.getString("GetNumImages0"));
    }
    if (seekForwardOnly && allowSearch) {
        throw new IllegalStateException(I18N.getString("GetNumImages1"));
    }
    return 1;
}
 
Example #26
Source File: BMPImageReader.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public int getWidth(int imageIndex) throws IOException {
    checkIndex(imageIndex);
    try {
        readHeader();
    } catch (IllegalArgumentException e) {
        throw new IIOException(I18N.getString("BMPImageReader6"), e);
    }
    return width;
}
 
Example #27
Source File: BMPImageReader.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
@Override
public int getWidth(int imageIndex) throws IOException {
    checkIndex(imageIndex);
    try {
        readHeader();
    } catch (IllegalArgumentException e) {
        throw new IIOException(I18N.getString("BMPImageReader6"), e);
    }
    return width;
}
 
Example #28
Source File: WBMPImageWriter.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public void setOutput(Object output) {
    super.setOutput(output); // validates output
    if (output != null) {
        if (!(output instanceof ImageOutputStream))
            throw new IllegalArgumentException(I18N.getString("WBMPImageWriter"));
        this.stream = (ImageOutputStream)output;
    } else
        this.stream = null;
}
 
Example #29
Source File: BMPMetadata.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
public Node getAsTree(String formatName) {
    if (formatName.equals(nativeMetadataFormatName)) {
        return getNativeTree();
    } else if (formatName.equals
               (IIOMetadataFormatImpl.standardMetadataFormatName)) {
        return getStandardTree();
    } else {
        throw new IllegalArgumentException(I18N.getString("BMPMetadata0"));
    }
}
 
Example #30
Source File: WBMPImageReader.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/** Overrides the method defined in the superclass. */
public int getNumImages(boolean allowSearch) throws IOException {
    if (iis == null) {
        throw new IllegalStateException(I18N.getString("GetNumImages0"));
    }
    if (seekForwardOnly && allowSearch) {
        throw new IllegalStateException(I18N.getString("GetNumImages1"));
    }
    return 1;
}