List of usage examples for java.io DataOutput writeBoolean
void writeBoolean(boolean v) throws IOException;
boolean
value to this output stream. From source file:com.netflix.aegisthus.input.AegSplit.java
@Override public void write(DataOutput out) throws IOException { out.writeLong(end);//from w w w. j av a 2 s. co m WritableUtils.writeStringArray(out, hosts); WritableUtils.writeString(out, path.toUri().toString()); out.writeBoolean(compressed); if (compressed) { WritableUtils.writeString(out, compressedPath.toUri().toString()); } out.writeLong(start); WritableUtils.writeEnum(out, type); if (convertors != null) { String[] parts = new String[2]; out.writeInt(convertors.size()); for (Map.Entry<String, AbstractType> e : convertors.entrySet()) { parts[0] = e.getKey(); parts[1] = e.getValue().toString(); WritableUtils.writeStringArray(out, parts); } } else { out.writeInt(0); } }
From source file:com.mobicage.rogerthat.registration.ContentBrandingRegistrationWizard.java
@Override public void writePickle(DataOutput out) throws IOException { T.UI();/*from w w w . j a v a2s. c o m*/ boolean set = mCredentials != null; out.writeBoolean(set); if (set) { out.writeInt(mCredentials.getPickleClassVersion()); mCredentials.writePickle(out); } set = mEmail != null; out.writeBoolean(set); if (set) out.writeUTF(mEmail); out.writeLong(mTimestamp); out.writeUTF(mRegistrationId); out.writeUTF(mInstallationId); out.writeUTF(mDeviceId); }
From source file:com.nearinfinity.blur.mapreduce.BlurTask.java
@Override public void write(DataOutput output) throws IOException { output.writeLong(_maxRecordCount);/* www . j av a 2 s. c o m*/ output.writeInt(_ramBufferSizeMB); output.writeBoolean(_optimize); writeString(output, _indexingType.name()); ByteArrayOutputStream os = new ByteArrayOutputStream(); TIOStreamTransport trans = new TIOStreamTransport(os); TBinaryProtocol protocol = new TBinaryProtocol(trans); try { _tableDescriptor.write(protocol); } catch (TException e) { throw new IOException(e); } os.close(); byte[] bs = os.toByteArray(); output.writeInt(bs.length); output.write(bs); }
From source file:com.cg.mapreduce.fpgrowth.mahout.fpm.TransactionTree.java
@Override public void write(DataOutput out) throws IOException { out.writeBoolean(representedAsList); VIntWritable vInt = new VIntWritable(); VLongWritable vLong = new VLongWritable(); if (representedAsList) { int transactionSetSize = transactionSet.size(); vInt.set(transactionSetSize);//from ww w . ja va2s . c o m vInt.write(out); for (Pair<IntArrayList, Long> transaction : transactionSet) { vLong.set(transaction.getSecond()); vLong.write(out); vInt.set(transaction.getFirst().size()); vInt.write(out); IntArrayList items = transaction.getFirst(); for (int idx = 0; idx < items.size(); idx++) { int item = items.get(idx); vInt.set(item); vInt.write(out); } } } else { vInt.set(nodes); vInt.write(out); for (int i = 0; i < nodes; i++) { vInt.set(attribute[i]); vInt.write(out); vLong.set(nodeCount[i]); vLong.write(out); vInt.set(childCount[i]); vInt.write(out); int max = childCount[i]; for (int j = 0; j < max; j++) { vInt.set(nodeChildren[i][j]); vInt.write(out); } } } }
From source file:com.zjy.mongo.io.MongoUpdateWritable.java
/** * /** {@inheritDoc}/*w w w. ja v a2 s . co m*/ * * @see Writable#write(DataOutput) */ public void write(final DataOutput out) throws IOException { BasicOutputBuffer buf = new BasicOutputBuffer(); enc.set(buf); enc.putObject(query); enc.done(); enc.set(buf); enc.putObject(modifiers); enc.done(); buf.pipe(new DataOutputOutputStreamAdapter(out)); out.writeBoolean(upsert); out.writeBoolean(multiUpdate); }
From source file:com.mobicage.rogerthat.registration.RegistrationWizard2.java
@SuppressWarnings("unchecked") @Override//ww w. j ava2s .c o m public void writePickle(DataOutput out) throws IOException { T.UI(); super.writePickle(out); boolean set = mCredentials != null; out.writeBoolean(set); if (set) { out.writeInt(mCredentials.getPickleClassVersion()); mCredentials.writePickle(out); } set = mEmail != null; out.writeBoolean(set); if (set) out.writeUTF(mEmail); out.writeLong(mTimestamp); out.writeUTF(mRegistrationId); out.writeBoolean(mInGoogleAuthenticationProcess); out.writeUTF(mInstallationId); out.writeUTF(mDeviceId); set = mBeaconRegions != null; out.writeBoolean(set); if (set) out.writeUTF(JSONValue.toJSONString(mBeaconRegions.toJSONMap())); set = mDetectedBeacons != null; out.writeBoolean(set); if (set) { JSONArray db1 = new JSONArray(); for (String db : mDetectedBeacons) { db1.add(db); } out.writeUTF(JSONValue.toJSONString(db1)); } }
From source file:cn.edu.xidian.repace.xml2hbase.filter.TestFilter.java
public void write(final DataOutput out) throws IOException { Bytes.writeByteArray(out, this.columnFamily); Bytes.writeByteArray(out, this.columnQualifier); out.writeUTF(compareOp.name());/*from w w w .ja v a 2 s . c o m*/ HbaseObjectWritable.writeObject(out, comparator, WritableByteArrayComparable.class, null); out.writeBoolean(foundColumn); out.writeBoolean(matchedColumn); out.writeBoolean(filterIfMissing); out.writeBoolean(latestVersionOnly); }
From source file:com.fiorano.openesb.application.aps.InPortInst.java
/** * This method is called to write this object of <code>InPortInst</code> to * the specified output stream object./* w w w .j a v a 2 s. co m*/ * * @param out DataOutput object * @param versionNo Description of the Parameter * @exception IOException if an error occurs while converting data and * writing it to a binary stream. * @since Tifosi2.0 */ public void toStream(DataOutput out, int versionNo) throws IOException { super.toStream(out, versionNo); writeUTF(out, m_strPortName); writeUTF(out, m_strDscription); writeUTF(out, m_strXSD); writeUTF(out, m_strJavaClass); out.writeBoolean(m_bIsSyncRequestType); out.writeBoolean(m_bisDisabled); if (m_params != null && m_params.size() > 0) { int num = m_params.size(); out.writeInt(num); for (int i = 0; i < num; ++i) { Param param = (Param) m_params.elementAt(i); param.toStream(out, versionNo); } } else { out.writeInt(0); } }
From source file:FormatStorage1.IRecord.java
@Override public void write(DataOutput out) throws IOException { out.writeBoolean(this.oldformat); out.writeInt(this.fieldnum); int i = 0;/*from w ww.j av a 2 s .c om*/ while (i++ < fieldnum) { fieldTypes.get(idxs[i - 1]).write(out); } this.persistent(out); }
From source file:com.mapr.hbase.support.objects.MHRegionInfo090x.java
@Override public void write(DataOutput out) throws IOException { super.write(out); Bytes.writeByteArray(out, endKey);/*from ww w.j a va 2s. com*/ out.writeBoolean(offLine); out.writeLong(regionId); Bytes.writeByteArray(out, regionName); out.writeBoolean(split); Bytes.writeByteArray(out, startKey); tableDesc.write(out); out.writeInt(hashCode); }