on 05-09-2010 2:49 PM
Hi Friends,
We have a requirement wherein we are storing text files in BO server and need to retrieve them using BO SDK and display it in browser. These text files are not generated by BO server but from other system. We just need to store them in BO server and retrieve them using BO java SDK.
We got struck in retrieving the textfile from BO server. Please let us know how we can do this.
Appreciate your help.
Here is some code I used in R2 to read text files (haven't tried it in 3.x). I omitted querying for the text file IInfoObject:
IInfoObject file = ...
IContent optionsFile = (IContent) file;
BufferedReader input = new BufferedReader(new InputStreamReader(optionsFile.getInputStream()));
try{
String line = null;
while((line = input.readLine()) != null){
System.out.println(line);
}
}
catch(IOException e){
System.out.println("There was an error reading the file");
}
finally{
try{
input.close();
}
catch(IOException e){
System.out.println("Could not close optinos file");
input = null;
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.