UTIL: rename ByteUtils, SWAPModel, and move plugin package 38/22238/1
authorgreatim <jaewon81.lim@samsung.com>
Fri, 30 May 2014 07:02:13 +0000 (16:02 +0900)
committergreatim <jaewon81.lim@samsung.com>
Fri, 30 May 2014 07:02:13 +0000 (16:02 +0900)
rename (Streamable -> StreamElement) (SWAPModel -> Streamable) (ByteUtils -> ByteUtil)
move some classes to common plugin (ByteUtils, ByteSwapper, SWAPModel)

Change-Id: I97368a294f34808f1c2cde395c64dee639db5a3c
Signed-off-by: greatim <jaewon81.lim@samsung.com>
43 files changed:
org.tizen.dynamicanalyzer.common/META-INF/MANIFEST.MF
org.tizen.dynamicanalyzer.common/src/org/tizen/dynamicanalyzer/model/Streamable.java [moved from org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/SWAPModel.java with 84% similarity]
org.tizen.dynamicanalyzer.common/src/org/tizen/dynamicanalyzer/util/ByteSwapper.java [moved from org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/utils/ByteSwapper.java with 99% similarity]
org.tizen.dynamicanalyzer.common/src/org/tizen/dynamicanalyzer/util/ByteUtil.java [moved from org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/ByteUtils.java with 92% similarity]
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/handlers/ReplayTraceHandler.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/logparser/LogParser.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/StreamElement.java [moved from org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/Streamable.java with 90% similarity]
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/project/Project.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/channel/control/ApplicationInst.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/channel/control/BasicMessage.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/channel/control/BinaryInfo.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/channel/control/EventObject.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/channel/control/FunctionInst.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/channel/control/LibraryInst.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/channel/control/ReplayEvent.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/channel/control/RunTimeConfiguration.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/channel/control/UserSpaceInst.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/channel/data/BasicDataMessage.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/communicator/Communicator30.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/logparser/LogPackage.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/logparser/MessageParser.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/DATime.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/RecordEventObject.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/data/ContextSwitchData.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/data/ControlData.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/data/CustomData.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/data/FileData.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/data/GLES20LogData.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/data/LogData.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/data/LogDataFactory.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/data/LogDataUtils.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/data/MemoryData.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/data/NetworkData.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/data/ProbeCommonData.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/data/ProfileData.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/data/ReplayData.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/data/SceneData.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/data/ScreenShotData.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/data/SyncData.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/data/SystemData.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/data/ThreadData.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/data/UIEventData.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/data/UserFunctionData.java

index 8eeec01..3509bd9 100644 (file)
@@ -10,5 +10,6 @@ Bundle-ActivationPolicy: lazy
 Bundle-RequiredExecutionEnvironment: JavaSE-1.7
 Export-Package: org.tizen.dynamicanalyzer.callback,
  org.tizen.dynamicanalyzer.constant,
+ org.tizen.dynamicanalyzer.model,
  org.tizen.dynamicanalyzer.util
 Import-Package: org.tizen.common.core.application
  * - S-Core Co., Ltd
  * 
  */
-package org.tizen.dynamicanalyzer.swap.model;
+package org.tizen.dynamicanalyzer.model;
 
