Binary Data write?
I'm trying to write out binary data from flash to take a
screen shot. Here's my coldfusion and flash:
Flash post:
var myRequest:URLRequest = new URLRequest
("create.cfm?name=snapshot.jpg");
CF code:
does any one see why this wouldn't work?
Thanks!
How are you writing the binary data from flash? The
coldfusion code is correct given a corrent file path in the cffile
tag.
Similar Messages
-
DAQ vi to perform digital write and read measurements using 32 bits binary data saved in a file
Hi
DAQ vi to perform digital write and read measurements using 32 bits binary data saved in a file
Two main
sections:
1)
Perform
write and read operations to and fro different spread sheet files, such that
each file have a single row of 32bits different binary data (analogous to 1D
array) where the left most bit is the MSB. I don’t want to manually enter the
32 bits binary data, I want the data written or read just by opening a file
name saves with the intended data.
2)
And
by using test patterns implemented using the digital pattern generator or build digital data functions or otherwise, I need to
ensure that the
binary data written to a spreadsheet file or any supported file type
then through the NI-USB 6509 is same as the data read.
I’m aware I can’t use the simulated
device to read data written to any port but if the write part of the vi works I
‘m sure the read part will work on the physical device which I’ll buy later.
My Plan
of action
I’ve
created a basic write/read file task and a write/read DAQ task for NI USB 6509
and both combine in a while loop to form a progress VI which I’m confuse of how
to proceed with the implementation.
My
greatest problem is to link both together with the correct functions or operators
such that there are no syntax/execution errors and thus achieve my intended
result.
This
project is one of my many assignments for my master thesis, so please i’ll
appreciate every help as I’m not really efficient with LabVIEW programming but
I prefer it because is fun and interesting if I get to know it.
Currently I’m
practicing with LabVIEW 8.6/NI DAQmx 8.8 Demo versions and NI USB 6509
simulated device.
Please see
the attached file for my novice progress, thanks in
advance for the support
Rgds
Paul
Attachments:
DIO_write_read DAQ from file.vi 17 KBWhat does your file look like? The DAQmx write is expecting a single U32 value, not an array of I64.
Message Edited by vt92 on 09-16-2009 02:42 PM
"There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal -
Example using setcontenttype to write binary data?
Hi there,
I'm having trouble getting my jsp to read a binary file and send the response to an http client.
I'm not sure what it could be between the getWriter, getOutputStream, setcontenttype, and other methods involved.
Can anyone provide and/or point me to a simple example where a binary file is opened, read, and the contents sent back to a web-browser?
Thanks!First, I would not recommend using JSP, but use servlets instead. If you have any newlines in the page like after <%@ page directives, you are can't write binary data. So you have to make all your page directives and everything have no newlines, making it ugly to read.
Second, use getOutputStream() to write to...
request.setContentType("application/octet-stream"); // or actual file mime type
request.setHeader("Content-Length", theFileSizeInBytes);
request.setHeader("Content-Disposition", "attachment; filename=" + theFileName); // if should do save as
OutputStream os = response.getOutputStream();
... -
How to write binary data to browser - File Save dialog
Hi,
problem:
i have a working webservice and i get binary data from that webservice.
my dynpro java already works and i have byte[] b which has my binary result.
what i want:
when the user clicks on the button, the action onActionGetResult() is executed and inside this method, the byteArray b exists. what can i do, to say the dynpro application that it should send the binary data direct to the browser, so that the "File Save Dialog" appears and the user can save the file to the harddisk
any ideas?I've found the solution:
IWDWindow window = wdComponentAPI.getWindowManager().createNonModalExternalWindow(
res.getUrl(WDFileDownloadBehaviour.ALLOW_SAVE.ordinal()),
res.getResourceName());
window.show();
this worked for me -
Where is the binary data of this icon stored and retrieved from Application server?
Hello guys,
Today I observed one phenomenon and could not explain it per my knowledge.
I have one url which points to an icon in application server:
https://<host name>:44301/sap/public/bc/ur/nw5/themes/sap_corbu/common/libs/Icon/SuccessMessage.gif
I could successfully open it via chrome:
and after that I could see an entry in ICM server cache. Everything works perfectly.
Then I tried to check this icon in mime browser in SE80. To my surprise, the folder /sap/public/bc/ur/nw5/themes is empty.
However, the ICM cache shows that there is a subfolder called "sap_corbu" under "themes" folder. But why I cannot find it in mime browser?
Then I write a report to retrieve the binary data of icon via CL_HTTP_CLIENT, and clear the ICM buffer via tcode SMICM.
I expect this time some database table will be queried to load the content of the icon, since now the buffer is not available.
To my surprise again, in SAT no database table is involved.
So now I am confused: since I have already cleared the ICM server cache, where does the icon binary data come from when I run the report to access the icon?
Best regards,
JerryHello guys,
one colleague today told me that there is a zip file "ur_mimes_nw7.zip" in MIME repository /PUBLIC/BC/UR/ur_mines_nw7.zip. I download it locally and unzip it and indeed find many theme folders including sap_corbu folder and its resource files. So I guess there must be some logic done in web application server which will unzip this archive file and put each theme folder to the corresponding folders in application server. I would assume those logic are done outside ABAP stack side, this is the reason I cannot find any hint of them in ABAP backend via tcode SAT even I clear both client and server side cache.
Best regards,
Jerry -
Download file problem for binary data?
Dear All,
I have wrote a jsp file to do download page. I have used a piece of code from the JDC to this. This code will prompt the download dialog box each time user clicks the download button. The code itself will set the content type for different application. The code is like below:
try
java.io.File fileobj = new java.io.File(strFolder + strFile);
response.setContentType(application.getMimeType(fileobj.getName()));
response.setHeader("Content-Disposition","attachment; filename=\""
+ strFile + "\"");
java.io.FileInputStream in = new java.io.FileInputStream(fileobj);
int ch;
while ((ch = in.read()) != -1) {
out.write(ch);
out.flush();
in.close();
} catch(Exception e)
The code can download and handle text file correctly when it is openned in the text editor or inside the IE. But when a PDF file or Image is downloaded and openned in the PDF viewer or image viewer, it is corrupted and cannot be viewed. What is the problem? Any ideas?
So, I wonder this code can handle binary data or not. It is seen like there is no different code to handle text and binary data in Java/Jsp.
Thank you very much!
Best Regards,
Rockyu Lee
Add following lines to .tld file (custom tag definition)
<tag>
<name>downloadbinary</name>
<tagclass>org.rampally.DownloadBinaryTag</tagclass>
<bodycontent>JSP</bodycontent>
</tag>
Add following line to JSP files.
In JSP, keep one line of source. Make sure that there are no space and additional line feeds at the any where
in the JSP files except JSP tags.
<%@ taglib uri="/WEB-INF/taglibs/mb.tld" prefix="mytags" %>
<mytags:downloadbinary />
I am hoping that you have all required parameters such as fileName to download, etc.
in your session or request object.
Tag class ....
public class DownloadBinaryTag extends TagSupport {
public int doEndTag() throws JspException {
// TODO: get binary data from filename or
// binary data buffer from datase.
// I am making it simple .. assume that it is a request parameter for
// you test easily.
String fileName = request.getParameter( "filename" );
java.io.File file = new java.io.File( fileName);
java.io.DataInputStream dis;
try {
dis = new java.io.DataInputStream(new FileInputStream(fileName));
} catch (FileNotFoundException e) {
// do error handling ...
return EVAL_PAGE;
BinaryUtil.sendBinaryFile( dis, (HttpServletResponse) pageContext.getResponse(), contentType );
return EVAL_PAGE;
public class BinaryUtil
static public void sendBinaryFile( DataInputStream dis,
HttpServletResponse response,
String contentType ) {
try {
response.setContentType(contentType);
String fileName="test.pdf";
response.setHeader("Content-disposition", "inline; filename=" + newFileName );
ServletOutputStream sout = response.getOutputStream();
int len;
byte[] data = new byte[128 * 1024];
while ((len = dis.read(data, 0, 128 * 1024)) >= 0)
sout.write(data, 0, len);
sout.flush();
sout.close();
} catch (Exception e) {
System.out.println(e.getMessage());
static public void sendBinaryFile( byte[] data,
HttpServletResponse response,
String contentType ) {
try {
response.setContentType(contentType);
String fileName="test.pdf";
response.setHeader("Content-disposition", "inline; filename=" + newFileName );
ServletOutputStream sout = response.getOutputStream();
sout.write(data);
sout.flush();
sout.close();
} catch (Exception e) {
System.out.println(e.getMessage());
You may have to change 'inline' to 'attachment' if you do not want IE to inline the document.
That's all!!.. Hope this helps...! -
The first binary file write operation for a new file takes progressively longer.
I have an application in which I am acquiring analog data from multiple
PXI-6031E DAQ boards and then writing that data to FireWire hard disks
over an extended time period (14 days). I am using a PXI-8145RT
controller, a PXI-8252 FireWire interface board and compatible FireWire
hard drive enclosures. When I start acquiring data to an empty
hard disk, creating files on the fly as well as the actual file I/O
operations are both very quick. As the number of files on the
hard drive increases, it begins to take considerably longer to complete
the first write to a new binary file. After the first write,
subsequent writes of the same data size to that same file are very
fast. It is only the first write operation to a new file that
takes progressively longer. To clarify, it currently takes 1 to 2
milliseconds to complete the first binary write of a new file when the
hard drive is almost empty. After writing 32, 150 MByte files,
the first binary write to file 33 takes about 5 seconds! This
behavior is repeatable and continues to get worse as the number of
files increases. I am using the FAT32 file system, required for
the Real-Time controller, and 80GB laptop hard drives. The
system works flawlessly until asked to create a new file and write the
first set of binary data to that file. I am forced to buffer lots
of data from the DAQ boards while the system hangs at this point.
The requirements for this data acquisition system do not allow for a
single data file so I can not simply write to one large file.
Any help or suggestions as to why I am seeing this behavior would be
greatly appreciated.I am experiencing the same problem. Our program periodically monitors data and eventually save it for post-processing. While it's searching for suitable data, it creates one file for every channel (32 in total) and starts streaming data to these files. If it finds data is not suitable, it deletes the files and creates new ones.
On our lab, we tested the program on windows and then on RT and we did not find any problems.
Unfortunately when it was time to install the PXI on field (an electromechanic shovel on a copper mine) and test it, we've come to find that saving was taking to long and the program screwed up. Specifically when creating files (I.E. "New File" function). It could take 5 or more seconds to create a single file.
As you can see, field startup failed and we will have to modify our programs to workaround this problem and return next week to try again, with the additional time and cost involved. Not to talk about the bad image we are giving to our costumer.
I really like labview, but I am particularly upset beacuse of this problem. LV RT is supposed to run as if it was LV win32, with the obvious and expected differences, but a developer can not expect things like this to happen. I remember a few months ago I had another problem: on RT Time/Date function gives a wrong value as your program runs, when using timed loops. Can you expect something like that when evaluating your development platform? Fortunately, we found the problem before giving the system to our costumer and there was a relatively easy workaround. Unfortunately, now we had to hit the wall to find the problem.
On this particular problem I also found that it gets worse when there are more files on the directory. Create a new dir every N hours? I really think that's not a solution. I would not expect this answer from NI.
I would really appreciate someone from NI to give us a technical explanation about why this problem happens and not just "trial and error" "solutions".
By the way, we are using a PXI RT controller with the solid-state drive option.
Thank you.
Daniel R.
Message Edited by Daniel_Chile on 06-29-2006 03:05 PM -
Exception writing binary data to the output stream to client -Broken pipe
Hi,
I am trying to use the drag & drop feature using Contributor mode of Webcenter sites. Single Image Page Attribute is working properly where as Multiple Image Page Attribute throws the following error:
[ERROR] [.kernel.Default (self-tuning)'] [logging.cs.satellite.request] Exception writing binary data to the output stream to client 10.191.117.106
java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at weblogic.servlet.internal.ChunkOutput.writeChunkTransfer(ChunkOutput.java:568)
at weblogic.servlet.internal.ChunkOutput.writeChunks(ChunkOutput.java:539)
at weblogic.servlet.internal.ChunkOutput.flush(ChunkOutput.java:427)
at weblogic.servlet.internal.ChunkOutput$2.checkForFlush(ChunkOutput.java:648)
at weblogic.servlet.internal.ChunkOutput.write(ChunkOutput.java:333)
at weblogic.servlet.internal.ChunkOutputWrapper.write(ChunkOutputWrapper.java:148)
at weblogic.servlet.internal.ServletOutputStreamImpl.write(ServletOutputStreamImpl.java:148)
at COM.FutureTense.Servlet.ServletRequest$OutputOutputStream.write(ServletRequest.java:80)
at COM.FutureTense.Servlet.ServletRequest.write(ServletRequest.java:1633)
at com.openmarket.Satellite.RequestContext.write(RequestContext.java:1123)
at com.openmarket.Satellite.BytePiece.stream(DataPiece.java:253)
at com.openmarket.Satellite.CacheObjectImpl.stream(CacheObjectImpl.java:651)
at com.openmarket.Satellite.Http11Responder.respondForWrapper(Http11Responder.java:142)
at com.openmarket.Satellite.WrapperAwareResponder.respond(WrapperAwareResponder.java:36)
at com.openmarket.Satellite.SatelliteServer.execute(SatelliteServer.java:85)
at com.openmarket.Satellite.servlet.BaseServlet.doGet(BaseServlet.java:118)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at com.fatwire.wem.sso.cas.filter.CASFilter.doFilter(CASFilter.java:557)
at com.fatwire.wem.sso.SSOFilter.doFilter(SSOFilter.java:51)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3730)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
Thanks
KarthiKThank u very much,
FileOutputStream opGif = new FileOutputStream(destFile, false);
I have changed above line with the following line:
PrintWriter opGif = new PrintWriter ( new FileWriter(destFile, false));
and now this code is working very fine.
Thanks once again... -
Storing binary data to a file......
Hi Friends,
I am trying to make a webapp in which users can upload Videos and I can store that videos on the server. I have this bit of code:
public ActionForward execute(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws Exception{
VideoUploadForm myForm = (VideoUploadForm)form;
// Process the FormFile
FormFile myFile = myForm.getTheFile();
byte[] fileData = myFile.getFileData();
}My question is, should i store the byte array into some text file???Then how can i read it back and get the original format i.e *.avi or *.mpg.
This might be easy,but this is my first time dealing with binary data,so your help would be appreciated.
Thanks
P.S: Any links would be appreciatedThanks BalusC,
After lots of hardwork finally I am trying to upload the binary file in the database,but getting this error:
java.sql.SQLException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc, file_blob) values(1, 1, 'uploaded file from user', _binary'\0\0�!\0\0�\' at line 1
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2928)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1571)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1666)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2994)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:936)
at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:773)
at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:168)This is my code thats trying to write that binary file:
public class StoreData {
private static Log log = LogFactory.getLog(StoreData.class);
private static final String INSERT_BLOB = "Insert into videos.files (id, owner_id, desc, file_blob)" +
" values(1, 1, 'uploaded file from user', ?)";
public void WriteData(VideoUploadForm myForm){
log.info("Writing file to database");
Connection conn = ConnectionUtil.getConnection();
PreparedStatement stmt = null;
// Process the FormFile
FormFile myFile = myForm.getTheFile();
byte[] bytes = null;
try{
bytes = myFile.getFileData();
}catch(IOException ie){
log.error("Upload File not Found");
ie.printStackTrace();
InputStream is = new ByteArrayInputStream(bytes);
try {
stmt = conn.prepareStatement(INSERT_BLOB);
stmt.setBinaryStream(1,is,bytes.length);
stmt.execute();
stmt.close();
}catch (Exception e) {
log.error("Error writing data to file:");
e.printStackTrace();
} finally {
ConnectionUtil.closeStatement(stmt);
ConnectionUtil.closeConnection(conn);
}Looking for some help here..... -
Writing binary data to ASP file from applet through URLConnection
Hi Everybody,
I am facing a proble with HttpURLConnection.I want to write some binary data from applet to an ASP file.The other end ASP file read this binary data and process , Here problem is I have opened URLConnection to the page and Created OutputStream and writing byte by Write() method But other end we are not getting bytes...we are not getting error too at java side..can any body help me..do we need to set any property to URLConnection...here I am giving sample code...
OutputStream os;
URL uConnect2;
HttpURLConnection hucConnect2;
uConnect2= new URL("http://webserver/vnc/sendtoserver.asp?"); hucConnect2=(HttpURLConnection)uConnect2.openConnection();
hucConnect2.setDoOutput(true);
hucConnect2.setRequestMethod("POST")
os=new DataOutputStream(hucConnect2.getOutputStream());
os.writeBytes("Hello");
Thanks in Advance
MadhavDo you remember to flush() and close() the stream?
-
Writing binary data to a file without carriage returns every 512 bytes
Is there a VI for writing binary data to a file without carriage returns being inserted every 512 bytes?
ThanksHi Momolxg,
I could be way off on this. I tried to simulate what you've done by
making a for loop that would run a set number of times. For my example I
used 1025. I wired the iteration terminal to a 'Write to SGL File.vi'
outside the loop with indexing enabled. It wrote the SGL data from 0 to
1024 to the file. I then read the file with a 'Read Characters from
File.vi' and searched the output for a carriage return (0D hex). It was
found five times. The reason why was the SGL number it was reading had a
13 (0D hex) in it. Perhaps you're running into a similar problem?
I tried it again, this time using the 'Write to I16 File.vi'. The
carriage return was found five times: the 28th character the first time
then on the 512th character four consecutive time
s after that. I suppose
that makes sense that you'd find a 0D in the numbers at equal spacings if
they're incrementing this way... In this case the carriage returns you're
seeing are actually numbers from your data.
One big difference is that I'm using a set pattern of numbers. This
doesn't appear to be your case. Is there a better way we can duplicate
your problem? It sounds interesting. Again my simulation could be way
off. (I'm also running this on LV60 for Linux so my results could be
different)
- Kevin
In article <[email protected]>,
"momolxg" wrote:
> Is there a VI for writing binary data to a file without carriage returns
> being inserted every 512 bytes? Thanks -
How to convert XML data into binary data (opaque data)
Hi,
I am trying to develop a process that delivers files after reading data from a database.
However, it is required not to deliver the data immediately. We want to perform some checks before the files get written.
So the way we want to design this is,
1. Read data from database (or any other input). The data is in XML format (this is a requirement, as in general, we have xml data)
2. This data is written, opaquely, to a JMS queue that can store binary data, along with what is the filename of the file that would be written (filename is passed using JMS Headers)
3. When required, another process reads the JMS queue's binary data, and dumps into a file
The reason I want to use opaque data while inserting in the JMS queue is, that enables me to develop a single process in Step 3 that can write any file, irrespective of the format.
My questions are
1. How to convert the xml data to opaque data. In BPEL I may use a embedded java, but how about ESB. Any other way....?
2. how to pass filename to the jms queue, when payload is opaque. Can I use a header attribute...custom attributes?
3. Which jms message type is better for this kind of requirement - SYS.AQ$_JMS_BYTES_MESSAGE or SYS.AQ$_JMS_STREAM_MESSAGEAna,
We are doing the same thing--using one variable with the schema as the source of the .xsl and assigning the resulting html to another variable--the content body of the email, in our case. I just posted how we did it here: Re: Using XSLT to generate the email HTML body
Let me know if this helps. -
Adapter development: binary data and adapter specific properties?
Hi,
We have succesfully developed our own SFTP adapter based on the J2SSH Maverick library (http://www.sshtools.com/showMaverick.do) and the sample file adapter that comes with XI.
There are 2 features we would like to implement as well, but lack the necessary documentation and sample code.
<b>1st Binary data</b>
We do not succeed in transporting binary data via our SFTP adapter (both text and xml go fine). While debugging, we see that the binary data are correctly picked up, but the actual payload appearing in message monitoring is much larger. When we write the message to a file again, the data have changed (size has e.g. increased importantly from 127180 bytes to 218198 bytes). According to the sample adapter code, the contenttype "application/octet-stream" should be specified. But the standard XI file adapter itself seems to specify "application/octet-stream".
<b>2nd Adapter specific properties (DynamicConfiguration)</b>
How can we set adapter specific properties in our own adapter code? Where are the Java docs of the API? Is this somewhere documented?
If you would have more information (or pointers), please post it as a response to this message.
Kind regards, Guy Crets
<b>Code snippet:</b>
XIMessageFactoryImpl mf = new XIMessageFactoryImpl();
Message msg = mf.createMessageRecord(fromParty, toParty, fromService, toService, action, actionNS);
msg.setDeliverySemantics(DeliverySemantics.ExactlyOnce);
// In case of XML documents it is not necessary to set the contentType or encoding
// But: take care that the encoding definiton in the XML document corresponds to the encoding used
if (msgText.indexOf("<?xml") != -1)
// Check whether the payload is a XML document. If not, treat it as binary to demonstrate how
// binary main documents work
// First create a XML Payload
XMLPayload xp = null;
xp = msg.createXMLPayload();
xp.setText(msgText);
xp.setName("MainDocument");
xp.setDescription("XI AF Sample Adapter Input: XML document as MainDocument");
msg.setDocument(xp);
// In case of binary documents use the Payload super class methods to fill the XMLPayload object
else
// Check whether the payload is a XML document. If not, treat it as binary to demonstrate how
// binary main documents work
// First create a XML Payload
XMLPayload xp = null;
xp = msg.createXMLPayload();
//xp.setContentType("application/octet-stream");
xp.setContentType("application/xml");
xp.setName("MainDocument");
xp.setDescription("XI AF Sample Adapter Input: Binary as MainDocument");
xp.setContent(msgData);
// Finally set the main document in the message
msg.setDocument(xp);
TRACE.debugT(SIGNATURE, XIAdapterCategories.CONNECT_AF, "Message object created and filled.");
ModuleData md = new ModuleData();
md.setPrincipalData(msg);Hello Moorthy,
I know this part of the documentation.
So I set the indicator within the communication channel.
Now, I have to fill the dynamic configuration during my mapping. My code looks like following:
DynamicConfigurationKey keyURL = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/HTTP", <b>XXXXX</b>);
// access dynamic configuration
DynamicConfiguration conf = (DynamicConfiguration) param.get (StreamTransformationConstants.DYNAMIC_CONFIGURATION);
// set value
conf.put(keyURL, url);
So what has to be filled instead of XXXXX ?
Regards,
Marc -
Loading Labview Binary Data into Matlab
This post explains the Labview binary data format. I couldn't find all of this information in any one place so this ought to help anyone in the future. I didn't want to add any overhead in Labview so I did all of my conversion in Matlab.
The Labview VI "Write to Binary File" writes data to a file in a linear format using Big Endian numbers of the type wired into the "Write to Binary File" VI. The array dimensions are listed before the actual array data.
fid = fopen('BinaryData.bin','r','ieee-be'); % Open the binary file
Dim1 = fread(fid,4); % Reads the first dimension
Dim2 = fread(fid,4); % Reads the second dimension
Dim3 = ...
Each dimension's length is specified by 4 bytes. Each increment of the first, second, third, and fourth byte represent 2^32, 2^16, 2^8, and 1 respectively. 0 0 2 38 equates to 2*256 + 38 = 550 values for that particular dimension.
As long as you know the number of dimensions and precision of your binary data you can load it.
Data = fread(fid,prod([Dim1 Dim2 Dim3]),'double',0,'ieee-be'); % Load double precision data
If you have appended multiple arrays to the same file in Labview you would repeat this procedure. Load each dimension then load the data, repeat.
Data = fread(fid,prod([Dim1 Dim2 Dim3]),'int8',0,'ieee-be'); % Load int8 precision data or boolean data
I had to create a function for my own purposes so I thought I'd share it with everyone else too. I uploaded it to the Matlab File Exchange. The file is named labviewload.m.
This was tested on Matlab R2007a and Labview 8.2.Thanks. I have the same questions as I tried to load labview binary data into Matlab.
-John -
Binary Data Type in finder methods for CMP beans
How to write an equivalent ejb-ql query in ejb-jar.xml for a finder method accepting
a byte array as a parameter. The finder method is for a cmp-field mapped to a
database field with binary data typeUsing CMP 2.x, your custom finder and select methods are implemented by the container based on the EJB QL query you provide in the ejb-jar.xml. In CMP 1.1, there was no portable way to express the semantics of the query, so most vendors had a vendor-specific syntax for describing the query.
See chapter 27 of the J2EE 1.4 Tutorial for some examples of using EJB QL :
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/index.html
--ken
Kenneth Saks
J2EE SDK Team
SUN Microsystems
Maybe you are looking for
-
I bought an ipod2 yesterday and all the photos were from an old computer (that I don't want to synch with) were transferred in the store without synching with it. I was told I could delete any I didn't want later but now find I can't delete any witho
-
I can't burn a disc from Itunes without getting error 4280 repeatedly.
I can't burn a disc from Itunes without getting error 4280 repeatedly. I was just able to burn a CD and now can't burn another. Any thoughts? I know my CD burner works as I just made a disc. I have tried changing file type from Audio to MP3 with no l
-
NVIDIA (0x10de) Duo 2 intel core 1 Core 256 Mb VRAM 32 bit color With the above characteristics, will my computer be able to take 10.6 upgrade online or do i need more memory to support that? Also, what is a good graphics program can be installed on
-
Thunderbolt network access Windows network
First, let me admit that I am brand new to the Mac. I have the new Retina Macbook Pro and like it, but am having real network connectivity problems. First, when connected through wireless, it is unreliable in resolving Windows host names. For examp
-
Big word problems....help please !
it seems the compatibility between mavericks and yosemite when using word is bad.....any word docs i try to work with now have issues after loading up yosemite....i cant page down to move the line of words down, the back button wont delete the space