### Eclipse Workspace Patch 1.0
#P lucene
Index: lucene/src/java/org/apache/lucene/index/IOContext.java
===================================================================
--- lucene/src/java/org/apache/lucene/index/IOContext.java	(revision 0)
+++ lucene/src/java/org/apache/lucene/index/IOContext.java	(revision 0)
@@ -0,0 +1,83 @@
+package org.apache.lucene.index;
+
+import org.apache.lucene.index.MergePolicy.OneMerge;
+
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+* Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+IOContext holds additional details on the merge/search context.
+A IOContext object can never be initialised as null as passed as a parameter to either 
+{@link #org.apache.lucene.store.Directory.openInput()} or {@link #org.apache.lucene.store.Directory.createInput()}
+ */
+public class IOContext {
+
+  /**
+   * Context is a enumerator which specifies the context in which the Directory is being used for.
+   */
+  public enum Context {Merge,Read,Flush,Default};
+  
+  /**
+   * An object of a enumerator Context type
+   */
+  public final Context context;
+  
+  /**
+   * An object of {@link #org.apache.lucene.index.MergePolicy.OneMerge}
+   */
+  public final OneMerge onemerge;  
+  
+  public final SegmentInfo seginfo;
+  
+  public final boolean readOnce; 
+  
+  public IOContext () {
+    this.context = Context.Default;
+    this.onemerge = null;
+    this.seginfo = null;
+    this.readOnce = false;
+  }
+  
+  public IOContext(Context c) {
+    this.context = c;
+    this.onemerge = null;
+    this.seginfo = null;
+    this.readOnce = false;
+  }
+  
+  public IOContext(boolean readonce) {
+    this.context = Context.Default;
+    this.onemerge = null;    
+    this.seginfo = null;
+    this.readOnce = readonce;
+  }
+  
+  public IOContext (OneMerge onemerge) {
+    this.context=Context.Merge;
+    this.onemerge=onemerge;
+    this.seginfo=null;
+    this.readOnce=false;
+  }
+  
+  public IOContext (SegmentInfo segmentinfo) {
+    this.context=Context.Flush;
+    this.onemerge=null;
+    this.seginfo=segmentinfo;
+    this.readOnce=true;
+  }  
+
+}
\ No newline at end of file
