@Override public int remaining() { int result = (lastPosition - activePosition); assert(result <= this.getPipe().maxVarLen); return result; }
@Override public int remaining() { int result = (lastPosition - activePosition); assert(result <= this.getPipe().maxVarLen); return result; }
@Override public int remaining() { int result = (lastPosition - activePosition); assert(result <= this.getPipe().maxVarLen); return result; }
/** * Ignore the length of this field and close it consuming all the available blob space for this field. * @param writer */ public static <T extends MessageSchema<T>> int closeLowLevelMaxVarLenField(DataOutputBlobWriter<T> writer) { return closeLowLeveLField(writer, writer.getPipe().maxVarLen); }
/** * Ignore the length of this field and close it consuming all the available blob space for this field. * @param writer */ public static <T extends MessageSchema<T>> int closeLowLevelMaxVarLenField(DataOutputBlobWriter<T> writer) { return closeLowLeveLField(writer, writer.getPipe().maxVarLen); }
/** * Ignore the length of this field and close it consuming all the available blob space for this field. * @param writer */ public static <T extends MessageSchema<T>> int closeLowLevelMaxVarLenField(DataOutputBlobWriter<T> writer) { return closeLowLeveLField(writer, writer.getPipe().maxVarLen); }
public static <T extends MessageSchema<T>> boolean tryClearIntBackData(DataOutputBlobWriter<T> writer, int intCount) { int bytes = (2+intCount)*4;//one for the schema index Pipe.validateVarLength(writer.getPipe(), bytes); int temp = writer.backPosition-bytes; if (temp >= writer.activePosition) { int p = writer.lastPosition; while (--p >= temp) {//clear all writer.byteBuffer[writer.byteMask & p] = (byte)0xFF; } writer.backPosition = temp; return true; } else { return false; } }
public static <T extends MessageSchema<T>> boolean tryClearIntBackData(DataOutputBlobWriter<T> writer, int intCount) { int bytes = (2+intCount)*4;//one for the schema index Pipe.validateVarLength(writer.getPipe(), bytes); int temp = writer.backPosition-bytes; if (temp >= writer.activePosition) { int p = writer.lastPosition; while (--p >= temp) {//clear all writer.byteBuffer[writer.byteMask & p] = (byte)0xFF; } writer.backPosition = temp; return true; } else { return false; } }
public static <T extends MessageSchema<T>> boolean tryClearIntBackData(DataOutputBlobWriter<T> writer, int intCount) { int bytes = (2+intCount)*4;//one for the schema index Pipe.validateVarLength(writer.getPipe(), bytes); int temp = writer.backPosition-bytes; if (temp >= writer.activePosition) { int p = writer.lastPosition; while (--p >= temp) {//clear all writer.byteBuffer[writer.byteMask & p] = (byte)0xFF; } writer.backPosition = temp; return true; } else { return false; } }
public static void finalizeLengthOfFirstBlock(HTTPUtilResponse that, DataOutputBlobWriter<?> outputStream) { int propperLength = DataOutputBlobWriter.length(outputStream); Pipe.validateVarLength(outputStream.getPipe(), propperLength); Pipe.setIntValue(propperLength, outputStream.getPipe(), that.block1PositionOfLen); //go back and set the right length. outputStream.getPipe().closeBlobFieldWrite(); }
logger.warn("pipes are too small for this many headers and payload, max size is "+writer.getPipe().maxVarLen); requestContext = errorReporter.sendError(ccId,503) ? (requestContext | ServerCoordinator.CLOSE_CONNECTION_MASK) : ServerCoordinator.INCOMPLETE_RESPONSE_MASK; logger.warn("pipes are too small for this many headers, max total header size is "+writer.getPipe().maxVarLen); requestContext = errorReporter.sendError(ccId,503) ? (requestContext | ServerCoordinator.CLOSE_CONNECTION_MASK) : ServerCoordinator.INCOMPLETE_RESPONSE_MASK;
noiseProducer.writeNoise(str, blockId, str.getPipe().maxVarLen-realDataSize);