Added volume to client plus other fixes
[stereo.git] / DAAPLib / src / util / node / PageNode.java
blobbf25177f20905cc055cbd45de08548a90acd06c7
1 package util.node;
3 import java.io.UnsupportedEncodingException;
5 public class PageNode extends Node {
7 private final String contentType;
8 private final byte[] text;
10 public PageNode(String contentType, String text) throws UnsupportedEncodingException {
11 super(0);
12 this.contentType = contentType;
13 this.text = text.getBytes("UTF-8");
16 public String contentType() {
17 return contentType;
20 public int length() {
21 return text.length;
24 public byte[] text() {
25 return text;
28 @Override
29 public int visit(Visitor visitor) {
30 return visitor.visitPageNode(this);