1 54 package org.w3c.tidy; 55 56 import java.io.InputStream ; 57 import java.io.UnsupportedEncodingException ; 58 59 60 65 public final class StreamInFactory 66 { 67 68 71 private StreamInFactory() 72 { 73 } 75 76 82 public static StreamIn getStreamIn(Configuration config, InputStream stream) 83 { 84 try 85 { 86 return new StreamInJavaImpl(stream, config.getInCharEncodingName(), config.tabsize); 87 } 88 catch (UnsupportedEncodingException e) 89 { 90 throw new RuntimeException ("Unsupported encoding: " + e.getMessage()); 91 } 92 } 93 } 94 | Popular Tags |