/*
 * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
 * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 *
 * $Id: StringBeanTextStreamEncoder.java 70531 2013-03-10 14:38:04Z djiao $
 */
package com.sun.ts.tests.websocket.common.stringbean;

import java.io.IOException;
import java.io.Writer;
import javax.websocket.EncodeException;
import javax.websocket.Encoder.TextStream;
import javax.websocket.EndpointConfig;

public class StringBeanTextStreamEncoder implements TextStream<StringBean> {

    @Override
    public void init(EndpointConfig config) {
    }

    @Override
    public void encode(StringBean bean, Writer writer) throws EncodeException,
            IOException {
        writer.append(bean.get());
    }

    @Override
    public void destroy() {
    }
}
