aspose file tools*
The moose likes Java in General and the fly likes Trying to get data stream from one class to another Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Trying to get data stream from one class to another" Watch "Trying to get data stream from one class to another" New topic
Author

Trying to get data stream from one class to another

Matt Kohanek
Village Idiot
Ranch Hand

Joined: Apr 04, 2009
Posts: 483

I have a class to deserialize data into a stream, here is the method (using SimpleXML btw):



Then I have another class that takes an input stream, and uses it to generate a richfaces tree. I doubt the data stream I get from readXML will yield the correct results, but I have no other clue about what to try, so I at least want to give this a chance. Here is a snippet of that code:



This is sample code I got from a site that takes a data stream that comes froma .properties file to generate the tree nodes. I am just trying to substitute the data stream from readXML for the data stream that is currently coming from the .properties file.

So how can I take the data stream from the readXML class and substitute it into the second bit of code in place of the dataStream variable. Like I said, I doubt this will even compile, but I need some kind of starting point.

Or, if someone can help me write some code that takes elements from the follwoing layout and uses them to populate the tree nodes it would be great.



The tree nodes need to popuate from the <name>, <device>, and <channel> elements. In fact I think I will create a second post just for that in hopes I can get help with it.

edit - my first post as the village idiot!!


True wisdom is in knowing you know nothing - Socrates
Matt Kohanek
Village Idiot
Ranch Hand

Joined: Apr 04, 2009
Posts: 483

edited out - better handled in a PM I believe
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Trying to get data stream from one class to another
 
Similar Threads
need suggestions on how to deal with data iteration problems
java.util.ArrayList is not compatible with class java.lang.String exception (SOLVED)
writing java code that will take data from certian xml <elements> and convert into tree nodes
Problem getting richfaces tree to display
Help extracting text out of a response