Java String Remove removeUnusedData(String songData)

Here you can find the source of removeUnusedData(String songData)

Description

remove Unused Data

License

Apache License

Declaration

public static String removeUnusedData(String songData) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.ArrayList;

import java.util.List;

public class Main {
    public static String GARBAGE = "---";
    public static List<Boolean> bitMap = new ArrayList<Boolean>();

    public static String removeUnusedData(String songData) {
        StringBuilder builder = new StringBuilder();
        String split[] = songData.split("\t");
        for (int i = 0; i < 54; ++i) {
            if (!bitMap.get(i)) {
                split[i] = GARBAGE;//from w  w w.j a v  a2  s.c o  m
            }
            builder.append(split[i]);
            builder.append("\t");
        }
        return builder.toString();
    }
}

Related

  1. removeRecursive(Object json, String keyToRemove)
  2. removeSomeOne(String words, int count)
  3. removeSpaces(String orig)
  4. removeSpecialChars(final String word)
  5. removeSpecialCharsForSQLRegExp(String _s)
  6. removeWaitStatus(String nodeInfo)
  7. removeWhitespace(String inputString)
  8. splitLine(String s, boolean removeNewLine)
  9. trimIndent(String line, int indentsToRemove, int tabWidth, int indentWidth)