App Engine Java SDK version 1.7.0
[gae.git] / java / src / main / com / google / appengine / api / files / KeyOrderingException.java
blob1668deb4bbbb07b10cfc7a1595b92156df4769c2
1 // Copyright 2010 Google Inc. All Rights Reserved.
3 package com.google.appengine.api.files;
5 import com.google.apphosting.api.ApiProxy;
7 import java.io.IOException;
9 /**
10 * A {@code KeyOrderingException} is thrown by the method
11 * {@link FileWriteChannel#write(java.nio.ByteBuffer, String)
12 * FileWriteChannel.write(ByteBuffer, String)} if the {@code sequenceKey}
13 * parameter is not {@code null} and the backend system already has recorded a
14 * last good sequence key for the file and {@code sequenceKey} is not
15 * lexicographically strictly greater than the last good sequence key. The last
16 * good sequence key may then be retrieved via the method
17 * {@link #getLastGoodSequenceKey()}
20 public class KeyOrderingException extends IOException {
22 private String lastGoodSequenceKey;
24 KeyOrderingException() {
27 KeyOrderingException(String message, ApiProxy.ApplicationException cause) {
28 super(message, cause);
29 lastGoodSequenceKey = cause.getErrorDetail();
32 public String getLastGoodSequenceKey() {
33 return lastGoodSequenceKey;