code: public static byte[] getGlobalSegment(RandomAccessFileOrArray ra ) {
  		try {
  			JBIG2SegmentReader sr = new JBIG2SegmentReader(ra);
  			sr.read();
  			return sr.getGlobal(true);
  		} catch (Exception e) {
  	        return null;
  	    }
  	}
docs: Gets a byte array that can be used as a /JBIG2Globals,
  or null if not applicable to the given jbig2.
  @param	ra	an random access file or array
  @return	a byte array