예제 #1
0
        public Stream openStream()
        {
            if (stream != null)
            {
                stream.Seek(position, SeekOrigin.Begin);
                return(stream);
            }

            stream = source.openStream();
            if (!stream.CanSeek)
            {
                throw new IllegalStateException("Use TailBuffer for streams that do not support seeking");
            }

            readEncoding();
            findPosition();

            return(stream);
        }