some additions for Java input stream adapters