Commit 04472c9c744b7b4d0fc840e58073260b6055cf54

Thomas de Grivel 2018-06-14T13:39:17

use cl-stream:super-stream

diff --git a/utf8-output-stream.lisp b/utf8-output-stream.lisp
index a1679ec..f8dddfc 100644
--- a/utf8-output-stream.lisp
+++ b/utf8-output-stream.lisp
@@ -26,21 +26,6 @@
                  :accessor stream-bytes-length
                  :type fixnum+)))
 
-(defmethod stream-clear-output ((stream utf8-output-stream))
-  (stream-clear-output (stream-underlying-stream stream)))
-
-(defmethod stream-finish-output ((stream utf8-output-stream))
-  (stream-finish-output (stream-underlying-stream stream)))
-
-(defmethod stream-flush ((stream utf8-output-stream))
-  (stream-flush (stream-underlying-stream stream)))
-
-(defmethod stream-flush-output ((stream utf8-output-stream))
-  (stream-flush-output (stream-underlying-stream stream)))
-
-(defmethod stream-open-p ((stream utf8-output-stream))
-  (stream-open-p (stream-underlying-stream stream)))
-
 (defmethod stream-write ((stream utf8-output-stream)
                          (element character))
   (stream-write (stream-underlying-stream stream) element))
diff --git a/utf8-stream.lisp b/utf8-stream.lisp
index 196157e..9e9dfde 100644
--- a/utf8-stream.lisp
+++ b/utf8-stream.lisp
@@ -18,22 +18,13 @@
 
 (in-package :utf8-stream)
 
-(defclass utf8-stream (ub8-stream)
-  ((underlying-stream :initarg :stream
-                      :accessor stream-underlying-stream
-                      :type character-stream)
-   (encoding :initarg :format
+(defclass utf8-stream (super-stream ub8-stream)
+  ((encoding :initarg :format
              :initform :utf-8
              :accessor stream-encoding
              :type symbol)
    (mapping)))
 
-(defmethod stream-close ((stream utf8-stream))
-  (stream-close (stream-underlying-stream stream)))
-
-(defmethod stream-open-p ((stream utf8-stream))
-  (stream-open-p (stream-underlying-stream stream)))
-
 (defun mapping (stream)
   (if (slot-boundp stream 'mapping)
       (slot-value stream 'mapping)