litesoft
@ 942
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 |
package org.litesoft.codec; import org.litesoft.commonfoundation.charstreams.*; import org.litesoft.commonfoundation.annotations.*; /** * Implementations of this TypedTerminatingCodec must produce and consume self-terminating encodings. * <p/> * A self-terminating encoded value, when decoding, will only consume as many characters * from the CharSource as were generated by the encode method. */ public interface TypedTerminatingCodec<T> { /** * Encode the Value into a self-terminating non-Null String. */ @NotNull String encode( @Nullable T pValue ); /** * Encode the Value (as a self-terminating character sequence) into the StringBuilder. */ void encode( @NotNull CharSink pCharSink, @Nullable T pValue ); /** * Decode the Value as a self-terminating non-Null String (generated by the encode method). * <p/> * Note: No extraneous characters allowed on the parameter Value. */ @Nullable T decode( @NotNull CharSequence pValue ); /** * Decode the next self-terminating character stream from the CharSource. */ @Nullable T decode( @NotNull CharSource pCharSource ); } |
Commits for litesoft/trunk/Java/core/Anywhere/src/org/litesoft/codec/TypedTerminatingCodec.java
Revision | Author | Commited | Message |
---|---|---|---|
942 Diff | GeorgeS | Mon 02 Jun, 2014 23:41:46 +0000 | Extracting commonfoundation |
939 Diff | GeorgeS | Mon 02 Jun, 2014 21:30:31 +0000 | Extracting commonfoundation |
779 Diff | GeorgeS | Mon 16 Jul, 2012 04:34:33 +0000 | |
772 Diff | GeorgeS | Sun 15 Jul, 2012 16:55:51 +0000 | ! |
770 Diff | GeorgeS | Sat 14 Jul, 2012 23:20:33 +0000 | |
769 Diff | GeorgeS | Sat 14 Jul, 2012 23:18:20 +0000 | |
768 Diff | GeorgeS | Sat 14 Jul, 2012 22:48:34 +0000 | ! |
767 Diff | GeorgeS | Sat 14 Jul, 2012 18:19:39 +0000 | |
766 | GeorgeS | Sat 14 Jul, 2012 16:38:04 +0000 | ! |