[brailleblaster] Re: Input and testing for document package

  • From: "John J. Boyer" <john.boyer@xxxxxxxxxxxxxxxxx>
  • To: brailleblaster@xxxxxxxxxxxxx
  • Date: Fri, 11 Jan 2013 06:34:35 -0600

InputStream was suggested because the input might be from a URL or from 
a file in a zipped archive. In these cases it would be necessary to 
create a temporary file for input to liblouisutdml .

John

On Fri, Jan 11, 2013 at 10:22:33AM +0000, Michael Whapples wrote:
> In short you cannot find file path fron InputStream, it may be a stream 
> of bytes from something other than a file.
> 
> If you wish to go more specific then FileInputStream has a method for 
> finding the file descriptor, but then you are tied to files.
> 
> Also it is worth noting the javadocs say that FileInputStream is for 
> reading bytes from a file, if you wish to read characters then use 
> FileReader, see: 
> http://docs.oracle.com/javase/7/docs/api/java/io/FileInputStream.html
> 
> Finally, InputStream is not an interface, it is an abstract class. There 
> are differences between the two: Abstract classes may have 
> implementation code where as interfaces are completely abstract, also 
> classes may implement many interfaces but can only extend a single class 
> (abstract or not). It is important to understand the differences and why 
> one might use one over the other. BrailleBlaster probably could do with 
> using a few interfaces.
> 
> Michael Whapples
> On 11/01/2013 08:35, John J. Boyer wrote:
> >First, as I suspected, There was a conflict between the name of the
> >Document class and the nu.xom.Document class. The compiler gave an eror
> >on the import statement for the latter. I have changed the name of the
> >Document class to DocumentBase .
> >
> >To test the document package, wome input is needed. BrailleBlaster can
> >directly open xml txt and brf files. These are passed through
> >liblouisutdml to have UTDML added. The augmented document then becomes
> >the working document. Could someone get DocumentManager working
> >sufficiently so that a file can be opened and passed to
> >DocumentBase.startDocument ?
> >
> >Keith has suggested that the input to startDocument should be
> >InputStream . However, Inp;utStream is an interface. liblouisutdml
> >requires a file path. How can the transition be made?
> >
> >Thanks,
> >John
> >
> 

-- 
John J. Boyer; President, Chief Software Developer
Abilitiessoft, Inc.
http://www.abilitiessoft.com
Madison, Wisconsin USA
Developing software for people with disabilities


Other related posts: