Package freenet.client.InsertContext

Examples of freenet.client.InsertContext.CompatibilityMode


    this.cryptoAlgorithm = cryptoAlgorithm;
    this.cryptoKey = cryptoKey;
  }

  protected ClientKeyBlock innerEncode(RandomSource random) throws InsertException {
    CompatibilityMode cmode = ctx.getCompatibilityMode();
    boolean pre1254 = !(cmode == CompatibilityMode.COMPAT_CURRENT || cmode.ordinal() >= CompatibilityMode.COMPAT_1255.ordinal());
    try {
      return innerEncode(random, uri, sourceData, isMetadata, compressionCodec, sourceLength, ctx.compressorDescriptor, pre1254, cryptoAlgorithm, cryptoKey);
    } catch (KeyEncodeException e) {
      Logger.error(SingleBlockInserter.class, "Caught "+e, e);
      throw new InsertException(InsertExceptionMode.INTERNAL_ERROR, e, null);
View Full Code Here


      if(u.getKeyType().equals("CHK")) u = FreenetURI.EMPTY_CHK_URI;
      if(data == null) {
        data = context.tempBucketFactory.makeBucket(sourceData.size());
        BucketTools.copy(sourceData, data);
      }
      CompatibilityMode cmode = ctx.getCompatibilityMode();
      boolean pre1254 = !(cmode == CompatibilityMode.COMPAT_CURRENT || cmode.ordinal() >= CompatibilityMode.COMPAT_1255.ordinal());
      return new BlockItem(key, data, isMetadata, compressionCodec, sourceLength, u, persistent, pre1254, cryptoAlgorithm, cryptoKey);
    } catch (IOException e) {
      throw new InsertException(InsertExceptionMode.BUCKET_ERROR, e, null);
    }
  }
View Full Code Here

TOP

Related Classes of freenet.client.InsertContext.CompatibilityMode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.