Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail From: Jan Burse Newsgroups: comp.lang.java.programmer Subject: Re: Piggypack Encoding/Decoding on RandomAccessFile Date: Sun, 06 Nov 2011 10:42:04 +0100 Organization: albasani.net Lines: 18 Message-ID: References: <29284695.78.1320512625961.JavaMail.geo-discussion-forums@prok29> <10583905.403.1320524978805.JavaMail.geo-discussion-forums@prfk19> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.albasani.net JcN+H32sS5gNffPt+q2mrxWV8lLEBb9e2tFQZl9ZSgIEzZ2NtwO0lcYDIoWniU4uog/yQL8efc0qqaFdI+VFlg== NNTP-Posting-Date: Sun, 6 Nov 2011 09:42:04 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="gs2Mn21XHgI4UO5bA5a4t5smLhe3WjpVYFjmaJQUAOhKNflGh1CW1bYCtNiIxsNVwE54t5RA7OM9WfvJKzBJiWUl1JDlBoj9yH+glnPq5MzImDt4GBt8HR+MHl6eB7jq"; mail-complaints-to="abuse@albasani.net" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20110928 Firefox/7.0.1 SeaMonkey/2.4.1 In-Reply-To: <10583905.403.1320524978805.JavaMail.geo-discussion-forums@prfk19> Cancel-Lock: sha1:Azgl28ayviYTX1CIp3wgAsLd6us= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:9644 Lew schrieb: > 'DataInput' already knows where the > characters begin, as it reads the source using 'readUTF()'. But the problem is posed that I want to piggy pack arbitrary encoders/decoders, not only UTF-8. For example UTF-16 etc.. Or some cyricllic code page which then needs to be mapped to unicode. How do think this is solved by readUTF()? And why do you think that the file positions do not communicate between the input stream and the raf, although they derive from the same file descriptor. In fact they do. Bye