com.terminaldriver.tn5250j.util.ScreenSerializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of terminaldriver-tn5250j Show documentation
Show all versions of terminaldriver-tn5250j Show documentation
terminal driver for 5250 telnet
package com.terminaldriver.tn5250j.util;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.text.StringEscapeUtils;
import org.tn5250j.framework.tn5250.Screen5250;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.terminaldriver.tn5250j.annotation.ScreenAttribute;
import com.terminaldriver.tn5250j.obj.ScreenDataContainer;
public class ScreenSerializer {
final int colCount;
final ScreenDataContainer screenContainer;
int curPosition = 0;
public ScreenSerializer(final Screen5250 screen) {
screenContainer = new ScreenDataContainer(screen);
colCount = screen.getColumns();
}
public String serialize(final Screen5250 screen, final boolean indent) throws JsonProcessingException {
curPosition = 0;
final List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy