public void write(OutputStream out) throws IOException {
  DataOutputStream dataOut=new DataOutputStream(out);
  dataOut.writeShort(pool.size() + 1);
  for (  Entry e : pool) {
    e.write(dataOut);
  }
}

public void write ( OutputStream out ) throws IOException { DataOutputStream dataOut = new DataOutputStream ( out ) ; dataOut . writeShort ( pool . size ( ) + 1 ) ; for ( Entry e : pool ) { e . write ( dataOut ) ; } }
write this constant pool to a stream as part of the class file format . this consists of writing the " constant_pool_count " and " constant_pool [ ] " items of the " classfile " structure , as described in jvms section 4 . 1 .
