/** * Actually write file data to an output stream from an editor kit's document. Called during a * file save by {@link #saveDocument}. * * <p>The default implementation just calls {@link EditorKit#write(OutputStream, Document, int, * int) EditorKit.write(...)}. Subclasses could override this to provide support for persistent * guard blocks, for example. * * @param doc the document to write from * @param kit the associated editor kit * @param stream the open stream to write to * @throws IOException if there was a problem writing the file * @throws BadLocationException should not normally be thrown * @see #loadFromStreamToKit */ protected void saveFromKitToStream(StyledDocument doc, EditorKit kit, OutputStream stream) throws IOException, BadLocationException { del.superSaveFromKitToStream(doc, kit, stream); }