question: public void writeToStream ( final ByteArrayOutputStream bos ) throws IOException { final ObjectOutput os = new ObjectOutputStream ( bos ) ; os . writeObject ( max_size ) ; for ( int i = 0 ; i < max_size ; i ++ ) { final Rectangle nextObj = items [ i ] ; if ( nextObj == null ) { os . writeObject ( null ) ; } else { final PathIterator pathIterator = nextObj . getPathIterator ( new AffineTransform ( ) ) ; PathSerializer . serializePath ( os , pathIterator ) ; } } }
target:  writes out the shapes in this collection to the ByteArrayOutputStream NOT PART OF API and subject to change (DO NOT USE)