Package java.io

Examples of java.io.DataOutput.writeByte()


                    } else {
                        output.write(ptr.get(), ptr.getOffset(), ptr.getLength());
                    }
                }
                if (!indexColumnType.isFixedWidth()) {
                    output.writeByte(QueryConstants.SEPARATOR_BYTE);
                }
            }
            int length = stream.size();
            int minLength = length - maxTrailingNulls;
            byte[] indexRowKey = stream.getBuffer();
View Full Code Here


                LOG.info("sync connected to " + socket.getInetAddress().getHostAddress() + " port " + socket.getLocalPort());

                CRC32 crc32 = new CRC32();
                DataOutput output = new DataOutputStream(new CheckedOutputStream(socket.getOutputStream(), crc32));
                DataInput input = new DataInputStream(socket.getInputStream());
                output.writeByte(INIT);
                long logId = input.readLong();
                do {
                    long nextLogId = logId + 1;
                    File file = Util.logFile(nextLogId);
                    if (file.exists() && server.getLogger().isWritten(nextLogId)) {
View Full Code Here

                    long nextLogId = logId + 1;
                    File file = Util.logFile(nextLogId);
                    if (file.exists() && server.getLogger().isWritten(nextLogId)) {
                        logId++;

                        output.writeByte(RECOVERY_LOG);
                        crc32.reset();
                        output.writeLong(logId);

                        LOG.info("sending recovery file: " + file.getName());
                        BufferedInputStream fileInput = new BufferedInputStream(new FileInputStream(file));
View Full Code Here

                if (!sizePrefixDisabled) {
                    bytesOut.restart();
                    looseOut = bytesOut;
                }

                looseOut.writeByte(type);
                dsm.looseMarshal(this, c, looseOut);

                if (!sizePrefixDisabled) {
                    ByteSequence sequence = bytesOut.toByteSequence();
                    dataOut.writeInt(sequence.getLength());
View Full Code Here

            dataRowKeySchema.iterator(rowKeyPtr, ptr, dataPosOffset);
            if (isMultiTenant) {
                dataRowKeySchema.next(ptr, dataPosOffset, maxRowKeyOffset);
                output.write(ptr.get(), ptr.getOffset(), ptr.getLength());
                if (!dataRowKeySchema.getField(dataPosOffset).getDataType().isFixedWidth()) {
                    output.writeByte(QueryConstants.SEPARATOR_BYTE);
                }
                dataPosOffset++;
            }
            if (viewIndexId != null) {
                output.write(viewIndexId);
View Full Code Here

                    } else {
                        output.write(ptr.get(), ptr.getOffset(), ptr.getLength());
                    }
                }
                if (!indexColumnType.isFixedWidth()) {
                    output.writeByte(QueryConstants.SEPARATOR_BYTE);
                }
            }
            int length = stream.size();
            int minLength = length - maxTrailingNulls;
            byte[] indexRowKey = stream.getBuffer();
View Full Code Here

            }
            if (isMultiTenant) {
                indexRowKeySchema.next(ptr, indexPosOffset, maxRowKeyOffset);
                output.write(ptr.get(), ptr.getOffset(), ptr.getLength());
                if (!dataRowKeySchema.getField(dataPosOffset).getDataType().isFixedWidth()) {
                    output.writeByte(QueryConstants.SEPARATOR_BYTE);
                }
                indexPosOffset++;
                dataPosOffset++;
            }
            indexPosOffset = (!isLocalIndex && nIndexSaltBuckets > 0 ? 1 : 0) + (isMultiTenant ? 1 : 0) + (viewIndexId == null ? 0 : 1);
View Full Code Here

                            }
                        }
                    }
                }
                if (!dataRowKeySchema.getField(i).getDataType().isFixedWidth() && ((i+1) !=  dataRowKeySchema.getFieldCount())) {
                    output.writeByte(QueryConstants.SEPARATOR_BYTE);
                }
            }
            int length = stream.size();
            int minLength = length - maxTrailingNulls;
            byte[] dataRowKey = stream.getBuffer();
View Full Code Here

        @Override
        public void write(RevCommit commit, OutputStream out) throws IOException {
            DataOutput data = new DataOutputStream(out);
            FormatCommonV1.writeHeader(data, "commit");
            data.writeByte(COMMIT_TREE_REF);
            data.write(commit.getTreeId().getRawValue());
            for (ObjectId pId : commit.getParentIds()) {
                data.writeByte(COMMIT_PARENT_REF);
                data.write(pId.getRawValue());
            }
View Full Code Here

            DataOutput data = new DataOutputStream(out);
            FormatCommonV1.writeHeader(data, "commit");
            data.writeByte(COMMIT_TREE_REF);
            data.write(commit.getTreeId().getRawValue());
            for (ObjectId pId : commit.getParentIds()) {
                data.writeByte(COMMIT_PARENT_REF);
                data.write(pId.getRawValue());
            }
            data.writeByte(COMMIT_AUTHOR_PREFIX);
            FormatCommonV1.writePerson(commit.getAuthor(), data);
            data.writeByte(COMMIT_COMMITTER_PREFIX);
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.