question: private Object translateStreamToInputStream ( InputStream str , DataFlavor flavor , long format , Transferable localeTransferable ) throws IOException { if ( isFlavorCharsetTextType ( flavor ) && isTextFormat ( format ) ) { str = new ReencodingInputStream ( str , format , DataTransferer . getTextCharset ( flavor ) , localeTransferable ) ; } return constructFlavoredObject ( str , flavor , InputStream . class ) ; }
target:  For arbitrary flavors, just use the raw InputStream. For text flavors, ReencodingInputStream will decode and reencode the InputStream on demand so that we can strip terminators and search-and-replace EOLN.