public int Decode(byte[] buffer, int offset, int length)
        {
            CodecInputStream s = new CodecInputStream(
                buffer, offset, length);

            try {
                DecodeFromStream(s);
            } catch (Exception e) {
                if (e is CodecException ||
                    e is ArgumentException ||
                    e is DecoderFallbackException)
                {
                    return(-1);
                }
                else
                {
                    throw;
                }
            }

            return(s.GetReadSize());
        }
 public abstract void DecodeFromStream(CodecInputStream s);