com.hcl.domino.data.NativeItemCoder Maven / Gradle / Ivy
/*
* ==========================================================================
* Copyright (C) 2019-2022 HCL America, Inc. ( http://www.hcl.com/ )
* All rights reserved.
* ==========================================================================
* Licensed 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 .
*
* 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.
* ==========================================================================
*/
package com.hcl.domino.data;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
import java.util.List;
import com.hcl.domino.misc.JNXServiceFinder;
import com.hcl.domino.richtext.records.RecordType;
import com.hcl.domino.richtext.records.RichTextRecord;
/**
* This service interface represents an implementation-contributed service that
* is able to decode item-type data from native memory
*
* @author Jesse Gallagher
* @since 1.0.24
*/
public interface NativeItemCoder {
static NativeItemCoder get() {
return JNXServiceFinder.findRequiredService(NativeItemCoder.class, NativeItemCoder.class.getClassLoader());
}
/**
* Represents different modes for null-termination and newline
* handling in LMBCS charsets.
*
* @since 1.0.46
*/
enum LmbcsVariant {
/** encodes strings without terminating \0. Replaces \n and \n\r in the string with \0 */
NORMAL,
/** encodes strings with terminating \0 */
NULLTERM,
/** keeps \n and \n\r in the string (e.g. used to store MIME or LS), no terminating \0 */
KEEPNEWLINES,
/** keeps \n and \n\r in the string (e.g. used to store MIME or LS), with terminating \0 */
NULLTERM_KEEPNEWLINES
}
List decodeStringList(byte[] buf);
byte[] encodeStringList(List values);
/**
* Decodes the provided raw item data to a Java-compatible type.
*
* @param buf the value to decode
* @param area the rich-text record category to use when interpreting
* composite data
* @return an object corresponding to the native data
* @since 1.0.43
*/
List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy