Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

import java.io.BufferedReader;

import java.io.FileNotFoundException;

import java.io.IOException;

import java.io.InputStreamReader;

import android.content.res.AssetManager;

public class Main {
    public static String readSkeleton(AssetManager am, String filename) throws FileNotFoundException, IOException {
        BufferedReader skeletonFile = new BufferedReader(new InputStreamReader(am.open(filename)));
        StringBuilder builder = new StringBuilder();
        String line;

        while ((line = skeletonFile.readLine()) != null) {
            builder.append(line);
            builder.append('\n');
        }
        skeletonFile.close();
        return builder.toString();
    }
}