/** * Initializes a new instance of the LogRecord class using a LogRecordStreamReader to populate. * * @param reader * the LogRecordStreamReader to use to populate the LogRecord. * @throws IOException * @throws ParseException * @throws URISyntaxException */ protected LogRecord(LogRecordStreamReader reader) throws IOException, ParseException, URISyntaxException { LAST_MODIFIED_TIME_FORMAT.setTimeZone(TimeZone.getTimeZone("GMT")); REQUEST_START_TIME_FORMAT.setTimeZone(TimeZone.getTimeZone("GMT")); Utility.assertNotNull("reader", reader); this.versionNumber = reader.readString(); Utility.assertNotNullOrEmpty("versionNumber", this.versionNumber); if (this.versionNumber.equals("1.0")) { this.populateVersion1Log(reader); } else { throw new IllegalArgumentException(String.format(SR.LOG_VERSION_UNSUPPORTED, this.versionNumber)); } }
/** * Initializes a new instance of the LogRecord class using a LogRecordStreamReader to populate. * * @param reader * the LogRecordStreamReader to use to populate the LogRecord. * @throws IOException * @throws ParseException * @throws URISyntaxException */ protected LogRecord(LogRecordStreamReader reader) throws IOException, ParseException, URISyntaxException { LAST_MODIFIED_TIME_FORMAT.setTimeZone(TimeZone.getTimeZone("GMT")); REQUEST_START_TIME_FORMAT.setTimeZone(TimeZone.getTimeZone("GMT")); Utility.assertNotNull("reader", reader); this.versionNumber = reader.readString(); Utility.assertNotNullOrEmpty("versionNumber", this.versionNumber); if (this.versionNumber.equals("1.0")) { this.populateVersion1Log(reader); } else { throw new IllegalArgumentException(String.format(SR.LOG_VERSION_UNSUPPORTED, this.versionNumber)); } }
URISyntaxException { 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();
URISyntaxException { 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();