1 18 package org.apache.batik.transcoder.image; 19 20 import java.util.HashMap ; 21 import java.util.Map ; 22 23 import org.apache.batik.transcoder.TranscoderInput; 24 25 31 public class LanguageTest extends AbstractImageTranscoderTest { 32 33 36 37 protected String inputURI; 38 39 40 protected String refImageURI; 41 42 43 protected String language; 44 45 52 public LanguageTest(String inputURI, 53 String refImageURI, 54 String language) { 55 this.inputURI = inputURI; 56 this.refImageURI = refImageURI; 57 this.language = language; 58 } 59 60 63 protected TranscoderInput createTranscoderInput() { 64 return new TranscoderInput(resolveURL(inputURI).toString()); 65 } 66 67 70 protected Map createTranscodingHints() { 71 Map hints = new HashMap (7); 72 hints.put(ImageTranscoder.KEY_LANGUAGE, language); 73 return hints; 74 } 75 76 79 protected byte [] getReferenceImageData() { 80 return createBufferedImageData(resolveURL(refImageURI)); 81 } 82 } 83 | Popular Tags |