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 |
// This Source Code is in the Public Domain per: http://litesoft.org/License.txt package org.litesoft.codec; import org.litesoft.commonfoundation.charstreams.*; /** * Convert Boolean value to/from a tight string representation */ public class BooleanTypedTerminatingCodec extends AbstractTypedTerminatingCodec<Boolean> { public static final BooleanTypedTerminatingCodec INSTANCE = new BooleanTypedTerminatingCodec(); private BooleanTypedTerminatingCodec() { } @Override protected void encodeNonNull( CharSink pCharSink, Boolean pValue ) { PrimitiveBooleanCodec.INSTANCE.encode( pCharSink, pValue ); } @Override protected Boolean decodeNonNull( CharSource pCharSource ) { return PrimitiveBooleanCodec.INSTANCE.decode( pCharSource ); } } |