/**
 * 
 */
package com.github.podd.sensors.test;

import static org.junit.Assert.*;

import java.io.ByteArrayOutputStream;
import java.io.IOException;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.restlet.representation.Representation;
import org.restlet.resource.ClientResource;

/**
 * @author ans025
 *
 */
public class SensorGetTest
{
    
    /**
     * @throws java.lang.Exception
     */
    @Before
    public void setUp() throws Exception
    {
    }
    
    /**
     * @throws java.lang.Exception
     */
    @After
    public void tearDown() throws Exception
    {
    }
    
    @Test
    public void testGet() throws Exception
    {
        final ClientResource clientResource = new ClientResource("http://152.83.198.37/TCLOG_01.CSV");
        
        final Representation representation = clientResource.get();
        
        System.out.println(representation.getMediaType().toString());
        System.out.println(clientResource.getStatus().getCode());
        
        representation.write(System.out);
    }
    
}

@@ -144,16 +144,109 @@
 ception;
+%0Aimport java.io.StringWriter;%0Aimport java.util.regex.Matcher;%0Aimport java.util.regex.Pattern;
 %0A%0Aimport
@@ -863,20 +863,8 @@
 .37/
-TCLOG_01.CSV
 %22);%0A
@@ -1097,50 +1097,820 @@
     
-%0A        representation.write(System.out);
+StringWriter writer = new StringWriter();%0A        %0A        representation.write(writer);%0A        %0A        String index = writer.toString();%0A        %0A        System.out.println(index);%0A        %0A        Matcher fileMatcher = Pattern.compile(%22href=%5C%22(.+)%5C%22%22).matcher(index);%0A        while(fileMatcher.find())%0A        %7B%0A            System.out.println(fileMatcher.group(1));%0A        %7D%0A%0A        Matcher dateMatcher = Pattern.compile(%22%3C/a%3E (.+) (.+) %22).matcher(index);%0A        while(dateMatcher.find())%0A        %7B%0A            System.out.println(dateMatcher.group(1));%0A            System.out.println(dateMatcher.group(2));%0A        %7D%0A%0A        Matcher sizeMatcher = Pattern.compile(%22(.+) (.+)%3C/li%3E%22).matcher(index);%0A        while(sizeMatcher.find())%0A        %7B%0A            System.out.println(sizeMatcher.group(2));%0A        %7D
 %0A   

Add HTML parsing code