this.requestStartTime = reader.readDate(LogRecord.REQUEST_START_TIME_FORMAT); this.operationType = reader.readString(); this.requestStatus = reader.readString(); this.httpStatusCode = reader.readString(); this.endToEndLatencyInMS = reader.readInteger(); this.serverLatencyInMS = reader.readInteger(); this.authenticationType = reader.readString(); this.requesterAccountName = reader.readString(); this.ownerAccountName = reader.readString(); this.serviceType = reader.readString(); this.requestUrl = reader.readUri(); this.requestedObjectKey = reader.readQuotedString(); this.requestIdHeader = reader.readUuid(); this.operationCount = reader.readInteger(); this.requesterIPAddress = reader.readString(); this.requestVersionHeader = reader.readString(); this.requestHeaderSize = reader.readLong(); this.requestPacketSize = reader.readLong(); this.responseHeaderSize = reader.readLong(); this.responsePacketSize = reader.readLong(); this.requestContentLength = reader.readLong(); this.requestMD5 = reader.readQuotedString(); this.serverMD5 = reader.readQuotedString(); this.eTagIdentifier = reader.readQuotedString(); this.lastModifiedTime = reader.readDate(LogRecord.LAST_MODIFIED_TIME_FORMAT); this.conditionsUsed = reader.readQuotedString(); this.userAgentHeader = reader.readQuotedString(); this.referrerHeader = reader.readQuotedString(); this.clientRequestId = reader.readQuotedString();
/** * Read a delimiter from the stream. * * @param delimiter * the delimiter to read. * @throws IOException */ private void readDelimiter(char delimiter) throws IOException { if (this.isEndOfFile()) { throw new EOFException(SR.LOG_STREAM_END_ERROR); } else { int read = this.read(); if (read == -1 || (char) read != delimiter) { throw new IllegalStateException(SR.LOG_STREAM_DELIMITER_ERROR); } } }
/** * Checks to see if the next character is the delimiter expected. * * @param delimiter * the delimiter to try to peek. * @return * @throws IOException */ private boolean tryPeekDelimiter(char delimiter) throws IOException { if (this.isEndOfFile()) { throw new EOFException(SR.LOG_STREAM_END_ERROR); } else { if ((char) this.peek() != delimiter) { return false; } else { return true; } } }
this.readDelimiter(LogRecordStreamReader.FIELD_DELIMITER); while (true) { if (this.isEndOfFile()) { throw new EOFException(SR.LOG_STREAM_END_ERROR); char c = (char) this.peek(); this.read(); fieldBuilder.append(c);
/** * Read a String from the stream. * * @return * the String read. * @throws IOException */ public String readString() throws IOException { String temp = this.readField(false /* isQuotedString */); if (Utility.isNullOrEmpty(temp)) { return null; } else { return temp; } }
if (this.reader == null || this.reader.isEndOfFile()) { this.reader.close(); this.reader = new LogRecordStreamReader(nextBlob.openInputStream()); return this.hasNext();
/** * Checks to see if the end of the stream has been reached. * * @return * true if at the end of the stream, false otherwise. * @throws IOException */ public boolean isEndOfFile() throws IOException { return (this.peek() == -1); }
/** * Ends the current record by reading the record delimiter and adjusting internal state. * * @throws IOException */ public void endCurrentRecord() throws IOException { this.readDelimiter(LogRecordStreamReader.RECORD_DELIMITER); this.isFirstFieldInRecord = true; }
this.readDelimiter(LogRecordStreamReader.FIELD_DELIMITER); while (true) { if (this.isEndOfFile()) { throw new EOFException(SR.LOG_STREAM_END_ERROR); char c = (char) this.peek(); this.read(); fieldBuilder.append(c);
/** * Read a Double from the stream. * * @return * the Double read. * @throws IOException */ public Double readDouble() throws IOException { String temp = this.readField(false /* isQuotedString */); if (Utility.isNullOrEmpty(temp)) { return null; } else { return Double.parseDouble(temp); } }
if (this.reader == null || this.reader.isEndOfFile()) { this.reader.close(); this.reader = new LogRecordStreamReader(nextBlob.openInputStream()); return this.hasNext();
/** * Checks to see if the end of the stream has been reached. * * @return * true if at the end of the stream, false otherwise. * @throws IOException */ public boolean isEndOfFile() throws IOException { return (this.peek() == -1); }
/** * Ends the current record by reading the record delimiter and adjusting internal state. * * @throws IOException */ public void endCurrentRecord() throws IOException { this.readDelimiter(LogRecordStreamReader.RECORD_DELIMITER); this.isFirstFieldInRecord = true; }
this.requestStartTime = reader.readDate(LogRecord.REQUEST_START_TIME_FORMAT); this.operationType = reader.readString(); this.requestStatus = reader.readString(); this.httpStatusCode = reader.readString(); this.endToEndLatencyInMS = reader.readInteger(); this.serverLatencyInMS = reader.readInteger(); this.authenticationType = reader.readString(); this.requesterAccountName = reader.readString(); this.ownerAccountName = reader.readString(); this.serviceType = reader.readString(); this.requestUrl = reader.readUri(); this.requestedObjectKey = reader.readQuotedString(); this.requestIdHeader = reader.readUuid(); this.operationCount = reader.readInteger(); this.requesterIPAddress = reader.readString(); this.requestVersionHeader = reader.readString(); this.requestHeaderSize = reader.readLong(); this.requestPacketSize = reader.readLong(); this.responseHeaderSize = reader.readLong(); this.responsePacketSize = reader.readLong(); this.requestContentLength = reader.readLong(); this.requestMD5 = reader.readQuotedString(); this.serverMD5 = reader.readQuotedString(); this.eTagIdentifier = reader.readQuotedString(); this.lastModifiedTime = reader.readDate(LogRecord.LAST_MODIFIED_TIME_FORMAT); this.conditionsUsed = reader.readQuotedString(); this.userAgentHeader = reader.readQuotedString(); this.referrerHeader = reader.readQuotedString(); this.clientRequestId = reader.readQuotedString();
/** * Read a quoted String from the stream. * * @return * the String read. * @throws IOException */ public String readQuotedString() throws IOException { String temp = this.readField(true /* isQuotedString */); if (Utility.isNullOrEmpty(temp)) { return null; } else { return temp; } }
/** * Read a delimiter from the stream. * * @param delimiter * the delimiter to read. * @throws IOException */ private void readDelimiter(char delimiter) throws IOException { if (this.isEndOfFile()) { throw new EOFException(SR.LOG_STREAM_END_ERROR); } else { int read = this.read(); if (read == -1 || (char) read != delimiter) { throw new IllegalStateException(SR.LOG_STREAM_DELIMITER_ERROR); } } }
/** * Checks to see if the next character is the delimiter expected. * * @param delimiter * the delimiter to try to peek. * @return * @throws IOException */ private boolean tryPeekDelimiter(char delimiter) throws IOException { if (this.isEndOfFile()) { throw new EOFException(SR.LOG_STREAM_END_ERROR); } else { if ((char) this.peek() != delimiter) { return false; } else { return true; } } }
/** * Read a UUID from the stream. * * @return * the UUID read. * @throws IOException */ public UUID readUuid() throws IOException { String temp = this.readField(false /* isQuotedString */); if (Utility.isNullOrEmpty(temp)) { return null; } else { return UUID.fromString(temp); } }
/** * Read a Long from the stream. * * @return * the Long read. * @throws IOException */ public Long readLong() throws IOException { String temp = this.readField(false /* isQuotedString */); if (Utility.isNullOrEmpty(temp)) { return null; } else { return Long.parseLong(temp); } }
/** * Read a quoted String from the stream. * * @return * the String read. * @throws IOException */ public String readQuotedString() throws IOException { String temp = this.readField(true /* isQuotedString */); if (Utility.isNullOrEmpty(temp)) { return null; } else { return temp; } }