Okay, via a little guestimation, I'd say it's blowing up at:

    private void init(FileChannel channel, FileChannel.MapMode mapMode)
    throws IOException {
        
        this.channel = channel;
        this.mappedByteBuffer = channel.map(mapMode, 0L,
channel.size());
        mappedByteBuffer.load();
    }

Ouch.  Not a lot of wiggle room there.  It's not even waiting for the
.load() call.  Strange.

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer<Cardiff> DisCard = null;
 
 

> -----Original Message-----
> From: LA [mailto:[email protected]] 
> Sent: Thursday, December 02, 2010 9:49 AM
> To: [email protected]
> Subject: Re: [iText-questions] READ LARGE FILE 1.5gb Error
> 
> 
> hi
> here the stack
> 
> 
> java.io.IOException: Map failed
>         at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:758)
>         at 
> com.lowagie.text.pdf.MappedRandomAccessFile.init(Unknown Source)
>         at com.lowagie.text.pdf.MappedRandomAccessFile.<init>(Unknown
> Source)
>         at com.lowagie.text.pdf.RandomAccessFileOrArray.<init>(Unknown
> Source)
>         at com.lowagie.text.pdf.RandomAccessFileOrArray.<init>(Unknown
> Source)
>         at test_pdf.mf_copy.main(mf_copy.java:52)
> Caused by: java.lang.OutOfMemoryError: Map failed
>         at sun.nio.ch.FileChannelImpl.map0(Native Method)
>         at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:755)
> --
> View this message in context: 
> http://itext-general.2136553.n4.nabble.com/READ-LARGE-FILE-1-5
gb-Error-tp3068682p3069808.html
> Sent from the iText - General mailing list archive at Nabble.com.
> 
> --------------------------------------------------------------
> ----------------
> Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
> Tap into the largest installed PC base & get more eyes on 
> your game by optimizing for Intel(R) Graphics Technology. Get 
> started today with the
> Intel(R) Software Partner Program. Five $500 cash prizes are 
> up for grabs.
> http://p.sf.net/sfu/intelisp-dev2dev
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> Many questions posted to this list can (and will) be answered 
> with a reference to the iText book: 
> http://www.itextpdf.com/book/ Please check the keywords list 
> before you ask for examples: http://itextpdf.com/themes/keywords.php
> 
> 

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to