You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by Mark Hortman <ma...@jcafeinc.com> on 2002/06/03 23:55:45 UTC

Slide corrupts files

Okay, so it probably isn't slide, probably me, but....

 

I am Using slidestore.reference.FileContentStore and have a routine that
copies in files via 

 

BufferedReader bufRead

               = new BufferedReader(new FileReader(file));

   NodeRevisionContent nrc = new NodeRevisionContent();

   nrc.setContent(bufRead);  

   NodeRevisionDescriptors revs =

                                    m_nat.getContentHelper().retrieve(token,
resourcePath);

 

    NodeRevisionNumber revisionNumber = revs.getLatestRevision();    

  NodeRevisionDescriptor rev = new
NodeRevisionDescriptor(nrc.getContentBytes().length);

  m_nat.getContentHelper().create(token, resourcePath, rev, nrc );

 

This seems to work most of the time, but I am noticing that When this
routine is called by an import

Function that is trying to upload like 10-100 files, it seems to corrupt the
jpgs and flash files.

It always gets the content length correct, it just seems to randomly change
some bits in the file at random intervals.

Any thoughts, or has anyone else seen this.

 

I was seeing this on my import routine, until I added the BufferedWrite, and
then it cleared right up.