fix bug in OBS.toByteArray()
remove java 6 support for now.