BUG-582: Optimize and correct validateJavaPackage

This removes obsolete set and uses it from Binding. Also does the same
for the package prefix -- this in fact was incorrect a happened to work
because YANG version == 1, same as our binding version. Finally we
optimize the validateJavaPackage() since it is a major CPU hog.

Change-Id: Ib189606cbc78a47681d4eb30174ebc51d82e04bc
Signed-off-by: Robert Varga <rovarga@cisco.com>
BUG-582: reuse SimpleDataTimeUtil

Thisreuses the already-existing thread-local safe formatter, squeezing
extra performance in this path.

Change-Id: I4f57f8f462cd2f1b82c9c2cd312f375461b312b5
Signed-off-by: Robert Varga <rovarga@cisco.com>
BUG-582: Optimize instantiated Splitter

This just turns the string-based splitter into a char-based one, saving
both memory and CPU cycles.

Change-Id: I9c93f23c79a32d662a8d7358ad928c5757359c37
Signed-off-by: Robert Varga <rovarga@cisco.com>
BUG-582: Optimize string modification

This code could potentially end up with a lot of copying around. Pay a
single copy operation, iterate over the character array once and replace
characters as needed.

Change-Id: Ifdb80f83c938fde9c70ec6f34300fd010b01db6a
Signed-off-by: Robert Varga <rovarga@cisco.com>
BUG-582: Use Splitter instead of String.split()

String.split() instantiates a pattern, which in itself is not efficient.
Splitters are a lot more efficient, so let's use one in this codepath.

Change-Id: I896c3e743a6c21041af027f7512e21f5b5533e03
Signed-off-by: Robert Varga <rovarga@cisco.com>
BUG-868: Eliminate StringBufferInputStream

StringBufferInputStream has been deprected since JDK 1.1 -- so let's not
use it.

Change-Id: Ic436c5082e58ced632957b439ef7bca5412cf583
Signed-off-by: Robert Varga <rovarga@cisco.com>