byte b = 0;
try {  Field f = declaringClass.getDeclaredField( fieldName );
  public static byte getFieldByte (Object instance, Class declaringClass, String fieldName)    throws NoSuchFieldError {      byte b = 0;      try {        // following may throw NoSuchFieldError;        Field f = declaringClass.getDeclaredField( fieldName );        f.setAccessible( true );     // to allow access to private fields        b = f.getByte(instance);      }      catch ( Exception e ) {        VM.sysWrite( "exception in ObjectOutputStream.getFieldByte(): " + e );      }      return b;    }