Package com.vtence.molecule.lib

Examples of com.vtence.molecule.lib.TextBody


        final Sequence sequence = new Sequence();

        server.start((new DynamicRoutes() {{
            get("/albums").to(new Application() {
                public void handle(Request request, Response response) throws Exception {
                    TextBody body = new TextBody();
                    for (int id : albums.keySet()) {
                        Album album = albums.get(id);
                        body.append(String.format("%d: %s\n", id, album.info()));
                    }
                    if (body.text().isEmpty()) {
                        body.append("Your music library is empty");
                    }
                    response.body(body);
                }
            });
View Full Code Here

TOP

Related Classes of com.vtence.molecule.lib.TextBody

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.