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);
}

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 ) ; }
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 .
