Skip to content

Commit 46c957b

Browse files
committed
v2 support
1 parent c67c55d commit 46c957b

File tree

2 files changed

+226
-105
lines changed

2 files changed

+226
-105
lines changed

src/main/java/org/microbit/android/partialflashing/HexUtils.java

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,13 @@
33
import android.util.Log;
44

55
import java.io.BufferedReader;
6-
import java.io.EOFException;
76
import java.io.FileInputStream;
87
import java.io.FileNotFoundException;
98
import java.io.IOException;
109
import java.io.InputStreamReader;
11-
import java.io.InterruptedIOException;
12-
13-
import java.util.*;
14-
import java.util.List;
1510
import java.util.ArrayList;
16-
import java.util.Iterator;
11+
import java.util.List;
12+
import java.util.ListIterator;
1713

1814

1915
/**
@@ -130,6 +126,15 @@ public int getRecordAddressFromIndex(int index) throws IOException {
130126
return getRecordAddress(hexLines.get(index));
131127
}
132128

129+
/*
130+
Used to get the data length from a record
131+
@param Record as a String
132+
@return Data length as a decimal / # of chars
133+
*/
134+
public int getRecordDataLengthFromIndex(int index){
135+
return getRecordDataLength(hexLines.get(index));
136+
}
137+
133138
/*
134139
* Returns segment address from an index
135140
* @param index

0 commit comments

Comments
 (0)