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 Alex Soto <as...@opux.com> on 2004/01/29 06:19:10 UTC
ContentInterceptor.postStoreContent() provides no content data
Hi,
I was playing with ContentInterceptor and trying to access the content
of the revision in postStoreContent(). What I've noticed is that
NodeRevisionContent.getContentBytes() is empty in the postStoreContent()
method, but has data in the preStoreContent() method. Not sure if this
is a bug, but since the javadoc didn't mention this, I thought I'd let
people know.
Alex
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org
Re: ContentInterceptor.postStoreContent() provides no content data
Posted by Daniel Florey <df...@c1-fse.de>.
Am Donnerstag, 29. Januar 2004 06:19 schrieb Alex Soto:
> Hi,
>
> I was playing with ContentInterceptor and trying to access the content
> of the revision in postStoreContent(). What I've noticed is that
> NodeRevisionContent.getContentBytes() is empty in the postStoreContent()
> method, but has data in the preStoreContent() method. Not sure if this
> is a bug, but since the javadoc didn't mention this, I thought I'd let
> people know.
>
> Alex
This is a known problem. The content is accessable via a InputStream, so
after storing the content, the stream is empty. You can access the content in
preStoreContent, but you have to make a copy of the content in a
sophisticated way and set this copy afterwards so that the content still can
be stored.
Try to avoid to copy very large resources into memory, this would limit the
content size to your available memory size.
I'm currently working on events as a replacement for interceptors and I'll try
to give a hint how to workaround this problem in future releases.
Daniel
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org