Examples of readFully()


Examples of org.apache.poi.poifs.filesystem.DocumentInputStream.readFully()

                   } catch (FileNotFoundException ioe) {
                     contentsEntry = (DocumentEntry)dir.getEntry("Contents");
                   }
                   DocumentInputStream inp = new DocumentInputStream(contentsEntry);
                   byte[] contents = new byte[contentsEntry.getSize()];
                   inp.readFully(contents);
                   embedded = TikaInputStream.get(contents);
                  
                   // Try to work out what it is
                   MediaType mediaType = getDetector().detect(embedded, new Metadata());
                   String extension = type.getExtension();
View Full Code Here

Examples of org.apache.poi.poifs.storage.DataInputBlock.readFully()

    DataInputBlock currentBlock = getDataInputBlock(offset);
   
    int blockAvailable = currentBlock.available();
    if (blockAvailable > len) {
      currentBlock.readFully(buffer, 0, len);
      return;
    }
    // else read big amount in chunks
    int remaining = len;
    int writePos = 0;
View Full Code Here

Examples of org.apache.tools.ant.filters.util.ChainReaderHelper.readFully()

            crh.setPrimaryReader(instream);
            crh.setFilterChains(filterChains);
            crh.setProject(getProject());
            instream = crh.getAssembledReader();

            String text = crh.readFully(instream);

            if (text != null && text.length() != 0) {
                if (!text.endsWith("\n")) {
                    text = text + "\n";
                }
View Full Code Here

Examples of org.archive.wayback.replay.HTMLPage.readFully()

    Map<String,String> headers = HttpHeaderOperation.processHeaders(resource, result, uriConverter, this);

    // Load content into an HTML page, and resolve load-time URLs:
    HTMLPage page = new HTMLPage(resource,result,uriConverter);
    page.readFully();
   
    if(serverSideRendering) {
      page.resolveAllPageUrls();
    } else {
      page.resolvePageUrls();
View Full Code Here

Examples of org.broad.igv.util.stream.IGVSeekableBufferedStream.readFully()

                reader = new LittleEndianInputStream(bufferedStream);
                int nBytes = reader.readInt();

                byte[] compressedBytes = new byte[nBytes];
                bufferedStream.readFully(compressedBytes);

                byte[] bytes = compressionUtils.decompress(compressedBytes);

                ByteArrayInputStream bis = new ByteArrayInputStream(bytes);
                reader = new LittleEndianInputStream(bis);
View Full Code Here

Examples of org.elasticsearch.common.io.stream.StreamInput.readFully()

            assertEquals(pbr.get(i), b);
        }
        si.reset();

        // bulk-read all
        si.readFully(targetBuf);
        assertArrayEquals(pbr.toBytes(), targetBuf);

        // continuing to read should now fail with EOFException
        try {
            si.readByte();
View Full Code Here

Examples of org.exoplatform.services.jcr.dataflow.serialization.ObjectReader.readFully()

         ow.writeLong(or.readLong());
         ow.writeLong(or.readLong());
         ow.writeLong(or.readLong());
         ow.writeString(or.readString());
         ow.writeString(or.readString());
         or.readFully(buf);
         ow.write(buf);
      }

      in.close();
      out.flush();
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.dataflow.serialization.ObjectReaderImpl.readFully()

         ow.writeLong(or.readLong());
         ow.writeLong(or.readLong());
         ow.writeLong(or.readLong());
         ow.writeString(or.readString());
         ow.writeString(or.readString());
         or.readFully(buf);
         ow.write(buf);
      }

      in.close();
      out.flush();
View Full Code Here

Examples of org.fusesource.hawtbuf.DataByteArrayInputStream.readFully()

                        Buffer header = new Buffer(512);
                        mappedFileFactory.getMemoryMappedFile().read(0, header);
                        DataByteArrayInputStream his = new DataByteArrayInputStream(header);

                        Buffer magic = new Buffer(HAWT_DB_PAGE_FILE_MAGIC.length());
                        his.readFully(magic.data, magic.offset, magic.length());
                        if( !magic.ascii().equals(HAWT_DB_PAGE_FILE_MAGIC)) {
                            throw new IOPagingException("File's magic does not match expected value");
                        }
                        freePageExtent = his.readInt();
                        headerSize = his.readInt();
View Full Code Here

Examples of org.h2.store.DataReader.readFully()

            } else if (x == PageLog.UNDO) {
                int pageId = in.readVarInt();
                int size = in.readVarInt();
                byte[] data = new byte[pageSize];
                if (size == 0) {
                    in.readFully(data, 0, pageSize);
                } else if (size == 1) {
                    // empty
                } else {
                    byte[] compressBuffer = new byte[size];
                    in.readFully(compressBuffer, 0, size);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.