Find Jobs
Hire Freelancers

A Java Preferences for larger amounts of data

$10-30 USD

Completed
Posted about 10 years ago

$10-30 USD

Paid on delivery
After two days of hacking around with the Java Preferences, I have come to the conclusion that Preferences were never meant to store large amounts of data. It seems to me that this is an important sub-problem. One of the people who has addressed the problem is David Croft. His code, which uses properties, is still unable to serialize large amounts of data, for reasons I cannot fathom. [login to view URL] shows his file example. The simplest example I can use to break his code appears below. We are interested in a java program that enables the storing of larger amounts of data in file preferences (perhaps 0.5Mb or so). Thanks! - D public static void main(String[] args) throws BackingStoreException { Preferences p = getPreferences([login to view URL]); for (String s : [login to view URL]()) { [login to view URL]("p[" + s + "]=" + [login to view URL](s, null)); } StringBuffer sb = new StringBuffer(); for (int i=0; i < 1<<11; i++){ [login to view URL](" "+i); } [login to view URL]("hi", true); [login to view URL]("Number", [login to view URL]([login to view URL]())); [login to view URL]("large string",[login to view URL]()); } public static Preferences getPreferences(Object c) { [login to view URL]("[login to view URL]", [login to view URL]()); File preferenceDir = [login to view URL](); [login to view URL]("preferenceDir:"+preferenceDir); File preferenceFile = new File(preferenceDir,"[login to view URL]"); [login to view URL](SYSTEM_PROPERTY_FILE, [login to view URL]()); [login to view URL]("storing preferences in:"+preferenceFile); return [login to view URL]([login to view URL]()); }
Project ID: 5268561

About the project

7 proposals
Remote project
Active 10 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
Hi, I am able to generate the preferences file with the large string. It's size comes around 9.04 KB and file on disk comes around 12 KB. I am keen to work on this project. Please let me know, any thing missed. I am not able to send the generated preferences file. Regards Rupa
$30 USD in 1 day
5.0 (17 reviews)
4.6
4.6
7 freelancers are bidding on average $49 USD for this job
User Avatar
Hi ! I am a JAva /JEE Developer with 7 years experience. I took a look at your problem and it seems that the only way to do it is to create your own AbstractPreferences and make it override the one provided in JDK. Because AbstractPreferences contains a final constant named MAX_VALUE_LENGTH and set to 8*1024. and since it's final it cannot be changed. So as I told you the only way is to create your own class with the same methods and changing just the value of this constant. The second hack is to make jdk use you class instead of the one by default in the jdk.
$35 USD in 3 days
5.0 (2 reviews)
2.8
2.8
User Avatar
Dear Sir, We claim to get it done perfectly for you EXACTLY in the way you want it - Kindly give we a chance and we will prove myself - Ready to prove our words, let's get it done right away and I mean RIGHT AWAY !! Looking forward to hear from you soon - GOD Bless You.
$74 USD in 1 day
5.0 (2 reviews)
2.7
2.7
User Avatar
I am experienced java developer. I would be able to implement this. I used java-pref at work place to hold data. This will be pretty interesting to work on.
$55 USD in 7 days
0.0 (0 reviews)
0.0
0.0
User Avatar
Hello This sounds like an interesting problem. I would like to work on it; I'm assuming that I would not use a single file as Mr. Croft did. Here is some background on me. I've been an Object Oriented software developer and a development lead for over sixteen years. For the past thirteen years, I've focused on the Java/JEE platform using technologies and frameworks such as HTML, JSP, Servlets, JavaScript, Spring JDBC, CXF, and Spring MVC. In my day job, I build JEE web applications and web services (SOAP or REST). Those assets run in a variety of application servers/web servers such as WebSphere and Tomcat and connect to relational databases such as PostGreSQL and DB2. Additionally, I have subject matter expertise on tools (Maven, Jenkins, Checkstyle, Selenium Web Driver, etc.) and practices (TDD, BDD, etc.) which facilitate writing great code quickly. I have a B.S. degree in mathematics and I've completed half of the requirements for an M.S. in mathematics. I hated to bid so high, but even at $75.00, my hourly wage will be very low. Thank you for considering my bid. Patrick
$83 USD in 5 days
0.0 (0 reviews)
0.0
0.0
User Avatar
hi buddy, i have 2 years of experience in teaching and development of java.i have created projects like paint app, hotel management system, sales monitoring system, etc. i am ready to fulfill your requirement. so, for any details feel free to contact me on chat. Thanks & Regards!
$35 USD in 3 days
0.0 (0 reviews)
0.0
0.0
User Avatar
Hi, I am Saravanan. I have 6+ years of exp on Webdevelopment using Java, Struts, Spring, Hibernate, JPA, SOAP/Rest webservices, JSP, JSF, SQL/PLSQL. Eclipse, Tomcat, Weblogic, Jboss, Java script,HTML,XML,Jquery, AngularJS, Bootstarp, MySQL, Oracle, SQL Server, Selenium, Firbug, JXL Juit. I am willing to work on this project as I have similar exp. Please contact me further discussion. My skype id: mailmebysaro
$30 USD in 1 day
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
Milford, United States
4.9
38
Payment method verified
Member since May 25, 2012

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.