try this method.
it accept a relative path to the resource, no matter if its in a cab or not.
something like
getResouece("/package/1.txt");
and return you a DataInputStream.
you can the use the data input stream readLine method to get what you need.
public DataInputStream getResource(String full_resource_name) throws java.io.IOException
{
InputStream is = getClass().getResourceAsStream(full_resource_name);
if(is == null)
throw new IOException("Unable to resolve resource name " + full_resource_name + " (file not found)");
BufferedInputStream bis = new BufferedInputStream(is);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
byte[] buff = new byte[4096];