Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
 public abstract void DecodeFromStream(CodecInputStream s);