public int writeAnnotationsDirectory(AnnotationsDirectory annotationsDirectory){
  int off=data.position();
  writeInt(annotationsDirectory.classAnnotationsOffset);
  writeInt(annotationsDirectory.fieldAnnotations.length);
  writeInt(annotationsDirectory.methodAnnotations.length);
  writeInt(annotationsDirectory.parameterAnnotations.length);
  for (  int[] fieldAnnotation : annotationsDirectory.fieldAnnotations) {
    writeInt(fieldAnnotation[0]);
    writeInt(fieldAnnotation[1]);
  }
  for (  int[] methodAnnotation : annotationsDirectory.methodAnnotations) {
    writeInt(methodAnnotation[0]);
    writeInt(methodAnnotation[1]);
  }
  for (  int[] parameterAnnotation : annotationsDirectory.parameterAnnotations) {
    writeInt(parameterAnnotation[0]);
    writeInt(parameterAnnotation[1]);
  }
  return off;
}

public int writeAnnotationsDirectory ( AnnotationsDirectory annotationsDirectory ) { int off = data . position ( ) ; writeInt ( annotationsDirectory . classAnnotationsOffset ) ; writeInt ( annotationsDirectory . fieldAnnotations . length ) ; writeInt ( annotationsDirectory . methodAnnotations . length ) ; writeInt ( annotationsDirectory . parameterAnnotations . length ) ; for ( int [ ] fieldAnnotation : annotationsDirectory . fieldAnnotations ) { writeInt ( fieldAnnotation [ 0 ] ) ; writeInt ( fieldAnnotation [ 1 ] ) ; } for ( int [ ] methodAnnotation : annotationsDirectory . methodAnnotations ) { writeInt ( methodAnnotation [ 0 ] ) ; writeInt ( methodAnnotation [ 1 ] ) ; } for ( int [ ] parameterAnnotation : annotationsDirectory . parameterAnnotations ) { writeInt ( parameterAnnotation [ 0 ] ) ; writeInt ( parameterAnnotation [ 1 ] ) ; } return off ; }
write annotationdirectory item into current section .
