@Override public <T extends MessageSchema<T>> void readInto(DataOutputBlobWriter<T> writer, int length) { checkLimit(this,length); super.readInto(writer, length); }
inputStream.readInto(outputStream, toCopyLength); DataOutputBlobWriter.closeLowLevelField(outputStream); Pipe.confirmLowLevelWrite(t, size);
peekInputStream.readInto(w,peekInputStream.available());
/** * Reads text from specified field in pipe * @param association field association showing where to read * @return <code>true</code> if data exists, else <code>false</code> */ public boolean readText(Object association, StructuredWriter output) { final long fieldId = Pipe.structRegistry(DataInputBlobReader.getBackingPipe(this.channelReader)).fieldLookupByIdentity(association, DataInputBlobReader.getStructType(this.channelReader)); assert(0==Pipe.structRegistry(DataInputBlobReader.getBackingPipe(channelReader)).dims(fieldId)) : "This method only used for non dim fields."; assert(Pipe.structRegistry(DataInputBlobReader.getBackingPipe(channelReader)).fieldType(fieldId) == StructType.Text); int index = channelReader.readFromEndLastInt(StructRegistry.FIELD_MASK&(int)fieldId); if (index>=0) { channelReader.position(index); int length = channelReader.readShort();//length of text ChannelWriter out = output.writeBlob(association); out.writeShort(length); channelReader.readInto(out, length); return true; } return false; }
/** * Reads text from specified field in pipe * @param association field association showing where to read * @return <code>true</code> if data exists, else <code>false</code> */ public boolean readText(Object association, StructuredWriter output) { final long fieldId = Pipe.structRegistry(DataInputBlobReader.getBackingPipe(this.channelReader)).fieldLookupByIdentity(association, DataInputBlobReader.getStructType(this.channelReader)); assert(0==Pipe.structRegistry(DataInputBlobReader.getBackingPipe(channelReader)).dims(fieldId)) : "This method only used for non dim fields."; assert(Pipe.structRegistry(DataInputBlobReader.getBackingPipe(channelReader)).fieldType(fieldId) == StructType.Text); int index = channelReader.readFromEndLastInt(StructRegistry.FIELD_MASK&(int)fieldId); if (index>=0) { channelReader.position(index); int length = channelReader.readShort();//length of text ChannelWriter out = output.writeBlob(association); out.writeShort(length); channelReader.readInto(out, length); return true; } return false; }
/** * Reads text from specified field in pipe * @param association field association showing where to read * @return <code>true</code> if data exists, else <code>false</code> */ public boolean readText(Object association, StructuredWriter output) { final long fieldId = Pipe.structRegistry(DataInputBlobReader.getBackingPipe(this.channelReader)).fieldLookupByIdentity(association, DataInputBlobReader.getStructType(this.channelReader)); assert(0==Pipe.structRegistry(DataInputBlobReader.getBackingPipe(channelReader)).dims(fieldId)) : "This method only used for non dim fields."; assert(Pipe.structRegistry(DataInputBlobReader.getBackingPipe(channelReader)).fieldType(fieldId) == StructType.Text); int index = channelReader.readFromEndLastInt(StructRegistry.FIELD_MASK&(int)fieldId); if (index>=0) { channelReader.position(index); int length = channelReader.readShort();//length of text ChannelWriter out = output.writeBlob(association); out.writeShort(length); channelReader.readInto(out, length); return true; } return false; }
DataOutputBlobWriter.openField(outStr); reader.readInto(outStr, dataLength);
outputStream.writePackedInt(i); outputStream.writePackedLong(toCopyLength); inputStream.readInto(outputStream, toCopyLength);
data.readInto(str, dataLength); /////then the data