Created
October 2, 2011 21:12
-
-
Save Kagee/1257964 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ReplacingInputStream extends FilterInputStream | |
public ReplacingInputStream(InputStream in) { | |
super(in); | |
this.in = in; | |
} | |
public int read() throws IOException { | |
int read = super.read(); | |
if (read!=-1 && read<0x20 && !(read==0x9 || read==0xA || read==0xB)) | |
{ read = 0x20;} | |
return read; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment