A boxed short primitive was allocated just to call toString(). It is more effective to just use the static form of toString which takes the primitive value
Method invokes inefficient Number constructor; will now use static valueOf instead
Calling String.toString() isa redundant operation. Changed to just use the String.
Swap usage of StringBuffer to StringBuilder where possible
use Stringbuilder in toString loop insteasd of + to concatenate
final initialized fields can be static
couple more Number constructors changed to use valueOf as 3.5x faster
change inner classes to static inner classes - class is an inner class, but does not use its embedded reference to the object which created it.  This reference makes the instances of the class larger, and may keep the reference to the creator object alive longer than necessary.
add finally block to ensure always close resources
Fix Failed test on MS windows due to Line Seperator differences
add hashCode and toString to ObjectTemplate as equals is a bit unusual and it could be used in a hashmap so ought to have  a hashcode implementation consistent with that.  Also  added/extended a few unit tests
Merge pull request #5 from chas66/findbugsA

Some more minor code changes
add finally block to ensure always close resources

Merge branch 'findbugsB' of https://github.com/chas66/jPOS
Merge pull request #7 from chas66/findbugsC

add hashCode and toString to ObjectTemplate + unit tests
Less noisy read timeout exceptions

Patch provided by @fgonzal
Committed by mistake

Just confirmed with Chris that this file can be removed.
prevent instantiation (added private constructors)
minor change, declare registrar final
if interval is not 1s, convert to seconds
if period is not 1s, convert to seconds