Package hermes.fix

Examples of hermes.fix.MalformedMessageException


      if (b != '9')
      {
         position = parseBuffer.position();

         throw new MalformedMessageException("Tag 9 does not follow tag 8");
      }

      parseBuffer.get();

      byte[] messageLengthBuffer = new byte[16];
View Full Code Here


      b = readByte(istream);

      if (b != '9')
      {
         throw new MalformedMessageException("Tag 9 does not follow tag 8");
      }

      messageBuffer[messageBufferIndex++] = b;
      messageBuffer[messageBufferIndex++] = (byte) istream.read();

      byte[] messageLengthBuffer = new byte[16];
      int messageLengthBufferOffset = 0;

      while ((b = readByte(istream)) != '\1')
      {
         messageBuffer[messageBufferIndex++] = b;
         messageLengthBuffer[messageLengthBufferOffset++] = b;
      }

      messageLengthBuffer[messageLengthBufferOffset++] = '\1';
      messageBuffer[messageBufferIndex++] = '\1';

      final String s = new String(messageLengthBuffer).trim();
      final int messageLength = Integer.parseInt(s);

      if (messageLength > maxMessageBuffer)
      {
         throw new MalformedMessageException("BodyLength is too big, " + messageLength + " > " + maxMessageBuffer);
      }

      readByte(istream, messageBuffer, messageBufferIndex, messageLength);

      messageBufferIndex += messageLength;
View Full Code Here

TOP

Related Classes of hermes.fix.MalformedMessageException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.