XML-ERROR: not-enough-characters ;
-XML-ERROR: bad-doctype contents ;
+XML-ERROR: bad-doctype read-contents ;
XML-ERROR: bad-encoding encoding ;
<tcp-echo> [
\ threaded-server get server>address binary [
#times [ #bytes read-write ] times
- contents empty? [ incorrect-#bytes ] unless
+ read-contents empty? [ incorrect-#bytes ] unless
] with-client
] with-threaded-server ;
: gopher-get ( selector -- item-type byte-array )
"/" split1 "" or [ first ] dip
"?" split1 [ "\t" glue ] when*
- "\r\n" append utf8 encode write flush contents ;
+ "\r\n" append utf8 encode write flush read-contents ;
PRIVATE>
[
parse-marker { SOI } = [ not-a-jpeg-image ] unless
parse-headers
- contents <loading-jpeg>
+ read-contents <loading-jpeg>
] with-input-stream ;
PRIVATE>
: <icc-profile> ( byte-array -- icc-profile )
binary [
- read-png-string read1 drop contents zlib-inflate
+ read-png-string read1 drop read-contents zlib-inflate
] with-byte-reader icc-profile boa ;
: <itext> ( byte-array -- itext )