-public interface SWAPModel {
-       public byte[] getByteValue();
+public interface Streamable {
+       public byte[] toByteStream();
 
-       public void setByteToValues(byte[] input);
+       public void fromByteStream(byte[] input);
 }
  * - S-Core Co., Ltd
  * 
  */
-package org.tizen.dynamicanalyzer.swap.model;
+package org.tizen.dynamicanalyzer.util;
 
 import java.nio.ByteBuffer;
 import java.util.List;
 
-import org.tizen.dynamicanalyzer.utils.ByteSwapper;
-import org.tizen.dynamicanalyzer.util.DALogger;
+import org.tizen.dynamicanalyzer.model.Streamable;
 
-public class ByteUtils {
+public class ByteUtil {
        private static final DALogger DA_LOG = DALogger.getInstance();
        
        public static byte EOS = '\0';
@@ -337,29 +336,29 @@ public class ByteUtils {
 
                        if (obj instanceof Integer) {
                                int value = (Integer) obj;
-                               temp = ByteUtils
-                                               .concatByteArray(temp, ByteUtils.toBytes(value));
+                               temp = ByteUtil
+                                               .concatByteArray(temp, ByteUtil.toBytes(value));
                        } else if (obj instanceof Long) {
                                long value = (Long) obj;
-                               temp = ByteUtils
-                                               .concatByteArray(temp, ByteUtils.toBytes(value));
+                               temp = ByteUtil
+                                               .concatByteArray(temp, ByteUtil.toBytes(value));
                        } else if (obj instanceof Float) {
                                float f = (Float) obj;
-                               temp = ByteUtils.concatByteArray(temp,
-                                               ByteUtils.floatToBytes(f));
+                               temp = ByteUtil.concatByteArray(temp,
+                                               ByteUtil.floatToBytes(f));
                        } else if (obj instanceof Double) {
                                double d = (Double) obj;
-                               temp = ByteUtils.concatByteArray(temp,
-                                               ByteUtils.doubleToBytes(d));
+                               temp = ByteUtil.concatByteArray(temp,
+                                               ByteUtil.doubleToBytes(d));
                        } else if (obj instanceof String) {
                                String value = (String) obj;
-                               temp = ByteUtils.concatByteArray(temp,
-                                               ByteUtils.stringToByte(value));
+                               temp = ByteUtil.concatByteArray(temp,
+                                               ByteUtil.stringToByte(value));
                        } else if (obj instanceof byte[]) {
-                               temp = ByteUtils.concatByteArray(temp, (byte[]) obj);
+                               temp = ByteUtil.concatByteArray(temp, (byte[]) obj);
                        } else if (obj instanceof List<?>) {
                                List<?> a = (List<?>) obj;
-                               temp = ByteUtils.concatByteArray(temp,
+                               temp = ByteUtil.concatByteArray(temp,
                                                getByteFromList((List<Object>) obj));
                        } else {
                                continue;
@@ -371,11 +370,11 @@ public class ByteUtils {
        public static <T> byte[] getByteFromList(List<T> input) {
                byte[] temp = new byte[0];
                for (T obj : input) {
-                       if (obj instanceof SWAPModel) {
-                               temp = ByteUtils.concatByteArray(temp,
-                                               ((SWAPModel) obj).getByteValue());
+                       if (obj instanceof Streamable) {
+                               temp = ByteUtil.concatByteArray(temp,
+                                               ((Streamable) obj).toByteStream());
                        } else {
-                               temp = ByteUtils.concatByteArray(temp, obj);
+                               temp = ByteUtil.concatByteArray(temp, obj);
                        }
                }
                return temp;
index f247a0c..6dd9e69 100644 (file)
@@ -32,12 +32,12 @@ import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.ExecutionException;
 import org.tizen.dynamicanalyzer.common.AnalyzerManager;
 import org.tizen.dynamicanalyzer.communicator.DACommunicator;
-import org.tizen.dynamicanalyzer.swap.model.ByteUtils;
 import org.tizen.dynamicanalyzer.swap.model.DATime;
 import org.tizen.dynamicanalyzer.swap.model.data.ReplayData;
 import org.tizen.dynamicanalyzer.ui.toolbar.ToolbarArea;
 import org.tizen.dynamicanalyzer.ui.toolbar.configuration.ConfigurationDialogDataManager;
 import org.tizen.dynamicanalyzer.ui.toolbar.replay.data.ReplayDataManager;
+import org.tizen.dynamicanalyzer.util.ByteUtil;
 import org.tizen.dynamicanalyzer.widgets.timer.IAlarm;
 import org.tizen.dynamicanalyzer.widgets.timer.TimerClock;
 
@@ -80,7 +80,7 @@ public class ReplayTraceHandler extends AbstractHandler {
                        int count = replayData.getObjectCount();
                        byte[] eventObjs = null;
                        for (int i = 0; i < count; i++) {
-                               eventObjs = ByteUtils.concatByteArray(eventObjs, replayData
+                               eventObjs = ByteUtil.concatByteArray(eventObjs, replayData
                                                .getRecordEvent().get(i).getByteValues());
 
 //                             System.out.println(" sec : "
@@ -97,7 +97,7 @@ public class ReplayTraceHandler extends AbstractHandler {
 //                                             + " value : "
 //                                             + replayData.getRecordEvent().get(i).getEventValue());
                        }
-                       replayEvent = ByteUtils.getByte(REPLAY_ON, startTime.getSec(),
+                       replayEvent = ByteUtil.getByte(REPLAY_ON, startTime.getSec(),
                                        startTime.getNano(), count, eventObjs);
                }
                return null;
index d33064c..08164aa 100644 (file)
@@ -33,11 +33,11 @@ import org.tizen.dynamicanalyzer.common.GlobalInformation;
 import org.tizen.dynamicanalyzer.constant.CommonConstants;
 import org.tizen.dynamicanalyzer.swap.channel.data.ApiNameManager;
 import org.tizen.dynamicanalyzer.swap.channel.data.DataChannelConstants;
-import org.tizen.dynamicanalyzer.swap.model.ByteUtils;
 import org.tizen.dynamicanalyzer.swap.model.data.LogData;
 import org.tizen.dynamicanalyzer.swap.model.data.LogDataFactory;
 import org.tizen.dynamicanalyzer.ui.toolbar.ToolbarArea;
 import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
+import org.tizen.dynamicanalyzer.util.ByteUtil;
 import org.tizen.dynamicanalyzer.util.DALogger;
 
 public class LogParser implements Runnable {
@@ -384,7 +384,7 @@ public class LogParser implements Runnable {
                        int tid = 0;
                        int cpuNum = 0;
 
-                       front = ByteUtils.getByte(pid, pcAddr, tid, cpuNum);
+                       front = ByteUtil.getByte(pid, pcAddr, tid, cpuNum);
                } else {
                        if (id == DataChannelConstants.MSG_PROBE_SCREENSHOT) {
                                DA_LOG.debug("debug ");
@@ -426,7 +426,7 @@ public class LogParser implements Runnable {
                        int reserved1 = initIntPayload(newLog[8]);
                        int reserved2 = initIntPayload(newLog[9]);
 
-                       front = ByteUtils.getByte(apiId, pid, tid, argsCount, args, ret,
+                       front = ByteUtil.getByte(apiId, pid, tid, argsCount, args, ret,
                                        err, internal, caller, reserved1, reserved2);
                }
 
@@ -439,8 +439,8 @@ public class LogParser implements Runnable {
                                        .parseInt(input[LogCenterConstants.MEMORY_APITYPE_INDEX]);
                        long address = AnalyzerUtil
                                        .addrToLong(input[LogCenterConstants.MEMORY_ADDR_INDEX]);
-                       rear = ByteUtils.getByte(size, apiType, address);
-                       result = ByteUtils.concatByteArray(front, rear);
+                       rear = ByteUtil.getByte(size, apiType, address);
+                       result = ByteUtil.concatByteArray(front, rear);
                        break;
                case DataChannelConstants.MSG_PROBE_UICONTROL:
                        String parentName = input[LogCenterConstants.USER_INTERFACE_CONTROL_LIST_PARENT_NAME_INDEX];
@@ -451,9 +451,9 @@ public class LogParser implements Runnable {
                        String childClassName = input[LogCenterConstants.USER_INTERFACE_CONTROL_LIST_CHILD_CLASS_NAME_INDEX];
                        long childPointer = AnalyzerUtil
                                        .addrToLong(input[LogCenterConstants.USER_INTERFACE_CONTROL_LIST_CHILD_POINTER_INDEX]);
-                       rear = ByteUtils.getByte(parentName, parentClassName,
+                       rear = ByteUtil.getByte(parentName, parentClassName,
                                        parentPointer, childName, childClassName, childPointer);
-                       result = ByteUtils.concatByteArray(front, rear);
+                       result = ByteUtil.concatByteArray(front, rear);
                        break;
                case DataChannelConstants.MSG_PROBE_UIEVENT:
                        int eventType = Integer
@@ -464,8 +464,8 @@ public class LogParser implements Runnable {
                        int y = Integer.parseInt(input[LogCenterConstants.UI_EVENT_Y]);
                        String info1 = input[LogCenterConstants.UI_EVENT_INFO1];
                        int info2 = initIntPayload(input[LogCenterConstants.UI_EVENT_INFO2]);
-                       rear = ByteUtils.getByte(eventType, detailType, x, y, info1, info2);
-                       result = ByteUtils.concatByteArray(front, rear);
+                       rear = ByteUtil.getByte(eventType, detailType, x, y, info1, info2);
+                       result = ByteUtil.concatByteArray(front, rear);
                        break;
                case DataChannelConstants.MSG_PROBE_FILE:
                        long sizeValue = Long
@@ -479,9 +479,9 @@ public class LogParser implements Runnable {
                        long fileSize = Long
                                        .parseLong(input[LogCenterConstants.RESOURCE_FILE_SIZE_INDEX]);
                        String filePath = input[LogCenterConstants.RESOURCE_FILE_PATH_INDEX];
-                       rear = ByteUtils.getByte(sizeValue, fdValue, fdType, fdApiType,
+                       rear = ByteUtil.getByte(sizeValue, fdValue, fdType, fdApiType,
                                        fileSize, filePath);
-                       result = ByteUtils.concatByteArray(front, rear);
+                       result = ByteUtil.concatByteArray(front, rear);
                        break;
                case DataChannelConstants.MSG_PROBE_NETWORK:
                        DA_LOG.debug("case AnalyzerConstants.MSG_PROBE_NETWORK");
@@ -492,8 +492,8 @@ public class LogParser implements Runnable {
                        long elapsedTime = Long
                                        .parseLong(input[LogCenterConstants.GL_ELAPSED_TIME_INDEX]);
                        String contextValue = input[LogCenterConstants.GL_CONTEXT_VALUE_INDEX];
-                       rear = ByteUtils.getByte(apiType, elapsedTime, contextValue);
-                       result = ByteUtils.concatByteArray(front, rear);
+                       rear = ByteUtil.getByte(apiType, elapsedTime, contextValue);
+                       result = ByteUtil.concatByteArray(front, rear);
                        break;
                case DataChannelConstants.MSG_PROBE_LIFECYCLE:
                        result = front;
@@ -502,8 +502,8 @@ public class LogParser implements Runnable {
                        String imgFilePath = input[LogCenterConstants.SCREENSHOT_IMAGE_PATH_INDEX];
                        int orientation = Integer
                                        .parseInt(input[LogCenterConstants.SCREENSHOT_ROTATE_INDEX]);
-                       rear = ByteUtils.getByte(imgFilePath, orientation);
-                       result = ByteUtils.concatByteArray(front, rear);
+                       rear = ByteUtil.getByte(imgFilePath, orientation);
+                       result = ByteUtil.concatByteArray(front, rear);
                        break;
                case DataChannelConstants.MSG_PROBE_SCENE:
                        String sceneName = input[LogCenterConstants.USER_INTERFACE_SCENE_TRANSFORMS_LIST_SCENE_NAME_INDEX];
@@ -517,16 +517,16 @@ public class LogParser implements Runnable {
                                        .parseInt(input[LogCenterConstants.USER_INTERFACE_SCENE_TRANSFORMS_LIST_TRANSITION_INDEX]);
                        int userTransitionTime = Integer
                                        .parseInt(input[LogCenterConstants.USER_INTERFACE_SCENE_TRANSFORMS_LIST_USERTIME_INDEX]);
-                       rear = ByteUtils
+                       rear = ByteUtil
                                        .getByte(sceneName, formName, formPointer, panelName,
                                                        panelPointer, transitionTime, userTransitionTime);
-                       result = ByteUtils.concatByteArray(front, rear);
+                       result = ByteUtil.concatByteArray(front, rear);
                        break;
                case DataChannelConstants.MSG_DATA_SYSTEM:
                        result = front;
                        break;
                case DataChannelConstants.MSG_DATA_SAMPLE:
-                       result = ByteUtils.concatByteArray(front, rear);
+                       result = ByteUtil.concatByteArray(front, rear);
                        break;
                case DataChannelConstants.MSG_PROBE_THREAD:
                        long pThreadId = Long
@@ -537,9 +537,9 @@ public class LogParser implements Runnable {
                                        .parseInt(input[LogCenterConstants.THREAD_TYPE_INDEX]);
                        int threadApiType = Integer
                                        .parseInt(input[LogCenterConstants.THREAD_API_TYPE_INDEX]);
-                       rear = ByteUtils.getByte(pThreadId, ospThradId, threadType,
+                       rear = ByteUtil.getByte(pThreadId, ospThradId, threadType,
                                        threadApiType);
-                       result = ByteUtils.concatByteArray(front, rear);
+                       result = ByteUtil.concatByteArray(front, rear);
                        break;
                case DataChannelConstants.MSG_PROBE_CUSTOM:
                        int handle = Integer
@@ -551,9 +551,9 @@ public class LogParser implements Runnable {
                                        .parseInt(input[LogCenterConstants.CUSTOM_CHART_COLOR]);
                        double value = Double
                                        .parseDouble(input[LogCenterConstants.CUSTOM_CHART_VALUE]);
-                       rear = ByteUtils.getByte(handle, customType, customName, color,
+                       rear = ByteUtil.getByte(handle, customType, customName, color,
                                        value);
-                       result = ByteUtils.concatByteArray(front, rear);
+                       result = ByteUtil.concatByteArray(front, rear);
                        break;
                case DataChannelConstants.MSG_PROBE_SYNC:
                        long syncVal = Long
@@ -562,8 +562,8 @@ public class LogParser implements Runnable {
                                        .parseInt(input[LogCenterConstants.SYNC_TYPE_INDEX]);
                        int syncApiType = Integer
                                        .parseInt(input[LogCenterConstants.SYNC_API_TYPE_INDEX]);
-                       rear = ByteUtils.getByte(syncVal, syncType, syncApiType);
-                       result = ByteUtils.concatByteArray(front, rear);
+                       rear = ByteUtil.getByte(syncVal, syncType, syncApiType);
+                       result = ByteUtil.concatByteArray(front, rear);
                        break;
                default:
                        // USER_FUNCTION
@@ -577,9 +577,9 @@ public class LogParser implements Runnable {
                                        .parseLong(input[LogCenterConstants.USER_FUNCTION_ELAPSED_TIME_INDEX]);
                        long pcAddr = Long
                                        .parseLong(input[LogCenterConstants.PCADDR_INDEX]);
-                       rear = ByteUtils
+                       rear = ByteUtil
                                        .getByte(lowPc, highPc, ufType, elapsedTime, pcAddr);
-                       result = ByteUtils.concatByteArray(front, rear);
+                       result = ByteUtil.concatByteArray(front, rear);
                        break;
                }
 
@@ -649,7 +649,7 @@ public class LogParser implements Runnable {
                byte[] temp = new byte[0];
                for (int i = 0; i < fr.length; i++) {
                        float f = Float.parseFloat(fr[i]);
-                       temp = ByteUtils.getByte(temp, f);
+                       temp = ByteUtil.getByte(temp, f);
                        coreCount = i + 1;
                }
                if (coreCount != 0) {
@@ -667,7 +667,7 @@ public class LogParser implements Runnable {
                temp = new byte[0];
                for (int i = 0; i < load.length - 1; i++) {
                        float f = Float.parseFloat(load[i]);
-                       temp = ByteUtils.getByte(temp, f);
+                       temp = ByteUtil.getByte(temp, f);
                }
                byte[] cpuLoad = new byte[temp.length];
                System.arraycopy(temp, 0, cpuLoad, 0, temp.length);
@@ -688,7 +688,7 @@ public class LogParser implements Runnable {
                for (int i = 0; i < tLoad.length; i += 2) {
                        int tid = Integer.parseInt(tLoad[i]);
                        float tl = Float.parseFloat(tLoad[i + 1]);
-                       temp = ByteUtils.getByte(temp, tid, tl);
+                       temp = ByteUtil.getByte(temp, tid, tl);
                }
                byte[] threadLoad = new byte[temp.length];
                System.arraycopy(temp, 0, threadLoad, 0, temp.length);
@@ -699,7 +699,7 @@ public class LogParser implements Runnable {
                for (int i = 0; i < pLoad.length; i += 2) {
                        int tid = Integer.parseInt(pLoad[i]);
                        float tl = Float.parseFloat(pLoad[i + 1]);
-                       temp = ByteUtils.getByte(temp, tid, tl);
+                       temp = ByteUtil.getByte(temp, tid, tl);
                }
                byte[] procLoad = new byte[temp.length];
                System.arraycopy(temp, 0, procLoad, 0, temp.length);
@@ -710,7 +710,7 @@ public class LogParser implements Runnable {
                int netSend = initIntPayload(newLog[31]);
                int netRecv = initIntPayload(newLog[32]);
 
-               byte[] front = ByteUtils.getByte(energy, wifi, bt, gps, brightness,
+               byte[] front = ByteUtil.getByte(energy, wifi, bt, gps, brightness,
                                camera, sound, audio, vibration, voltage, rssi, video, call,
                                dnet, cpuFrequency, appCpuUsage, cpuLoad, virtualMem, resident,
                                shared, pss, totalAlloc, systemTotal, systemUsed,
@@ -2,7 +2,7 @@ package org.tizen.dynamicanalyzer.model;
 
 // this class is parent class of data class which is element of blocking queue.
 // this class has methods to confirm that is end of stream or not
-public abstract class Streamable {
+public abstract class StreamElement {
        private boolean endOfStream = false;
        
        public final boolean isEndOfStream() {
index 7ff4574..be7e1dc 100755 (executable)
@@ -55,9 +55,9 @@ import org.tizen.dynamicanalyzer.swap.channel.data.DataChannelConstants;
 import org.tizen.dynamicanalyzer.swap.channel.data.ProcessInfo;
 import org.tizen.dynamicanalyzer.swap.channel.data.ProcessInfoPackage;
 import org.tizen.dynamicanalyzer.swap.logparser.DataManagerRegistry;
-import org.tizen.dynamicanalyzer.swap.model.ByteUtils;
 import org.tizen.dynamicanalyzer.swap.model.DATime;
 import org.tizen.dynamicanalyzer.ui.toolbar.ToolbarArea;
+import org.tizen.dynamicanalyzer.util.ByteUtil;
 import org.tizen.dynamicanalyzer.util.CommonUtil;
 import org.tizen.dynamicanalyzer.util.DALogger;
 
@@ -337,7 +337,7 @@ public class Project {
                if (ReplayTraceHandler.isReplay) {
                        replayEvent = ReplayTraceHandler.getReplayEvent();
                } else {
-                       replayEvent = ByteUtils.getByte(ReplayTraceHandler.REPLAY_OFF);
+                       replayEvent = ByteUtil.getByte(ReplayTraceHandler.REPLAY_OFF);
                }
        }
 
index 8c89183..07fa81f 100755 (executable)
@@ -28,10 +28,10 @@ package org.tizen.dynamicanalyzer.swap.channel.control;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.tizen.dynamicanalyzer.swap.model.ByteUtils;
-import org.tizen.dynamicanalyzer.swap.model.SWAPModel;
+import org.tizen.dynamicanalyzer.model.Streamable;
+import org.tizen.dynamicanalyzer.util.ByteUtil;
 
-public class ApplicationInst implements SWAPModel {
+public class ApplicationInst implements Streamable {
        public static final int APPTYPE_TIZEN = 0x01;
        public static final int APPTYPE_PROCESS = 0x02;
        public static final int APPTYPE_COMMON_EXEC = 0x03;
@@ -61,13 +61,13 @@ public class ApplicationInst implements SWAPModel {
        private List<FunctionInst> functionInstList = new ArrayList<FunctionInst>();
 
        @Override
-       public byte[] getByteValue() {
-               return ByteUtils.getByte(applicationType, applicationId,
+       public byte[] toByteStream() {
+               return ByteUtil.getByte(applicationType, applicationId,
                                executablePath, functionCount, functionInstList);
        }
 
        @Override
-       public void setByteToValues(byte[] input) {
+       public void fromByteStream(byte[] input) {
                // TODO Auto-generated method stub
        }
 
index 8bd695e..31fd607 100755 (executable)
  */
 package org.tizen.dynamicanalyzer.swap.channel.control;
 
-import org.tizen.dynamicanalyzer.swap.model.ByteUtils;
-import org.tizen.dynamicanalyzer.swap.model.SWAPModel;
+import org.tizen.dynamicanalyzer.model.Streamable;
+import org.tizen.dynamicanalyzer.util.ByteUtil;
 
-public class BasicMessage implements SWAPModel {
+public class BasicMessage implements Streamable {
        private int id = 0;
        private int length = 0;
        private byte[] payload = null;
@@ -64,12 +64,12 @@ public class BasicMessage implements SWAPModel {
        }
 
        @Override
-       public byte[] getByteValue() {
-               return ByteUtils.getByte(id, length, payload);
+       public byte[] toByteStream() {
+               return ByteUtil.getByte(id, length, payload);
        }
 
        @Override
-       public void setByteToValues(byte[] input) {
+       public void fromByteStream(byte[] input) {
                // TODO Auto-generated method stub
                
        }
index 09a9230..c7bcf52 100755 (executable)
  */
 package org.tizen.dynamicanalyzer.swap.channel.control;
 
-import org.tizen.dynamicanalyzer.swap.model.ByteUtils;
-import org.tizen.dynamicanalyzer.swap.model.SWAPModel;
+import org.tizen.dynamicanalyzer.model.Streamable;
+import org.tizen.dynamicanalyzer.util.ByteUtil;
 
-public class BinaryInfo implements SWAPModel {
+public class BinaryInfo implements Streamable {
        private int type = 0;
        private String targetBinaryPath = null;
        private String localBinaryPath = null;
@@ -76,12 +76,12 @@ public class BinaryInfo implements SWAPModel {
        }
 
        @Override
-       public byte[] getByteValue() {
-               return ByteUtils.concatByteArray(type, localBinaryPath);
+       public byte[] toByteStream() {
+               return ByteUtil.concatByteArray(type, localBinaryPath);
        }
 
        @Override
-       public void setByteToValues(byte[] input) {
+       public void fromByteStream(byte[] input) {
                // TODO Auto-generated method stub
 
        }
index fff17e3..92374aa 100755 (executable)
  */
 package org.tizen.dynamicanalyzer.swap.channel.control;
 
-import org.tizen.dynamicanalyzer.swap.model.ByteUtils;
-import org.tizen.dynamicanalyzer.swap.model.SWAPModel;
+import org.tizen.dynamicanalyzer.model.Streamable;
+import org.tizen.dynamicanalyzer.util.ByteUtil;
 
-public class EventObject implements SWAPModel {
+public class EventObject implements Streamable {
        public static final int TOUCH = 0x8001;
        public static final int KEY = 0x8002;
 
@@ -79,12 +79,12 @@ public class EventObject implements SWAPModel {
        }
 
        @Override
-       public byte[] getByteValue() {
-               return ByteUtils.getByte(time, id, type, code, value);
+       public byte[] toByteStream() {
+               return ByteUtil.getByte(time, id, type, code, value);
        }
 
        @Override
-       public void setByteToValues(byte[] input) {
+       public void fromByteStream(byte[] input) {
                // TODO Auto-generated method stub
                
        }
index fb0296a..54fce44 100755 (executable)
  */
 package org.tizen.dynamicanalyzer.swap.channel.control;
 
-import org.tizen.dynamicanalyzer.swap.model.ByteUtils;
-import org.tizen.dynamicanalyzer.swap.model.SWAPModel;
+import org.tizen.dynamicanalyzer.model.Streamable;
+import org.tizen.dynamicanalyzer.util.ByteUtil;
 
-public class FunctionInst implements SWAPModel {
+public class FunctionInst implements Streamable {
        private long addr = 0;
        private byte[] args = null;
 
@@ -49,12 +49,12 @@ public class FunctionInst implements SWAPModel {
        }
 
        @Override
-       public byte[] getByteValue() {
-               return ByteUtils.getByte(addr, args);
+       public byte[] toByteStream() {
+               return ByteUtil.getByte(addr, args);
        }
 
        @Override
-       public void setByteToValues(byte[] input) {
+       public void fromByteStream(byte[] input) {
                // TODO Auto-generated method stub
 
        }
index 911aeda..6908ba4 100755 (executable)
@@ -27,10 +27,10 @@ package org.tizen.dynamicanalyzer.swap.channel.control;
 
 import java.util.List;
 
-import org.tizen.dynamicanalyzer.swap.model.ByteUtils;
-import org.tizen.dynamicanalyzer.swap.model.SWAPModel;
+import org.tizen.dynamicanalyzer.model.Streamable;
+import org.tizen.dynamicanalyzer.util.ByteUtil;
 
-public class LibraryInst implements SWAPModel {
+public class LibraryInst implements Streamable {
        // path of binary
        private String path = null;
 
@@ -65,12 +65,12 @@ public class LibraryInst implements SWAPModel {
        }
 
        @Override
-       public byte[] getByteValue() {
-               return ByteUtils.getByte(path, count, funcInstList);
+       public byte[] toByteStream() {
+               return ByteUtil.getByte(path, count, funcInstList);
        }
 
        @Override
-       public void setByteToValues(byte[] input) {
+       public void fromByteStream(byte[] input) {
                // TODO Auto-generated method stub
 
        }
index 0bfc648..936481f 100755 (executable)
@@ -28,10 +28,10 @@ package org.tizen.dynamicanalyzer.swap.channel.control;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.tizen.dynamicanalyzer.swap.model.ByteUtils;
-import org.tizen.dynamicanalyzer.swap.model.SWAPModel;
+import org.tizen.dynamicanalyzer.model.Streamable;
+import org.tizen.dynamicanalyzer.util.ByteUtil;
 
-public class ReplayEvent implements SWAPModel {
+public class ReplayEvent implements Streamable {
        private int enabled = 0;
        private long time = 0;
        private int objectCount = 0;
@@ -69,12 +69,12 @@ public class ReplayEvent implements SWAPModel {
        }
 
        @Override
-       public byte[] getByteValue() {
-               return ByteUtils.getByte(enabled, time, objectCount, eventObjectList);
+       public byte[] toByteStream() {
+               return ByteUtil.getByte(enabled, time, objectCount, eventObjectList);
        }
 
        @Override
-       public void setByteToValues(byte[] input) {
+       public void fromByteStream(byte[] input) {
                // TODO Auto-generated method stub
                
        }
index e7dba41..27cb1e5 100755 (executable)
  */
 package org.tizen.dynamicanalyzer.swap.channel.control;
 
-import org.tizen.dynamicanalyzer.swap.model.ByteUtils;
-import org.tizen.dynamicanalyzer.swap.model.SWAPModel;
+import org.tizen.dynamicanalyzer.model.Streamable;
+import org.tizen.dynamicanalyzer.util.ByteUtil;
 
-public class RunTimeConfiguration implements SWAPModel {
+public class RunTimeConfiguration implements Streamable {
        private long lowFeatures = 0;
        private long highFeatures = 0;
 
@@ -42,20 +42,20 @@ public class RunTimeConfiguration implements SWAPModel {
        }
 
        @Override
-       public byte[] getByteValue() {
-               byte[] lowByte = ByteUtils.getByte(lowFeatures);
-               byte[] highByte = ByteUtils.getByte(highFeatures);
+       public byte[] toByteStream() {
+               byte[] lowByte = ByteUtil.getByte(lowFeatures);
+               byte[] highByte = ByteUtil.getByte(highFeatures);
                
                byte[] features = new byte[8];
                System.arraycopy(lowByte, 0, features, 0, 4);
                System.arraycopy(highByte, 0, features, 4, 4);
 
-               return ByteUtils.getByte(features, nullFeatures, systemTracePeriod,
+               return ByteUtil.getByte(features, nullFeatures, systemTracePeriod,
                                samplingPeriod);
        }
 
        @Override
-       public void setByteToValues(byte[] input) {
+       public void fromByteStream(byte[] input) {
                // TODO Auto-generated method stub
 
        }
index 057cca8..b057b6a 100755 (executable)
@@ -28,10 +28,10 @@ package org.tizen.dynamicanalyzer.swap.channel.control;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.tizen.dynamicanalyzer.swap.model.ByteUtils;
-import org.tizen.dynamicanalyzer.swap.model.SWAPModel;
+import org.tizen.dynamicanalyzer.model.Streamable;
+import org.tizen.dynamicanalyzer.util.ByteUtil;
 
-public class UserSpaceInst implements SWAPModel {
+public class UserSpaceInst implements Streamable {
        // count of applications
 //     private int count = 0;
        private List<ApplicationInst> appInstList = null;
@@ -52,12 +52,12 @@ public class UserSpaceInst implements SWAPModel {
        }
 
        @Override
-       public byte[] getByteValue() {
-               return ByteUtils.getByte(getCount(), appInstList);
+       public byte[] toByteStream() {
+               return ByteUtil.getByte(getCount(), appInstList);
        }
 
        @Override
-       public void setByteToValues(byte[] input) {
+       public void fromByteStream(byte[] input) {
                // TODO Auto-generated method stub
 
        }
index ccb86dc..1f914fc 100644 (file)
@@ -28,9 +28,9 @@ package org.tizen.dynamicanalyzer.swap.channel.data;
 import org.tizen.dynamicanalyzer.common.AnalyzerManager;
 import org.tizen.dynamicanalyzer.constant.CommonConstants;
 import org.tizen.dynamicanalyzer.logparser.LogCenterConstants;
-import org.tizen.dynamicanalyzer.swap.model.ByteUtils;
 import org.tizen.dynamicanalyzer.swap.model.DATime;
 import org.tizen.dynamicanalyzer.swap.model.data.LogDataFactory;
+import org.tizen.dynamicanalyzer.util.ByteUtil;
 import org.tizen.dynamicanalyzer.util.DALogger;
 
 public class BasicDataMessage {
@@ -205,7 +205,7 @@ public class BasicDataMessage {
                        String strId = String.format("%4x", id);
                        DA_LOG.debug("Message [id : " + strId + "] [seq :" + seq
                                        + "] [ Time : " + time + " ms]");
-                       ByteUtils.printByteArray(payload);
+                       ByteUtil.printByteArray(payload);
                }
        }
 }
index 2936cb6..7eea771 100755 (executable)
@@ -78,7 +78,6 @@ import org.tizen.dynamicanalyzer.swap.channel.control.TargetInfo;
 import org.tizen.dynamicanalyzer.swap.channel.control.UserSpaceInst;
 import org.tizen.dynamicanalyzer.swap.logparser.DataManagerRegistry;
 import org.tizen.dynamicanalyzer.swap.logparser.SWAPLogParser;
-import org.tizen.dynamicanalyzer.swap.model.ByteUtils;
 import org.tizen.dynamicanalyzer.swap.model.DATime;
 import org.tizen.dynamicanalyzer.swap.model.data.LogDataUtils;
 import org.tizen.dynamicanalyzer.swap.platform.BinarySettingData;
@@ -89,6 +88,7 @@ import org.tizen.dynamicanalyzer.ui.page.UpdateViewTimer;
 import org.tizen.dynamicanalyzer.ui.toolbar.ConfigureManager;
 import org.tizen.dynamicanalyzer.ui.toolbar.StartProcessManager;
 import org.tizen.dynamicanalyzer.ui.toolbar.ToolbarArea;
+import org.tizen.dynamicanalyzer.util.ByteUtil;
 import org.tizen.dynamicanalyzer.util.DALogger;
 import org.tizen.dynamicanalyzer.util.WorkbenchUtil;
 import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
@@ -178,11 +178,11 @@ public class Communicator30 extends BaseCommunicator {
                UserSpaceInst userSpaceInst = getUserSpaceInst();
                DA_LOG.performance("TEST", "Start Trace", "Set application inst");
                byte[] replayData = AnalyzerManager.getProject().getReplayEvent();
-               byte[] rear = ByteUtils.getByte(userSpaceInst.getByteValue(),
+               byte[] rear = ByteUtil.getByte(userSpaceInst.toByteStream(),
                                replayData);
                int length = rear.length;
 
-               byte[] ret = ByteUtils.getByte(AnalyzerConstants.MSG_START_SWAP,
+               byte[] ret = ByteUtil.getByte(AnalyzerConstants.MSG_START_SWAP,
                                length, rear);
 
                DA_LOG.debug("print start message");
@@ -231,9 +231,9 @@ public class Communicator30 extends BaseCommunicator {
                                index += INT_SIZE; // message id
                                index += INT_SIZE; // payload length
                                index += INT_SIZE; // return id
-                               int sec = ByteUtils.toInt(data, index);
+                               int sec = ByteUtil.toInt(data, index);
                                index += INT_SIZE;
-                               int nano = ByteUtils.toInt(data, index);
+                               int nano = ByteUtil.toInt(data, index);
 
                                AnalyzerManager.getProject().setProfileStartTime(
                                                new DATime(sec, nano));
@@ -251,9 +251,9 @@ public class Communicator30 extends BaseCommunicator {
                byte[] payload = getMessagePayload(result.getRet());
                DATime profilingStartTime = new DATime();
                int index = 0;
-               int sec = ByteUtils.toInt(payload, index);
+               int sec = ByteUtil.toInt(payload, index);
                index += INT_SIZE;
-               int nano = ByteUtils.toInt(payload, index);
+               int nano = ByteUtil.toInt(payload, index);
                index += INT_SIZE;
                profilingStartTime.setSec(sec);
                profilingStartTime.setNano(nano);
@@ -342,7 +342,7 @@ public class Communicator30 extends BaseCommunicator {
 
        public HostResult sendBinaryInfoMessage(AppInfo selectedApp) {
                // send config message
-               byte[] msgBinInfo = ByteUtils
+               byte[] msgBinInfo = ByteUtil
                                .toBytes(AnalyzerConstants.MSG_BINARY_INFO);
 
                PackageInfo pkgInfo = GlobalInformation.getCurrentDeviceInfo()
@@ -354,15 +354,15 @@ public class Communicator30 extends BaseCommunicator {
                }
 
                int binCount = apps.size();
-               byte[] preMsg = ByteUtils.getByte(binCount);
+               byte[] preMsg = ByteUtil.getByte(binCount);
 
                for (AppInfo app : apps) {
                        String targetPath = app.getExecPath();
-                       preMsg = ByteUtils.getByte(preMsg, targetPath);
+                       preMsg = ByteUtil.getByte(preMsg, targetPath);
                }
 
                int length = preMsg.length;
-               byte[] msg = ByteUtils.getByte(msgBinInfo, length, preMsg);
+               byte[] msg = ByteUtil.getByte(msgBinInfo, length, preMsg);
 
                HostResult result = handleControlMessage(
                                GlobalInformation.getCurrentDeviceInfo(), msg);
@@ -375,7 +375,7 @@ public class Communicator30 extends BaseCommunicator {
                byte[] payload = getMessagePayload(result.getRet());
 
                int index = 0;
-               int count = ByteUtils.toInt(payload, index);
+               int count = ByteUtil.toInt(payload, index);
                index += INT_SIZE;
                String localBinaryPath = null;
 
@@ -386,10 +386,10 @@ public class Communicator30 extends BaseCommunicator {
                        binInfo.setTargetBinaryPath(targetPath);
                        app.setMainBinaryInfo(binInfo);
 
-                       int binaryType = ByteUtils.toInt(payload, index);
+                       int binaryType = ByteUtil.toInt(payload, index);
                        index += INT_SIZE;
-                       localBinaryPath = ByteUtils.getString(payload, index).trim();
-                       index += ByteUtils.getStringLength(payload, index);
+                       localBinaryPath = ByteUtil.getString(payload, index).trim();
+                       index += ByteUtil.getStringLength(payload, index);
                        String[] splitLocalBinaryPath = localBinaryPath
                                        .split(CommonConstants.SLASH);
                        binInfo.setLocalBinaryPath(localBinaryPath);
@@ -404,15 +404,15 @@ public class Communicator30 extends BaseCommunicator {
                                        binInfo.setTempBinaryPath(localBinaryPath);
                                }
 
-                               String md5sum = ByteUtils.getString(payload, index);
-                               index += ByteUtils.getStringLength(payload, index);
+                               String md5sum = ByteUtil.getString(payload, index);
+                               index += ByteUtil.getStringLength(payload, index);
                                binInfo.setType(binaryType);
                                binInfo.setTempBinaryPath(localBinaryPath);
                                binInfo.setMd5sumValue(md5sum);
                                continue;
                        } else {
-                               String md5sum = ByteUtils.getString(payload, index);
-                               index += ByteUtils.getStringLength(payload, index);
+                               String md5sum = ByteUtil.getString(payload, index);
+                               index += ByteUtil.getStringLength(payload, index);
                                binInfo.setType(binaryType);
                                binInfo.setTempBinaryPath(localBinaryPath);
                                binInfo.setMd5sumValue(md5sum);
@@ -509,7 +509,7 @@ public class Communicator30 extends BaseCommunicator {
        public HostResult sendConfigurationMessage(DeviceInfo devInfo, int type,
                        String message) {
                // send config message
-               byte[] config = ByteUtils.toBytes(AnalyzerConstants.MSG_CONFIG);
+               byte[] config = ByteUtil.toBytes(AnalyzerConstants.MSG_CONFIG);
                RunTimeConfiguration rt = new RunTimeConfiguration();
                rt.setFeatures(
                                ConfigureManager.getInstance().getConfiguration(devInfo),
@@ -517,9 +517,9 @@ public class Communicator30 extends BaseCommunicator {
                rt.setSystemTracePeriod(ConfigureManager.getInstance()
                                .getSystemPeriod());
                rt.setSamplingPeriod(ConfigureManager.getInstance().getSamplingPeriod());
-               byte[] rtByte = rt.getByteValue();
+               byte[] rtByte = rt.toByteStream();
                int length = rtByte.length;
-               byte[] msg = ByteUtils.getByte(config, length, rtByte);
+               byte[] msg = ByteUtil.getByte(config, length, rtByte);
 
                // ByteUtils.printByteArrayForStart(msg);
 
@@ -547,9 +547,9 @@ public class Communicator30 extends BaseCommunicator {
        @Override
        public HostResult stopTrace() {
                if (DACommunicator.isRunning()) {
-                       byte[] stop = ByteUtils.toBytes(AnalyzerConstants.MSG_STOP_SWAP);
+                       byte[] stop = ByteUtil.toBytes(AnalyzerConstants.MSG_STOP_SWAP);
                        int length = 0;
-                       byte[] stopMsg = ByteUtils.getByte(stop, length);
+                       byte[] stopMsg = ByteUtil.getByte(stop, length);
                        HostResult result = handleControlMessage(
                                        GlobalInformation.getCurrentDeviceInfo(), stopMsg);
 
@@ -603,7 +603,7 @@ public class Communicator30 extends BaseCommunicator {
                                controlSock.getOutputStream().write(message);
                        }
 
-                       int msgId = ByteUtils.toInt(message);
+                       int msgId = ByteUtil.toInt(message);
                        DA_LOG.debug("wait for ack... [send message : " + msgId + " ]");
 
                        int readsize = -1;
@@ -625,7 +625,7 @@ public class Communicator30 extends BaseCommunicator {
                                byte[] buf = new byte[readsize];
                                System.arraycopy(cbuf, 0, buf, 0, readsize);
                                result = HostResult.SUCCESS;
-                               int ackId = ByteUtils.toInt(buf);
+                               int ackId = ByteUtil.toInt(buf);
 
                                // for debug
                                System.out.print("ack id : ");
@@ -723,9 +723,9 @@ public class Communicator30 extends BaseCommunicator {
 
        public HostResult getTargetInfo(DeviceInfo device) {
                DA_LOG.debug("Send target info  : "
-                               + ByteUtils.getByte(AnalyzerConstants.MSG_TARGET_INFO, 0));
+                               + ByteUtil.getByte(AnalyzerConstants.MSG_TARGET_INFO, 0));
                HostResult result = handleControlMessage(device,
-                               ByteUtils.getByte(AnalyzerConstants.MSG_TARGET_INFO, 0));
+                               ByteUtil.getByte(AnalyzerConstants.MSG_TARGET_INFO, 0));
                if (result.isSuccess()) {
                        // FIXME : log parsing
                        byte[] data = result.getRet();
@@ -743,9 +743,9 @@ public class Communicator30 extends BaseCommunicator {
        @Override
        public HostResult sendKeepAliveMessage(DeviceInfo device) {
                DA_LOG.debug("Send keep alive message  : "
-                               + ByteUtils.getByte(AnalyzerConstants.MSG_KEEP_ALIVE, 0));
+                               + ByteUtil.getByte(AnalyzerConstants.MSG_KEEP_ALIVE, 0));
                HostResult result = handleControlMessage(device,
-                               ByteUtils.getByte(AnalyzerConstants.MSG_KEEP_ALIVE, 0));
+                               ByteUtil.getByte(AnalyzerConstants.MSG_KEEP_ALIVE, 0));
                if (result.isSuccess()) {
                        DA_LOG.debug("keep alive message ack :" + result.getMessage());
 
@@ -759,11 +759,11 @@ public class Communicator30 extends BaseCommunicator {
        private boolean isCorrectAck(int ackType, HostResult result) {
                byte[] data = result.getRet();
                int index = 0;
-               int msgId = ByteUtils.toInt(data, index);
+               int msgId = ByteUtil.toInt(data, index);
                index += INT_SIZE;
                // int length = ByteUtils.toInt(data, index);
                index += INT_SIZE;
-               int retId = ByteUtils.toInt(data, index);
+               int retId = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
                if (ackType == msgId) {
@@ -794,25 +794,25 @@ public class Communicator30 extends BaseCommunicator {
                int numberOfDevice = 0;
                String deviceList = CommonConstants.EMPTY;
 
-               systemMemorySize = ByteUtils.toLong(payload, index);
+               systemMemorySize = ByteUtil.toLong(payload, index);
                index += LONG_SIZE;
-               storageSize = ByteUtils.toLong(payload, index);
+               storageSize = ByteUtil.toLong(payload, index);
                index += LONG_SIZE;
-               bluetoothSupport = ByteUtils.toInt(payload, index);
+               bluetoothSupport = ByteUtil.toInt(payload, index);
                index += INT_SIZE;
-               gpsSupport = ByteUtils.toInt(payload, index);
+               gpsSupport = ByteUtil.toInt(payload, index);
                index += INT_SIZE;
-               wifiSupport = ByteUtils.toInt(payload, index);
+               wifiSupport = ByteUtil.toInt(payload, index);
                index += INT_SIZE;
-               cameraCount = ByteUtils.toInt(payload, index);
+               cameraCount = ByteUtil.toInt(payload, index);
                index += INT_SIZE;
-               networkType = ByteUtils.getString(payload, index);
-               index += ByteUtils.getStringLength(payload, index);
-               maxBrightness = ByteUtils.toInt(payload, index);
+               networkType = ByteUtil.getString(payload, index);
+               index += ByteUtil.getStringLength(payload, index);
+               maxBrightness = ByteUtil.toInt(payload, index);
                index += INT_SIZE;
-               numberOfCPU = ByteUtils.toInt(payload, index);
+               numberOfCPU = ByteUtil.toInt(payload, index);
                index += INT_SIZE;
-               numberOfDevice = ByteUtils.toInt(payload, index);
+               numberOfDevice = ByteUtil.toInt(payload, index);
                index += INT_SIZE;
 
                for (int i = 0; i < numberOfDevice; i++) {
@@ -845,12 +845,12 @@ public class Communicator30 extends BaseCommunicator {
 
        private int getReturnId(byte[] data) {
                int index = INT_SIZE * 2;
-               return ByteUtils.toInt(data, index);
+               return ByteUtil.toInt(data, index);
        }
 
        private byte[] getMessagePayload(byte[] data) {
                int index = INT_SIZE;
-               int size = ByteUtils.toInt(data, index);
+               int size = ByteUtil.toInt(data, index);
                index += INT_SIZE * 2;
                size -= INT_SIZE;
                byte[] payload = new byte[size];
@@ -888,7 +888,7 @@ public class Communicator30 extends BaseCommunicator {
 
                byte[] test = new byte[1];
                test[0] = 'n';
-               ret = ByteUtils.getByte(ret, test);
+               ret = ByteUtil.getByte(ret, test);
                return ret;
        }
 
@@ -921,7 +921,7 @@ public class Communicator30 extends BaseCommunicator {
        }
 
        public HostResult sendScreenShotRequest() {
-               byte[] msg = ByteUtils.getByte(AnalyzerConstants.MSG_GET_SCREENSHOT, 0);
+               byte[] msg = ByteUtil.getByte(AnalyzerConstants.MSG_GET_SCREENSHOT, 0);
                HostResult result = HostResult.SUCCESS;
                Socket controlSock = GlobalInformation.getCurrentDeviceInfo()
                                .getControlSock();
@@ -961,7 +961,7 @@ public class Communicator30 extends BaseCommunicator {
                byte[] msg = new byte[0];
                int count = settings.size();
                int failedCount = 0;
-               msg = ByteUtils.getByte(msg, messageId);
+               msg = ByteUtil.getByte(msg, messageId);
                byte[] libInst = new byte[0];
                for (int a = 0; a < count; a++) {
                        String binaryPath = settings.get(a).getBinaryPath();
@@ -1003,16 +1003,16 @@ public class Communicator30 extends BaseCommunicator {
                                // System.out.println();
                        }
                        size = size - exSize;
-                       libInst = ByteUtils.getByte(libInst, binaryPath, size);
+                       libInst = ByteUtil.getByte(libInst, binaryPath, size);
                        for (int i = 0; i < size; i++) {
-                               libInst = ByteUtils.getByte(libInst, functionInstList.get(i)
-                                               .getByteValue());
+                               libInst = ByteUtil.getByte(libInst, functionInstList.get(i)
+                                               .toByteStream());
                        }
                }
                count = count - failedCount;
-               libInst = ByteUtils.getByte(count, libInst);
+               libInst = ByteUtil.getByte(count, libInst);
                int length = libInst.length;
-               msg = ByteUtils.getByte(msg, length, libInst);
+               msg = ByteUtil.getByte(msg, length, libInst);
 
                // ByteUtils.printByteArrayForStart(msg);
                HostResult result = handleControlMessage(
@@ -1048,14 +1048,14 @@ public class Communicator30 extends BaseCommunicator {
 
                int binCount = binPaths.size();
                byte[] sendBin = new byte[0];
-               sendBin = ByteUtils.getByte(binCount);
+               sendBin = ByteUtil.getByte(binCount);
 
                for (int i = 0; i < binCount; i++) {
                        String targetPath = binPaths.get(i);
-                       sendBin = ByteUtils.getByte(sendBin, targetPath);
+                       sendBin = ByteUtil.getByte(sendBin, targetPath);
                }
                int length = sendBin.length;
-               byte[] msg = ByteUtils.getByte(AnalyzerConstants.MSG_BINARY_INFO,
+               byte[] msg = ByteUtil.getByte(AnalyzerConstants.MSG_BINARY_INFO,
                                length, sendBin);
                HostResult result = handleControlMessage(
                                GlobalInformation.getCurrentDeviceInfo(), msg);
@@ -1067,7 +1067,7 @@ public class Communicator30 extends BaseCommunicator {
                // parse binary info
                byte[] payload = getMessagePayload(result.getRet());
                int index = 0;
-               int count = ByteUtils.toInt(payload, index);
+               int count = ByteUtil.toInt(payload, index);
                index += INT_SIZE;
                String localBinaryPath = null;
                if (binCount != count) {
@@ -1076,10 +1076,10 @@ public class Communicator30 extends BaseCommunicator {
                }
                for (int i = 0; i < binCount; i++) {
                        BinaryInfo binInfo = binInfoList.get(i);
-                       int binaryType = ByteUtils.toInt(payload, index);
+                       int binaryType = ByteUtil.toInt(payload, index);
                        index += INT_SIZE;
-                       localBinaryPath = ByteUtils.getString(payload, index).trim();
-                       index += ByteUtils.getStringLength(payload, index);
+                       localBinaryPath = ByteUtil.getString(payload, index).trim();
+                       index += ByteUtil.getStringLength(payload, index);
                        binInfo.setLocalBinaryPath(localBinaryPath);
                        binInfo.setTempBinaryPath(localBinaryPath);
                        String[] splitLocalBinaryPath = localBinaryPath
@@ -1089,16 +1089,16 @@ public class Communicator30 extends BaseCommunicator {
                                                + File.separator + getFileName(binPaths.get(i));
                                result = pullTheFile(binPaths.get(i), localBinaryPath);
                                if (result.isSuccess()) {
-                                       String md5sum = ByteUtils.getString(payload, index);
-                                       index += ByteUtils.getStringLength(payload, index);
+                                       String md5sum = ByteUtil.getString(payload, index);
+                                       index += ByteUtil.getStringLength(payload, index);
                                        binInfo.setType(binaryType);
                                        binInfo.setTempBinaryPath(localBinaryPath);
                                        binInfo.setMd5sumValue(md5sum);
                                }
                                continue;
                        } else {
-                               String md5sum = ByteUtils.getString(payload, index);
-                               index += ByteUtils.getStringLength(payload, index);
+                               String md5sum = ByteUtil.getString(payload, index);
+                               index += ByteUtil.getStringLength(payload, index);
                                binInfo.setType(binaryType);
                                binInfo.setTempBinaryPath(localBinaryPath);
                                binInfo.setMd5sumValue(md5sum);
index 952ed42..aebb51c 100755 (executable)
@@ -30,10 +30,10 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 
-import org.tizen.dynamicanalyzer.model.Streamable;
+import org.tizen.dynamicanalyzer.model.StreamElement;
 import org.tizen.dynamicanalyzer.swap.model.data.LogData;
 
-public class LogPackage extends Streamable {
+public class LogPackage extends StreamElement {
        private HashMap<Integer, Logs> logMap;
 
        public void clear() {
index d3a9593..2c43c9a 100755 (executable)
@@ -59,7 +59,6 @@ import org.tizen.dynamicanalyzer.swap.channel.data.DataChannelConstants;
 import org.tizen.dynamicanalyzer.swap.channel.data.LibraryObject;
 import org.tizen.dynamicanalyzer.swap.channel.data.ProcessInfo;
 import org.tizen.dynamicanalyzer.swap.channel.data.ProcessInfoPackage;
-import org.tizen.dynamicanalyzer.swap.model.ByteUtils;
 import org.tizen.dynamicanalyzer.swap.model.DATime;
 import org.tizen.dynamicanalyzer.swap.model.data.LogData;
 import org.tizen.dynamicanalyzer.swap.model.data.LogDataFactory;
@@ -69,6 +68,7 @@ import org.tizen.dynamicanalyzer.ui.toolbar.StartProcessManager;
 import org.tizen.dynamicanalyzer.ui.toolbar.StopLogProcessor;
 import org.tizen.dynamicanalyzer.ui.toolbar.StopProcessManager;
 import org.tizen.dynamicanalyzer.ui.toolbar.ToolbarArea;
+import org.tizen.dynamicanalyzer.util.ByteUtil;
 import org.tizen.dynamicanalyzer.util.WorkbenchUtil;
 import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
 import org.tizen.dynamicanalyzer.util.DALogger;
@@ -172,25 +172,25 @@ public class MessageParser {
                String commandLineName = null;
 
                int index = MSG_HEADER_SIZE;
-               pid = ByteUtils.toInt(data, index);
+               pid = ByteUtil.toInt(data, index);
                index += INT_SIZE;
-               commandLineName = ByteUtils.getString(data, index);
-               index += ByteUtils.getStringLength(data, index);
-               ppid = ByteUtils.toInt(data, index);
+               commandLineName = ByteUtil.getString(data, index);
+               index += ByteUtil.getStringLength(data, index);
+               ppid = ByteUtil.toInt(data, index);
                index += INT_SIZE;
-               int sec = ByteUtils.toInt(data, index);
+               int sec = ByteUtil.toInt(data, index);
                index += INT_SIZE;
-               int nano = ByteUtils.toInt(data, index);
+               int nano = ByteUtil.toInt(data, index);
                index += INT_SIZE;
                processStartTime.setSec(sec);
                processStartTime.setNano(nano);
-               lowAddr = ByteUtils.toLong(data, index);
+               lowAddr = ByteUtil.toLong(data, index);
                index += LONG_SIZE;
-               highAddr = ByteUtils.toLong(data, index);
+               highAddr = ByteUtil.toLong(data, index);
                index += LONG_SIZE;
-               targetBinaryPath = ByteUtils.getString(data, index);
-               index += ByteUtils.getStringLength(data, index);
-               dependantLibCount = ByteUtils.toInt(data, index);
+               targetBinaryPath = ByteUtil.getString(data, index);
+               index += ByteUtil.getStringLength(data, index);
+               dependantLibCount = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
                ProcessInfoPackage pInfoPack = processPkgMap.get(pid);
@@ -214,14 +214,14 @@ public class MessageParser {
                for (int i = 0; i < dependantLibCount; i++) {
                        LibraryObject libObj = new LibraryObject();
                        libObj.setPid(pid);
-                       long lowestAddr = ByteUtils.toLong(data, index);
+                       long lowestAddr = ByteUtil.toLong(data, index);
                        index += LONG_SIZE;
-                       long highestAddr = ByteUtils.toLong(data, index);
+                       long highestAddr = ByteUtil.toLong(data, index);
                        index += LONG_SIZE;
-                       String libPath = ByteUtils.getString(data, index);
+                       String libPath = ByteUtil.getString(data, index);
                        // remove \0 char
                        // libPath = libPath.substring(0, libPath.length() - 1);
-                       index += ByteUtils.getStringLength(data, index);
+                       index += ByteUtil.getStringLength(data, index);
                        libObj.setLowestAddress(lowestAddr);
                        libObj.setHighestAddress(highestAddr);
                        libObj.setLibPath(libPath);
@@ -266,14 +266,14 @@ public class MessageParser {
 
                /** parsing */
                int index = 0;
-               int id = ByteUtils.toInt(data, index);
+               int id = ByteUtil.toInt(data, index);
                index += INT_SIZE;
                // int seq = ByteUtils.toInt(data, index);
                index += INT_SIZE;
                DATime changeTime = new DATime();
-               int sec = ByteUtils.toInt(data, index);
+               int sec = ByteUtil.toInt(data, index);
                index += INT_SIZE;
-               int nano = ByteUtils.toInt(data, index);
+               int nano = ByteUtil.toInt(data, index);
                index += INT_SIZE;
                changeTime.setSec(sec);
                changeTime.setNano(nano);
@@ -281,16 +281,16 @@ public class MessageParser {
                // int length = ByteUtils.toInt(data, index);
                index += INT_SIZE;
 
-               int pid = ByteUtils.toInt(data, index);
+               int pid = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
                long lowAddr = 0;
                long highAddr = 0;
 
                if (id == DataChannelConstants.MSG_PROCESS_MAP) {
-                       lowAddr = ByteUtils.toLong(data, index);
+                       lowAddr = ByteUtil.toLong(data, index);
                        index += LONG_SIZE;
-                       highAddr = ByteUtils.toLong(data, index);
+                       highAddr = ByteUtil.toLong(data, index);
                        index += LONG_SIZE;
                }
                String libPath = LogDataUtils.getString(index, data);
@@ -438,7 +438,7 @@ public class MessageParser {
                                // System.out.println("header log");
                                // ByteUtils.printByteArrayForStart(header);
 
-                               int id = ByteUtils.toInt(header, 0);
+                               int id = ByteUtil.toInt(header, 0);
 
                                /** for debug */
                                // int seq = ByteUtils.toInt(header, INT_SIZE);
@@ -446,7 +446,7 @@ public class MessageParser {
                                // AnalyzerUtil.printHexdecimal(id);
                                // System.out.println();
 
-                               int payloadSize = ByteUtils.toInt(header,
+                               int payloadSize = ByteUtil.toInt(header,
                                                MSG_PAYLOAD_SIZE_INDEX);
                                byte[] payload = null;
 
@@ -478,7 +478,7 @@ public class MessageParser {
                                                payloadSize);
                                
                                if(PRINT_DATA_LOG_TOFILE && printWriter != null) {
-                                       printWriter.printf("%d %d %d %d %d :", id, ByteUtils.toInt(header, 4), ByteUtils.toInt(header, 8), ByteUtils.toInt(header, 12), payloadSize);
+                                       printWriter.printf("%d %d %d %d %d :", id, ByteUtil.toInt(header, 4), ByteUtil.toInt(header, 8), ByteUtil.toInt(header, 12), payloadSize);
                                        for(int k = 0; k < payloadSize; k++)
                                                printWriter.printf("%02x ", payload[k]);
                                        printWriter.printf("\n");
@@ -551,7 +551,7 @@ public class MessageParser {
        }
 
        private void processMessage(byte[] data) {
-               int id = ByteUtils.toInt(data, 0);
+               int id = ByteUtil.toInt(data, 0);
                LogData log = null;
                switch (id) {
                case DataChannelConstants.MSG_DATA_PROCESS_INFO:
@@ -614,10 +614,10 @@ public class MessageParser {
                {
                        // process command line name is changed (/proc/<pid>/cmdline)
                        int index = MSG_HEADER_SIZE;
-                       int pid = ByteUtils.toInt(data, index);
+                       int pid = ByteUtil.toInt(data, index);
                        index += INT_SIZE;
-                       String name = ByteUtils.getString(data, index);
-                       index += ByteUtils.getStringLength(data, index);
+                       String name = ByteUtil.getString(data, index);
+                       index += ByteUtil.getStringLength(data, index);
 
                        HashMap<Integer, ProcessInfoPackage> processPkgMap = AnalyzerManager
                                        .getProject().getProcessInfoPackHash();
index 46533f0..1b253b2 100644 (file)
@@ -26,6 +26,7 @@
 package org.tizen.dynamicanalyzer.swap.model;
 
 import org.tizen.dynamicanalyzer.constant.CommonConstants;
+import org.tizen.dynamicanalyzer.util.ByteUtil;
 
 public class DATime {
        private int sec;
@@ -62,7 +63,7 @@ public class DATime {
        }
 
        public byte[] getByteValues() {
-               return ByteUtils.getByte(sec, nano);
+               return ByteUtil.getByte(sec, nano);
        }
 
        @Override
index 4a14c40..a296e55 100644 (file)
@@ -30,6 +30,7 @@ import java.sql.ResultSet;
 import java.sql.SQLException;
 
 import org.tizen.dynamicanalyzer.swap.model.data.LogData;
+import org.tizen.dynamicanalyzer.util.ByteUtil;
 
 public class RecordEventObject extends LogData {
        private DATime eventTime = new DATime();
@@ -105,7 +106,7 @@ public class RecordEventObject extends LogData {
        }
 
        public byte[] getByteValues() {
-               return ByteUtils.getByte(eventTime.getByteValues(), eventId, eventType,
+               return ByteUtil.getByte(eventTime.getByteValues(), eventId, eventType,
                                eventCode, eventValue);
        }
 
index 4475785..c9e2cb3 100644 (file)
@@ -33,7 +33,7 @@ import java.sql.ResultSet;
 import java.sql.SQLException;
 
 import org.tizen.dynamicanalyzer.swap.logparser.MessageParser;
-import org.tizen.dynamicanalyzer.swap.model.ByteUtils;
+import org.tizen.dynamicanalyzer.util.ByteUtil;
 
 public class ContextSwitchData extends LogData {
 
@@ -65,13 +65,13 @@ public class ContextSwitchData extends LogData {
                super.makeData(data);
                index = MessageParser.MSG_HEADER_SIZE;
 
-               pcAddr = ByteUtils.toLong(data, index);
+               pcAddr = ByteUtil.toLong(data, index);
                index += LONG_SIZE;
-               pid = ByteUtils.toInt(data, index);
+               pid = ByteUtil.toInt(data, index);
                index += INT_SIZE;
-               tid = ByteUtils.toInt(data, index);
+               tid = ByteUtil.toInt(data, index);
                index += INT_SIZE;
-               cpuNum = ByteUtils.toInt(data, index);
+               cpuNum = ByteUtil.toInt(data, index);
                index += INT_SIZE;
        }
 
index f64dff7..a5c30a7 100644 (file)
@@ -31,7 +31,7 @@ import java.sql.PreparedStatement;
 import java.sql.ResultSet;
 import java.sql.SQLException;
 
-import org.tizen.dynamicanalyzer.swap.model.ByteUtils;
+import org.tizen.dynamicanalyzer.util.ByteUtil;
 
 public class ControlData extends ProbeCommonData {
        private String parentName = null;
@@ -59,7 +59,7 @@ public class ControlData extends ProbeCommonData {
                parentClassName = new String(temp);
                index += length;
 
-               parentPointer = ByteUtils.toLong(data, index);
+               parentPointer = ByteUtil.toLong(data, index);
                index += LONG_SIZE;
 
                length = LogDataUtils.getStringLength(index, data);
@@ -74,7 +74,7 @@ public class ControlData extends ProbeCommonData {
                childClassName = new String(temp);
                index += length;
 
-               childPointer = ByteUtils.toLong(data, index);
+               childPointer = ByteUtil.toLong(data, index);
        }
 
        public String getParentName() {
index 2ee6c98..773110b 100644 (file)
@@ -31,7 +31,7 @@ import java.sql.PreparedStatement;
 import java.sql.ResultSet;
 import java.sql.SQLException;
 
-import org.tizen.dynamicanalyzer.swap.model.ByteUtils;
+import org.tizen.dynamicanalyzer.util.ByteUtil;
 
 public class CustomData extends ProbeCommonData {
 
@@ -46,10 +46,10 @@ public class CustomData extends ProbeCommonData {
        public void makeData(byte[] data) {
                super.makeData(data);
 
-               handle = ByteUtils.toInt(data, index);
+               handle = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
-               type = ByteUtils.toInt(data, index);
+               type = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
                int length = LogDataUtils.getStringLength(index, data);
@@ -58,10 +58,10 @@ public class CustomData extends ProbeCommonData {
                name = new String(temp);
                index += length;
 
-               color = ByteUtils.toInt(data, index);
+               color = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
-               value = ByteUtils.toDouble(data, index);
+               value = ByteUtil.toDouble(data, index);
        }
 
        public int getHandle() {
index ef7c53f..fe489e3 100644 (file)
@@ -32,7 +32,7 @@ import java.sql.PreparedStatement;
 import java.sql.ResultSet;
 import java.sql.SQLException;
 
-import org.tizen.dynamicanalyzer.swap.model.ByteUtils;
+import org.tizen.dynamicanalyzer.util.ByteUtil;
 
 public class FileData extends ProbeCommonData {
 
@@ -88,16 +88,16 @@ public class FileData extends ProbeCommonData {
        public void makeData(byte[] data) {
                super.makeData(data);
 
-               size = ByteUtils.toLong(data, index);
+               size = ByteUtil.toLong(data, index);
                index += LONG_SIZE;
 
-               fdValue = ByteUtils.toLong(data, index);
+               fdValue = ByteUtil.toLong(data, index);
                index += LONG_SIZE;
 
-               fdApiType = ByteUtils.toInt(data, index);
+               fdApiType = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
-               fileSize = ByteUtils.toLong(data, index);
+               fileSize = ByteUtil.toLong(data, index);
                index += LONG_SIZE;
 
                filePath = LogDataUtils.getString(index, data);
index 26fff64..1144507 100644 (file)
@@ -5,7 +5,7 @@ import java.sql.ResultSet;
 import java.sql.SQLException;
 
 import org.tizen.dynamicanalyzer.constant.CommonConstants;
-import org.tizen.dynamicanalyzer.swap.model.ByteUtils;
+import org.tizen.dynamicanalyzer.util.ByteUtil;
 
 public class GLES20LogData extends ProbeCommonData {
        protected long glCurrentContextName = 0;
@@ -16,13 +16,13 @@ public class GLES20LogData extends ProbeCommonData {
        @Override
        public void makeData(byte[] data) {
                super.makeData(data);
-               glCurrentContextName = ByteUtils.toLong(data, index);
+               glCurrentContextName = ByteUtil.toLong(data, index);
                index += CommonConstants.LONG_SIZE;
 
-               apiType = ByteUtils.toInt(data, index);
+               apiType = ByteUtil.toInt(data, index);
                index += CommonConstants.INT_SIZE;
 
-               elapsedTime = ByteUtils.toLong(data, index);
+               elapsedTime = ByteUtil.toLong(data, index);
                index += CommonConstants.LONG_SIZE;
 
                int length = LogDataUtils.getStringLength(index, data);
index 0304b6f..34a5fe9 100644 (file)
@@ -33,9 +33,9 @@ import java.sql.SQLException;
 
 import org.tizen.dynamicanalyzer.common.AnalyzerManager;
 import org.tizen.dynamicanalyzer.communicator.DACommunicator;
-import org.tizen.dynamicanalyzer.swap.model.ByteUtils;
 import org.tizen.dynamicanalyzer.swap.model.DATime;
 import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
+import org.tizen.dynamicanalyzer.util.ByteUtil;
 import org.tizen.dynamicanalyzer.util.DALogger;
 
 public abstract class LogData implements Cloneable {
@@ -69,15 +69,15 @@ public abstract class LogData implements Cloneable {
        public void makeData(byte[] data) {
                isSWAP = DACommunicator.isSWAPVersion();
 
-               id = ByteUtils.toInt(data, index);
+               id = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
-               seq = ByteUtils.toInt(data, index);
+               seq = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
-               long sec = ByteUtils.toInt(data, index);
+               long sec = ByteUtil.toInt(data, index);
                index += INT_SIZE;
-               long nano = ByteUtils.toInt(data, index);
+               long nano = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
                DATime startTime = AnalyzerManager.getProject().getProfileStartTime();
index 619d5b1..28f1b19 100644 (file)
@@ -52,7 +52,6 @@ import java.util.ArrayList;
 import java.util.List;
 
 import org.tizen.dynamicanalyzer.logparser.LogCenterConstants;
-import org.tizen.dynamicanalyzer.swap.model.ByteUtils;
 import org.tizen.dynamicanalyzer.swap.model.format.ContextSwitchLogFormat;
 import org.tizen.dynamicanalyzer.swap.model.format.ControlLogFormat;
 import org.tizen.dynamicanalyzer.swap.model.format.CustomChartLogFormat;
@@ -70,6 +69,7 @@ import org.tizen.dynamicanalyzer.swap.model.format.SystemLogFormat;
 import org.tizen.dynamicanalyzer.swap.model.format.ThreadLogFormat;
 import org.tizen.dynamicanalyzer.swap.model.format.UIEventLogFormat;
 import org.tizen.dynamicanalyzer.swap.model.format.UserFunctionLogFormat;
+import org.tizen.dynamicanalyzer.util.ByteUtil;
 
 public class LogDataFactory {
        private static List<Integer> logList = new ArrayList<Integer>();
@@ -127,7 +127,7 @@ public class LogDataFactory {
        }
 
        public static LogData createInstance(byte[] data) {
-               int id = ByteUtils.toInt(data, 0);
+               int id = ByteUtil.toInt(data, 0);
 
                LogData output = null;
                switch (id) {
index 0641d76..6c74ac1 100644 (file)
@@ -31,14 +31,14 @@ import static org.tizen.dynamicanalyzer.constant.CommonConstants.INT_SIZE;
 import static org.tizen.dynamicanalyzer.constant.CommonConstants.LONG_SIZE;
 
 import org.tizen.dynamicanalyzer.constant.CommonConstants;
-import org.tizen.dynamicanalyzer.swap.model.ByteUtils;
+import org.tizen.dynamicanalyzer.util.ByteUtil;
 import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
 
 public class LogDataUtils {
 
        public static ArgsInfo parseArgs(byte[] payload, int index) {
                ArgsInfo args = new ArgsInfo();
-               int countOfArgs = ByteUtils.toInt(payload, index);
+               int countOfArgs = ByteUtil.toInt(payload, index);
                index += INT_SIZE;
                StringBuffer buffer = new StringBuffer();
                for (int ii = 0; ii < countOfArgs; ii++) {
@@ -52,34 +52,34 @@ public class LogDataUtils {
                        }
 
                        case 'd': {
-                               int iValue = ByteUtils.toInt(payload, index);
+                               int iValue = ByteUtil.toInt(payload, index);
                                buffer.append(iValue);
                                index += Integer.SIZE / Byte.SIZE;
                                break;
                        }
 
                        case 'x': {
-                               long lValue = ByteUtils.toLong(payload, index);
+                               long lValue = ByteUtil.toLong(payload, index);
                                buffer.append(lValue);
                                index += LONG_SIZE;
                                break;
                        }
 
                        case 'p': {
-                               long pValue = ByteUtils.toLong(payload, index);
+                               long pValue = ByteUtil.toLong(payload, index);
                                buffer.append(AnalyzerUtil.toHexdecimal(pValue));
                                index += LONG_SIZE;
                                break;
                        }
 
                        case 'f': {
-                               float fValue = ByteUtils.toFloat(payload, index);
+                               float fValue = ByteUtil.toFloat(payload, index);
                                buffer.append(fValue);
                                index += FLOAT_SIZE;
                                break;
                        }
                        case 'w': {
-                               double dValue = ByteUtils.toDouble(payload, index);
+                               double dValue = ByteUtil.toDouble(payload, index);
                                buffer.append(dValue);
                                index += DOUBLE_SIZE;
                                break;
@@ -108,14 +108,14 @@ public class LogDataUtils {
                                break;
                        }
                        case 'F': {
-                               long object = ByteUtils.toLong(payload, index);
+                               long object = ByteUtil.toLong(payload, index);
                                buffer.append(AnalyzerUtil.toHexdecimal(object));
                                index += LONG_SIZE;
-                               int arrarySize = ByteUtils.toInt(payload, index);
+                               int arrarySize = ByteUtil.toInt(payload, index);
                                index += INT_SIZE;
                                buffer.append(CommonConstants.OPEN_SQUARE_BRACKET);
                                for (int i = 0; i < arrarySize; i++) {
-                                       float fValue = ByteUtils.toFloat(payload, index);
+                                       float fValue = ByteUtil.toFloat(payload, index);
                                        buffer.append(fValue);
                                        index += FLOAT_SIZE;
                                        if (i != arrarySize - 1) {
@@ -153,27 +153,27 @@ public class LogDataUtils {
                        index += 1;
                        break;
                case 'd':
-                       int iValue = ByteUtils.toInt(payload, index);
+                       int iValue = ByteUtil.toInt(payload, index);
                        buffer.append(iValue);
                        index += Integer.SIZE / Byte.SIZE;
                        break;
                case 'x':
-                       long lValue = ByteUtils.toLong(payload, index);
+                       long lValue = ByteUtil.toLong(payload, index);
                        buffer.append(lValue);
                        index += LONG_SIZE;
                        break;
                case 'p':
-                       long pValue = ByteUtils.toLong(payload, index);
+                       long pValue = ByteUtil.toLong(payload, index);
                        buffer.append(AnalyzerUtil.toHexdecimal(pValue));
                        index += LONG_SIZE;
                        break;
                case 'f':
-                       float fValue = ByteUtils.toFloat(payload, index);
+                       float fValue = ByteUtil.toFloat(payload, index);
                        buffer.append(fValue);
                        index += FLOAT_SIZE;
                        break;
                case 'w':
-                       double dValue = ByteUtils.toDouble(payload, index);
+                       double dValue = ByteUtil.toDouble(payload, index);
                        buffer.append(dValue);
                        index += DOUBLE_SIZE;
                        break;
index 39cfd35..f081079 100644 (file)
@@ -32,7 +32,7 @@ import java.sql.PreparedStatement;
 import java.sql.ResultSet;
 import java.sql.SQLException;
 
-import org.tizen.dynamicanalyzer.swap.model.ByteUtils;
+import org.tizen.dynamicanalyzer.util.ByteUtil;
 
 public class MemoryData extends ProbeCommonData {
        long size = 0;
@@ -44,13 +44,13 @@ public class MemoryData extends ProbeCommonData {
 
        public void makeData(byte[] data) {
                super.makeData(data);
-               size = ByteUtils.toInt(data, index);
+               size = ByteUtil.toInt(data, index);
 
                index += LONG_SIZE;
-               apiType = ByteUtils.toInt(data, index);
+               apiType = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
-               address = ByteUtils.toLong(data, index);
+               address = ByteUtil.toLong(data, index);
        }
 
        public long getSize() {
index 5a0eea6..a808b38 100644 (file)
@@ -8,7 +8,7 @@ import java.sql.ResultSet;
 import java.sql.SQLException;
 
 import org.tizen.dynamicanalyzer.constant.CommonConstants;
-import org.tizen.dynamicanalyzer.swap.model.ByteUtils;
+import org.tizen.dynamicanalyzer.util.ByteUtil;
 
 public class NetworkData extends ProbeCommonData {
 
@@ -67,22 +67,22 @@ public class NetworkData extends ProbeCommonData {
        public void makeData(byte[] data) {
                super.makeData(data);
 
-               objectAddress = ByteUtils.toLong(data, index);
+               objectAddress = ByteUtil.toLong(data, index);
                index += LONG_SIZE;
 
-               fdValue = ByteUtils.toLong(data, index);
+               fdValue = ByteUtil.toLong(data, index);
                index += LONG_SIZE;
 
-               fdApiType = ByteUtils.toInt(data, index);
+               fdApiType = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
-               destinationIPAddress = ByteUtils.toInt(data, index);
+               destinationIPAddress = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
-               destinationPortAddress = ByteUtils.toInt(data, index);
+               destinationPortAddress = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
-               messageSize = ByteUtils.toInt(data, index);
+               messageSize = ByteUtil.toInt(data, index);
                index += LONG_SIZE;
                if (messageSize > 0) {
                        packetMessage = LogDataUtils.getString(index, data);
index b1478d5..df03317 100644 (file)
@@ -39,7 +39,7 @@ import org.tizen.dynamicanalyzer.swap.channel.data.ApiNameManager;
 import org.tizen.dynamicanalyzer.swap.channel.data.ProcessInfo;
 import org.tizen.dynamicanalyzer.swap.channel.data.ProcessInfoPackage;
 import org.tizen.dynamicanalyzer.swap.logparser.MessageParser;
-import org.tizen.dynamicanalyzer.swap.model.ByteUtils;
+import org.tizen.dynamicanalyzer.util.ByteUtil;
 
 public class ProbeCommonData extends LogData {
 
@@ -82,13 +82,13 @@ public class ProbeCommonData extends LogData {
                super.makeData(data);
                index = MessageParser.MSG_HEADER_SIZE;
 
-               apiId = ByteUtils.toInt(data, index);
+               apiId = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
-               pid = ByteUtils.toInt(data, index);
+               pid = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
-               tid = ByteUtils.toInt(data, index);
+               tid = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
                ArgsInfo argInfo = LogDataUtils.parseArgs(data, index);
@@ -101,19 +101,19 @@ public class ProbeCommonData extends LogData {
                ret = retInfo.getArgs();
                index = retInfo.getLastIndex();
 
-               errno = ByteUtils.toLong(data, index);
+               errno = ByteUtil.toLong(data, index);
                index += LONG_SIZE;
 
-               internalCall = ByteUtils.toInt(data, index);
+               internalCall = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
-               callerAddress = ByteUtils.toLong(data, index);
+               callerAddress = ByteUtil.toLong(data, index);
                index += LONG_SIZE;
 
-               reserved1 = ByteUtils.toInt(data, index);
+               reserved1 = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
-               reserved2 = ByteUtils.toInt(data, index);
+               reserved2 = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
                ProcessInfoPackage processInfoPkg = AnalyzerManager.getProject()
index bfbae26..92950b2 100644 (file)
@@ -41,7 +41,7 @@ import org.tizen.dynamicanalyzer.common.AnalyzerManager;
 import org.tizen.dynamicanalyzer.swap.channel.control.BinaryInfo;
 import org.tizen.dynamicanalyzer.swap.channel.data.ProcessInfo;
 import org.tizen.dynamicanalyzer.swap.channel.data.ProcessInfoPackage;
-import org.tizen.dynamicanalyzer.swap.model.ByteUtils;
+import org.tizen.dynamicanalyzer.util.ByteUtil;
 
 public class ProfileData extends LogData {
 
@@ -90,25 +90,25 @@ public class ProfileData extends LogData {
                switch (id) {
                case MSG_FUNCTION_ENTRY:
                        logCount++;
-                       pcAddr = ByteUtils.toLong(data, index);
+                       pcAddr = ByteUtil.toLong(data, index);
                        index += LONG_SIZE;
-                       callerPcAddr = ByteUtils.toLong(data, index);
+                       callerPcAddr = ByteUtil.toLong(data, index);
                        index += LONG_SIZE;
 
                        byte[] temp = new byte[4];
                        System.arraycopy(data, index, temp, 0, 2);
-                       probeType = ByteUtils.toInt(temp, 0);
+                       probeType = ByteUtil.toInt(temp, 0);
                        index += 2;
 
                        System.arraycopy(data, index, temp, 0, 2);
-                       probeSubType = ByteUtils.toInt(temp, 0);
+                       probeSubType = ByteUtil.toInt(temp, 0);
                        index += 2;
 
-                       pid = ByteUtils.toInt(data, index);
+                       pid = ByteUtil.toInt(data, index);
                        index += INT_SIZE;
-                       tid = ByteUtils.toInt(data, index);
+                       tid = ByteUtil.toInt(data, index);
                        index += INT_SIZE;
-                       cpuNum = ByteUtils.toInt(data, index);
+                       cpuNum = ByteUtil.toInt(data, index);
                        index += INT_SIZE;
                        ArgsInfo info = LogDataUtils.parseArgs(data, index);
                        args = info.getArgs();
@@ -116,15 +116,15 @@ public class ProfileData extends LogData {
                        break;
                case MSG_FUNCTION_EXIT:
                        logCount++;
-                       pid = ByteUtils.toInt(data, index);
+                       pid = ByteUtil.toInt(data, index);
                        index += INT_SIZE;
-                       tid = ByteUtils.toInt(data, index);
+                       tid = ByteUtil.toInt(data, index);
                        index += INT_SIZE;
-                       pcAddr = ByteUtils.toLong(data, index);
+                       pcAddr = ByteUtil.toLong(data, index);
                        index += LONG_SIZE;
-                       callerPcAddr = ByteUtils.toLong(data, index);
+                       callerPcAddr = ByteUtil.toLong(data, index);
                        index += LONG_SIZE;
-                       cpuNum = ByteUtils.toInt(data, index);
+                       cpuNum = ByteUtil.toInt(data, index);
                        index += INT_SIZE;
                        ArgsInfo retInfo = LogDataUtils.parseReturn(data, index);
                        ret = retInfo.getArgs();
@@ -132,23 +132,23 @@ public class ProfileData extends LogData {
                        break;
                case MSG_CONTEXT_SWITCH_ENTRY:
                case MSG_CONTEXT_SWITCH_EXIT:
-                       pcAddr = ByteUtils.toLong(data, index);
+                       pcAddr = ByteUtil.toLong(data, index);
                        index += LONG_SIZE;
-                       pid = ByteUtils.toInt(data, index);
+                       pid = ByteUtil.toInt(data, index);
                        index += INT_SIZE;
-                       tid = ByteUtils.toInt(data, index);
+                       tid = ByteUtil.toInt(data, index);
                        index += INT_SIZE;
-                       cpuNum = ByteUtils.toInt(data, index);
+                       cpuNum = ByteUtil.toInt(data, index);
                        index += INT_SIZE;
                        break;
                case MSG_DATA_SAMPLE:
-                       pid = ByteUtils.toInt(data, index);
+                       pid = ByteUtil.toInt(data, index);
                        index += INT_SIZE;
-                       pcAddr = ByteUtils.toLong(data, index);
+                       pcAddr = ByteUtil.toLong(data, index);
                        index += LONG_SIZE;
-                       tid = ByteUtils.toInt(data, index);
+                       tid = ByteUtil.toInt(data, index);
                        index += INT_SIZE;
-                       cpuNum = ByteUtils.toInt(data, index);
+                       cpuNum = ByteUtil.toInt(data, index);
                        index += INT_SIZE;
                        break;
 
index 6f04fc0..edf67a6 100644 (file)
@@ -32,9 +32,9 @@ import java.util.List;
 
 import org.tizen.dynamicanalyzer.common.AnalyzerManager;
 import org.tizen.dynamicanalyzer.communicator.DACommunicator;
-import org.tizen.dynamicanalyzer.swap.model.ByteUtils;
 import org.tizen.dynamicanalyzer.swap.model.DATime;
 import org.tizen.dynamicanalyzer.swap.model.RecordEventObject;
+import org.tizen.dynamicanalyzer.util.ByteUtil;
 
 public class ReplayData extends LogData {
 
@@ -49,15 +49,15 @@ public class ReplayData extends LogData {
                // super.makeData(data);
                isSWAP = DACommunicator.isSWAPVersion();
 
-               id = ByteUtils.toInt(data, index);
+               id = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
-               seq = ByteUtils.toInt(data, index);
+               seq = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
-               int sec = ByteUtils.toInt(data, index);
+               int sec = ByteUtil.toInt(data, index);
                index += INT_SIZE;
-               int nano = ByteUtils.toInt(data, index);
+               int nano = ByteUtil.toInt(data, index);
                index += INT_SIZE;
                DATime eventTime = new DATime();
                eventTime.setSec(sec);
@@ -73,7 +73,7 @@ public class ReplayData extends LogData {
 
                index += INT_SIZE; // payload length field offset
 
-               int count = ByteUtils.toInt(data, index);
+               int count = ByteUtil.toInt(data, index);
                index += INT_SIZE;
                setObjectCount(count);
 
@@ -89,21 +89,21 @@ public class ReplayData extends LogData {
                        recordObj.setEventTime(eventTime);
 
                        // event id
-                       int value = ByteUtils.toInt(data, index);
+                       int value = ByteUtil.toInt(data, index);
                        recordObj.setEventId(value);
                        index += INT_SIZE;
 
                        // event type
-                       value = ByteUtils.toInt(data, index);
+                       value = ByteUtil.toInt(data, index);
                        recordObj.setEventType(value);
                        index += INT_SIZE;
 
                        // eventy code
-                       value = ByteUtils.toInt(data, index);
+                       value = ByteUtil.toInt(data, index);
                        recordObj.setEventCode(value);
                        index += INT_SIZE;
 
-                       value = ByteUtils.toInt(data, index);
+                       value = ByteUtil.toInt(data, index);
                        recordObj.setEventValue(value);
                        index += INT_SIZE;
 //                     System.out.println("Sec : " + recordObj.getEventTime().getSec()
index adef582..e58fd0b 100644 (file)
@@ -32,7 +32,7 @@ import java.sql.PreparedStatement;
 import java.sql.ResultSet;
 import java.sql.SQLException;
 
-import org.tizen.dynamicanalyzer.swap.model.ByteUtils;
+import org.tizen.dynamicanalyzer.util.ByteUtil;
 
 public class SceneData extends ProbeCommonData {
        String sceneName = null;
@@ -60,7 +60,7 @@ public class SceneData extends ProbeCommonData {
                formName = new String(temp);
                index += length;
 
-               formPointer = ByteUtils.toLong(data, index);
+               formPointer = ByteUtil.toLong(data, index);
                index += LONG_SIZE;
 
                length = LogDataUtils.getStringLength(index, data);
@@ -69,13 +69,13 @@ public class SceneData extends ProbeCommonData {
                panelName = new String(temp);
                index += length;
 
-               panelPointer = ByteUtils.toLong(data, index);
+               panelPointer = ByteUtil.toLong(data, index);
                index += LONG_SIZE;
 
-               transitionTime = ByteUtils.toInt(data, index);
+               transitionTime = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
-               userTransitionTime = ByteUtils.toInt(data, index);
+               userTransitionTime = ByteUtil.toInt(data, index);
        }
 
        public String getSceneName() {
index bbcc554..0512333 100644 (file)
@@ -29,7 +29,7 @@ import java.sql.PreparedStatement;
 import java.sql.ResultSet;
 import java.sql.SQLException;
 
-import org.tizen.dynamicanalyzer.swap.model.ByteUtils;
+import org.tizen.dynamicanalyzer.util.ByteUtil;
 
 public class ScreenShotData extends ProbeCommonData {
        String imageFilePath = null;
@@ -45,7 +45,7 @@ public class ScreenShotData extends ProbeCommonData {
                imageFilePath = new String(temp);
                index += length;
 
-               orientation = ByteUtils.toInt(data, index);
+               orientation = ByteUtil.toInt(data, index);
        }
 
        public String getImageFilePath() {
index 0e7cd01..a204c71 100644 (file)
@@ -32,7 +32,7 @@ import java.sql.PreparedStatement;
 import java.sql.ResultSet;
 import java.sql.SQLException;
 
-import org.tizen.dynamicanalyzer.swap.model.ByteUtils;
+import org.tizen.dynamicanalyzer.util.ByteUtil;
 
 public class SyncData extends ProbeCommonData {
        long syncValue = 0;
@@ -44,13 +44,13 @@ public class SyncData extends ProbeCommonData {
        public void makeData(byte[] data) {
                super.makeData(data);
 
-               syncValue = ByteUtils.toLong(data, index);
+               syncValue = ByteUtil.toLong(data, index);
                index += LONG_SIZE;
 
-               syncType = ByteUtils.toInt(data, index);
+               syncType = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
-               apiType = ByteUtils.toInt(data, index);
+               apiType = ByteUtil.toInt(data, index);
        }
 
        public long getSyncValue() {
index aefac16..62ab207 100644 (file)
@@ -35,7 +35,7 @@ import java.sql.SQLException;
 
 import org.tizen.dynamicanalyzer.common.GlobalInformation;
 import org.tizen.dynamicanalyzer.constant.CommonConstants;
-import org.tizen.dynamicanalyzer.swap.model.ByteUtils;
+import org.tizen.dynamicanalyzer.util.ByteUtil;
 
 public class SystemData extends LogData {
 
@@ -90,7 +90,7 @@ public class SystemData extends LogData {
                                .getCpuCount();
                int deviceCount = GlobalInformation.getCurrentDeviceInfo().getTargetInfo()
                                .getDeviceCount();
-               appCpuUsage = ByteUtils.toFloat(data, index);
+               appCpuUsage = ByteUtil.toFloat(data, index);
                index += FLOAT_SIZE;
 
                cpuFrequency = parseCpu(index, data);
@@ -99,100 +99,100 @@ public class SystemData extends LogData {
                cpuLoad = parseCpu(index, data);
                index += (FLOAT_SIZE * coreCount);
 
-               threadCount = ByteUtils.toInt(data, index);
+               threadCount = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
                threadLoad = parseLoad(index, data);
                index += (threadCount * (INT_SIZE + FLOAT_SIZE));
 
-               processCount = ByteUtils.toInt(data, index);
+               processCount = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
                processLoad = parseLoad(index, data);
                index += (processCount * (INT_SIZE + FLOAT_SIZE));
 
-               virtualMemory = ByteUtils.toInt(data, index);
+               virtualMemory = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
-               residentMemory = ByteUtils.toInt(data, index);
+               residentMemory = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
-               sharedMemory = ByteUtils.toInt(data, index);
+               sharedMemory = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
-               pssMemory = ByteUtils.toInt(data, index);
+               pssMemory = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
-               totalAllocSize = ByteUtils.toLong(data, index);
+               totalAllocSize = ByteUtil.toLong(data, index);
                index += LONG_SIZE;
 
-               systemMemoryTotal = ByteUtils.toLong(data, index);
+               systemMemoryTotal = ByteUtil.toLong(data, index);
                index += LONG_SIZE;
 
-               systemMemoryUsed = ByteUtils.toLong(data, index);
+               systemMemoryUsed = ByteUtil.toLong(data, index);
                index += LONG_SIZE;
 
-               totalUsedDrive = ByteUtils.toInt(data, index);
+               totalUsedDrive = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
-               diskReadSize = ByteUtils.toInt(data, index);
+               diskReadSize = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
-               diskReadSectorCount = ByteUtils.toInt(data, index);
+               diskReadSectorCount = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
-               diskWriteSize = ByteUtils.toInt(data, index);
+               diskWriteSize = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
-               diskWrittenSectorCount = ByteUtils.toInt(data, index);
+               diskWrittenSectorCount = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
-               networkSendSize = ByteUtils.toInt(data, index);
+               networkSendSize = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
-               networkReceiveSize = ByteUtils.toInt(data, index);
+               networkReceiveSize = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
-               wifi = ByteUtils.toInt(data, index);
+               wifi = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
-               btStatus = ByteUtils.toInt(data, index);
+               btStatus = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
-               gpsStatus = ByteUtils.toInt(data, index);
+               gpsStatus = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
-               brightness = ByteUtils.toInt(data, index);
+               brightness = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
-               camera = ByteUtils.toInt(data, index);
+               camera = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
-               sound = ByteUtils.toInt(data, index);
+               sound = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
-               audio = ByteUtils.toInt(data, index);
+               audio = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
-               vibration = ByteUtils.toInt(data, index);
+               vibration = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
-               voltage = ByteUtils.toInt(data, index);
+               voltage = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
-               rssi = ByteUtils.toInt(data, index);
+               rssi = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
-               video = ByteUtils.toInt(data, index);
+               video = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
-               call = ByteUtils.toInt(data, index);
+               call = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
-               dnet = ByteUtils.toInt(data, index);
+               dnet = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
-               energyUsage = ByteUtils.toInt(data, index);
+               energyUsage = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
                deviceEnergyUsage = parseUsage(index, data);
@@ -206,14 +206,14 @@ public class SystemData extends LogData {
        private static String parseLoad(int start, byte[] payload) {
                int pos = start;
                int backPos = start - INT_SIZE;
-               int count = ByteUtils.toInt(payload, backPos);
+               int count = ByteUtil.toInt(payload, backPos);
                StringBuffer outBuf = new StringBuffer();
                for (int ii = 0; ii < count; ii++) {
                        try {
-                               int tid = ByteUtils.toInt(payload, pos);
+                               int tid = ByteUtil.toInt(payload, pos);
                                pos += INT_SIZE;
                                outBuf.append(tid).append(CommonConstants.COMMA);
-                               float f = ByteUtils.toFloat(payload, pos);
+                               float f = ByteUtil.toFloat(payload, pos);
                                outBuf.append(f);
                                pos += FLOAT_SIZE;
                                if (ii + 1 != count) {
@@ -233,7 +233,7 @@ public class SystemData extends LogData {
                                .getCpuCount();
                StringBuffer buffer = new StringBuffer();
                for (int i = 0; i < coreCount; i++) {
-                       float value = ByteUtils.toFloat(payload, start);
+                       float value = ByteUtil.toFloat(payload, start);
                        start += FLOAT_SIZE;
                        buffer.append(value);
                        if (i + 1 != coreCount) {
@@ -248,7 +248,7 @@ public class SystemData extends LogData {
                                .getDeviceCount();
                StringBuffer buffer = new StringBuffer();
                for (int i = 0; i < count; i++) {
-                       int value = ByteUtils.toInt(payload, start);
+                       int value = ByteUtil.toInt(payload, start);
                        start += INT_SIZE;
                        buffer.append(value);
                        if (i + 1 != count) {
index 7530e4b..9b4289e 100644 (file)
@@ -32,7 +32,7 @@ import java.sql.PreparedStatement;
 import java.sql.ResultSet;
 import java.sql.SQLException;
 
-import org.tizen.dynamicanalyzer.swap.model.ByteUtils;
+import org.tizen.dynamicanalyzer.util.ByteUtil;
 
 public class ThreadData extends ProbeCommonData {
        long pThreadId = 0;
@@ -45,16 +45,16 @@ public class ThreadData extends ProbeCommonData {
        public void makeData(byte[] data) {
                super.makeData(data);
 
-               pThreadId = ByteUtils.toLong(data, index);
+               pThreadId = ByteUtil.toLong(data, index);
                index += LONG_SIZE;
 
-               ospThreadId = ByteUtils.toLong(data, index);
+               ospThreadId = ByteUtil.toLong(data, index);
                index += LONG_SIZE;
 
-               threadType = ByteUtils.toInt(data, index);
+               threadType = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
-               apiType = ByteUtils.toInt(data, index);
+               apiType = ByteUtil.toInt(data, index);
        }
 
        public long getPThreadId() {
index 01342f5..7d53a89 100644 (file)
@@ -31,7 +31,7 @@ import java.sql.PreparedStatement;
 import java.sql.ResultSet;
 import java.sql.SQLException;
 
-import org.tizen.dynamicanalyzer.swap.model.ByteUtils;
+import org.tizen.dynamicanalyzer.util.ByteUtil;
 
 public class UIEventData extends ProbeCommonData {
 
@@ -47,22 +47,22 @@ public class UIEventData extends ProbeCommonData {
        public void makeData(byte[] data) {
                super.makeData(data);
 
-               eventType = ByteUtils.toInt(data, index);
+               eventType = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
-               detailType = ByteUtils.toInt(data, index);
+               detailType = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
-               x = ByteUtils.toInt(data, index);
+               x = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
-               y = ByteUtils.toInt(data, index);
+               y = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
-               info1 = ByteUtils.getString(data, index);
-               index += ByteUtils.getStringLength(data, index);
+               info1 = ByteUtil.getString(data, index);
+               index += ByteUtil.getStringLength(data, index);
 
-               info2 = ByteUtils.toInt(data, index);
+               info2 = ByteUtil.toInt(data, index);
        }
 
        public int getEventType() {
index 91f0112..4fff976 100644 (file)
@@ -32,7 +32,7 @@ import java.sql.PreparedStatement;
 import java.sql.ResultSet;
 import java.sql.SQLException;
 
-import org.tizen.dynamicanalyzer.swap.model.ByteUtils;
+import org.tizen.dynamicanalyzer.util.ByteUtil;
 
 public class UserFunctionData extends ProbeCommonData {
 
@@ -48,19 +48,19 @@ public class UserFunctionData extends ProbeCommonData {
 
        public void makeData(byte[] data) {
                super.makeData(data);
-               lowPc = ByteUtils.toLong(data, index);
+               lowPc = ByteUtil.toLong(data, index);
                index += LONG_SIZE;
 
-               highPc = ByteUtils.toLong(data, index);
+               highPc = ByteUtil.toLong(data, index);
                index += LONG_SIZE;
 
-               type = ByteUtils.toInt(data, index);
+               type = ByteUtil.toInt(data, index);
                index += INT_SIZE;
 
-               elapsedTime = ByteUtils.toLong(data, index);
+               elapsedTime = ByteUtil.toLong(data, index);
                index += LONG_SIZE;
 
-               pcAddr = ByteUtils.toLong(data, index);
+               pcAddr = ByteUtil.toLong(data, index);
        }
 
        public long getLowPc() {