Exemple #1
0
            public override IntIndexOutput CreateOutput(Directory dir, string fileName, IOContext context)
            {
                IndexOutput output  = dir.CreateOutput(fileName, context);
                bool        success = false;

                try
                {
                    output.WriteInt(baseBlockSize);
                    VariableIntBlockIndexOutput ret = new VariableIntBlockIndexOutputAnonymousHelper(output, 2 * baseBlockSize);
                    success = true;
                    return(ret);
                }
                finally
                {
                    if (!success)
                    {
                        IOUtils.CloseWhileHandlingException(output);
                    }
                }
            }
 public override IntIndexOutput CreateOutput(Directory dir, string fileName, IOContext context)
 {
     IndexOutput output = dir.CreateOutput(fileName, context);
     bool success = false;
     try
     {
         output.WriteInt(baseBlockSize);
         VariableIntBlockIndexOutput ret = new VariableIntBlockIndexOutputAnonymousHelper(output, 2 * baseBlockSize);
         success = true;
         return ret;
     }
     finally
     {
         if (!success)
         {
             IOUtils.CloseWhileHandlingException(output);
         }
     }
 }