![JAR search and dependency download from the Maven repository](/logo.png)
com.nmote.iim4j.serialize.BinarySerializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nmote-iim4j Show documentation
Show all versions of nmote-iim4j Show documentation
IIM4J allows Java programmers to read, write and process IPTC IIM version 4 files.
The newest version!
/*
* Copyright (c) Nmote Ltd. 2004-2015. All rights reserved.
* See LICENSE doc in a root of project folder for additional information.
*/
package com.nmote.iim4j.serialize;
/**
* Binary data Serializer.
*/
public class BinarySerializer implements Serializer {
public BinarySerializer() {
this(null);
}
public BinarySerializer(String def) {
maxLength = def != null ? Integer.parseInt(def) : Integer.MAX_VALUE;
}
public Object deserialize(byte[] data, SerializationContext ctx) throws SerializationException {
return data;
}
public byte[] serialize(Object o, SerializationContext ctx) throws SerializationException {
return (byte[]) o;
}
@SuppressWarnings("unused")
private final int maxLength;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy