1 package org.rosuda.REngine;
3 /** REXPRaw represents a raw vector in R - essentially a sequence of bytes. */
4 public class REXPRaw extends REXPVector {
5 private byte[] payload;
7 /** create a new raw vector with the specified payload
8 * @param load payload of the raw vector */
9 public REXPRaw(byte[] load) {
11 payload=(load==null)?new byte[0]:load;
14 /** create a new raw vector with the specified payload and attributes
15 * @param load payload of the raw vector
16 * @param attr attributes for the resulting R object */
17 public REXPRaw(byte[] load, REXPList attr) {
19 payload=(load==null)?new byte[0]:load;
22 public int length() { return payload.length; }
24 public boolean isRaw() { return true; }
26 public byte[] asBytes() { return payload; }
28 public Object asNativeJavaObject() {