
com.adobe.forms.common.submitutils.CustomServletOutputStream Maven / Gradle / Ivy
/*************************************************************************
*
* ADOBE CONFIDENTIAL
* __________________
*
* Copyright 2014 Adobe Systems Incorporated
* All Rights Reserved.
*
* NOTICE: All information contained herein is, and remains
* the property of Adobe Systems Incorporated and its suppliers,
* if any. The intellectual and technical concepts contained
* herein are proprietary to Adobe Systems Incorporated and its
* suppliers and may be covered by U.S. and Foreign Patents,
* patents in process, and are protected by trade secret or copyright law.
* Dissemination of this information or reproduction of this material
* is strictly forbidden unless prior written permission is obtained
* from Adobe Systems Incorporated.
**************************************************************************/
package com.adobe.forms.common.submitutils;
import javax.servlet.ServletOutputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
/**
* Created with IntelliJ IDEA.
* User: syr
* Date: 1/21/14
* Time: 11:01 PM
* To change this template use File | Settings | File Templates.
*/
public class CustomServletOutputStream extends ServletOutputStream {
private ByteArrayOutputStream copy;
public CustomServletOutputStream() {
this.copy = new ByteArrayOutputStream();
}
@Override
public void write(int b) throws IOException {
copy.write(b);
}
@Override
public void write(byte[] b) throws IOException {
copy.write(b);
}
public byte[] getCopy() {
return copy.toByteArray();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy