
carosellini.rJava.REngine.0.9-7.source-code.REXPRaw Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of REngine Show documentation
Show all versions of REngine Show documentation
Rserve is a TCP/IP server which allows other programs to use facilities of R (see www.r-project.org) from various languages without the need to initialize R or link against R library. Every connection has a separate workspace and working directory. Client-side implementations are available for popular languages such as C/C++, PHP and Java. Rserve supports remote connection, authentication and file transfer. Typical use is to integrate R backend for computation of statstical models, plots etc. in other applications.
The newest version!
package org.rosuda.REngine;
/** REXPRaw represents a raw vector in R - essentially a sequence of bytes. */
public class REXPRaw extends REXPVector {
private byte[] payload;
/** create a new raw vector with the specified payload
* @param load payload of the raw vector */
public REXPRaw(byte[] load) {
super();
payload=(load==null)?new byte[0]:load;
}
/** create a new raw vector with the specified payload and attributes
* @param load payload of the raw vector
* @param attr attributes for the resulting R object */
public REXPRaw(byte[] load, REXPList attr) {
super(attr);
payload=(load==null)?new byte[0]:load;
}
public int length() { return payload.length; }
public boolean isRaw() { return true; }
public byte[] asBytes() { return payload; }
public Object asNativeJavaObject() {
return payload;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy