Package java.io

Examples of java.io.DataInputStream.readBoolean()


     
      switch( command ) {
      case GET_INDEX:
        DataInputStream dis = new DataInputStream( socket.getInputStream() );
        DataOutputStream dos = new DataOutputStream( socket.getOutputStream() );
        boolean randomAccess = dis.readBoolean();
        boolean documentSizes = dis.readBoolean();
       
        if ( index instanceof BitStreamIndex && ! forceRemoteIndex ) {
          BitStreamIndex localIndex = (BitStreamIndex)index;
          if ( randomAccess && localIndex.offsets == null ) {
View Full Code Here


      switch( command ) {
      case GET_INDEX:
        DataInputStream dis = new DataInputStream( socket.getInputStream() );
        DataOutputStream dos = new DataOutputStream( socket.getOutputStream() );
        boolean randomAccess = dis.readBoolean();
        boolean documentSizes = dis.readBoolean();
       
        if ( index instanceof BitStreamIndex && ! forceRemoteIndex ) {
          BitStreamIndex localIndex = (BitStreamIndex)index;
          if ( randomAccess && localIndex.offsets == null ) {
            randomAccess = false;
View Full Code Here

        DataInputStream dis = new DataInputStream(in);

        String fname = IOUtils.readString(dis);
        String dirPath = IOUtils.readString(dis);
        long len = dis.readLong();
        boolean append = dis.readBoolean();
        boolean ackRequired = dis.readBoolean();
        boolean hasAdditionalHeader = dis.readBoolean();
        if(hasAdditionalHeader) {
            readAdditionalHeader(dis, fname, dirPath, len, append, ackRequired);
        }
View Full Code Here

        String fname = IOUtils.readString(dis);
        String dirPath = IOUtils.readString(dis);
        long len = dis.readLong();
        boolean append = dis.readBoolean();
        boolean ackRequired = dis.readBoolean();
        boolean hasAdditionalHeader = dis.readBoolean();
        if(hasAdditionalHeader) {
            readAdditionalHeader(dis, fname, dirPath, len, append, ackRequired);
        }
View Full Code Here

        String fname = IOUtils.readString(dis);
        String dirPath = IOUtils.readString(dis);
        long len = dis.readLong();
        boolean append = dis.readBoolean();
        boolean ackRequired = dis.readBoolean();
        boolean hasAdditionalHeader = dis.readBoolean();
        if(hasAdditionalHeader) {
            readAdditionalHeader(dis, fname, dirPath, len, append, ackRequired);
        }

        final File file;
View Full Code Here

            try {
                DataInputStream din = new DataInputStream(fin);
                long id = din.readLong();
                String sinkName = din.readUTF();
                messageId = Math.max(id, messageId);
                boolean urgent = din.readBoolean();
                String subject = din.readUTF();
                List<Recipient> recipientList = new ArrayList<Recipient>();
                while (true) {
                    int recipientType = din.readInt();
                    if (recipientType == Recipient.EOF) {
View Full Code Here

    public void readStatus() throws IOException, ChecksumFailedException, StorageFormatException {
        byte[] data = new byte[statusLength-parent.checker.checksumLength()];
        parent.preadChecksummed(parent.getOffsetSegmentStatus(segNo), data, 0, data.length);
        DataInputStream dis = new DataInputStream(new ByteArrayInputStream(data));
        if(dis.readInt() != segNo) throw new StorageFormatException("Bad segment number");
        encoded = dis.readBoolean();
        blockChooser.read(dis);
    }

    public long storedStatusLength() {
        return statusLength;
View Full Code Here

            }
            this.fecCodec = FECCodec.getInstance(splitfileType);
            splitfileSingleCryptoAlgorithm = dis.readByte();
            if(!Metadata.isValidSplitfileCryptoAlgorithm(splitfileSingleCryptoAlgorithm))
                throw new StorageFormatException("Invalid splitfile crypto algorithm "+splitfileType);
            if(dis.readBoolean()) {
                splitfileSingleCryptoKey = new byte[32];
                dis.readFully(splitfileSingleCryptoKey);
            } else {
                splitfileSingleCryptoKey = null;
            }
View Full Code Here

            if(offsetOriginalDetails < 0 || offsetOriginalDetails > rafLength)
                throw new StorageFormatException("Invalid offset (original metadata)");
            offsetBasicSettings = dis.readLong();
            if(offsetBasicSettings != basicSettingsOffset)
                throw new StorageFormatException("Invalid basic settings offset (not the same as computed)");
            if(completeViaTruncation != dis.readBoolean())
                throw new StorageFormatException("Complete via truncation flag is wrong");
            int compatMode = dis.readInt();
            if(compatMode < 0 || compatMode > CompatibilityMode.values().length)
                throw new StorageFormatException("Invalid compatibility mode "+compatMode);
            finalMinCompatMode = CompatibilityMode.values()[compatMode];
View Full Code Here

        if(((dataLength + CHKBlock.DATA_LENGTH - 1) / CHKBlock.DATA_LENGTH) != totalDataBlocks)
            throw new StorageFormatException("Data blocks "+totalDataBlocks+" not compatible with size "+dataLength);
        decompressedLength = dis.readLong();
        if(decompressedLength <= 0)
            throw new StorageFormatException("Bogus decompressed length");
        isMetadata = dis.readBoolean();
        short atype = dis.readShort();
        if(atype == -1) {
            archiveType = null;
        } else {
            archiveType = ARCHIVE_TYPE.getArchiveType(atype);
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.