Unsigned Byte. This also contains a method for extracting the data at a location as a string.
efficiently return the data contained in the bytes presuming a string encoding. This is useful when the data is mostly binary but parts are text data. This is typically used with trim to extract text portions of data. This code shows how the length of each record in a U.S.G.S. DEM file is extracted:
from java.nio.charset import Charset usascii= Charset.forName( 'US-ASCII' ) ds=getDataSet( 'vap+bin:%s?byteOffset=858&byteLength=6' % fil.toURI() ) from java.lang import Integer ncol= Integer.parseUnsignedInt( ds.collectString( usascii ).strip() ) print ncol