TMI-TGA: Now compiles with Java 6.

This commit is contained in:
Harald Kuhr 2014-10-02 16:04:04 +02:00
parent 72e3f80de6
commit c9ba5feb43

View File

@ -1,12 +1,11 @@
package com.twelvemonkeys.imageio.plugins.tga; package com.twelvemonkeys.imageio.plugins.tga;
import java.awt.image.IndexColorModel;
import java.io.DataInput;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import javax.imageio.IIOException; import javax.imageio.IIOException;
import javax.imageio.stream.ImageInputStream; import javax.imageio.stream.ImageInputStream;
import java.awt.image.IndexColorModel;
import java.io.DataInput;
import java.io.IOException;
import java.nio.charset.Charset;
final class TGAHeader { final class TGAHeader {
@ -125,7 +124,7 @@ final class TGAHeader {
byte[] idBytes = new byte[imageIdLength]; byte[] idBytes = new byte[imageIdLength];
imageInput.readFully(idBytes); imageInput.readFully(idBytes);
header.identification = new String(idBytes, StandardCharsets.US_ASCII); header.identification = new String(idBytes, Charset.forName("US-ASCII"));
} }
// Color map, not *really* part of the header // Color map, not *really* part of the header