litesoft
@ 942
litesoft / trunk / Java / core / Anywhere / src / org / litesoft / commonfoundation / charstreams / CharSource.java
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
// This Source Code is in the Public Domain per: http://litesoft.org/License.txt package org.litesoft.commonfoundation.charstreams; /** * A CharSource is like a powerful version of a "char" based Iterator. */ public interface CharSource { /** * Report if there are any more characters available to get(). * <p/> * Similar to Iterator's hasNext(). */ public boolean anyRemaining(); /** * Get the next character (consume it from the stream) or -1 if there are no more characters available. */ public int get(); /** * Get the next character (consume it from the stream) or throw an exception if there are no more characters available. */ public char getRequired(); /** * Return the next character (without consuming it) or -1 if there are no more characters available. */ public int peek(); /** * Return the Next Offset (from the stream) that the peek/get/getRequired would read from (it may be beyond the stream end). */ public int getNextOffset(); /** * Return the Last Offset (from the stream), which the previous get/getRequired read from (it may be -1 if stream has not been successfully read from). */ public int getLastOffset(); } |
Commits for litesoft/trunk/Java/core/Anywhere/src/org/litesoft/commonfoundation/charstreams/CharSource.java
Revision | Author | Commited | Message |
---|---|---|---|
942 Diff | GeorgeS | Mon 02 Jun, 2014 23:41:46 +0000 | Extracting commonfoundation |
772 Diff | GeorgeS | Sun 15 Jul, 2012 16:55:51 +0000 | ! |
768 Diff | GeorgeS | Sat 14 Jul, 2012 22:48:34 +0000 | ! |
766 Diff | GeorgeS | Sat 14 Jul, 2012 16:38:04 +0000 | ! |
490 Diff | GeorgeS | Fri 09 Sep, 2011 18:11:40 +0000 | Encoding |
50 Diff | GeorgeS | Tue 13 Apr, 2010 11:51:38 +0000 | |
49 Diff | GeorgeS | Mon 12 Apr, 2010 02:59:10 +0000 | License Text |
2 | GeorgeS | Sun 07 Feb, 2010 12:50:58 +0000 |