Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Technology Project and PMC » Iproject.setPersistentProperty with binary data
Iproject.setPersistentProperty with binary data [message #586852] Wed, 27 November 2002 23:48
Greg Taylor is currently offline Greg TaylorFriend
Messages: 1
Registered: July 2009
Junior Member
I'm serializing an object and storing the value as a property of a Project:
QualifiedName propName = ...
ByteArrayOutputStream bos = new ByteArrayOutputStream();
ObjectOutputStream out = new ObjectOutputStream (bos);
Vector a = new Vector(0);
out.writeObject(a);
out.flush();
out.close();
stringValue = bos.toString();
int len1 = stringValue.length();
project.setPersistentProperty(propName, stringValue);
String tmp1 = project.getPersistentProperty(propName);
int len2 = tmp1.length();

In the above example len1 = 156, but len2 = 2. The inspector shows
stringValue as:
stringValue="
Previous Topic:Iproject.setPersistentProperty with binary data
Next Topic:run java app from bin dir
Goto Forum:
  


Current Time: Thu Apr 25 22:24:22 GMT 2024

Powered by FUDForum. Page generated in 0.02979 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top