public InputStream openStream ( ProgressMonitor p ) throws IOException { if ( onNFS ( ) ) return PersistNFS . openStream ( _key ) ; if ( onHDFS ( ) ) return PersistHdfs . openStream ( _key , p ) ; if ( onS3 ( ) ) return PersistS3 . openStream ( _key , p ) ; if ( onTachyon ( ) ) return PersistTachyon . openStream ( _key , p ) ; if ( isFrame ( ) ) throw new IllegalArgumentException ( "Tried to pass a Frame to openStream (maybe tried to parse a (already-parsed) Frame?)" ) ; assert _type == TypeMap . PRIM_B : "Expected byte[] type but got " + TypeMap . className ( _type ) ; return new ByteArrayInputStream ( memOrLoad ( ) ) ; }
Creates a Stream for reading bytes