hop-2012/java/hop/SexpBytes.java

35 lines
623 B
Java

/*
* Copyright (c) 2011 Tony Garnock-Jones. All rights reserved.
*/
package hop;
import java.io.IOException;
import java.io.OutputStream;
/**
*/
public class SexpBytes {
public byte[] _bytes;
public SexpBytes(byte[] bytes) {
_bytes = bytes;
}
public byte[] getData() {
return _bytes;
}
public String getDataString() {
return new String(getData());
}
public void writeTo(OutputStream stream) throws IOException {
SexpWriter.writeSimpleString(stream, _bytes);
}
public String toString() {
return SexpWriter.writeString(this);
}
}