|
Hi!
In T5 API, Is there any File Handling and Buffer Handling classes...........? charith |
|
What are you trying to do? If it's just normal reading / writing of
files, check out the FileUtils class in Commons IO: http://commons.apache.org/io/api-1.4/org/apache/commons/io/FileUtils.html For input and output streams, http://commons.apache.org/io/api-1.4/org/apache/commons/io/IOUtils.html If you need to return a file from tapestry, you need to change the return type of your method to http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry5/StreamResponse.html and you can stream whatever you like. On Sun, Aug 29, 2010 at 5:19 AM, Charith Madusanka <[hidden email]> wrote: > Hi! > > In T5 API, Is there any File Handling and Buffer Handling > classes...........? > > charith > --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
|
Hi Donny,
I want to do randomly access a file and I was already use java.io.RandomAccessFile class . I'm looking T5 class ....... I think your comment help to me. On Sun, Aug 29, 2010 at 6:02 PM, Donny Nadolny <[hidden email]>wrote: > What are you trying to do? If it's just normal reading / writing of > files, check out the FileUtils class in Commons IO: > http://commons.apache.org/io/api-1.4/org/apache/commons/io/FileUtils.html > For input and output streams, > http://commons.apache.org/io/api-1.4/org/apache/commons/io/IOUtils.html > > If you need to return a file from tapestry, you need to change the > return type of your method to > > http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry5/StreamResponse.html > and you can stream whatever you like. > > On Sun, Aug 29, 2010 at 5:19 AM, Charith Madusanka > <[hidden email]> wrote: > > Hi! > > > > In T5 API, Is there any File Handling and Buffer Handling > > classes...........? > > > > charith > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [hidden email] > For additional commands, e-mail: [hidden email] > > |
|
On Sun, 29 Aug 2010 11:22:03 -0300, Charith Madusanka
<[hidden email]> wrote: > Hi Donny, Hi! > I want to do randomly access a file and I was already use > java.io.RandomAccessFile class . I'm looking T5 class ....... I think > your comment help to me. Why do you need random access in a file for? Tapestry-Core is a web framework and Tapestry-IoC is an IoC container, so they ave no need to provide this kind of feature. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
|
Hi Thiago!
> Why do you need random access in a file for? Tapestry-Core is a web > framework and Tapestry-IoC is an IoC container, so they ave no need to > provide this kind of feature. I want to render pdf file to images. I'm working with https://pdf-renderer.dev.java.net/ library therefore I need File Handling and Buffer Handling classes in T5 API. charith |
|
On Tue, 31 Aug 2010 23:02:06 -0300, Charith Madusanka
<[hidden email]> wrote: > Hi Thiago! Hi, Charith! > I want to render pdf file to images. I'm working with > https://pdf-renderer.dev.java.net/ library therefore I need File Handling > and Buffer Handling classes in T5 API. You don't really need file handling nor buffer handling classes in Tapestry: just use the Java ones. Anyway, you don't need to worry with files nor buffering in your component: handle files in memory only. Make your component receive the PDF file to be rendered as an InputStream. Most probably the PDF renderer already buffers input. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
|
Hi Thiago!
> You don't really need file handling nor buffer handling classes in > Tapestry: just use the Java ones. Anyway, you don't need to worry with files > nor buffering in your component: handle files in memory only. Make your > component receive the PDF file to be rendered as an InputStream. Most > probably the PDF renderer already buffers input. Thank your comment. http://download.oracle.com/javase/1.5.0/docs/api/java/io/InputStream.html using this class is ok? charith |
|
On Wed, 01 Sep 2010 10:04:42 -0300, Charith Madusanka
<[hidden email]> wrote: > Hi Thiago! Hi! > Thank your comment. > http://download.oracle.com/javase/1.5.0/docs/api/java/io/InputStream.html > using this class is ok? Yes. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
|
Hi Thiago!,
I also use java.awt.Rectangle, java.awt.image.BufferedImage packages for my code ... is it ok? charith On Wed, Sep 1, 2010 at 6:36 PM, Thiago H. de Paula Figueiredo < [hidden email]> wrote: > On Wed, 01 Sep 2010 10:04:42 -0300, Charith Madusanka < > [hidden email]> wrote: > > Hi Thiago! >> > > Hi! > > > Thank your comment. >> http://download.oracle.com/javase/1.5.0/docs/api/java/io/InputStream.htmlusing this class is ok? >> > > Yes. > > > -- > Thiago H. de Paula Figueiredo > Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, > and instructor > Owner, Ars Machina Tecnologia da Informação Ltda. > http://www.arsmachina.com.br > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [hidden email] > For additional commands, e-mail: [hidden email] > > |
|
On Thu, 02 Sep 2010 00:35:18 -0300, Charith Madusanka
<[hidden email]> wrote: > Hi Thiago!, Hi! > I also use java.awt.Rectangle, java.awt.image.BufferedImage packages > for my code ... is it ok? As long as you're dealing with images, it is ok. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
|
In reply to this post by Charith Madusanka
You may need/want to add a -Djava.awt.headless=true to your startup, too.
mrg On Wed, Sep 1, 2010 at 11:35 PM, Charith Madusanka <[hidden email]> wrote: > Hi Thiago!, > > I also use java.awt.Rectangle, java.awt.image.BufferedImage packages for my > code ... is it ok? > > charith > > On Wed, Sep 1, 2010 at 6:36 PM, Thiago H. de Paula Figueiredo < > [hidden email]> wrote: > >> On Wed, 01 Sep 2010 10:04:42 -0300, Charith Madusanka < >> [hidden email]> wrote: >> >> Hi Thiago! >>> >> >> Hi! >> >> >> Thank your comment. >>> http://download.oracle.com/javase/1.5.0/docs/api/java/io/InputStream.htmlusing this class is ok? >>> >> >> Yes. >> >> >> -- >> Thiago H. de Paula Figueiredo >> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, >> and instructor >> Owner, Ars Machina Tecnologia da Informação Ltda. >> http://www.arsmachina.com.br >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [hidden email] >> For additional commands, e-mail: [hidden email] >> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
| Powered by Nabble | Edit this page |
