Code example for BufferedOutputStream

Methods: close

0
 
    protected AbstractFilePersistenceResource(final ModelNode model, final AbstractConfigurationPersister persister) throws ConfigurationPersistenceException {
        marshalled = new ExposedByteArrayOutputStream(1024 * 8);
        try { 
            try { 
                BufferedOutputStream output = new BufferedOutputStream(marshalled);
                persister.marshallAsXml(model, output);
                output.close();
                marshalled.close();
            } finally { 
                IoUtils.safeClose(marshalled);
            } 
        } catch (Exception e) {
            throw MESSAGES.failedToMarshalConfiguration(e);
        } 
    } 
 
    @Override 
    public void commit() { 
        if (marshalled == null) {