int open_callbacks(InputStream is, byte[] initial, int ibytes//, callbacks callbacks ) throws JOrbisException { int ret; datasource = is; oy.init(); // perhaps some data was previously read into a buffer for testing // against other stream types. Allow initialization from this // previously read data (as we may be reading from a non-seekable // stream) if (initial != null) { int index = oy.buffer(ibytes); System.arraycopy(initial, 0, oy.data, index, ibytes); oy.wrote(ibytes); } // can we seek? Stevens suggests the seek test was portable if (is instanceof SeekableInputStream) { ret = open_seekable(); } else { ret = open_nonseekable(); } if (ret != 0) { datasource = null; clear(); } return ret; }
int open_callbacks(InputStream is, byte[] initial, int ibytes//, callbacks callbacks ) throws JOrbisException{ int ret; datasource=is; oy.init(); // perhaps some data was previously read into a buffer for testing // against other stream types. Allow initialization from this // previously read data (as we may be reading from a non-seekable // stream) if(initial!=null){ int index=oy.buffer(ibytes); System.arraycopy(initial, 0, oy.data, index, ibytes); oy.wrote(ibytes); } // can we seek? Stevens suggests the seek test was portable if(is instanceof SeekableInputStream){ ret=open_seekable(); } else{ ret=open_nonseekable(); } if(ret!=0){ datasource=null; clear(); } return ret; }
int open_callbacks(InputStream is, byte[] initial, int ibytes//, callbacks callbacks ) throws JOrbisException{ int ret; datasource=is; oy.init(); // perhaps some data was previously read into a buffer for testing // against other stream types. Allow initialization from this // previously read data (as we may be reading from a non-seekable // stream) if(initial!=null){ int index=oy.buffer(ibytes); System.arraycopy(initial, 0, oy.data, index, ibytes); oy.wrote(ibytes); } // can we seek? Stevens suggests the seek test was portable if(is instanceof SeekableInputStream){ ret=open_seekable(); } else{ ret=open_nonseekable(); } if(ret!=0){ datasource=null; clear(); } return ret; }
int open_callbacks(InputStream is, byte[] initial, int ibytes//, callbacks callbacks ) throws JOrbisException{ int ret; datasource=is; oy.init(); // perhaps some data was previously read into a buffer for testing // against other stream types. Allow initialization from this // previously read data (as we may be reading from a non-seekable // stream) if(initial!=null){ int index=oy.buffer(ibytes); System.arraycopy(initial, 0, oy.data, index, ibytes); oy.wrote(ibytes); } // can we seek? Stevens suggests the seek test was portable if(is instanceof SeekableInputStream){ ret=open_seekable(); } else{ ret=open_nonseekable(); } if(ret!=0){ datasource=null; clear(); } return ret; }
int open_callbacks(InputStream is, byte[] initial, int ibytes//, callbacks callbacks ) throws JOrbisException{ int ret; datasource=is; oy.init(); // perhaps some data was previously read into a buffer for testing // against other stream types. Allow initialization from this // previously read data (as we may be reading from a non-seekable // stream) if(initial!=null){ int index=oy.buffer(ibytes); System.arraycopy(initial, 0, oy.data, index, ibytes); oy.wrote(ibytes); } // can we seek? Stevens suggests the seek test was portable if(is instanceof SeekableInputStream){ ret=open_seekable(); } else{ ret=open_nonseekable(); } if(ret!=0){ datasource=null; clear(); } return ret; }