MARSHAL m = new MARSHAL("Not a GIOP message"); m.minor = Minor.Giop;
StringBuffer b = new StringBuffer(); if (r == - 1) { b.append("Immediate EOF"); minor = Minor.EOF; } else { minor = Minor.Giop; b.append(r + " bytes: "); for (int i = 0; i < xMagic.length; i++) { b.append(Integer.toHexString(xMagic[i] & 0xFF)); b.append(' '); } } MARSHAL m = new MARSHAL("Not a GIOP message: " + b); m.minor = minor;
  public void read(java.io.InputStream istream)            throws MARSHAL  {    try      {        byte[] xMagic = new byte[MAGIC.length];        istream.read(xMagic);        if (!Arrays.equals(xMagic, MAGIC))          {            MARSHAL m = new MARSHAL("Not a GIOP message");            m.minor = Minor.Giop;            throw m;          }        version = Version.read_version(istream);        AbstractDataInput din;        flags = (byte) istream.read();        // This checks the bit in the byte we have just received.        if (isBigEndian())          din = new BigEndianInputStream(istream);        else          din = new LittleEndianInputStream(istream);        message_type = (byte) din.read();        message_size = din.readInt();      }    catch (IOException ex)      {        MARSHAL t = new MARSHAL();        t.minor = Minor.Header;        t.initCause(ex);        throw t;      }  }