Package xbird.util.io

Examples of xbird.util.io.FastBufferedInputStream


        return oldValue;
    }

    public static PropertyMap load(File file) throws IOException {
        FileInputStream fis = new FileInputStream(file);
        FastBufferedInputStream bis = new FastBufferedInputStream(fis, 4096);
        DataInputStream dis = new DataInputStream(bis);

        final int totalEntries = dis.readInt();
        final int duplicateEntries = dis.readInt();
        ConcurrentMap<String, String> entries = new ConcurrentHashMap<String, String>((totalEntries >>> 1) * 3); // totalSize * 3/2       
View Full Code Here


        try {
            remoteIs = _proxy.fetch(_fetchSize);
        } catch (RemoteException e) {
            throw new XQRemoteException(e);
        }
        final FastBufferedInputStream bufferedIs = new FastBufferedInputStream(remoteIs);
        final int fetched = fetchInternal(bufferedIs);
        return fetched;
    }
View Full Code Here

        try {
            remoteIs = _proxy.asyncFetch(_fetchSize);
        } catch (RemoteException e) {
            throw new XQRemoteException(e);
        }
        final FastBufferedInputStream bufferedIs = new FastBufferedInputStream(remoteIs);
        final ObjectInputStream ois;
        try {
            ois = new ObjectInputStream(bufferedIs);
        } catch (IOException e) {
            throw new IllegalStateException(e);
View Full Code Here

        try {
            fis = new FileInputStream(cacheFile);
        } catch (FileNotFoundException e) {
            throw new IllegalStateException(e);
        }
        final FastBufferedInputStream bis = new FastBufferedInputStream(fis);
        Object obj = ObjectUtils.readObjectQuietly(bis);
        return (Map<MutableString, Long>) obj;
    }
View Full Code Here

        }
    }

    public void loadDocument(InputStream is) throws XQueryException {
        if(!(is instanceof FastBufferedInputStream)) {
            is = new FastBufferedInputStream(is);
        }
        _handler.init();
        final StopWatch sw = new StopWatch();
        try {
            _reader.parse(new InputSource(is));
View Full Code Here

                try {
                    fis = new FileInputStream(file);
                } catch (FileNotFoundException e) {
                    throw new IllegalStateException();
                }
                final FastBufferedInputStream bis = new FastBufferedInputStream(fis, 4096);
                this.recordMap = ObjectUtils.readObjectQuietly(bis);
                IOUtils.closeQuietly(bis);
            } else {
                this.recordMap = new Long2LongOpenHash(cacheSize, 0.7f, 1.9f);
            }
View Full Code Here

        try {
            fis = new FileInputStream(cacheFile);
        } catch (FileNotFoundException e) {
            throw new IllegalStateException(e);
        }
        final FastBufferedInputStream bis = new FastBufferedInputStream(fis);
        Object obj = ObjectUtils.readObject(bis);
        return (Map<MutableString, Long>) obj;
    }
View Full Code Here

        return oldValue;
    }

    public static PropertyMap load(File file) throws IOException {
        FileInputStream fis = new FileInputStream(file);
        FastBufferedInputStream bis = new FastBufferedInputStream(fis, 4096);
        DataInputStream dis = new DataInputStream(bis);

        final int totalEntries = dis.readInt();
        final int duplicateEntries = dis.readInt();
        ConcurrentMap<String, String> entries = new ConcurrentHashMap<String, String>((totalEntries >>> 1) * 3); // totalSize * 3/2       
View Full Code Here

        try {
            remoteIs = _proxy.fetch(_fetchSize);
        } catch (RemoteException e) {
            throw new XQRemoteException(e);
        }
        final FastBufferedInputStream bufferedIs = new FastBufferedInputStream(remoteIs);
        final int fetched = fetchInternal(bufferedIs);
        return fetched;
    }
View Full Code Here

        try {
            remoteIs = _proxy.asyncFetch(_fetchSize);
        } catch (RemoteException e) {
            throw new XQRemoteException(e);
        }
        final FastBufferedInputStream bufferedIs = new FastBufferedInputStream(remoteIs);
        final ObjectInputStream ois;
        try {
            ois = new ObjectInputStream(bufferedIs);
        } catch (IOException e) {
            throw new IllegalStateException(e);
View Full Code Here

TOP

Related Classes of xbird.util.io.FastBufferedInputStream

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.