protected long readToByteChannel ( ucar . nc2 . Variable v , Section section , WritableByteChannel wbc ) throws java . io . IOException , ucar . ma2 . InvalidRangeException { //if (unlocked) // throw new IllegalStateException("File is unlocked - cannot use"); if ( ( spi == null ) || v . hasCachedData ( ) ) return IospHelper . copyToByteChannel ( v . read ( section ) , wbc ) ; return spi . readToByteChannel ( v , section , wbc ) ; }
Read data from a top level Variable and send data to a WritableByteChannel . Experimental .