public void writePrimitiveArray ( Object array , int off , int len ) throws IOException { Class < ? > componentType = array . getClass ( ) . getComponentType ( ) ; if ( componentType == byte . class ) { writeRawBytes ( ( byte [ ] ) array , off , len ) ; } else if ( componentType == char . class ) { writeFCharArr ( ( char [ ] ) array , off , len ) ; } else if ( componentType == short . class ) { writeFShortArr ( ( short [ ] ) array , off , len ) ; } else if ( componentType == int . class ) { writeFIntArr ( ( int [ ] ) array , off , len ) ; } else if ( componentType == double . class ) { writeFDoubleArr ( ( double [ ] ) array , off , len ) ; } else if ( componentType == float . class ) { writeFFloatArr ( ( float [ ] ) array , off , len ) ; } else if ( componentType == long . class ) { writeFLongArr ( ( long [ ] ) array , off , len ) ; } else if ( componentType == boolean . class ) { writeFBooleanArr ( ( boolean [ ] ) array , off , len ) ; } else { throw new RuntimeException ( "expected primitive array" ) ; } }
write prim array no len no tag