Code example for BufferedWriter

Methods: flush, write

0
        return mHeader.getHeaderNames();
    } 
 
    public void writeTo(OutputStream out) throws IOException, MessagingException {
 
        BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(out), 1024);
        mHeader.writeTo(out);
        writer.write("\r\n");
        writer.flush();
        if (mBody != null) {
            mBody.writeTo(out);
        } 
    } 
 
    public InputStream getInputStream() throws MessagingException {
        return null; 
    } 
 
    @Override 
    public void setEncoding(String encoding) throws MessagingException {
        if (mBody != null) {