Displaying 20 results from an estimated 20 matches for "getoutputstream".
2004 Apr 21
2
calling R from java
Hello,
I need to call R from a java(swing) application. I manage to do it with
something like :
Process p = Runtime.getRuntime().exec("R --slave")
OutputStreanWriter o = new OutputStreamWriter(p.getOutputStream())
o.wrote("...")
... etc
but at the end no .Rdata file has been created and there are some data I
don't want to reload each time (for time execution reasons).
So,
Is it possible when calling R from java to create a .Rdata file to save
data and as a consequence when recalling in the...
2009 Jul 29
2
[LLVMdev] Question on llc output stream
In llc's GetOutputStream we have this:
raw_fd_ostream *FDOut = new raw_fd_ostream(OutputFilename.c_str(),
/*Binary=*/true, Force, error);
Why is Binary set true here? We don't know yet whether this is going to be an
AsmFile or a MachOFile.
Setting Binary=true cause...
2010 May 06
1
Encoding a wave file with a bad header
...wavFormat.getChannels(),
-1, // frame size
-1, // frame rate
false); // little endian
AudioInputStream spx = AudioSystem.getAudioInputStream(speexFormat, ais);
AudioSystem.write(spx, SpeexFileFormatType.SPEEX, getOutputStream());
I then use speex C library to decompress on the receiving end. In one case where audio comes from a certain source (headers are properly formed) the compression/decompression works but in another case where wave audio comes from a different source (different sample rate and zeroes in the size...
2013 Jan 07
0
[LLVMdev] How to output a .S *and* a .OBJ file?
...TargetMachine::CGFT_ObjectFile
*/
TargetMachine::CodeGenFileType FileType_S = TargetMachine::CGFT_AssemblyFile;
TargetMachine::CodeGenFileType FileType_OBJ = TargetMachine::CGFT_ObjectFile;
//if ( DoCompileObj ) {
//} else if ( DoCompileS ) {
OwningPtr<tool_output_file> Out_S(GetOutputStream(FileType_S, TheTarget->getName(), TheTriple->getOS(), "BasicParser.exe"));
if ( !Out_S) {
printf( "Error creating output file\n" );
return false;
}
OwningPtr<tool_output_file> Out_OBJ(GetOutputStream(FileType_OBJ, TheTarget->getName(), TheTriple->ge...
2011 Aug 31
2
[LLVMdev] How to place call(s) to functions found in other llvm modules ???
...--------------------------------------
And here is the source code of my example.
----------------------------------------------------------------------
Module* makeLLVMModule(LLVMContext& Context);
Module* makeMainModule(LLVMContext& Context, Module &inMod);
static tool_output_file *GetOutputStream(const char *FileName)
{
std::string error;
tool_output_file *FDOut = new tool_output_file(FileName, error,
raw_fd_ostream::F_Binary);
if (!error.empty()) {
errs() << error << '\n';
delete FDOut;
return 0;
}
return FDOut;
}
int main(int argc, cha...
2005 Aug 16
4
Image from bytes streams
...------------------------------------------------------------------------------------------------------------------
Process p = Runtime.getRuntime().exec("C:/Arquivos de
programas/R/rw1090/bin/Rterm.exe --no-save");
DataOutputStream output = new DataOutputStream(new
BufferedOutputStream(p.getOutputStream()));
DataInputStream input = new DataInputStream(new
BufferedInputStream(p.getInputStream()));
// output.writeBytes("pie(c(50,30,20))"); //Pie graphic
output.writeBytes("plot(1,1)"); // Plot graphic
output.flush();
input.readFully(new byte[200]); // Here I read the "imag...
2016 May 21
1
Using an MCStreamer Directly to produce an object file?
...std::unique_ptr<MCSubtargetInfo>
STI(TheTarget->createMCSubtargetInfo(TripleName, MCPU, FeaturesStr));
OK, that seems, OK. Now I want to setup an output buffer:
std::string ofile("/home/users/avose/hpcgp/hpcgp_rundir/tmp.o");
std::unique_ptr<tool_output_file> Out = GetOutputStream(ofile);
if (!Out) {
return 1;
}
std::unique_ptr<buffer_ostream> BOS;
raw_pwrite_stream *OS = &Out->os();
if (!Out->os().supportsSeeking()) {
BOS = make_unique<buffer_ostream>(Out->os());
OS = BOS.get();
}
This also seems to do OK. Now I would thin...
2009 Jul 29
0
[LLVMdev] Question on llc output stream
On Jul 29, 2009, at 8:09 AM, David Greene wrote:
> In llc's GetOutputStream we have this:
>
> raw_fd_ostream *FDOut = new raw_fd_ostream(OutputFilename.c_str(),
> /*Binary=*/true,
> Force, error);
>
> Why is Binary set true here? We don't know yet whether this is
> going to be an
> AsmFile or...
1999 Oct 06
1
Java interface to R
I have been doing some programming with java servlets for data
collection.
I was wondering if there is a way to connect to the R-server using java
to do data analysis. A java-interface or some connection class.
I think there is some similar facility with SAS, although I have not
looked at it.
Richard Piper
RNS Hospital,
Sydney.
2003 Nov 12
1
Talk with from Java
...lp");
BufferedReader in = new BufferedReader(new
InputStreamReader(process.getInputStream()));
BufferedReader reader = new BufferedReader(new
java.io.InputStreamReader(System.in));
BufferedWriter out = new BufferedWriter(new
OutputStreamWriter(process.getOutputStream()));
String s=null;
String c=null;
while(true) {
try {
while ((s=in.readLine())!=null) {
System.out.println(s);
}
/* The big problem is: it seems like R doesn't come out...
2002 Nov 14
0
[Bug 436] New: SSH client API
...lient,
so it could be used from other programs.
Java-stype pseudo code:
// create connections and forward ports
SSHClient ssh = new SSHClient();
ssh.setUserAuthenticationHandler(new PasswordDialog());
ssh.setHostAuthenticationHandler(this);
SSHSocket con = ssh.connect("127.0.0.1");
con.getOutputStream().write("hello".getBytes());
ssh.localForward(80, "www.google.com", 80);
ssh.remoteForward(80, "www.google.com", 80);
// access configuration
SSHConfiguration sshConfig = ssh.getConfiguration();
SSHHostConfiguration hc = sshConfig.getHostConfiguration("*.ssh.box&...
2004 Apr 22
0
calling R from java[Scanned]
...imag.fr> writes:
>
> > Hello,
> >
> > I need to call R from a java(swing) application. I manage to do it with
> > something like :
> >
> > Process p = Runtime.getRuntime().exec("R --slave")
> > OutputStreanWriter o = new OutputStreamWriter(p.getOutputStream())
> > o.wrote("...")
> > ... etc
> >
> > but at the end no .Rdata file has been created and there are some data I
> > don't want to reload each time (for time execution reasons).
> > So,
> > Is it possible when calling R from java to create a...
2000 May 10
1
R and Java ? [forwarded]
...S-Word
Any help would be greatly appreciated.
The code for the above is:
Runtime rt = Runtime.getRuntime();
String strCmdTmp ="";
strCmdTmp = "Z:\\R\\rw1000\\bin\\Rgui ";
Process jproc= rt.exec(strCmdTmp);
OutputStreamWriter o = new OutputStreamWriter(jproc.getOutputStream());
o.write("a<-c(4,5)\n");
o.write("mean(a)\n");
o.write("quit(\"no\")\n");
o.flush();
String line=null;
BufferedReader reader = new BufferedReader(new
InputStreamReader(jproc.getInputStream()));
while((line = reader.readLine())!=null)
Syste...
2004 Aug 06
0
Lost ogg sync using jspeex
...FIED);
SpeexPlayer speexPlayer = new SpeexPlayer(pout);
//Speex2PcmAudioInputStream speex2pcm=new Speex2PcmAudioInputStream(pin, audioFormat,AudioSystem.NOT_SPECIFIED);
//Socket clientSocket = serverSocket.accept();
//ObjectOutputStream toClient = new ObjectOutputStream(clientSocket.getOutputStream());
//BufferedReader fromClient = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));
targetDataLine.open(audioFormat,8000);
targetDataLine.start();
//sourceDataLine.open(audioFormat,44100);
//sourceDataLine.start();
double ratio=bufferlength/framelength;...
2004 Aug 06
0
Lost ogg sync using jspeex
...FIED);
SpeexPlayer speexPlayer = new SpeexPlayer(pout);
//Speex2PcmAudioInputStream speex2pcm=new Speex2PcmAudioInputStream(pin, audioFormat,AudioSystem.NOT_SPECIFIED);
//Socket clientSocket = serverSocket.accept();
//ObjectOutputStream toClient = new ObjectOutputStream(clientSocket.getOutputStream());
//BufferedReader fromClient = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));
targetDataLine.open(audioFormat,8000);
targetDataLine.start();
//sourceDataLine.open(audioFormat,44100);
//sourceDataLine.start();
double ratio=bufferlength/framelength;...
2008 Oct 31
2
Problem of running R console from Java on linux box
Hi the list:
I can not create R process from Java application with my linux box,
the process never was created, or just terminated immediately after I
called Runtime.getRuntime().exec(...)
The command lines I have tried are(the paths are all correct):
"/bin/sh /usr/bin/R"
"/bin/sh -c /usr/bin/R"
"/usr/lib/R/bin/exec/R"(also set R_HOME=/usr/lib/R)
I
2004 Aug 06
0
Please Help, Lost ogg sync using jspeex
...new SpeexPlayer(pout);<BR> //Speex2PcmAudioInputStream speex2pcm=new Speex2PcmAudioInputStream(pin, audioFormat,AudioSystem.NOT_SPECIFIED);<BR> <BR> //Socket clientSocket = serverSocket.accept();<BR> //ObjectOutputStream toClient = new ObjectOutputStream(clientSocket.getOutputStream());<BR> //BufferedReader fromClient = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));<BR> targetDataLine.open(audioFormat,8000);<BR> targetDataLine.start();<BR> //sourceDataLine.open(audioFormat,44100);<BR> //sourceDataLine.start();&...
2011 Apr 16
3
calling dovecot exported auth from Java
As far as I have been able to figure out, dovecot auth always works over
a Unix domain socket. I believe it is not currently possible to operate
dovecot auth over an Internet domain (TCP) socket. Am I correct?
I want to call dovecot's exported authentication from a Java
application. Java doesn't natively know how to talk to a Unix domain
socket, so there are inconveniences. There
2016 May 23
0
Using an MCStreamer Directly to produce an object file?
2004 Aug 06
3
q about jspeex
Hi Marc,
thanks for the quick reply.
Marc Gimpel wrote:
> It would appear the the 'pcm2speex.read(frame, 0, frame.length)' is
> blocking which means that it is waiting for data from the underlying
> inputstream (i.e.AudioInputStream(t.input)). If it could read
> sufficient data it would transcode it. If it recieved an EOF, it
> should do some zero padding and then