.getProperty(Constants.Configuration.CHARACTER_SET_ENCODING);
// Apply a detachable inputstream. This can be used later
// to (a) get the length of the incoming message or (b)
// free transport resources.
DetachableInputStream is = new DetachableInputStream(inputStream);
messageContext.setProperty(Constants.DETACHABLE_INPUT_STREAM, is);
// Get the actual encoding by looking at the BOM of the InputStream
PushbackInputStream pis = BuilderUtil.getPushbackInputStream(is);
String actualCharSetEncoding = BuilderUtil.getCharSetEncoding(pis, charSetEncoding);