Package nom.tam.util

Examples of nom.tam.util.BufferedFile


        } else {
            // assume FITS format
            FITSImage fitsImage = getFitsImage();
            if (fitsImage != null && _url != null) {
                try {
                    BufferedFile bf = new BufferedFile(tmpFile, "rw");
                    fitsImage.getFits().write(bf);
                    bf.close();

                    // under Windows, this is necessary to avoid an error
                    fitsImage.getFits().getStream().close();
                } catch (Exception e) {
                    DialogUtil.error(e);
View Full Code Here


            //System.out.println("XXX FITSImage: using BufferedFile");
            long headerSize = _header.getSize();
            long offset = _hdu.getFileOffset() + headerSize;
            long size = _hdu.getSize() - headerSize;
            //System.out.println("XXX FITSImage: HDU offset = " + offset + ", size = " + size);
            BufferedFile bufferedFile = (BufferedFile) arrayDataInput;
            FileChannel channel = bufferedFile.getChannel();
            System.gc(); // XXX got out of memory errors here    
            _byteBuffer = channel.map(FileChannel.MapMode.READ_ONLY, offset, size);
            //System.out.println("XXX FITSImage: got byteBuffer");
        } else {
            //System.out.println("XXX FITSImage: no byteBuffer access");
View Full Code Here

TOP

Related Classes of nom.tam.util.BufferedFile

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.