001/**
002 *
003 * Copyright (c) 2014, the Railo Company Ltd. All rights reserved.
004 *
005 * This library is free software; you can redistribute it and/or
006 * modify it under the terms of the GNU Lesser General Public
007 * License as published by the Free Software Foundation; either 
008 * version 2.1 of the License, or (at your option) any later version.
009 * 
010 * This library is distributed in the hope that it will be useful,
011 * but WITHOUT ANY WARRANTY; without even the implied warranty of
012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
013 * Lesser General Public License for more details.
014 * 
015 * You should have received a copy of the GNU Lesser General Public 
016 * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
017 * 
018 **/
019package lucee.commons.io.res.type.http;
020
021import java.io.IOException;
022import java.nio.charset.Charset;
023
024import lucee.aprint;
025import lucee.commons.io.IOUtil;
026
027public class Test {
028        public static void main(String[] args) throws IOException {
029                HTTPResourceProvider p=(HTTPResourceProvider) new HTTPResourceProvider().init("https", null);
030                HTTPResource res = (HTTPResource) p.getResource("https://www.google.com/reader/public/atom/user%2F11740182374692118732%2Flabel%2Fweb-rat.com");
031                aprint.out("1");
032                aprint.out(res.length());
033                aprint.out("2");
034                aprint.out(res.exists());
035                aprint.out("3");
036                aprint.out(res.isFile());
037                aprint.out("4");
038                aprint.out(IOUtil.toString(res,(Charset)null).length());
039                
040        }
041}