John,
If you look at the org.dspace.app.mediafilter.MediaFilter Class,
you'll see underneath the hood, that what it passes around are
"Bitstream" objects which can be used to access the bitstream in the
assetstore without actually opening a stream against it.
Look at overriding the following method in MediaFilter, which is
where it is setup to be streamed to the actual concrete instance of
this Abstract parent class, instead you can write in your MediaFilter
code which just accesses the bitstream object the way you need.
/**
* processBitstream is a utility class that calls the above
virtual methods -
* it is unlikely that you will need to override it. It scans
the bitstreams
* in an item, and decides if a bitstream has already been
filtered, and if
* not or if overWrite is set, invokes the filter.
*
* @param c
* context
* @param item
* item containing bitstream to process
* @param source
* source bitstream to process
*
* @return true if new rendition is created, false if rendition
already
* exists and overWrite is not set
*/
public boolean processBitstream(Context c, Item item, Bitstream
source)
throws Exception
Hope you find this helpful,
-Mark
On Jan 23, 2007, at 7:41 AM, John Preston wrote:
Can anybody tell me how I can determine the file name of a
bitstream as stored in the assetstore path. I see that it appears
to use the internal_id from the bitstream table broken down into
directories, but I don't know if this is a reliable way to access
the bitstream on disk. I need this so I don't have to copy the
bitstream to a temporary file to process it with a media filter.
The files I'm processing will be very large (maybe 100MB) so if I
can avoid copying, that would be good.
----------------------------------------------------------------------
---
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to
share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?
page=join.php&p=sourceforge&CID=DEVDEV________________________________
_______________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech
Mark R. Diggory
~~~~~~~~~~~~~
DSpace Systems Manager
MIT Libraries, Systems and Technology Services
Massachusetts Institute of Technology
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech