I am writing a code that collects all the credit card information of every buyer and stores it in the file. Format that I am using to store information in a file:
[credit card number] | [User name] | [Street address] | [Zipcode] | @ [Credit card number] | [User name] | [Street address] | [Zipcode] | @ .....
Now, credit card number
, & lt; Username & gt;
, & lt; Street Address & gt; ;
and & lt; Zipcode & gt;
The actual UI fields I capture this information, use the field separator "|" And the record separator "@" is in my code so that I can use it as per fields and records as required, but I have an argument and now I am surprised that this will work, primarily due to the file API in Java. There is no way that allows me to use specific areas in the record even after being a delimitent. I also checked the RandomAccessFile API.
Can someone give me suggestions of this problem in other possible ways?
I want to differentiate between a record and different records so that I can perform tasks such as searching for a user with credit card number = XXX and drawing details. Use either
Use it in line by various means such as or To read with the use, also see. You can call them a list & lt; Data & gt;
, where data is your own square with the fields of the same line, in this way you can access the "various" records after reading the file.
As an alternative, you can store it only in one SQL database, in this way you can easily select the record. Or if it actually needs to be a file, then you can also see using the CSV or XML format. Convenient APIs are available for those formats.
Comments
Post a Comment