I hope someone could help me please, I need to pass a String from the method below to the method below that. I have looked on the interent and got it working on test programs but can't seem to get it working on mine, it's been 3 hours, 3 pages of google and a book lol. Sorry if this is easy but I really have no idea.
What I need to do... I need to pass the variable "Hex" from the method "WMDBAudio" to the method "hexConverter". I hope this makes sense, thanks for your help in advance it's is apperciated!
public class WMDBAudio{
public String WMDBAudio1(String fileInfo) throws IOException{
//code removed as there is quite a lot
int m = 0;
while (m != 1){
for (int count = 0; count < 3; count++){
hexIn = in.read();
s = Integer.toHexString(hexIn);
if(s.length() < 2){
s = "0" + Integer.toHexString(hexIn);
}
temp = temp + s;
}
if ("000000".equalsIgnoreCase(temp)){
m = 1;
hex = entry;
}
entry = entry + temp;
temp = "";
}
}
}
//Hex Converter method
public class hexConverter{
public static void hexConverter(String t){
WMDBAudio w = new WMDBAudio();
String hex = "";
StringBuilder output = new StringBuilder();
for (int i = 0; i < hex.length(); i+=2){
String str = hex.substring(i, i+2);
output.append((char)Integer.parseInt(str, 16));
}
System.out.println(output);
}
}