Content of text file

Dear All,

I have Notepad file in BO Repository.

Is there any posibility to copy the content of the same using BO SDK. Becasue we need to pass it other application.

Thanks,
Swamy


bvrswamy :india: (BOB member since 2006-06-18)

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;
	}
}

BoB LoblaW :us: (BOB member since 2007-10-23)

Thanks a ton!!! :lol:


bvrswamy :india: (BOB member since 2006-06-18)