Mainly new code standard.

A few changes that should have been committed earlier.. :-/
This commit is contained in:
Harald Kuhr
2011-02-17 12:40:49 +01:00
parent 41b8080683
commit 20b87d155d
40 changed files with 951 additions and 593 deletions

View File

@@ -98,8 +98,8 @@ public class SVGImageReader extends ImageReaderBase {
public void setInput(Object pInput, boolean pSeekForwardOnly, boolean pIgnoreMetadata) {
super.setInput(pInput, pSeekForwardOnly, pIgnoreMetadata);
if (mImageInput != null) {
TranscoderInput input = new TranscoderInput(IIOUtil.createStreamAdapter(mImageInput));
if (imageInput != null) {
TranscoderInput input = new TranscoderInput(IIOUtil.createStreamAdapter(imageInput));
mRasterizer.setInput(input);
}
}

View File

@@ -137,25 +137,25 @@ public class TIFFImageReader extends ImageReaderBase {
private synchronized void init() {
if (mDecoder == null) {
if (mImageInput == null) {
if (imageInput == null) {
throw new IllegalStateException("input == null");
}
mDecoder = new TIFFImageDecoder(new SeekableStream() {
public int read() throws IOException {
return mImageInput.read();
return imageInput.read();
}
public int read(final byte[] pBytes, final int pStart, final int pLength) throws IOException {
return mImageInput.read(pBytes, pStart, pLength);
return imageInput.read(pBytes, pStart, pLength);
}
public long getFilePointer() throws IOException {
return mImageInput.getStreamPosition();
return imageInput.getStreamPosition();
}
public void seek(final long pPos) throws IOException {
mImageInput.seek(pPos);
imageInput.seek(pPos);
}
}, null);
}

View File

@@ -124,7 +124,7 @@ public class TIFFImageWriter extends ImageWriterBase {
processImageStarted(0);
mEncoder.encode(image);
mImageOutput.flush();
imageOutput.flush();
processImageComplete();
}
@@ -136,10 +136,10 @@ public class TIFFImageWriter extends ImageWriterBase {
private synchronized void init() {
if (mEncoder == null) {
if (mImageOutput == null) {
if (imageOutput == null) {
throw new IllegalStateException("output == null");
}
mEncoder = new TIFFImageEncoder(IIOUtil.createStreamAdapter(mImageOutput), null);
mEncoder = new TIFFImageEncoder(IIOUtil.createStreamAdapter(imageOutput), null);
}
}
}

View File

@@ -88,7 +88,7 @@ public class WMFImageReader extends ImageReaderBase {
private synchronized void init() throws IOException {
// Need the extra test, to avoid throwing an IOException from the Transcoder
if (mImageInput == null) {
if (imageInput == null) {
throw new IllegalStateException("input == null");
}
@@ -98,7 +98,7 @@ public class WMFImageReader extends ImageReaderBase {
ByteArrayOutputStream output = new ByteArrayOutputStream();
Writer writer = new OutputStreamWriter(output, "UTF8");
try {
TranscoderInput in = new TranscoderInput(IIOUtil.createStreamAdapter(mImageInput));
TranscoderInput in = new TranscoderInput(IIOUtil.createStreamAdapter(imageInput));
TranscoderOutput out = new TranscoderOutput(writer);
// TODO: Transcodinghints?