{
headerName = holder.getString();
}
catch (UnsupportedEncodingException e)
{
throw new HornetQStompException("Encoding exception", e);
}
holder.reset();
inHeaderName = false;
headerValueWhitespace = true;
}
}
whiteSpaceOnly = false;
break;
}
case StompDecoder.LN:
{
if (isEscaping)
{
holder.append(StompDecoder.NEW_LINE);
isEscaping = false;
}
else
{
holder.append(b);
}
break;
}
case StompDecoder.NEW_LINE:
{
if (whiteSpaceOnly)
{
// Headers are terminated by a blank line
readingHeaders = false;
break outer;
}
String headerValue;
try
{
headerValue = holder.getString();
}
catch (UnsupportedEncodingException e)
{
throw new HornetQStompException("Encoding exception.", e);
}
holder.reset();
headers.put(headerName, headerValue);