private void pad(int padding, DataOutput out) throws IOException {
        //padding
        for (int i = 0; i < padding; i++) {
            out.write('\0');
        }
    }
writes padding data to the output padding times.

@param padding the number of bytes to be written
@param out the output stream
@throws IOException from the output stream
jme3-core/src/plugins/java/com/jme3/texture/plugins/ktx/KTXWriter.java