1 21 package org.apache.derby.iapi.tools.i18n; 22 23 import java.io.InputStreamReader ; 24 import java.io.InputStream ; 25 import java.io.UnsupportedEncodingException ; 26 import java.io.IOException ; 27 28 public class LocalizedInput extends InputStreamReader { 29 private InputStream in; 30 public LocalizedInput(InputStream i){ 31 super(i); 32 this.in = i; 33 } 34 35 LocalizedInput(InputStream i, String encode) throws UnsupportedEncodingException { 36 super(i,encode); 37 this.in = i; 38 } 39 public boolean isStandardInput(){ 40 return (in == System.in); 41 } 42 public void close() throws IOException { 43 if (!isStandardInput()) { 44 super.close(); 45 } 46 } 47 48 } 49 | Popular Tags |