added creation from stream for jar integration