Thanks Bob, that works great. I didn't know that the filename could be null
if the reader is supplied.
I doubt anyone cares about the details, but if so see
https://github.com/biojava/biojava/pull/570
-Spencer
On Mon, Aug 29, 2016 at 3:15 PM, Robert Hanson wrote:
>
> You
You can now just use
viewer.openReader("filename", reader)
where reader is one of byte[] or BufferedInputStream or Reader
I'm not catching how Jmol is fitting in there in terms of loading an MMTF
file. How does that reading fit into BioJava's writing?
Bob
On Sun, Aug 28, 2016 at 3:48 PM,
I have a method writeToOutputStream(Structure structure, OutputStream
outputStream) that does the mmtf writing. I have flexibility in what type
of OutputStream to use. The byte[] is accessible using a
ByteArrayOutputStream. If it makes more sense to pass an input stream, I
guess this should be
Spencer, I've simplified that in what I am releasing today. You can use a
byte[] or BufferedInputStream to introduce mmtf files.
/**
* Opens the file and creates the model set, given the reader.
*
* not used in Jmol
*
* @param fullPathName full path name or null
* @param
The call you will need to make is to this, in org.jmol.viewer.Viewer:
public String loadModelFromFile(String fullPathName, String fileName,
String[] fileNames, Object reader,
boolean isAppend,
It would be totally inconvenient to treat the byte[] mmtf data as String
data.
You can cache the binary data as a byte array and then pass a cache://
protocol.
Way better would be to pass the data as a buffered stream, but I don't
think that is set up in Jmol.
You have the data in what form? Full
6 matches
Mail list logo