How to store data in JavaCard
Hi folks,
I have a basic question. I want to store data in Java card of each transaction in a log file. Each record contains some information. I'm wondering how to create this kind of file on java card and update log file for each new transaction.
Suppose that I want to store about 1000 maximal records in my log file (1000 transactions). From your experience working with Java card, could you please suggest me the way to do this task.
Thank you very much in advance.
Best regards,
JDL
I spent a little time searching over the internet and I read this document:
http://www.informatik.uni-augsburg.de/lehrstuehle/swt/se/teaching/fruehere_semester/ws0708/javacard/Dokumentation/JCADG.pdf
I try to explore whether my Java card support javacardx.framework package or not but unfortunately, it doesn't support this package. It means that I must build my own class to manage EF files.
Another try over the internet, I found a very useful example dealing with managing Cyclic file on Javacard. At the moment, I'm on the way designing and coding my own class and hope that it will work :-)
http://jcs.mobile-utopia.com/servlet/Source?type=s&q=CyclicFile
Thank you anyway your response, it would be helpful :-)
Best regards,
JDL
P.S. Jason Gosling, as far as I see, our names are totally different :-)
Similar Messages
-
How to store data (in tdm files)
I'm looking for advice on how to store data in tdm/tdx files.
The main challenge is like this: At regular time intervals there is new data available (say every 10 minutes there are 10 minutes of new data available). All data is time based. So every ten minutes I may create a new tdm/tdx file containing this data segment. However, when i want to analyze the data i dont necessarily want to view 10 minutes of data from all channels, but maybe 20 hours of data from one particular channel.
The way I've achieved this so far is to manually load each 10 minute segment of this particular channel and then add these parts together. This is both time consuming and cumbersome. Is there a better way to do this that I've simply not discovered yet? Is there a better way to store data to simplify this process?
One solution is of course to save data from several 10-minute frames in one file, but seeing as there is a never ending supply of data i cant simply save all data in one giant file, it has to be split up at some point, and the problem will still remain.
One factor to have in mind here is that this is rather large amounts of data (maybe 10GB each day), so the option to simply load all the data into memory goes out the window rather quickly.
Feel free to ask if I've not made myself very clearHi salte,
If your test ever ended, and if you had LabVIEW 8.20 or higher, I would recommend using a TDMS file, which handles data appeands flawlessly. DIAdem 10.1 now also does data reduction and index windowing during file loading for TDM / TDMS / DataPlugin files, so that you could easily load out only the part of the file you wanted to look at. But since you describe your data acquisition as never stopping and amassing 10 GB per day, I agree that it would be impractical to use only 1 data file. So we are stuck with some number of files which each contain a part of your measurement. This approach can have advantages, since you can save operational properties for each "buffer" such as average value, dominant frequency, ambient room temperature, etc., and later on you can use the DataFinder to query out only the data buffers which meet specific conditions based on these properties. The problem remains to load and assemble data based on multiple files. This is an old problem in DIAdem, and one for which I have an efficient and I hope satisfactory workaround application. It does what you describe already doing in the minimum amount of time and with the minimum amount of user interaction, and it can be highly parametrized to suit your particular situation. The ideal way to start the application would be as part of a ResultsList custom menu. This would enable you to query out the buffers you wanted, highlight those rows in the ResultsList, right-click and choose your custom menu, and WHAM! the selected buffers for your queried channel(s) are automatically appended together in the DataPortal. Launching from a ResultsList custom menu would mean that you could skip the file dialog and just read out the data sources directly from the ResultsList selection.
Let me know what you think,
Brad Turpin
DIAdem Product Support Engineer
National Instruments
Attachments:
Importing Data from Multiple DataPlugin Files.zip 198 KB -
What is a cube? how we store data in that? how we fetch data from cube?
Hi,
What is a cube? how we store data in that? how we fetch data from cube?
Regards.
venkat>
venkey B wrote:
> Hi,
>
>
> What is a cube? how we store data in that? how we fetch data from cube?
>
>
> Regards.
>
> venkat
Hi Venkat,
I guess you mean an infocube from the SAP BI product. I propose to look at the forum for Business Intelligence to find your answers.
E.g. SAP POS DM writes the sales data in infocubes..... -
How to store data from textfile to vector and delete a selected row.
Can someone teach me how to store data from textfile to vector and delete a selected row. And after deleting, i want to write the changes in my textfile.
Do someone has an idea? :)nemesisjava wrote:
Can someone teach me how to store data from textfile to vector and delete a selected row. And after deleting, i want to write the changes in my textfile.
Do someone has an idea? :)What's the problem? What have you done so far? What failed?
What you described should be pretty easy to do. -
How to store data in ipad from computer
please explain me how to store data (music video & pictures) in ipad from any personal computer...kindly explain me in simple steps...
The iPad can only sync with one computer. To do this you need to have iTunes installed on the computer and have it associated with your Apple ID. you can then use iTunes to transfer music, movies and pictures from that computer, and that computer only.
iOS: Syncing your data with iTunes
http://support.apple.com/kb/ht1386
If you need to get files from other computers, you would need a 3rd party App that can handle the formats you wish to transfer, and possibly transfer them either through iTunes file sharing or Wifi transfer depending on what the App supports.
iOS: About File Sharing
http://support.apple.com/kb/ht4094 -
What is the diff bet. LDAP & Data base?
How LDAP stores data?LDAP uses a hierarchical tree structure. This is why LDAP queries are formed like ldap://mydomain.com/...
-
How to store data,key,cert,... in javacard
I'm newbie in javacard
I develop it by use RMI model
I develop to similar EMV specification but don't exactly
EMV spec told me that data element such as KEY, CERT,COUNTER,ExpirationDate,...anything. will be keep in file , with tree structure.
above is not importance
I try to understand: How to save file into javacard?
I read a lot of help and manual from sdk , this website ,forum
and I feel it's impossible to save file (such as text file *.txt, photo file *.jpeg,*.gif) into javacard directly,
Is my understand correct?
I try to understand PhotoCardApplet Demo that come with sdk
run it , have fun with it, try to understand code
I saw the demo bring the pictures file from reader-side save into card to the "Object" of byte[]
Is there just only one way to keep KEY,CERT,..DATA in Object in the applet?
Can it possible to seperate these data away from applet and keep it individual? ( seperate applet , text file ,photo file ,... keep in javacard)
And if it possible plz tell me how to do it with detailed.
thx for every answer.EMV spec told me that data element such as KEY,
CERT,COUNTER,ExpirationDate,...anything. will be
keep in file , with tree structure.That is the file-system part of an EMV smart card. That has nothing (directly) to do with java cards. Most java cards has a file system part, too but that isn't accessible from within the java card applet.
I try to understand PhotoCardApplet Demo that come
with sdk
run it , have fun with it, try to understand code
I saw the demo bring the pictures file from
reader-side save into card to the "Object" of
byte[]
Is there just only one way to keep KEY,CERT,..DATA
in Object in the applet?
Can it possible to seperate these data away from
applet and keep it individual? ( seperate applet ,
text file ,photo file ,... keep in javacard)
No, loading data into the memory which belongs to your java card applet instance makes the data become a part of the applet. If you delete the applet all stored data will be deleted, too.
You can only separate different objects within your applet by using separate byte-arrays or other java card objects.
Jan -
How to store data in hashmap so that it can be used by different methods.
Hello,
I have an ADF/JSF application and the database is DRM. The program gets data from DRM into this hashmap. Program needs this data frequently. Getting this HashMap is very resource intensive due to a lot of data it has.
I want to get the data in HashMap once ( I can do this - no problem). But where/how do I keep it so that different methods can just use this and not make individual trips to DRM? It may be a very basic java question but I seem to be stuck :)
I am not very concerned about the HashMap part, it can be any collection - the question is of storing it so that it can be used over and over.
Thanks,User,
If I understand you correctly, you have a JSF application that needs to store data in a HashMap such that it can be accessed over and over? You could put the hashmap into an appropriately-scoped managed bean and access it from there. I'm not sure what a "DRM" is (a digital rights management database, perhaps, in which case it's a "database"), so there is something special about a "DRM" that we need to know, please share.
John -
How to store data in chinese from oracle and show it to jsp?
hi, please help.
i have design a jsp page for registeration of a website in chinese,
but after the user have enter the chinses data throught the jsp~
the jsp have shown some monster code~
it can't show the valid date in chinese!!! how can i fix it????
when i select data from SQL PLUS, monster code is showed. how to show the chinese data in the oracle.
i am using tomcat 5.0 ~servlet 2.2 and oracle 9i for database~~
thx thx thx~~~~~pls help me!!The how to at following url shows how to store, retrieve and display characters of different languages from Oracle database onto a JSP page.
http://otn.oracle.com/sample_code/tech/java/codesnippet/jdbc/nls/Globalization.html
HTH
Chandar -
How to store data from Host.vi in cRIO-9074
TejasKumar Patel
I implemented a advance Measurement and Control system using cRIO-9074
with c-Series I/O cards( NI 9217, 9411, 9264)
I have some questions about it,
(1)- Data rate from FPGA targate to host vi is too low. how can I increase
it, when I run my host VI, sometimes all temperature sensor update at
same time and sometimes one by one, can you please give me some hint, how
can I correct it, I used two FIFOs for NI-9411 digital pulses, I put all
Digital input and all analog output and input in a seperate while loop in
FPGA targate VI.
(2)- I have to write that data to analyse for further result. I tried all
possible way to write data including wite to spreadsheet.vi, write to
text.vi, Data storage.vi, Write to measurement.vi. All this VI work
efficientlywhen it run individualy, But when I connect this VI to
writedata from FPGA host VI. than it always give empty file.
I saw your post in NI discussion forum about how to write data from
Host.vi, But still I am confuse that how can I creat a protocol between
host VI and Fpga target vi. to write the data in a file. I have nearabout
38 channel to write data.
(3)- I have to measure time difference between two digital pulses, to find
a flow rate. I am using counter for it with risisng edge shot.vi, but when
i get a timestemp when there is risisng edge for the second rising edge
how can I get timestemp. Its like i have to measure time between two
pulses, I triend waveform measurement.vi to find cycle period. but it not
worked. any other was to measure it.
I am stuck in this question since from last one month. I already followed
NI-discussion forum solution but it doesnt work. I think the way I applied
is may be wrong.
Looking forward to hear from you soon.
Plese send an additional email copy to [email protected]
Thank you and Best Regards,Thanks Joseph for your support,
1- If I count the ticks between the pulses it always seems different ….because this method I already tried, but it does not work, like some times it shows 9099 tick and at the second pulse it shows like some more or less ticks not the same ticks every time. To complete my project, the biggest problem is the data storage.
2- As you gives the solution in NI forum, “low level file I/O Vis such as Write to text file” FPGA target not support this VI. And mainly I want to write data from HOST.vi, because I am process those data …and I need to store it. For to figure out my result.
3- If I use “Write to text file. VI (Sub-VI ) to FPGA.vi, it not support because it support string data and I have FIXpoint data. And can you explain me what is low level file IO, and how can I use in fpga.vi??
4- Yes, for my project time stamp it really necessary, for data analysis.
5- I need the time stamp to find out what was the system response at the time. As our project based on weather temperature, I need time stamp.
Waiting for your reply,
Thanks and Regards,
Patel -
How to store data in class?
I have a problem urgent to slove...anybody pro can help me?
I use a method in main program type a input data and pass to the class, than when i call another method in main program print out the data which retrive form class...than all data print out become null. what is my problem? can i know how i store all my input data in class permanence and how can i retrive the data and use by main program method anytime when i needed...?skydestinyz wrote:
I have a problem urgent to slove...anybody pro can help me?
I use a method in main program type a input data and pass to the class, than when i call another method in main program print out the data which retrive form class...than all data print out become null. what is my problem? You have a bug.
can i know how i store all my input data in class permanence and how can i retrive the data and use by main program method anytime when i needed...?Use a database. Or write data to a file. -
How to store date in database , taking cre of timezone
Hello java users
I have a user interface in which a user can pick a date, time and timezone.
Implemented simply.
start Date as a textbox: format - MM/dd/yyyy
start time as a textbox : format - HH/mm/ss
start timezone as a drop down. And currently there is only 3 values here: PST,EST,CST. As this is what we support.
I am using MSSQL and my date field column ( startdate ) is of type datetime.
Now how will I pass the correct value to the database.
Some more details.
I have a bean i which I am able to retrieve all the values.
public class MyBean implements serializable{
private Date startDate;
private Date startTime;
private String timezone; // this will store the timezone id selected by the user.
//getters and setters
Now, how will I combine all the values selected by the user and set in the bean and save it in the database.
I am sure there are a lot of times someone has tried to do this. But I am having a hard time finding this info in a collective manner.
Any help would be usefull
Thanks
AayushIts does help.
And yes it is requirement to get the date and time and the timezone info from the user through a UI.
And date is in format : MM/dd/yyyy
time is in format : HH:mm:ss
and there are 3 timezones : PST,EST,CST (And yes these are valid timezone ids).
I guess, the other way to put this is that - The user input is the way to get the StartTime data.
And ya it makes sense to have separate fields in the database to store date and timezone.
I am fairly new on this date part and its confusing me a little.
So I will go into a little more details.
As u suggested that it would be a good idea to have 3 separate fields for doing this.
you mean to have 3 fields in the database with columns like
1. startDate - datetime // to store the start date ( MM/dd/yyyy)
2. startTime - datetime // to store the start time ( HH:mm:ss). Is it possible to store only time in the database or are you suggesting to combine date and time in one database field.
3. startTimeZone - varchar // to store time zone.
So how do I achieve this.
lets say I get these values;
String startDate = "09/06/2008";
String startTime = "11:10:12";
String startTimeZone = EST;
now how will I store it in the database.
consider I have a java bean
public class StartTimeBean{
private Date startDate ;
private Date startTime ;
private String startTimeZone;
also I am using a OR mapping tool ( ibatis )
And I have my insert statement mapped to the bean StartTime.
Essentially what I am looking for a say method say , createTime(StartTimeBean startTimeBean )
so how will I store the info in the database -
How to store data in the text line by line?
when i write the data into *.txt, the data I wrote before is deleted.
how can wrote the data into the txt following the existing data?
how to write data line by line? many thanks!
my code is like:
private String text = "i am yanbo du, i am a boy.";
public BufferWriteMultiKey( ) {
try {
StringTokenizer st = new StringTokenizer(text, " ,.");
File fil =new File("f.txt");
//FileWriter fw = new FileWriter(fil);
//BufferedWriter bw= new BufferedWriter(fw);
DataOutputStream out = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(fil)));
while(st.hasMoreTokens())
String s = st.nextToken();
//bw.newLine();
out.writeChars(s);
out.writeChars("\n");
out.close();use a random access file and append text at the end.
read the file in line by line using a BufferedReader and store each line in a List of Strings, of course.
% -
How to store data for an account individually
hi there, may i know how do u store data for an account individually.
let's say i have an application for all users. but i do have a log in module since i have a module where users can enter thier own information into the system like appoinments. since every account( owned by user) has different details, may i know how to design such system?
mus i store data in the local system instead of the database?
thanx in advancelet's say i have an application for all users. but i
do have a log in module since i have a module where
users can enter thier own information into the system
like appoinments. since every account( owned by user)
has different details, may i know how to design such
system?
mus i store data in the local system instead of the
database?You can store all the information in the database you want and you can also retrieve it where ever and however you want.
Exactly how to do it depends on exactly what you want to do, so plz explain alittle bit more on what do you intend to do. :)
Gul -
How to store data from a complex query and only fresh hourly or daily?
We have a report which runs quite slow (1-2 minutes) because the query is quite complicate, so we would like to run this query daily only and store in a table so for those procedures that need to use this complex query as a subquery, can just join to this table directly to get results.
However, I am not sure what kind of object I should use to store data for this complex query. Is data in global temp table only persist within transaction? I need something that can persist the data and be access by procedures.
Any suggestions are welcome,
CheersThank you for your reply. I looked at the materialized view earlier on, but have some difficulties to use it. So I have some questions here:
1.The complex query is not a sum or aggregate functions, it just need to get data from different tables based on different conditions, in this case is it still appropriate to use meterialized view?
2.If it is, I created one, but how to use it in my procedure? From the articles I read, it seems I can't just query from this view directly. So do I need to keep the complex query in my procedure and how the procedure will use the meterialized view instead?
3. I also put the complex query in a normal view, then create a materialized view for this normal view (I expect the data from the complex query will be cache here), then in the procedure I just select * from my_NormalView, but it takes the same time to run even when I set the QUERY_REWRITE_ENABLED to true in the alter session. So I am not sure what else I need to do to make sure the procedure use the materialized view instead of the normal view. Can I query from the Materialized View directly?
Below in the code I copied from one of the article to create the materialized view based on my normal view:
CREATE MATERIALIZED VIEW HK3ControlDB.MW_RIRating
PCTFREE 5 PCTUSED 60
TABLESPACE "USERS"
STORAGE (INITIAL 50K NEXT 50K)
USING INDEX STORAGE (INITIAL 25K NEXT 25K)
REFRESH START WITH ROUND(SYSDATE + 1) + 11/24
NEXT NEXT_DAY(TRUNC(SYSDATE), 'MONDAY') + 15/24
enable query rewrite
AS SELECT * FROM HK3ControlDB.VW_RIRating;
Cheers
Maybe you are looking for
-
Entry in contact list does not show up when you try to edit the list in v4
When clicking the "To" box for a new message I have as the last entry a name in bold that is not something I recognize and when going into my contact list so as to remove it, it does NOT show up. How do I get rid of it? IE: find it so as to delete it
-
Why won't my g5 turn on it is like there is no electricity getting to it
my mac was on and than 2 hrs later it was not and it won't turn on with the on off button it is like it is not getting electricity
-
Why isnt the youtube page loading on my mac?
I try going on the youtube website, but the whole page wont load, its just a huge blank.
-
IPad not backed up icon will not remove from screen
iPad not backed up icon will not remove from screen
-
QT movies: sometimes anamorphic; sometimes squished
I have just been looking at several of the QT movies in my Final Cut Express Capture Scratch. All are exactly as they came from my PAL camera when captured. When they are played directly in QT Player (I have QT 7.1.3) without any editing, some displa